Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant archive_postsperpage - assumed 'archive_postsperpage' (this will throw an Error in a future version of PHP) in ..../archive/index.php on line 456
[9.44] TheLazyHunter [Archive] - Forums

PDA

View Full Version : [9.44] TheLazyHunter



Xavious
02-29-2012, 01:35 PM
Source has been verified. The executable has been recompiled and reattached by Jo3Bingham.
Remember, only the attached file in this post has been verified.
If the author posts an "update" in a later post, please note that it has not been verified, and you should only download the attachment from this post.

I recently started playing Tibia again and remembered how awfully boring it acutally can be to hunt manually, specially as a low level. Since most bots either cost money or they dont have the functions that I require, I figured that I would make my own bot, or a tool as I would call it.

Now it is pretty much ready for decent use, I have been running it for a couple of days and havn't noticed any issues with it. Everything just flows as it should.

However, notice that this is not a bot you turn on and leave home. This is a tool for the lazy hunter. It will automize some of your work and take care of the boring parts --> spamming spells, healing, drinking mana. All you need to do is to attack creeps, run with them until they die and loot them.

This tool does not write anything to the memory and does not send any packets. The only things used are reading information from the client and sending hotkeys(supporting F1 - F12 for now).

Features
* Customizable hotkeys (ie hit insert instead of F3)
* High and low healing priorites
* Refills mana from a certain amount to a certain amount
* Mana trainer/rune maker with 10% randomness
* Auto strike (ie exori vis if target is alive and in range(customizable)
* Auto strike special (can use a certain spell(hotkey) to certain creeps, if hunting creeps weak to different elements)
* All randomized timers

Screenshots here
http://i39.tinypic.com/2s9pzjs.png

Wesker
03-01-2012, 04:58 AM
if you want the project to be verified i belive you have to post it there, with the link of the sources or the package to compile it

jo3bingham
03-01-2012, 06:50 AM
Nice work, Xavious. I'll PM you now.

@Wesker No -> http://tpforums.org/forum/thread-6077.html
Stickies are there for a reason.

jo3bingham
03-02-2012, 10:28 PM
Source has been verified. The executable has been recompiled and reattached by myself. Remember, only the attached file in the original post has been verified. If the author posts an "update" in a later post, please note that it has not been verified, and you should only download the attachment from the original post.

joely
03-09-2012, 09:02 PM
Please keep on developing his Xavious

If you be able to add a eater option, that would complete the runemaker :)

Xavious
03-09-2012, 09:51 PM
Im glad you like it :)

I will continue working on it, currently working with reading the map and got a working attacker(not complete yet) and looter(not completed yet either). It also has automatic heal friend, source of this function can be found in C# section on this forum, and what it does is finding an exura sio hotkey and extract the players name from that hotkey and reads his health and clicks the hotkey that was found for this specific player when his health percentage is lower than what was submitted. Ill also add this function to support multiple players/hotkeys.

Eating food will also be added as soon as I get the container function to work properly!

joely
03-09-2012, 10:10 PM
Very good news! Rly liked what you did with the Classic bot

I will be following this closely :)

charlesc09
03-10-2012, 05:15 AM
Very Neat Program.. Cant wait for more!

Xavious
03-10-2012, 12:16 PM
Thanks a lot :)

If there are any suggestions please reply, keep in mind that container handling and partly game window handling will be available in the next release!

joely
03-10-2012, 04:38 PM
Yeah, suggestions you say.. ;)

How about a fully working bot with keeping distance, looting from a far, fully customized scripter yada yada yada.. what neobot had to keep the list small :D

Gimmie a shout if you need help with anything

Xavious
03-10-2012, 05:06 PM
Keeping distance sure take some advanced programming, I have some milstones left to rea h before I get even close to that but I will certanily try to get there!

joely
03-10-2012, 08:35 PM
I think Neobot used the code from OTserv, the code that keeps distance from players.. check that out? :)

EDIT:
Check here, https://github.com/opentibia/otserv/blob/master/monster.cpp (maybe on line 1140?) :P

Xavious
03-11-2012, 11:15 AM
Looks interesting, Ill have a look at it! Thanks!

charlesc09
03-11-2012, 01:01 PM
Xavbot dot com fourmz plxxx

joely
03-11-2012, 01:16 PM
yeah, I agreed with charlesc. If your going serious, a dedicated forum is the way to go

Gimmie a shout if you need help setting it up

Xavious
03-11-2012, 01:23 PM
Even if that was the case, theres alot work to do to even get close to a decent enough tool that would have use for a dedicated forum.. But time will tell :)

Currently creating a more sophisticated attacker, when I get this to work propely Ill add looting functions aswell.

charlesc09
03-11-2012, 03:31 PM
Even if that was the case, theres alot work to do to even get close to a decent enough tool that would have use for a dedicated forum.. But time will tell :)

Currently creating a more sophisticated attacker, when I get this to work propely Ill add looting functions aswell.


Cant Wait!!

