How can i set an hotkey for activating functions inside a script?
Here an example, what's wrong?
PHP Code:
import player
import net
import app
class Test():
def __init__(self):
self.__BuildKeyDict()
def __BuildKeyDict(self):
onPressKeyDict = {}
onPressKeyDict[app.DIK_SPACE] = lambda : self.StartHot()
self.onPressKeyDict = onPressKeyDict
def StartHot(self):
net.SendChatPacket("/unmount")
player.ClickSkillSlot(3)
for i in xrange(player.INVENTORY_PAGE_SIZE*3):
ItemValue = player.GetItemIndex(i)
if ItemValue == 666:
net.SendItemUsePacket(i)