31
Stealth scripts / Re: [py] EggFarmer
« on: October 07, 2020, 09:18:15 AM »
Nice! Good job and thanks
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.
# entrance 79, 97, 326, 344 - bloodyroom 104, 115, 640, 660
These are 2 different zone examples, the "bloody room" is like 3rd floor. if 79 <= GetX(_monsters[0]) <= 97 and\
326 <= GetY(_monsters[0]) <= 344:
This part tells the bot to only set targets to monsters within this range. If an already set target roams without this range, the bot will continue to follow it and kill it. if 79 <= GetX(_corpse) <= 97 and\
326 <= GetY(_corpse) <= 344:
Unfortunatley if something roams out of the box and dies, it's not looted. I added this because someone was farming in a room near me and the bot would run over to him periodically and try and loot his corpses. This ensures that only corpses looted are those within the zone.def LootCorpse(_corpse):
UseObject(_corpse)
Wait(1500)
_lootList = NewFind([0xFFFF], [0xFFFF], [_corpse], True)
for _loot in _lootList:
_tooltipRec = GetTooltipRec(_loot)
if GetParam(_tooltipRec, 1112857) >= 20 and not\
ClilocIDExists(_tooltipRec, 1152714) and not\
ClilocIDExists(_tooltipRec, 1049643):
AddToSystemJournal(f'Looting Item: {_loot}')
MoveItem(_loot, 1, LootBag, 0, 0, 0)
InsureItem(_loot)
return
if GetHP(Self()) <= 90 and not Confidence:
Cast('Confidence')
def OnClilocSpeech(_param1, _param2, _param3, _message):
global Confidence
if 'exude' in _message:
Confidence = True
elif 'wanes' in _message:
Confidence = False
return
Path = Areas[0]
Rails 0 through 4 represent the 5 different rails.It is preferable to use tuples instead lists if the arrays will not be edited.
There is no need to use global operator if your variables will not be reassigned (OnClilocSpeech function).
There is a wrong using SetFindDistance and SetFindVertical functions. They are functions.
I hope you continue to write python scripts, cause this script is a good one. If you will, there is some styling conventions PEP-8.
from py_stealth import *
You are truly a god among men. Thank you.
My only issue now is that, after connecting, when doing 'Start Client' it brings up the EC login screen and the login details are not auto populated like the CC is. I'm not sure where the login creds for the virtual server are defined at so all i have is the username 'StealthClient'.
for _result in _results:
tofor _result in _results[:10]:
for first 10 results