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.


Topics - 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 / 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?

3
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?

4
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.

5
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.

6
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]