Author Topic: Can't get simple Python UOSay hello to run in game.  (Read 4026 times)

0 Members and 1 Guest are viewing this topic.

Offline daymornTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Activity:
    0%
  • Reputation Power: 1
  • daymorn has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Can't get simple Python UOSay hello to run in game.
« on: August 29, 2020, 04:19:39 AM »
0
Hi all,

Windows 10
Stealth_v8.10.2 (program says 8.10.6)

I can't get any snippets of python code to run through Stealth. Not even one liner hello worlds.
Code: [Select]
UOSay("Hello world")
I am creating files, such as test.py, with the above content. I've tried other Python snippets, such as UseSkill('Anatomy')

I am able to execute scripts with python directly.
C:\Python32\python.exe C:\Users\####\Desktop\Stealth_v8.10.2\Scripts\test.py

In Stealth settings I have Python 3.2 selected.

I figured out a Pascal hello world script and can get that to run without issue, causing my character to speak in game.

I'm sure it's a stupid issue, but can someone please help? If I can get a simple script to run I should be able to play with it from there.

Offline unisharp

  • Moderator
  • ***
  • *****
  • Posts: 196
  • Activity:
    0%
  • Reputation Power: 4
  • unisharp has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: Can't get simple Python UOSay hello to run in game.
« Reply #1 on: August 31, 2020, 08:28:39 AM »
0
in the directory where you installed stealth, there is a sub-directory called "py_stealth" that you need to copy into each of your projects' folders, or, make sure hide.py is located in your stealth program directory including py_stealth

at the top of your hide.py file you should have:
Code: [Select]
from py_stealth import *
without any of this you won't hook into stealth with python

Offline daymornTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Activity:
    0%
  • Reputation Power: 1
  • daymorn has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: Can't get simple Python UOSay hello to run in game.
« Reply #2 on: September 08, 2020, 10:24:23 AM »
0
I was able to get it to work, but I had one other issue. I had originally found python details somewhere inside https://stealth.od.ua/Doc:Manual/Scripting/Python and it had recommended using python 3.2. Those /Doc: links are no longer active. After you pointed me to importing the py_stealth dir I saw mention of py34 inside of it. After installing 3.4 on Windows 10 I was able to get my simple script below to work.

Code: [Select]
from py_stealth import *
UOSay('Hello world');
Bow();

Thanks again.

Tags: