Scripting Resources & Utilities > Stealth Client

Can't get simple Python UOSay hello to run in game.

(1/1)

daymorn:
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: ---UOSay("Hello world")
--- End code ---

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.

unisharp:
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: ---from py_stealth import *
--- End code ---

without any of this you won't hook into stealth with python

daymorn:
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: ---from py_stealth import *
UOSay('Hello world');
Bow();

--- End code ---

Thanks again.

Navigation

[0] Message Index

Go to full version