Don't download if you think python is only a snake !
Hey,
I made a epic class, which makes many things easier.
I have no desire to describe it in this thread, everything is commented
examples for usage:
- easy getting hp of target vid
- handling OnRecvQuest for instant close
- ...
Snippet from DaRealFreaks bot:
Code:
def HookOpenTargetBoard():
game.GameWindow.SetPCTargetBoard = HookedOpenTargetBoard
chat.AppendChat(1, "OpenTargetBoard wurde erfolgreich gehooked.")
def HookedOpenTargetBoard(self, vid, name):
global OldOpenTargetBoard
global BuffVid
BuffVid = vid
chat.AppendChat(1, "Du hast " + name + " anvisiert.")
OldOpenTargetBoard(self, vid, name)
def UnHookOpenTargetBoard():
global OldOpenTargetBoard
global BuffVid
BuffVid = 0
game.GameWindow.SetPCTargetBoard = OldOpenTargetBoard
chat.AppendChat(1, "OpenTargetBoard Hook wurde erfolgreich entfernt.")
With my pyDetour:
Code:
import pyDetour
....
def HookedOpenTargetBoard(data):
global BuffVid
BuffVid = data.args[1]
name = data.args[2]
chat.AppendChat(1, "Du hast " + name+ " anvisiert.")
data() # call the original function, with *data.args as argument(s)
detour = pyDetour.detour(game.GameWindow.SetPCTargetBoard, HookedOpenTargetBoard)
HookOpenTargetBoard=detour.attach
UnHookOpenTargetBoard=detour.deatch
AND there are no ugly globals (OldOpenTargetBoard)
In the past (i was a noob), i always searched for this class, but i was to unskilled for writing it myself.
pyDetour3: "import" works again for GF clients
Have fun.