Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - blackbeard

Pages: [1]
1
I'm very newbie in C#, and had some problem trying to solve something using python. So i want to learn C#. I downloaded ScriptSDK from Crome, add as refference on visual studio soluction, but when i run a simple script, simply nothing happens. How to solve this?

Code: [Select]
using System;
using ScriptSDK;
using StealthAPI;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            Stealth.Client.AddToSystemJournal("Hello World");
        }
    }
}

2
Stealth Client / Re: Run Python Scripts on Linux
« on: December 08, 2019, 02:02:10 AM »
I could make it running, and it runs better than windows. The only problem that i think, but it is not a big problem, is that i could only run python 2.6. But i could run my scripts in python. Maybe i'll make a tutorial how to make python scripts run in stealth client + linux.

Thanks.

3
Stealth Client / Run Python Scripts on Linux
« on: December 05, 2019, 03:05:42 AM »
I could make almost everything runs on linux. Stealth, and a graphical client. But i can't get to run any python script on linux, even after installled python 3.7 64bits for windows.

Is there a way to run python scripts on Linux, on Stealth Client?

4
Stealth Client / How to get Target Next in stealth?
« on: February 11, 2018, 03:58:20 PM »
I didnt find any command ou way to get nexttarget or how to target an enemy. Can someone help me if there is a way of doing it?

5
Stealth Client / Re: How to debug Python Scripts
« on: February 10, 2018, 02:27:37 AM »
: I`m following this tutorial but getting an error when run this

Code: [Select]
import sys
REMOTE_DBG = True

if REMOTE_DBG:
    sys.path.append('D:\\Jogos\\Ultima Online\\Stealth\\Stealth_v8.7.2\\Scripts\\pydebug')
    sys.path.append('D:\\Jogos\\Ultima Online\\Stealth\\Stealth_v8.7.2\\Scripts\\pydebug\\pysrc') #this is only needed if you run Python >= 3.2.x
    print str(sys.path)
    import pysrc.pydevd as pydevd
    pydevd.settrace('localhost', stdoutToServer=True, stderrToServer=True)

AttributeError: 'module' object has no attribute 'declare_namespace'

Code: [Select]
09:26:14:450 [tfg noob]: ['D:\\Jogos\\Ultima Online\\Stealth\\Stealth_v8.7.2\\py_stealth', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin', 'D:\\Jogos\\Ultima Online\\Stealth\\Stealth_v8.7.2', 'D:\\Jogos\\Ultima Online\\Stealth\\Stealth_v8.7.2\\Scripts\\workspace\\UO-001\\src\\core', 'D:\\Jogos\\Ultima Online\\Stealth\\Stealth_v8.7.2\\Scripts\\pydebug', 'D:\\Jogos\\Ultima Online\\Stealth\\Stealth_v8.7.2\\Scripts\\pydebug\\pysrc']
09:26:14:450 [tfg noob]:
09:26:14:749 [tfg noob]: Traceback (most recent call last):
09:26:14:749 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth\Stealth_v8.7.2\Scripts\workspace\UO-001\src\core\auto2.py", line 8, in <module>
09:26:14:749 [tfg noob]:     import pysrc.pydevd as pydevd
09:26:14:749 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth\Stealth_v8.7.2\Scripts\pydebug\pysrc\pydevd.py", line 28, in <module>
09:26:14:749 [tfg noob]:     from _pydevd_bundle import pydevd_vars
09:26:14:749 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth\Stealth_v8.7.2\Scripts\pydebug\pysrc\_pydevd_bundle\pydevd_vars.py", line 8, in <module>
09:26:14:749 [tfg noob]:     from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate, get_type, var_to_xml
09:26:14:749 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth\Stealth_v8.7.2\Scripts\pydebug\pysrc\_pydevd_bundle\pydevd_xml.py", line 3, in <module>
09:26:14:749 [tfg noob]:     from _pydevd_bundle import pydevd_extension_utils
09:26:14:750 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth\Stealth_v8.7.2\Scripts\pydebug\pysrc\_pydevd_bundle\pydevd_extension_utils.py", line 4, in <module>
09:26:14:750 [tfg noob]:     import pydevd_plugins.extensions
09:26:14:750 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth\Stealth_v8.7.2\Scripts\pydebug\pysrc\pydevd_plugins\extensions\__init__.py", line 2, in <module>
09:26:14:750 [tfg noob]:     __import__('pkg_resources').declare_namespace(__name__)
09:26:14:750 [tfg noob]: AttributeError: 'module' object has no attribute 'declare_namespace'

using pydev 6.2.0
eclipse 4.6
python 2.7.14

6
Hi, there is some time i`ve been away from uo and i did a lot of macros with Pascal that time. Now i`m back and want to learn python with ultima online but i need help.

In Stealth Client settings, Script Engine folder, i included the path from my installation of Python 3.4 (C:\Python34\Lib\site-packages) as image shows.

https://ibb.co/c5Np0c

And i`m having problem importing theses other libraries from python.

When i try to import a library like numpy it gives me this error

Code: [Select]
from stealth import *
import numpy as np


Code: [Select]
18:33:08:320 [tfg noob]: Traceback (most recent call last):
18:33:08:320 [tfg noob]:   File "D:\Jogos\Ultima Online\Stealth_v8.7.2\Scripts\auto.py", line 2, in <module>
18:33:08:320 [tfg noob]:     import numpy as np
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\__init__.py", line 142, in <module>
18:33:08:320 [tfg noob]:     from . import add_newdocs
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\add_newdocs.py", line 13, in <module>
18:33:08:320 [tfg noob]:     from numpy.lib import add_newdoc
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\lib\__init__.py", line 8, in <module>
18:33:08:320 [tfg noob]:     from .type_check import *
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\lib\type_check.py", line 11, in <module>
18:33:08:320 [tfg noob]:     import numpy.core.numeric as _nx
18:33:08:320 [tfg noob]:   File "C:\Python34\lib\site-packages
umpy\core\__init__.py", line 16, in <module>
18:33:08:320 [tfg noob]:     from . import multiarray
18:33:08:320 [tfg noob]: TypeError: source code string cannot contain null bytes


