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 - ZeroDX

Pages: 1 [2] 3
16
Stealth Client / Discord
« on: December 03, 2018, 08:53:44 PM »

17
Stealth Client / Re: Hi all newbie on non-OSI custom RunUO shard.
« on: November 14, 2018, 07:54:49 PM »
Stealth supports pythons 2.6-3+, supports custom skills, can detect gumps. There is a wiki at the stealth webpage.

18
Stealth Client / Re: [Python] Working with events
« on: September 24, 2018, 03:59:25 AM »
What is the purpose of the Wait(100)? I noticed it does not work if there isn't a wait.
It needs for saving some cpu time.
When I add the event in my mining script, the script will only loop through 1-2 tiles before it just stands still doing nothing. If I disable the handler, it works flawlessly. I'm wondering if the two issues are related.
Can you post the script?

19
Stealth Client / Re: [Python] Working with events
« on: September 21, 2018, 02:22:20 PM »
Code: [Select]
def object_handler(serial):
    AddToSystemJournal('Character found!', serial=serial, graphic=GetType(serial), sep=' ', end='.')

def speech_handler(*args):
    AddToSystemJournal(*args)


def main():
    SetEventProc('evDrawObject', object_handler)
    SetEventProc('evSpeech', speech_handler)
    Connect()
    while 1:
        Wait(100)


if __name__ == "__main__":
    main()
Code: [Select]
01:20:15:950 [Demise 1]: Character found! serial=479289 graphic=400.
01:20:15:952 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:15:953 [Demise 1]: Character found! serial=127053 graphic=401.
01:20:15:953 [Demise 1]: Character found! serial=9767 graphic=400.
01:20:15:954 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:15:956 [Demise 1]: Character found! serial=127053 graphic=401.
01:20:15:957 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:17:695 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:17:697 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:17:698 [Demise 1]: Character found! serial=479289 graphic=400.
01:20:17:700 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:17:702 [Demise 1]: Character found! serial=9767 graphic=400.
01:20:17:703 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:17:704 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:17:706 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:17:707 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:17:708 [Demise 1]: Character found! serial=9767 graphic=400.
01:20:19:667 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:19:690 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:19:692 [Demise 1]: Character found! serial=479289 graphic=400.
01:20:19:694 [Demise 1]: Character found! serial=127053 graphic=401.
01:20:19:695 [Demise 1]: Character found! serial=9767 graphic=400.
01:20:19:697 [Demise 1]: Character found! serial=9767 graphic=400.
01:20:19:860 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:21:685 [Demise 1]: Character found! serial=479289 graphic=400.
01:20:21:686 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:21:687 [Demise 1]: Character found! serial=127053 graphic=401.
01:20:21:689 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:21:690 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:21:691 [Demise 1]: Character found! serial=127053 graphic=401.
01:20:23:717 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:23:719 [Demise 1]: Character found! serial=127053 graphic=401.
01:20:23:720 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:23:721 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:25:714 [Demise 1]: Character found! serial=479289 graphic=400.
01:20:25:716 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:25:717 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:25:719 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:25:720 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:27:743 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:27:744 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:27:756 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:27:758 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:29:812 [Demise 1]: Character found! serial=479295 graphic=401.
01:20:29:813 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:29:815 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:29:816 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:29:978 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:29:980 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:30:366 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:31:811 [Demise 1]: Character found! serial=479295 graphic=401.
01:20:31:813 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:31:814 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:31:816 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:32:299 [Demise 1]: Character found! serial=479291 graphic=400.
01:20:32:301 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:32:695 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:32:857 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:33:062 [Demise 1]: Character found! serial=1616794 graphic=400.
01:20:33:842 [Demise 1]: Character found! serial=479295 graphic=401.
01:20:33:844 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:35:844 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:35:846 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:37:909 [Demise 1]: Character found! serial=479295 graphic=401.
01:20:37:911 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:37:912 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:37:914 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:39:918 [Demise 1]: Character found! serial=479295 graphic=401.
01:20:39:920 [Demise 1]: Character found! serial=479292 graphic=400.
01:20:39:921 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:39:923 [Demise 1]: Character found! serial=51438 graphic=401.
01:20:41:975 [Demise 1]: Character found! serial=479289 graphic=400.
01:20:41:976 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:41:989 [Demise 1]: Character found! serial=479289 graphic=400.
01:20:44:042 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:44:044 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:46:106 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:48:109 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:48:111 [Demise 1]: Character found! serial=52354 graphic=401.
01:20:50:162 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:50:164 [Demise 1]: Character found! serial=127054 graphic=400.
01:20:52:165 [Demise 1]: Character found! serial=50405 graphic=401.
01:20:52:166 [Demise 1]: Character found! serial=50405 graphic=401.

20
Stealth Client / Re: [Python] Working with events
« on: September 20, 2018, 03:40:09 AM »
it does not break, when the handler returns control, the script continues from the same line as the handler was called

21
Stealth Client / Re: [Python] Working with events
« on: September 20, 2018, 12:26:51 AM »
for each script thread, an event hander will works in the same thread. Each stealth-function checks new events and runs handlers if required, when a handler will returns a control, the function will resumes. While handler is running, another events may comes, so if your handler is more than 2-3 lines, you need to unset it.

In this code handlers will never be called
Code: [Select]
import time