Xavious
03-11-2012, 10:19 PM
So far whats been added is the heal friend function I mentioned earlier, an anti paralyze function(automatically uses method chosen as High heal priority when regular auto heal is enabled) and a decent working targeting. The targeting works somewhat like Elfbots targeting with fewers functions and ability to save and load targeting settings. Basic looter is also added but need more testing before release. Until I make a decent walker I will probably only upload it as a beta under the unverified board and ask Jo3 to verify when the walker is done.

Then the next goal will be to make scripts and expand hotkeys posibilities. If anyone has suggestions or questions please reply here or send a private message

joely
03-12-2012, 08:03 AM
Apart from the hotkeys you got in Classic bot as always a nice additon would be interacting with depots, tradeing/talking with NPC's

And again, an example of how to keep distance from target (In python, author is wisling@tibiaauto.net | Thread here (http://tibiaauto.net/forum/viewtopic.php?f=20&t=1005503))


import time
def getPathToEx (selfPos, targetPos, minDist, maxDist):
ab = time.clock()
if selfPos['z'] != targetPos['z']:
return False;

currentDist = max(abs(selfPos['x'] - targetPos['x']),abs(selfPos['y'] - targetPos['y']));

if(currentDist == maxDist):
return False;

if (selfPos['x'] - targetPos['x']) <= 0: dxMin = maxDist;
else: dxMin = 0;
if (selfPos['x'] - targetPos['x']) >= 0: dxMax = maxDist;
else: dxMax = 0;
if (selfPos['y'] - targetPos['y']) <= 0: dyMin = maxDist;
else: dyMin = 0;
if (selfPos['y'] - targetPos['y']) >= 0: dyMax = maxDist;
else: dyMax = 0;

tile = 0;

minWalkPos = {};
tmpPos = {};

minWalkDist = 100;
maxTaxi = -1;

tmpDist = -1;
tmpWalkDist = -1;
tmpMaxTaxi = -1;

tryDist = maxDist;

point = [];

while tryDist >= minDist:
for y in range(targetPos['y'] - dyMin, targetPos['y'] + dyMax + 1):
for x in range(targetPos['x'] - dxMin, targetPos['x'] + dxMax + 1):
tmpDist = max(abs(targetPos['x'] - x),abs(targetPos['y'] - y));
if tmpDist == tryDist:
point += [[x,y]];
while len(point) > 0:
p = point.pop(random.randint(0,len(point)-1));
x = p[0];
y = p[1];

tmpWalkDist = abs(selfPos['x'] - x) + abs(selfPos['y'] - y);
tmpPos = {};
tmpPos['x'] = x;
tmpPos['y'] = y;
tmpPos['z'] = selfPos['z'];

tmpMaxTaxi = abs(targetPos['x'] - x) + abs(targetPos['y'] - y)

#print tmpPos,(tmpWalkDist < minWalkDist and tmpMaxTaxi+1 >= maxTaxi ),(tmpMaxTaxi >= tmpWalkDist and tmpMaxTaxi > maxTaxi),minWalkPos.get('x',0)-tmpPos.get('x',0),tmpPos.get('y',0)-minWalkPos.get('y',0);
#print tmpWalkDist,minWalkDist,tmpMaxTaxi,maxTaxi;
if (tmpWalkDist < minWalkDist and tmpMaxTaxi+1 >= maxTaxi ) or (tmpMaxTaxi >= tmpWalkDist and tmpMaxTaxi > maxTaxi) or minWalkDist == 100:
if tmpPos != selfPos:
if tamap.isPointAvailable(x, y, selfPos['z']) and tamap.getPointUpDown(x, y, selfPos['z']) == 0:
minWalkDist = tmpWalkDist;
minWalkPos = tmpPos;
maxTaxi = tmpMaxTaxi;



if minWalkDist != 100:
return minWalkPos;

tryDist -= 1;
return False;

def facing(direction):
return [-abs(direction%4-1)+1,-abs(direction%4-2)+1];

class ModuleKeepDistance:
RUN = True;
walkTo = False;
zCoordinate = tareader.readSelfCharacter()['z'];
tareader.setMemIntValue(0x7E4ED4, tareader.readSelfCharacter()['z']);

def getName(self):
tasender.sendTAMessage("Start KeepDistance to Toggle with \'%ta dist\'");
return "Keep Distance 9.4";

def getVersion(self):
return "1.0";

def getFunDef(self,nr):
if (nr==0): return (0,800,self.findPath);
if (nr==1): return (0,300,self.walkToPoint);
if (nr==2): return (1,0,self.walkToPoint2);
if (nr==3): return (2,0,self.toggle);
if (nr==4): return (0,800,self.bypassZFloor);
return ();

def getConfigParam(self,nr):
if (nr==0): return ('minDistance','Def:2, Distance to stay over.');
if (nr==1): return ('maxDistance','Def:3, Max Distance to try for.');
if (nr==2): return ('hardCreatures','Eg:demon,fury,ghoul,skeleton (List of hard creatures to keep minDist+1 distance from)');
if (nr==3): return ('followCreatures', 'Eg:Fire Devil ("Monsters that you want to follow that are either really easy, or distance fighters)');
return;

def bypassZFloor(self, params):
if tareader.readSelfCharacter()['z']!=self.zCoordinate:
self.zCoordinate = tareader.readSelfCharacter()['z'];
tareader.setMemIntValue(0x800FBC, tareader.readSelfCharacter()['z']) # 9.4
return;

def findPath (self, params):
if self.RUN:
me = tareader.readSelfCharacter();
targID = tareader.getAttackedCreature();
if targID != 0:
targ = tareader.getCharacterByTibiaId (targID);
try: minDist = int(params['minDistance']);
except: minDist = 3;
try: maxDist = int(params['maxDistance']);
except: maxDist = 100;

hList = params['hardCreatures'].lower().split(',');
isHard = int(hList.count(targ['name'].lower()) != 0);
minDist += isHard;

face = facing(targ['lookDirection']);
monToMe = [(me['x']-targ['x']),(me['y']-targ['y'])];
isRunning = int((face[0]*monToMe[0] + face[1]*monToMe[1]) < 0);#will bring to 1 less than maxDist if monster is running
#print "first:", isRunning;
followCreature = params['followCreatures'].lower().split(',');
isRunning = int(followCreature.count(targ['name'].lower()) != 0);
#//print "sec:", isRunning;

if isRunning:
maxDist = 1;
minDist = 1;

isToofar = max(abs(me['x'] - targ['x']),abs(me['y'] - targ['y'])) > maxDist;
isNotBestDiag = abs(me['x'] - targ['x'])+abs(me['y'] - targ['y']) < minDist*2;
isClose = max(abs(me['x'] - targ['x']),abs(me['y'] - targ['y'])) <= minDist;
if isToofar or (isNotBestDiag and isClose):
#print {'x':me['x'],'y':me['y'],'z':me['z']},{'x':targ['x'],'y':targ['y'],'z':targ['z']}
self.walkTo = getPathToEx({'x':me['x'],'y':me['y'],'z':me['z']},{'x':targ['x'],'y':targ['y'],'z':targ['z']},minDist,minDist)
#print self.walkTo['x'] - me['x'],self.walkTo['y'] - me['y'];
self.walkToPoint(params);
return;

def walkToPoint (self, params):
if tareader.getAttackedCreature() == 0:
self.walkTo = False;
return;
targ = tareader.getCharacterByTibiaId (tareader.getAttackedCreature());
if targ['hpPercLeft'] == 0:
self.walkTo = False;
return;
if self.walkTo != False:
tareader.writeGotoCoords (self.walkTo['x'],self.walkTo['y'],self.walkTo['z']);
return;

def walkToPoint2 (self, params,(type,channel,nick,message)):
me = tareader.readSelfCharacter();
if nick == me['name'] and self.walkTo != False:
tareader.writeGotoCoords (self.walkTo['x'],self.walkTo['y'],self.walkTo['z']);
return;

def toggle (self, params, message):
if message == "%ta dist":
self.RUN = not self.RUN;
tasender.sendTAMessage("Keep Distance is = "+str(self.RUN));
return;

tibiaauto.registerPlugin(ModuleKeepDistance);


#print getPathToEx({'x':0,'y':2,'z':0},{'x':0,'y':0,'z':0 },6,6+1)

Xavious
03-12-2012, 09:44 PM
Since I dont want to use packets, as sending bad or incorrect packets probably have a good chance to your account deleted I have to figure out where every item on your gamewindow is located which can be very hard(at least for me as Im fairly new to the subject) it will be hard to implement interacting with npc for buying or selling items. I however hope that I can learn more on how its used to eventually add such functions. But for now it will not be added.

As I update map reading I will try to implement functions to keep distance from targets aswell. Its not very difficult to make your character run away from creatures but finding the best, and even possible path to run in is quite hard as I need to read tile information to see which are and are not blocking. Thanks to Tibia API and other open source projects I believe I can get some basic distance keeper in a while

joely
03-13-2012, 09:06 AM
Since I dont want to use packets, as sending bad or incorrect packets probably have a good chance to your account deleted I have to figure out where every item on your gamewindow is located which can be very hard(at least for me as Im fairly new to the subject) it will be hard to implement interacting with npc for buying or selling items. I however hope that I can learn more on how its used to eventually add such functions. But for now it will not be added.

As I update map reading I will try to implement functions to keep distance from targets aswell. Its not very difficult to make your character run away from creatures but finding the best, and even possible path to run in is quite hard as I need to read tile information to see which are and are not blocking. Thanks to Tibia API and other open source projects I believe I can get some basic distance keeper in a while


Very nice! Im looking forward to it, gimmie a shout if you need help with anything

charlesc09
03-14-2012, 12:03 AM
Yea I want to beta test :)

Darkh
03-23-2012, 07:26 PM
Can you update for 9.46? Your tool is very helpful.