Is there a solution to to use opencv, pillow and others external python libraries? :D

Post Merge: February 10, 2018, 02:29:05 AM
[FIXED] The fix was to install python 2.7.14. Now it is importing and running external lib.

7
Stealth Client / Re: client dll troubles
« on: May 30, 2016, 06:46:50 PM »
i solved.

re-install stealth.

8
Stealth Client / Pascal problem with procedures
« on: September 21, 2015, 11:21:55 AM »
I made a easyuo mining macro and i'm trying to convert the code i made in easyuo to pascal for stealth. But i dont know how to simulate the subs of easyuo in pascal. i'm trying to use procedures, but i'm getting error of unknown identifier on line 94, it is commented.

Code: [Select]
program Mining;

const
pickaxe1 = $0E85;
pickaxe2 = $0E86;
runebook =$22C5;
runebook_color =$0461;
runa_casa = 9;
limiteinativo = 1000;

var
cntalvo, cntinativo, contadorrunas : integer;



procedure save();

begin

end;

procedure guardar();

begin

end;


procedure recall(runa : integer) ;

begin
 
    findtypeex(runebook, runebook_color,backpack,false);
    useobject(finditem);
    waitgump(inttostr(runa));
    wait(300)
    numgumpbutton(getgumpscount()-1,runa+100);
   
   
    wait(9000);
end;
procedure verifica_marreta();
   
   begin
    FindType (pickaxe2 , Backpack);
    UseObject(FindItem);
    UseObject(FindItem);
   end;

procedure verifica_peso();




begin
if weight > maxweight - 2 then
begin
 recall(runa_casa);
 guardar();
end;
end;

procedure detecta();

begin

end;
procedure hiding();

begin

end;

procedure inicio();

begin
  verifica_peso();
  recall(contadorrunas);
 
 
   
end;


procedure mining();

begin
   verifica_peso();
   save();   
   hiding();
   verifica_marreta();
   useobject(finditem);
   alvo(); // getting error: Unknown Identifier
   jornal();
   
end;

procedure jornal();

begin

end;

procedure alvo();

begin
     if targetpresent then
     begin
        if cntalvo = 1 then targettotile(0,getx(self)-1,gety(self),getz(self));
     end;
end;

procedure inativo();

begin
cntinativo := cntinativo + 1;
if cntinativo > limiteinativo then
begin
    cntinativo := 1;
    inicio();
end;

end;

procedure andar();

var
i, x, randomx, randomx2, y, randomy, randomy2 : integer;
tileinfo : tstaticcell;

begin
    randomx := random(10);
    randomx2 := random(10);
    randomy := random(10);
    randomy2 := random(10);
   
    x := getx(self) + randomx - randomx2;
    y := gety(self) + randomy - randomy2; 
   
    tileinfo := ReadStaticsXY(x, y, WorldNum);
   
    if tileinfo.staticcount > 0 then
    begin
        //addtosystemjournal('length'+inttostr(length(tileinfo.statics)));
        for i := Low(TileInfo.Statics)to high(TileInfo.Statics) do
        begin
            if (TileInfo.Statics[i].Tile >= 1339) and  (TileInfo.Statics[i].Tile <= 1359) and  (TileInfo.Statics[i].z = GetZ(self)) then
            begin
                newmovexy(x,y,true,0,false);
            end
            else
            begin
                inativo();
                andar(); 
            end;
        end;
    end
    else
    begin
        inativo();
        andar();
    end;
end;

begin
 contadorrunas := 1;
 cntalvo := 1;
 recall(contadorrunas);
 andar();
 mining();
end.




What is wrong, in procedure mining, i'm getting an error, unknown identifier when try to call andar() procedure.

What i'm doing wrong?

Post Merge: September 21, 2015, 11:49:54 AM
Sry, i found the solution.

9
Stealth Client / Re: Help with tile name
« on: September 21, 2015, 11:07:27 AM »
thx, I know. But he only uses this procedure when he is inside a cave, so there will not be any overflow, he simple doesn't get out of the cave.

actualy i solved this problem.


10
Stealth Client / Help with tile name
« on: September 21, 2015, 01:02:10 AM »
Hi,


How to solve this?


Code: [Select]

program walk;

procedure andar();

var
i, x, randomx, randomx2, y, randomy, randomy2 : integer;
tileinfo : tstaticcell;

begin
    randomx := random(10);
    randomx2 := random(10);
    randomy := random(10);
    randomy2 := random(10);
  
    x := getx(self) + randomx - randomx2;
    y := gety(self) + randomy - randomy2;  
    
    tileinfo := ReadStaticsXY(x, y, WorldNum);
    if tileinfo.staticcount > 0 then
    for i := Low(TileInfo.Statics)to high(TileInfo.Statics) do
    begin
    if (TileInfo.Statics[i].Tile >= 1339) and  (TileInfo.Statics[i].Tile <= 1359) and  (TileInfo.Statics[i].z = GetZ(self)) then
    begin
      newmovexy(x,y,true,0,false);
    end
    else
       begin
        addtosystemjournal('did not find cave floor');
        andar();  
        end
    end;
end;

begin
 andar();
end.

i have this pascal problem, the program aren't making the loop when he is not on a cave, the script stops.. why?

Pages: [1]