blob: 2e3eafa4a00a8ae24bd6492de8212cb67d7cf9cd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/usr/bin/python
"""
Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
This file is part of tradey, a trading bot in the mana world
see www.themanaworld.org
"""
class Item:
pass
class Player:
def __init__(self, name):
self.inventory = {}
self.storage = []
self.name = name
self.id = 0
self.sex = 0
self.map = ""
self.x = 0
self.y = 0
self.EXP_NEEDED = 0
self.EXP = 0
self.MONEY = 0
self.LEVEL = 0
self.HP = 0
self.MaxHP = 0
self.MP = 0
self.MaxMP = 0
self.WEIGHT = 0
self.MaxWEIGHT = 0
def find_inventory_index(self, item_id):
for item in self.inventory:
if item > 1:
if self.inventory[item].itemId == item_id:
return item
return -10 # Not found - bug somewhere!
if __name__ == '__main__':
print "Do not run this file directly. Run main.py"
|