def f(*args):
    pass

SetEventProc('evtimer1', f)
while 1:
    time.sleep(1)  # this is a non-stealth function

22
Stealth Client / Re: [Python] Working with events
« on: September 19, 2018, 07:47:14 PM »
an example of functional programming

Code: [Select]
import datetime

HUMANS = 0x0190, 0x0191  # humans graphic
PICKAXE = 0x0E86  # a pickaxe graphic

foundSomeone = False


def evDrawObjectHandler(serial):
    global foundSomeone  # now this function can change this variable, not only read
    AddToSystemJournal('Character found!', serial=serial, graphic=GetType(serial), sep=' ', end='.')
    if serial != Self() and GetType(serial) in HUMANS:
        foundSomeone = True
        SetEventProc('evDrawObject', None)  # disable the handler
        FindType(0x0F06, Backpack()) #invis pot
        UseObject(FindItem())
        Wait(100)
        ClientPrint('Player near!')
        recallHome()


def MineTile(t, x, y, z):
    msgEnd = 'nothing to mine|mining in rock|reach the target|far away'
    msgTry = 'put|fail'
    while 1:
        WaitTargetTile(t, x, y, z)
        UseType2(PICKAXE)
        start = datetime.datetime.now()
        WaitJournalLine(start, '|'.join(msgEnd, msgTry), 5000)
        if InJournalBetweenTimes(msgEnd, start, datetime.datetime.now()) >= 0:
            return


def main():
    while 1:
        SetEventProc('evDrawObject', evDrawObjectHandler)
        recallToMine()
        mx, my = GetX(Self()), GetY(Self())
        tiles = GetStaticTilesArray(mx-2, my-2, mx+2, my+2, WorldNum(), range(1339, 1359))  # find all mining spots near the character
        for tile in tiles:
            MineTile(*tile)
            if foundSomeone:
                return  # exit
        recallHome()
       

if __name__ == '__name__':
    main()

23
Stealth Client / Re: [Python] Working with events
« on: September 19, 2018, 03:14:13 PM »
You need to use quotes, cause an event name is a string
There is no evdrawgameplayer in events. There was, but was deprecated.
Code: [Select]
EVENTS_NAMES = (
    'eviteminfo', 'evitemdeleted', 'evspeech', 'evdrawgameplayer',
    'evmoverejection', 'evdrawcontainer', 'evadditemtocontainer',
    'evaddmultipleitemsincont', 'evrejectmoveitem', 'evupdatechar',
    'evdrawobject', 'evmenu', 'evmapmessage', 'evallowrefuseattack',
    'evclilocspeech', 'evclilocspeechaffix', 'evunicodespeech',
    'evbuffdebuffsystem', 'evclientsendresync', 'evcharanimation',
    'evicqdisconnect', 'evicqconnect', 'evicqincomingtext', 'evicqerror',
    'evincominggump', 'evtimer1', 'evtimer2', 'evwindowsmessage', 'evsound',
    'evdeath', 'evquestarrow', 'evpartyinvite', 'evmappin', 'evgumptextentry',
    'evgraphicaleffect', 'evircincomingtext', 'evmessengerevent',
    'evsetglobalvar', 'evupdateobjstats'
)

Code: [Select]
# evDrawGamePlayer: deprecated, used no longer (use evDrawObject).
# evDrawObject : [ID : Cardinal] mobiles only

HUMANS = 0x0190, 0x0191

def emergency(serial):
    if serial == Self() and GetType(serial) in HUMANS:
        return
    SetEventProc('evDrawGamePlayer', None)  # turn off the handler
    recall_home()

SetEventProc('evDrawObject', emergency)  # set the handler before leaving a safe zone

Edit: change or to and.

24
Stealth Client / Re: [Python] How to access the current time
« on: September 18, 2018, 09:07:08 PM »
Code: [Select]
import datetime

now = datetime.datetime.now()
findMsg = WaitJournalLine(now, endMsg + "|" + stopMsg, 25000)

Code: [Select]
from datetime import datetime as dt

findMsg = WaitJournalLine(dt.now(), endMsg + "|" + stopMsg, 25000)

25
Stealth Client / Re: [C#] send texts
« on: September 09, 2018, 05:46:17 PM »
Is it possible call this script from inside a python script I use? If not, does anyone have one that will work for python?
It is possible to send and recieve email-messages via python. those libraries will help: smtplib, poplib, imaplib

26
Stealth Client / Re: WHat has changed
« on: August 07, 2018, 10:07:06 PM »
client version, stealth version, what server?

27
Stealth Client / [Release] 8.8.0 - OSI fix
« on: July 14, 2018, 10:11:11 PM »
Many thanks to Vizitor, the stealth developer. Original post with a changelog
Bon Appetit!  :P

Download page

28
Stealth Client / Re: OSI Stealth
« on: July 13, 2018, 07:50:32 PM »
Are you a Developer on Stealth? Just curious on your affiliation to it.
Vizitor told this here

29
Stealth Client / Re: OSI Stealth
« on: July 13, 2018, 11:26:08 AM »
The next patch will fix osi. Just wait a few days

30
Stealth Client / Re: Trojan in last stealth
« on: April 26, 2018, 12:02:21 PM »
it is an official release. this was happened before.

Pages: 1 [2] 3