Discussion on [5173] - Python bot interface with loadable memory functions. (w/ Melee demo) within the CO2 Programming forum part of the Conquer Online 2 category.
I've just registered at the site your reffering to (Like 2 days ago). I'm not sure if high6 checks the introductions daily but I would love to join the forum. Not just for this bot, which would be a bit greedy but also to help people.
Anyway. if high6 reads this post. Please would you reply to my PM on your forum?
Best regards,
Replace the code in Melee.py with the following... it stops the crashing, but its goes a bit slower... maybe u guys can play w/ the delays to perfect it.
Code:
import math
def distance(x1,y1,x2,y2):
dx = x2 - x1
dy = y2 - y1
return dx*dx + dy*dy
class CMob:
def __init__(self, mobBase):
self.X = GetXCoord(mobBase)
self.Y = GetYCoord(mobBase)
self.UID = RoleUID(mobBase)
nextTime = TimeStamp()
def update():
global nextTime
if TimeStamp() < nextTime:
return
#print "Melee bot update()"
heroBase = HeroBase()
hx = GetXCoord(heroBase)
hy = GetYCoord(heroBase)
num = NumMobs()
mobs = []
for i in range(0, num-1):
mobBase = GetMob(i)
if mobBase == 0:
break
if AniFlag(mobBase) == 32:
continue
if RoleUID(mobBase) > 0x0F423F:
continue
mobs.append(CMob(GetMob(i)))
#print repr(num) + " mobs are on the screen."
#print "The hero is positioned at (" + repr(hx) + ", " + repr(hy) + ")"
nearMob = 0
nearDist = 100*100
for mob in mobs:
mx = mob.X
my = mob.Y
if mx > 1000 or my > 1000 or mx < 0 or my < 0:
break
#print "A mob is seen at (" + repr(mx) + ", " + repr(my) + ")"
dist = distance(hx,hy,mx,my)
#print "he is " + repr(dist) + " units squared away"
if dist < nearDist:
nearMob = mob
nearDist = dist
if nearMob != 0:
if nearDist > 16*16:
dx = nearMob.X+1 - hx
dy = nearMob.Y+1 - hy
a = 16.0 / math.sqrt(dx*dx+dy*dy)
dx = int(a * dx)
dy = int(a * dy)
Jump(hx + dx, hy + dy)
nextTime = TimeStamp() + 1000
elif nearDist <= 4*4:
Melee(nearMob.UID, nearMob.X, nearMob.Y)
nextTime = TimeStamp() + 200
else:
Jump(nearMob.X+1,nearMob.Y+1)
nextTime = TimeStamp() + 1000
print "Melee bot loaded."
Good Luck
man help me i have melee but i dont have update for it when patch 5173 i need Conquer that it can work in it
AutoIT Memory Functions 11/14/2009 - AutoIt - 2 Replies Hi^^
Also, ich bin im moment nen bisschen dabei mit AutoIT rumzuspielen, da ich noch keinen wirklichwn Plan hab was ich damit anfangen will :P (zu viel Noob für Bots, bzw. Hacks)
Allerdings hatte ich jetz ma die Idee das ich für Cs nen kleinen Memory Bot erstell ;)
Der soll per Hotkey die Munition im Magazin auf dem maximalen stand halten ;)
Funzt auch alles prima^^
Nur jetz hab ich das Probelm, dass ich nur einmal Funktion ausführen kann :(
AutoIt Memory Functions 07/05/2007 - CO2 Exploits, Hacks & Tools - 0 Replies prob in the wrong section...
would be nice if mod could move it
text2schild.php?smilienummer=1&text=my bad' border='0' alt='my bad' />
Small CO Memory Functions Library... 01/15/2007 - Conquer Online 2 - 4 Replies I've begun to work on a small dynamic load library (DLL) for Conquer Online in pure assembler. Due to it being programmed in assembler not only will the library be incredibly small in file size, but it will also be much faster than any Visual Basic, C++, or Pascal equivalent. Not to mention I just plain love programming in assembler languages.
Before I get started on some major functions, I would like some of the more intelligent users to suggest and chose features for each so that...