rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
else:
else:
itemdef = child.getattribute('definition')
2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py
itemdef = child.getattribute('definition')
2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py
action.skills[skill] = [minimum, maximum]
try: penalty = hex2dec(subchild.getattribute('penalty','0')) except: console.log(LOG_ERROR, "%s element with invalid max value in menu %s.\n" % (subchild.name, menu.id)) action.skills[skill] = [minimum, maximum, penalty]
itemdef = child.getattribute('definition')
2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py
successsmelt( char, ingottable, resname, amount, ingotdef ) ore.delete()
char.socket.clilocmessage( 501987, '', GRAY ) return OOPS
successsmelt( char, ingottable, resname, amount, ingotdef )
7585429e5200e75d4817f3555faa63acc897383f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/7585429e5200e75d4817f3555faa63acc897383f/ore.py
target.effect(0x376A, 9, 32) target.soundeffect(0x202)
target.char.effect(0x376A, 9, 32) target.char.soundeffect(0x202)
def dorestore( char, args, target ): if target.item: char.socket.sysmessage( 'That was not a valid character!', GRAY ) elif target.char: target.char.hitpoints = int( target.char.maxhitpoints ) target.char.stamina = int( target.char.maxstamina ) target.char.mana = int( target.char.maxmana ) target.char.updatestats() tar...
2f9fb8b781975d06a33f7d64ee24d0e9cd67472d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2f9fb8b781975d06a33f7d64ee24d0e9cd67472d/restore.py
if target.char.priv & 0x04 or target.char.dead:
if target.char.dead:
def response( char, args, target ): socket = char.socket # Check for a valid target if not target.char: socket.clilocmessage( 0x7A263, "", 0x3b2, 3, char ) # Only living things have anatomies return if target.char == char: socket.clilocmessage( 0x7A264, "", 0x3b2, 3, char ) # You know yourself quite well enough alre...
d28fa0e6e4a09838b940805e7d5a9180cb70cb4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d28fa0e6e4a09838b940805e7d5a9180cb70cb4c/anatomy.py
gump.addText( 250, 120, unicode( "%s" % player.region ), 0x834 )
gump.addText( 250, 120, unicode( "%s" % unicode(player.region) ), 0x834 )
def callbackWho( char, args, choice ): socket = char.socket wholist = args[0] if choice.button == 0: return False elif wholist[ choice.button - 10 ]: player = wolfpack.findchar( wholist[ choice.button - 10 ] ) pos = player.pos account = player.account # Socket Information gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
810111476cb90665e8d178a8f09317afee55dc12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/810111476cb90665e8d178a8f09317afee55dc12/who.py
config.write("INCLUDEPATH += %s" % ( py_incpath ) )
config.write("INCLUDEPATH += %s\n" % ( py_incpath ) )
def main(): checkPython() checkQt() # Create config.pri global py_libpath global py_libfile global py_incpath global qt_qmake config = file("config.pri", "w") config.write("# WARNING: This file was automatically generated by configure.py\n ") config.write("# any changes to this file will be lost!\n") config...
8a573069ecf8fe7787924774b38b57edd70f8a2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/8a573069ecf8fe7787924774b38b57edd70f8a2b/configure.py
config.write("LIBS += %s" % LIBS)
config.write("LIBS += %s\n" % LIBS)
def main(): checkPython() checkQt() # Create config.pri global py_libpath global py_libfile global py_incpath global qt_qmake config = file("config.pri", "w") config.write("# WARNING: This file was automatically generated by configure.py\n ") config.write("# any changes to this file will be lost!\n") config...
8a573069ecf8fe7787924774b38b57edd70f8a2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/8a573069ecf8fe7787924774b38b57edd70f8a2b/configure.py
parser.parse("data/decoration.2.xml")
parser.parse("data/decoration.3.xml")
def decoration( socket, command, arguments ): if len(arguments) > 0: args = str(arguments) if args == 'save': saveObject = DecorationSaveHandler(socket) socket.sysmessage("Sorting items") saveObject.sort() saveObject.save() else: parser = xml.sax.make_parser() handler = DecorationHandler() parser.setContentHandler(han...
782be9853ea1b435eea1962f5441152dd7b2d7ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/782be9853ea1b435eea1962f5441152dd7b2d7ac/decoration.py
return 1
return True
def onContextCheckVisible( char, target, tag ): if (target.skill[tag - 1] >= 300): return 1 # visible return 0 # not visible
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return 0
return False
def onContextCheckVisible( char, target, tag ): if (target.skill[tag - 1] >= 300): return 1 # visible return 0 # not visible
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return 0
return False
def onContextCheckEnabled( char, target, tag ): skill = tag - 1 if ( skill == STEALTH and char.skill[ HIDING ] < 800 ): return 0 # disabled if ( skill == REMOVETRAPS and ( char.skill[ LOCKPICKING ] < 500 or char.skill[ DETECTINGHIDDEN ] < 500 ) ): return 0 # disabled if ( char.skill[ skill ] >= MAX_TEACHING ): return 0...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return 0
return False
def onContextCheckEnabled( char, target, tag ): skill = tag - 1 if ( skill == STEALTH and char.skill[ HIDING ] < 800 ): return 0 # disabled if ( skill == REMOVETRAPS and ( char.skill[ LOCKPICKING ] < 500 or char.skill[ DETECTINGHIDDEN ] < 500 ) ): return 0 # disabled if ( char.skill[ skill ] >= MAX_TEACHING ): return 0...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return 0
return False if ( char.skill[ skill ] >= char.skillcap[ skill ] ): return False
def onContextCheckEnabled( char, target, tag ): skill = tag - 1 if ( skill == STEALTH and char.skill[ HIDING ] < 800 ): return 0 # disabled if ( skill == REMOVETRAPS and ( char.skill[ LOCKPICKING ] < 500 or char.skill[ DETECTINGHIDDEN ] < 500 ) ): return 0 # disabled if ( char.skill[ skill ] >= MAX_TEACHING ): return 0...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return 1
return True
def onContextCheckEnabled( char, target, tag ): skill = tag - 1 if ( skill == STEALTH and char.skill[ HIDING ] < 800 ): return 0 # disabled if ( skill == REMOVETRAPS and ( char.skill[ LOCKPICKING ] < 500 or char.skill[ DETECTINGHIDDEN ] < 500 ) ): return 0 # disabled if ( char.skill[ skill ] >= MAX_TEACHING ): return 0...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
def onContextEntry( char, target, tag ): skill = tag - 1 if ( char.dead or skill < 0 ): return 1 baseToSet = target.skill[ skill ] / ( 1000 / MAX_TEACHING ) if ( baseToSet > MAX_TEACHING ): baseToSet = MAX_TEACHING elif ( baseToSet < MIN_TEACHING ): target.say( str( baseToSet ) ) return 1 pointsToLearn = baseToSet -...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return 1
return True
def onContextEntry( char, target, tag ): skill = tag - 1 if ( char.dead or skill < 0 ): return 1 baseToSet = target.skill[ skill ] / ( 1000 / MAX_TEACHING ) if ( baseToSet > MAX_TEACHING ): baseToSet = MAX_TEACHING elif ( baseToSet < MIN_TEACHING ): target.say( str( baseToSet ) ) return 1 pointsToLearn = baseToSet -...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
target.say( str( baseToSet ) ) return 1
return True
def onContextEntry( char, target, tag ): skill = tag - 1 if ( char.dead or skill < 0 ): return 1 baseToSet = target.skill[ skill ] / ( 1000 / MAX_TEACHING ) if ( baseToSet > MAX_TEACHING ): baseToSet = MAX_TEACHING elif ( baseToSet < MIN_TEACHING ): target.say( str( baseToSet ) ) return 1 pointsToLearn = baseToSet -...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
if ( pointsToLearn < 0 ): return 1
pointsToLearn = min( pointsToLearn, char.skillcap[ skill ] - char.skill[ skill ] ) if ( pointsToLearn <= 0 ): return True
def onContextEntry( char, target, tag ): skill = tag - 1 if ( char.dead or skill < 0 ): return 1 baseToSet = target.skill[ skill ] / ( 1000 / MAX_TEACHING ) if ( baseToSet > MAX_TEACHING ): baseToSet = MAX_TEACHING elif ( baseToSet < MIN_TEACHING ): target.say( str( baseToSet ) ) return 1 pointsToLearn = baseToSet -...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return 1
return True
def onContextEntry( char, target, tag ): skill = tag - 1 if ( char.dead or skill < 0 ): return 1 baseToSet = target.skill[ skill ] / ( 1000 / MAX_TEACHING ) if ( baseToSet > MAX_TEACHING ): baseToSet = MAX_TEACHING elif ( baseToSet < MIN_TEACHING ): target.say( str( baseToSet ) ) return 1 pointsToLearn = baseToSet -...
ba155b16fafab12460cc9e4c64798e50468a12f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ba155b16fafab12460cc9e4c64798e50468a12f2/trainmenu.py
return True
return False
def onDropOnItem( container, item ): dropper = item.container # Turn off the lightsource if item.id in burning and ids.has_key( item.id ): item.id = ids[item.id] wolfpack.queuecode(update_light, (item.serial, )) dropper.soundeffect(0x226) return True
6b04775a036753d193fcf44095f49a32d8eab1ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6b04775a036753d193fcf44095f49a32d8eab1ff/lightsource.py
item.decay = 0
item.decay = 0
def startElement( self, name, atts ): if name == "item": self.itemid = str(atts.getValue("id")); if atts.has_key("hue"): self.hue = int(hex2dec(str(atts.getValue("hue")))); else: self.hue = 0 if atts.has_key("amount"): self.amount = int(atts.getValue("amount")); else: self.amount = 0 self.statements = [] elif name == "...
ef810a1acbbe1a267657de88a5347d9d60996492 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ef810a1acbbe1a267657de88a5347d9d60996492/decoration.py
def checktool(char, item, wearout = 0):
def checktool(char, item, wearout = False):
def checktool(char, item, wearout = 0): if not item: return 0 # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) return 0 # We do not allow "invulnerable" tools. if not item.hastag('remaining_uses'): char.socket.clilocmessage(1044038) item.delete() return 0 if wearout: u...
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def checktool(char, item, wearout = 0): if not item: return 0 # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) return 0 # We do not allow "invulnerable" tools. if not item.hastag('remaining_uses'): char.socket.clilocmessage(1044038) item.delete() return 0 if wearout: u...
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def checktool(char, item, wearout = 0): if not item: return 0 # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) return 0 # We do not allow "invulnerable" tools. if not item.hastag('remaining_uses'): char.socket.clilocmessage(1044038) item.delete() return 0 if wearout: u...
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def checktool(char, item, wearout = 0): if not item: return 0 # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) return 0 # We do not allow "invulnerable" tools. if not item.hastag('remaining_uses'): char.socket.clilocmessage(1044038) item.delete() return 0 if wearout: u...
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def checktool(char, item, wearout = 0): if not item: return 0 # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) return 0 # We do not allow "invulnerable" tools. if not item.hastag('remaining_uses'): char.socket.clilocmessage(1044038) item.delete() return 0 if wearout: u...
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 1
item.resendtooltip() return True
def checktool(char, item, wearout = 0): if not item: return 0 # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) return 0 # We do not allow "invulnerable" tools. if not item.hastag('remaining_uses'): char.socket.clilocmessage(1044038) item.delete() return 0 if wearout: u...
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 1
return True
def onUse(char, item): if not checktool(char, item): return 1 menu = findmenu('TAILORING') if menu: menu.send(char, [item.serial]) return 1
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 1
return True
def onUse(char, item): if not checktool(char, item): return 1 menu = findmenu('TAILORING') if menu: menu.send(char, [item.serial]) return 1
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def getexceptionalchance(self, player, arguments): # Only works if this item requires blacksmithing if not self.skills.has_key(TAILORING): return 0
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
checktool(player, wolfpack.finditem(arguments[0]), 1)
checktool(player, wolfpack.finditem(arguments[0]), True)
def applyproperties(self, player, arguments, item, exceptional): # All tailoring items crafted out of leather gain the special color if self.submaterial1 > 0: material = self.parent.getsubmaterial1used(player, arguments) material = self.parent.submaterials1[material] item.color = material[4] item.settag('resname', mate...
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def make(self, player, arguments, nodelay=0): assert(len(arguments) > 0, 'Arguments has to contain a tool reference.')
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def getsubmaterial1used(self, player, arguments): if not player.hastag('tailoring_leather'): return 0 else: material = int(player.gettag('tailoring_leather')) if material < len(self.submaterials1): return material else: return 0
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
return 0
return False
def getsubmaterial1used(self, player, arguments): if not player.hastag('tailoring_leather'): return 0 else: material = int(player.gettag('tailoring_leather')) if material < len(self.submaterials1): return material else: return 0
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
def onShowToolTip( sender, target, tooltip ):
def onShowTooltip( sender, target, tooltip ):
def onShowToolTip( sender, target, tooltip ): if target.gettag( 'filled' ) == 1: filled( target, tooltip ) else: unfilled( target, tooltip) tooltip.send ( sender ) return True
a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d/commoditydeed.py
def filled( target, tooltip ): tooltip.add( 1047016, "" ) # Commodity Deed tooltip.add( 1038021, "" ) # Blessed tooltip.add( 1060747, "" ) # filled tooltip.add( 1060659, str ( target.gettag("cname") ) + "\t" + str( target.gettag( "amount") ) )
a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d/commoditydeed.py
def unfilled( target, tooltip ): tooltip.add( 1047016, "" ) # Commodity Deed tooltip.add( 1038021, "" ) # Blessed tooltip.add( 1060748, "" ) # unfilled
a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d/commoditydeed.py
def onUse ( char, item ): bank = char.getbankbox() if not item.getoutmostitem() == bank: char.socket.clilocmessage( 0xFF9F2, "", 0x3b2, 3 ) # That must be in your bankbox to use it. return True if not item.hastag ( "filled" ): char.socket.clilocmessage( 0xFF9F5, "", 0x3b2, 3 ) char.socket.attachtarget( "deeds.commod...
a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a47cce47fb77cb7b9ed535731d3a4e93e6eeae9d/commoditydeed.py
player.socket.sysmessage('There are %u members of your guild logged in.' % len(online))
player.socket.sysmessage('There are %u other members of your guild logged on.' % len(online), 0x30)
def onLogin(player): if player.hastag('guildmessages'): count = int(player.gettag('guildmessages')) for i in range(0, count): name = 'guildmessage' + str(i) text = unicode(player.gettag(name)) player.socket.sysmessage(text) # Make sure that this event is removed as soon as we don't are in a guild anymore if not playe...
e5756ff6630e9c70cd95f7cd8253bcb990c21e6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/e5756ff6630e9c70cd95f7cd8253bcb990c21e6b/member.py
player.socket.sysmessage('There is one member of your guild logged in.')
player.socket.sysmessage('There is one other member of your guild logged on.', 0x30)
def onLogin(player): if player.hastag('guildmessages'): count = int(player.gettag('guildmessages')) for i in range(0, count): name = 'guildmessage' + str(i) text = unicode(player.gettag(name)) player.socket.sysmessage(text) # Make sure that this event is removed as soon as we don't are in a guild anymore if not playe...
e5756ff6630e9c70cd95f7cd8253bcb990c21e6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/e5756ff6630e9c70cd95f7cd8253bcb990c21e6b/member.py
item.decay = 1 item.movable = 1 if self.amount > 0: item.amount = self.amount
def make(self, player, arguments, nodelay=0): # See if we have enough skills to attempt if not self.checkskills(player, arguments): player.socket.clilocmessage(1044153) return 0
22a213e2da2ec7d8cdc93ac133c06a2a2c6a2ca4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/22a213e2da2ec7d8cdc93ac133c06a2a2c6a2ca4/makemenus.py
def handleStatus(socket, packet): statusPacket = 1 for i in range( 0, packet.size ): if ( packet.getbyte(i) != statusRequest[i] ): statusPacket = 0 if statusPacket == 1: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % ( wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.se...
2d007f2ef3da1d8f98207268ae7056c52566f670 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2d007f2ef3da1d8f98207268ae7056c52566f670/uogstatus.py
if ( packet.getbyte(i) != statusRequest[i] ):
if (packet.getbyte(i) != statusRequest[i]):
def handleStatus(socket, packet): statusPacket = 1 for i in range( 0, packet.size ): if ( packet.getbyte(i) != statusRequest[i] ): statusPacket = 0 if statusPacket == 1: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % ( wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.se...
2d007f2ef3da1d8f98207268ae7056c52566f670 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2d007f2ef3da1d8f98207268ae7056c52566f670/uogstatus.py
if statusPacket == 1: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % ( wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serverversion() )
if statusPacket: status = 'Wolfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % (wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serverversion())
def handleStatus(socket, packet): statusPacket = 1 for i in range( 0, packet.size ): if ( packet.getbyte(i) != statusRequest[i] ): statusPacket = 0 if statusPacket == 1: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % ( wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.se...
2d007f2ef3da1d8f98207268ae7056c52566f670 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2d007f2ef3da1d8f98207268ae7056c52566f670/uogstatus.py
if maxcharges > 0:
if maxcharges > 0:
def onDropOnItem( book, item ): char = item.container if isrunebook( book ): if isrune(item) and item.hastag('marked'): # initialize rune serials to -1 if there's no rune # should not occur - will be removed later for i in range( 0, 16 ): if not book.hastag( "rune %i" % i ): book.settag( "rune %i" % i, -1 ) # rune se...
ebd8e7c80888e4f968c7d7a2a320ced4b81c764f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ebd8e7c80888e4f968c7d7a2a320ced4b81c764f/runebook.py
def droprune( char, book, runenumber ): if book.hastag( "rune %i" % runenumber ): rune = wolfpack.finditem( book.gettag( "rune %i" % runenumber ) ) if rune: wolfpack.utilities.tobackpack( rune, char ) rune.update() book.settag( "rune %i" % runenumber, -1 ) book.update() return True #elif rune and rune.container != book...
ebd8e7c80888e4f968c7d7a2a320ced4b81c764f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ebd8e7c80888e4f968c7d7a2a320ced4b81c764f/runebook.py
gateGump = cGump( 1, 1, 0, 30, 30 )
gateGump = cGump( 1, 1, 0, 100, 120 )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" )
gateGump.addBackground( 9200, 380, 280 ) gateGump.addText( 5, 10, "Pick your destination:" ) gateGump.addButton( 10, 210, 0xFA5, 0xFA7, 1 ) gateGump.addText( 45, 210, "OKAY", 0 ) gateGump.addButton( 10, 235, 0xFA5, 0xFA7, 0 ) gateGump.addText( 45, 235, "CANCEL" )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addText( 70, 70, "Trammel", 12 ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 )
gateGump.addText( 35, 35, "Trammel", 61 ) gateGump.addPageButton( 10, 35, 0x4B9, 0x4BA, 1 ) gateGump.addText( 35, 60, "Felucca" ) gateGump.addPageButton( 10, 60, 0x4B9, 0x4BA, 2 ) gateGump.addText( 35, 85, "Ilshenar" ) gateGump.addPageButton( 10, 85, 0x4B9, 0x4BA, 3 )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addText( 170, 70, "Britain" ) gateGump.addButton( 150, 75, 0x837, 0x838, 5 ) gateGump.addText( 170, 90, "Magincia" ) gateGump.addButton( 150, 95, 0x837, 0x838, 6 ) gateGump.addText( 170, 110, "Moonglow" ) gateGump.addButton( 150, 115, 0x837, 0x838, 7 ) gateGump.addText( 170, 130, "Skara Brae" ) gateGump.addBut...
gateGump.addText( 225, 40, "Britain" ) gateGump.addRadioButton(200, 40, 210, 211, 10 ) gateGump.addText( 225, 65, "Magincia" ) gateGump.addRadioButton(200, 65, 210, 211, 11 ) gateGump.addText( 225, 90, "Moonglow" ) gateGump.addRadioButton(200, 90, 210, 211, 12 ) gateGump.addText( 225, 115, "Skara Brae" ) gateGump.addRa...
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" )
gateGump.addBackground( 9200, 380, 280 ) gateGump.addText( 5, 10, "Pick your destination:" ) gateGump.addButton( 10, 210, 0xFA5, 0xFA7, 1 ) gateGump.addText( 45, 210, "OKAY", 0 ) gateGump.addButton( 10, 235, 0xFA5, 0xFA7, 0 ) gateGump.addText( 45, 235, "CANCEL" )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addText( 70, 70, "Trammel" ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca", 12 ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 )
gateGump.addText( 35, 35, "Trammel" ) gateGump.addPageButton( 10, 35, 0x4B9, 0x4BA, 1 ) gateGump.addText( 35, 60, "Felucca", 61 ) gateGump.addPageButton( 10, 60, 0x4B9, 0x4BA, 2 ) gateGump.addText( 35, 85, "Ilshenar" ) gateGump.addPageButton( 10, 85, 0x4B9, 0x4BA, 3 )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addText( 170, 70, "Britain" ) gateGump.addButton( 150, 75, 0x837, 0x838, 13 ) gateGump.addText( 170, 90, "Magincia" ) gateGump.addButton( 150, 95, 0x837, 0x838, 14 ) gateGump.addText( 170, 110, "Moonglow" ) gateGump.addButton( 150, 115, 0x837, 0x838, 15 ) gateGump.addText( 170, 130, "Skara Brae" ) gateGump.add...
gateGump.addText( 225, 40, "Britain" ) gateGump.addRadioButton(200, 40, 210, 211, 18 ) gateGump.addText( 225, 65, "Magincia" ) gateGump.addRadioButton(200, 65, 210, 211, 19 ) gateGump.addText( 225, 90, "Moonglow" ) gateGump.addRadioButton(200, 90, 210, 211, 20 ) gateGump.addText( 225, 115, "Skara Brae" ) gateGump.addRa...
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" )
gateGump.addBackground( 9200, 380, 280 ) gateGump.addText( 5, 10, "Pick your destination:" ) gateGump.addButton( 10, 210, 0xFA5, 0xFA7, 1 ) gateGump.addText( 45, 210, "OKAY", 0 ) gateGump.addButton( 10, 235, 0xFA5, 0xFA7, 0 ) gateGump.addText( 45, 235, "CANCEL" )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addText( 70, 70, "Trammel" ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar", 12 ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 )
gateGump.addText( 35, 35, "Trammel" ) gateGump.addPageButton( 10, 35, 0x4B9, 0x4BA, 1 ) gateGump.addText( 35, 60, "Felucca" ) gateGump.addPageButton( 10, 60, 0x4B9, 0x4BA, 2 ) gateGump.addText( 35, 85, "Ilshenar", 61 ) gateGump.addPageButton( 10, 85, 0x4B9, 0x4BA, 3 )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
gateGump.addText( 170, 70, "Compassion" ) gateGump.addButton( 150, 75, 0x837, 0x838, 21 ) gateGump.addText( 170, 90, "Honesty" ) gateGump.addButton( 150, 95, 0x837, 0x838, 22 ) gateGump.addText( 170, 110, "Honor" ) gateGump.addButton( 150, 115, 0x837, 0x838, 23 ) gateGump.addText( 170, 130, "Humility" ) gateGump.addBut...
gateGump.addText( 225, 40, "Compassion" ) gateGump.addRadioButton( 200, 40, 210, 211, 26 ) gateGump.addText( 225, 65, "Honesty" ) gateGump.addRadioButton( 200, 65, 210, 211, 27 ) gateGump.addText( 225, 90, "Honor" ) gateGump.addRadioButton( 200, 90, 210, 211, 28 ) gateGump.addText( 225, 115, "Humility" ) gateGump.addRa...
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCE...
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
wolfpack.effect(0x3728, target.pos, 8, 20) target.soundeffect(0x201) target.delete()
if self.checkresist(char, tgarget): target.effect(0x3779, 10, 20) else: wolfpack.effect(0x3728, target.pos, 8, 20) target.soundeffect(0x201) target.delete() items = wolfpack.items(target.x, target.y, char.pos.map, 8) for item in items: if target.hastag('dispellable_field'): wolfpack.effect(0x376a, target.pos, 9, 20) ...
def target(self, char, mode, targettype, target, args=[]): if not self.consumerequirements(char, mode): return
e11c6824d095f392424727ade3206f31d4ce0b8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/e11c6824d095f392424727ade3206f31d4ce0b8b/circle7.py
( baseid, id, x, y, z, map, color ) = line.split( ' ' ) baseid = baseid
( id, x, y, z, color ) = line.split( ' ' )
def parseTxt( file, map ): warnings = '' count = 0 parseTickCount = 0 createTickCount = 0 propTickCount = 0 moveTickCount = 0 for line in file: step1 = wolfpack.tickcount() # Replace \r and \n's line = line.replace( "\r", "" ) line = line.replace( "\n", "" ) ( baseid, id, x, y, z, map, color ) = line.split( ' ' ) ...
69d3a7ce2744e2d3fdb6862ce93cfd03323c3715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/69d3a7ce2744e2d3fdb6862ce93cfd03323c3715/import.py
map = int( map )
def parseTxt( file, map ): warnings = '' count = 0 parseTickCount = 0 createTickCount = 0 propTickCount = 0 moveTickCount = 0 for line in file: step1 = wolfpack.tickcount() # Replace \r and \n's line = line.replace( "\r", "" ) line = line.replace( "\n", "" ) ( baseid, id, x, y, z, map, color ) = line.split( ' ' ) ...
69d3a7ce2744e2d3fdb6862ce93cfd03323c3715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/69d3a7ce2744e2d3fdb6862ce93cfd03323c3715/import.py
self.stopped.set() self.httpd.server_close()
self.stopped.set() self.httpd.server_close()
def cancel( self ):
b6dcd5f1d83a156d6040621befe5907dc7eb16ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b6dcd5f1d83a156d6040621befe5907dc7eb16ce/webadmin.py
server_address = ( '', self.port ) time.sleep( 5 ) print "Remote Admin running on port %u\n" % self.port try: filepath = os.path.normpath( os.path.abspath( 'web/' ) ) self.httpd = Webserver( ( '', self.port ), filepath ) except: traceback.print_exc() return while 1: self.httpd.handle_request() self.stopped.wait( ...
server_address = ( '', self.port ) if not wolfpack.isreloading(): wolfpack.console.send( "Remote Admin running on port %u\n" % self.port ) try: filepath = os.path.normpath( os.path.abspath( 'web/' ) ) self.httpd = Webserver( ( '', self.port ), filepath ) except: traceback.print_exc() return while 1: self.httpd.han...
def run( self ):
b6dcd5f1d83a156d6040621befe5907dc7eb16ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b6dcd5f1d83a156d6040621befe5907dc7eb16ce/webadmin.py
if type(self.spellid) == int:
if type(spell.spellid) == int:
def target_response( char, args, target ): # No more npc saftey from here char.socket.deltag('cast_target') spell = args[0] mode = args[1] item = args[3] args = args[2] if type(item) == int: item = wolfpack.findobject(item) # Object went out of scope if not item: fizzle(char) return # Char Targets if target.char and ...
7db2b2d903fab6dd177af012db2e1c168ffa4ed4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/7db2b2d903fab6dd177af012db2e1c168ffa4ed4/__init__.py
char.socket.deltag( 'wood_gem' )
def successlumberjacking( char, args ): socket = char.socket pos = args[0] # Target POS resource = args[1] amount = args[2] tool = args[3] resname = args[4] table = args[5] # Lets make sure we stayed next to the tree # Player can reach that ? if char.pos.map != pos.map or char.pos.distance( pos ) > chopdistance: socke...
17b6829a3f12eb2f9286af89e445d64fe22e3222 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/17b6829a3f12eb2f9286af89e445d64fe22e3222/lumberjacking.py
gump.addCheckerTrans(10, 10, 510, 397)
def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF)
379e090080cf9a5b69ae382e37d98807fb971cd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/379e090080cf9a5b69ae382e37d98807fb971cd8/makemenus.py
elif response.button & 0x80000000: submenu = response.button & ~ 0x80000000
elif response.button & 0x01000000: submenu = response.button & ~ 0x01000000
def response(self, player, response, arguments): # Show a gump with the last 10 items the player made. if response.button == 1: self.makehistory(player, arguments)
379e090080cf9a5b69ae382e37d98807fb971cd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/379e090080cf9a5b69ae382e37d98807fb971cd8/makemenus.py
gump.addButton(15, yoffset, 4005, 4007, 0x80000000 | (actions + j))
gump.addButton(15, yoffset, 4005, 4007, 0x01000000 | (actions + j))
def send(self, player, args = []): # Close gumps of the same type if self.gumptype != 0: player.socket.closegump(self.gumptype, 0xFFFF)
379e090080cf9a5b69ae382e37d98807fb971cd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/379e090080cf9a5b69ae382e37d98807fb971cd8/makemenus.py
char.addscript('magic') char.action(self.castaction)
char.addscript('magic') if char.bodytype == BODY_HUMAN: char.action(self.castaction)
def precast(self, char, mode=0, args=[], target = None, item = None): socket = char.socket # Casting from a scroll and no scroll was passed if mode == MODE_SCROLL and not item: return # Casting from a wand and no wand was passed if mode == MODE_WAND and not item: return
7fd9fe8012eff488a03f0138cd4bb6a39dd2029c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/7fd9fe8012eff488a03f0138cd4bb6a39dd2029c/spell.py
return 0
return False if char.gm: return True
def checkrequirements(self, char, mode, args=[], target=None, item=None): if char.dead: return 0
7fd9fe8012eff488a03f0138cd4bb6a39dd2029c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/7fd9fe8012eff488a03f0138cd4bb6a39dd2029c/spell.py
socket.sysmessage('A item with the given name was not found.')
socket.sysmessage('An item with the given name was not found.')
def goitem(socket, command, arguments): if len(arguments) == 0: socket.sysmessage('Usage: goitem <name>') return items = wolfpack.itemiterator() item = items.first name = hash(arguments.lower()) found = [] while item: if hash(item.name.lower()) == name: found.append( item ) item = items.next if socket.hastag( "goi...
8370aae69a670e7ce8038f48921bcd1e272b4579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/8370aae69a670e7ce8038f48921bcd1e272b4579/__init__.py
socket.sendcontainer(item.container)
if item.container.isitem(): socket.sendcontainer(item.container) """ \command gobaseid \usage - <code>gobaseid baseid</code> \description Go to the item found with the given baseid. \notes Use the command twice to go to the next item with the same baseid etc. """ def gobaseid(socket, command, arguments): if len(argume...
def goitem(socket, command, arguments): if len(arguments) == 0: socket.sysmessage('Usage: goitem <name>') return items = wolfpack.itemiterator() item = items.first name = hash(arguments.lower()) found = [] while item: if hash(item.name.lower()) == name: found.append( item ) item = items.next if socket.hastag( "goi...
8370aae69a670e7ce8038f48921bcd1e272b4579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/8370aae69a670e7ce8038f48921bcd1e272b4579/__init__.py
socket.sendcontainer(item.container)
if item.container.isitem(): socket.sendcontainer(item.container)
def gouid(socket, command, arguments): try: uid = hex2dec(arguments) except: socket.symsessage('Usage: gouid <serial>') return if uid > 0x40000000: item = wolfpack.finditem(uid) if item: container = item.getoutmostitem() if container.container: container = container.container # Going to container socket.sysmessage('...
8370aae69a670e7ce8038f48921bcd1e272b4579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/8370aae69a670e7ce8038f48921bcd1e272b4579/__init__.py
'woodenwall1': (buildWall, ('a6', 'a7', 'a8', 'a9')), 'woodenwall1small': (buildWall, ('b6', 'b8', 'b7', '13')), 'woodenwall1tiny': (buildWall, ('bd', 'be', 'bf', 'c0')),
'woodenwall2': (buildWall, ('a6', 'a7', 'a8', 'a9')), 'woodenwall2small': (buildWall, ('b6', 'b8', 'b7', '13')), 'woodenwall2tiny': (buildWall, ('bd', 'be', 'bf', 'c0')),
def buildRoofN(x1, x2, y1, y2, z, mapid, args): for x in range(x1, x2 + 1): roff = x2 - x loff = x - x1 # Which tile should we create? if roff == loff: itemid = args[2] tilez = z + loff * 3 elif loff < roff: itemid = args[0] tilez = z + loff * 3 else: itemid = args[1] tilez = z + roff * 3 for y in range(y1, y2 + 1): ...
072cf8d6a0834eb0bb4a247dfd56a68bc04c4ccf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/072cf8d6a0834eb0bb4a247dfd56a68bc04c4ccf/build.py
duration = int(char.skill[MAGERY] * 200)
duration = int(300 + char.skill[MAGERY] * 100)
def cast(self, char, mode, args): if char.polymorph: if char.socket: char.socket.clilocmessage(1005559) return 0
e4bf32d80817a65291896a0ed5f1899bff24f83c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/e4bf32d80817a65291896a0ed5f1899bff24f83c/circle7.py
item = wolfpack.additem(random.choice(RANDOM_MAGIC_ITEMS))
def createpack(char, killer, corpse, pack): if killer: luckChance = properties.luckchance(killer) else: luckChance = 0 # A pack is actually a list of lists for item in pack: packchance = item[ PACK_CHANCE ] packstackable = item[ PACK_STACKABLE ] packamount = item[ PACK_AMOUNT ] packitem = item[ PACK_ITEM ] spawn = Fa...
aeb14799573ef57610a19301a9cca79fdf48b1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/aeb14799573ef57610a19301a9cca79fdf48b1f0/loot.py
newitem.direction = 29
def target(self, char, mode, targettype, target, args, item): char.turnto(target)
94a9827338cf51901bed326109be3334fc41fb69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/94a9827338cf51901bed326109be3334fc41fb69/circle6.py
potionexplosion( [ char.serial, item.serial, 4, item.amount ] )
potionexplosion( item, [ char.serial, 4] )
def onUse( char, item ): socket = char.socket # Potions need to be on your body to use them, or in arms reach. if item.getoutmostchar() != char: char.message( "This potion is out of your reach..." ) return False # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return False else: potiontype = item.g...
88cfef9e0a5530a5c6c5a3478fd5c03c66361c78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/88cfef9e0a5530a5c6c5a3478fd5c03c66361c78/potions.py
socket.sysmessage( 'Please select a target...', RED )
socket.sysmessage( 'You should throw this now!', RED )
def onUse( char, item ): socket = char.socket # Potions need to be on your body to use them, or in arms reach. if item.getoutmostchar() != char: char.message( "This potion is out of your reach..." ) return False # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return False else: potiontype = item.g...
88cfef9e0a5530a5c6c5a3478fd5c03c66361c78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/88cfef9e0a5530a5c6c5a3478fd5c03c66361c78/potions.py
throwobject(char, potion, pos, 1, 3, 5)
if potion: throwobject(char, potion, pos, 1, 3, 5)
def targetexplosionpotion(char, args, target): socket = char.socket potion = args[0] check = 10 if not potion: return 0 if target.char: if target.char.invulnerable: return 0 if target.char.dead: return 0 if not char.cansee(target.char): return 0 if char.distanceto(target.char) > check: return 0 if not char.canreach(tar...
88cfef9e0a5530a5c6c5a3478fd5c03c66361c78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/88cfef9e0a5530a5c6c5a3478fd5c03c66361c78/potions.py
counter = args[2] bonus = args[3]
counter = args[1] bonus = potion.amount
def potionexplosion( potion, args ): char = wolfpack.findchar(args[0]) counter = args[2] bonus = args[3] if not bonus: bonus = 1 if counter > 0: potion.addtimer( 1000, "potions.potioncountdown", [char.serial, counter, bonus] ) return else: potion.soundeffect(0x307) # Boom! potion.effect( explosions[randint( 0, 2 )], 20...
88cfef9e0a5530a5c6c5a3478fd5c03c66361c78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/88cfef9e0a5530a5c6c5a3478fd5c03c66361c78/potions.py
item.name = textentries[ key ]
if textentries[ key ] == '': item.name = str('') else: item.name = textentries[ key ]
def iteminfo_response( player, args, choice ): socket = player.socket item = args[0] if choice.button == 0 or not item or not socket: return True textentries = choice.text keys = textentries.keys() for key in keys: if key == 1: item.name = textentries[ key ] elif key == 2: item.id = int( hex2dec( textentries[ key ] )...
d5323692a349a48b69afac9c2651f9c1c55fb5c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d5323692a349a48b69afac9c2651f9c1c55fb5c6/info.py
gem = createwoodgem()
gem = createwoodgem(target, pos)
def getvein( socket, pos, target ): #Check if we have wood_gems near ( range = 4) gems = wolfpack.items( pos.x, pos.y, pos.map, 4 ) for gem in gems: if wolfpack.finditem( gem.serial ): if gem.hastag('resource') and gem.gettag('resource') == 'wood' and gem.hastag('resname') and gem.id == hex2dec( 0x1ea7 ): return gem br...
01dcc10ac7dbd4b98909c41b1c5b39879176bd66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/01dcc10ac7dbd4b98909c41b1c5b39879176bd66/lumberjacking.py
if not char.checkskill( char, resource, LUMBERJACKING, 0 ):
if not char.checkskill( resource, LUMBERJACKING, 0 ):
def successlumberjacking( time, args ): char = args[0] pos = args[1] # Target POS resource = args[2] amount = args[3] tool = args[4] resname = args[5] table = args[6] socket = char.socket # Lets make sure we stayed next to the tree # Player can reach that ? if char.pos.map != pos.map or char.pos.distance( pos ) > chop...
01dcc10ac7dbd4b98909c41b1c5b39879176bd66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/01dcc10ac7dbd4b98909c41b1c5b39879176bd66/lumberjacking.py
socket.clilocmessage( 500118, "", 0x3b2, 3 )
char.socket.clilocmessage( 500118, "", 0x3b2, 3 )
def evaluatingintel( char, skill ): #Only Handle Evalint if skill != EVALUATINGINTEL: return False if char.socket.hastag( 'skill_delay' ): if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True else: char.socket.deltag( 'skill_delay' ) char.socke...
2d35448d9504822af65c929afb7238cbbf895a41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2d35448d9504822af65c929afb7238cbbf895a41/evaluatingintel.py
damage = damage / char.distanceto(potion)
if char.distanceto(potion) > 1: damage = damage / char.distanceto(potion)
def potiondamage( char, target, potion, dmgbonus ): if potion.gettag('potiontype') == 11: damage = randint(POTION_LESSEREXPLOSION_RANGE[0], POTION_LESSEREXPLOSION_RANGE[1]) elif potion.gettag('potiontype') == 12: damage = randint(POTION_EXPLOSION_RANGE[0], POTION_EXPLOSION_RANGE[1]) elif potion.gettag('potiontype') == ...
45c20af55197dcfce4bb070f35ee9c6d569a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/45c20af55197dcfce4bb070f35ee9c6d569a885e/potions.py
char.socket.sysmessage( str(statics))
def response( char, args, target ): char.turnto(target.pos) if not char.canreach(target.pos, 4): char.socket.clilocmessage(500295) return item = wolfpack.finditem(args[0]) if not item: return if not item.hastag( 'resname' ): return False else: resname = item.gettag( 'resname' ) if target.item: targetitem = wolfpac...
4315bfe9e996b60e6379b2c55825e658634bb84c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/4315bfe9e996b60e6379b2c55825e658634bb84c/ore.py
if target.item.baseid in FORGEIDS:
if target.item and target.item.baseid in FORGEIDS:
def response( char, args, target ): char.turnto(target.pos) if not char.canreach(target.pos, 4): char.socket.clilocmessage(500295) return item = wolfpack.finditem(args[0]) if not item: return if not item.hastag( 'resname' ): return False else: resname = item.gettag( 'resname' ) if target.item: targetitem = wolfpac...
4315bfe9e996b60e6379b2c55825e658634bb84c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/4315bfe9e996b60e6379b2c55825e658634bb84c/ore.py
elif target.item.baseid in DEF_ORES:
elif target.item and target.item.baseid in DEF_ORES:
def response( char, args, target ): char.turnto(target.pos) if not char.canreach(target.pos, 4): char.socket.clilocmessage(500295) return item = wolfpack.finditem(args[0]) if not item: return if not item.hastag( 'resname' ): return False else: resname = item.gettag( 'resname' ) if target.item: targetitem = wolfpac...
4315bfe9e996b60e6379b2c55825e658634bb84c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/4315bfe9e996b60e6379b2c55825e658634bb84c/ore.py
damage = min(100, max(15, damage))
if damage > 75: damage = 75 elif damage < 15: damage = 15
def cast(self, char, mode, args=[], target=None, item=None): if not self.consumerequirements(char, mode, args, target, item): return targets = []
51113e2c614e73cde8d02b88b5e790d8712e0f1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/51113e2c614e73cde8d02b88b5e790d8712e0f1d/circle8.py
gump.addText( 250, 120, unicode( "%s" % unicode(player.region) ), 0x834 )
if player.region: gump.addText( 250, 120, unicode( "%s" % unicode(player.region.name) ), 0x834 ) else: gump.addText( 250, 120, "Unknown", 0x834 )
def callbackWho( char, args, choice ): socket = char.socket wholist = args[0] if choice.button == 0: return False elif wholist[ choice.button - 10 ]: player = wolfpack.findchar( wholist[ choice.button - 10 ] ) pos = player.pos account = player.account # Socket Information gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
24e84c8b2e9f58d6864ee6d8f9ca87330382ec4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/24e84c8b2e9f58d6864ee6d8f9ca87330382ec4b/who.py
def cmdWho( socket, command, argstring ):
def cmdWho(socket, command, arguments): showWhoGump(socket.player, 0) def showWhoGump(player, page):
def onLoad(): wolfpack.registercommand( "who", cmdWho ) return
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
worldsocketcount = wolfpack.sockets.count()
def cmdWho( socket, command, argstring ): wholist = [] worldsocketcount = wolfpack.sockets.count() worldsocket = wolfpack.sockets.first() while worldsocket: wholist += [ worldsocket.player.serial ] worldsocket = wolfpack.sockets.next() if len(wholist) == 0: return False gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
wholist += [ worldsocket.player.serial ]
char = worldsocket.player if char.invisible and char.rank > player.rank: continue if not char.account: continue wholist.append(char)
def cmdWho( socket, command, argstring ): wholist = [] worldsocketcount = wolfpack.sockets.count() worldsocket = wolfpack.sockets.first() while worldsocket: wholist += [ worldsocket.player.serial ] worldsocket = wolfpack.sockets.next() if len(wholist) == 0: return False gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
if len(wholist) == 0: return False
count = len(wholist) newwholist = wholist[page * 10:] while len(newwholist) == 0 and page > 0: page -= 1 newwholist = wholist[page * 10:] wholist = newwholist
def cmdWho( socket, command, argstring ): wholist = [] worldsocketcount = wolfpack.sockets.count() worldsocket = wolfpack.sockets.first() while worldsocket: wholist += [ worldsocket.player.serial ] worldsocket = wolfpack.sockets.next() if len(wholist) == 0: return False gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
gump.addText( 165, 20, unicode("Who Menu"), 0x530 ) gump.addButton( 30, 320, 0xFB1, 0xFB3, 0 ) gump.addText( 70, 320, unicode("Close"), 0x834 )
gump.addText( 165, 20, tr("Who Menu"), 0x530 ) gump.addButton( 30, 320, 0xFB1, 0xFB3, 0 ) gump.addText( 70, 320, tr("Close"), 0x834 ) gump.addText( 145, 320, tr("Players: %u") % count, 0x834 )
def cmdWho( socket, command, argstring ): wholist = [] worldsocketcount = wolfpack.sockets.count() worldsocket = wolfpack.sockets.first() while worldsocket: wholist += [ worldsocket.player.serial ] worldsocket = wolfpack.sockets.next() if len(wholist) == 0: return False gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
maxpages = (worldsocketcount + 9) / 10 socket.sysmessage('Sockets: %u' % worldsocketcount) page = 0 serialcount = 0 while page <= maxpages: page += 1 gump.startPage( page ) gump.addText( 280, 320, unicode( "Page %i of %i" % ( page, maxpages ) ), 0x834 ) if page < maxpages: gump.addPageButton( 260, 320, 0x0FA, 0x0FA, ...
pages = (count + 9) / 10 player.socket.sysmessage(tr('Total sockets: %u') % count) gump.addText( 280, 320, tr( "Page %i of %i" % ( page + 1, pages ) ), 0x834 ) if page + 1 < pages: gump.addButton( 260, 320, 0x0FA, 0x0FA, 1 ) if page > 0: gump.addButton( 240, 320, 0x0FC, 0x0FC, 2 ) offset = 22 for item in wholist[:1...
def cmdWho( socket, command, argstring ): wholist = [] worldsocketcount = wolfpack.sockets.count() worldsocket = wolfpack.sockets.first() while worldsocket: wholist += [ worldsocket.player.serial ] worldsocket = wolfpack.sockets.next() if len(wholist) == 0: return False gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
gump.send( socket ) return
gump.send( player.socket ) def callbackWho( char, args, choice ): page = args[0] if choice.button == 1: showWhoGump(char, page + 1) elif choice.button == 2 and page > 0: showWhoGump(char, page - 1) elif choice.button > 2: serial = choice.button - 2 player = wolfpack.findchar(serial) details(char, player)
def cmdWho( socket, command, argstring ): wholist = [] worldsocketcount = wolfpack.sockets.count() worldsocket = wolfpack.sockets.first() while worldsocket: wholist += [ worldsocket.player.serial ] worldsocket = wolfpack.sockets.next() if len(wholist) == 0: return False gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackgro...
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
def callbackWho( char, args, choice ): wholist = args[0] if choice.button == 0: return False elif wholist[ choice.button - 10 ]: player = wolfpack.findchar( wholist[ choice.button - 10 ] ) details(char, player) return True else: return False
def callbackWho( char, args, choice ): wholist = args[0] if choice.button == 0: return False elif wholist[ choice.button - 10 ]: player = wolfpack.findchar( wholist[ choice.button - 10 ] ) details(char, player) return True else: return False
a481dcbd56274d8e191358dddc986da15be4da95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a481dcbd56274d8e191358dddc986da15be4da95/who.py
player.socket.clilocmessage()
player.socket.clilocmessage(500364)
def target(player, arguments, target): # Check the target if not target.item or target.item.id != 0xfab: player.socket.clilocmessage(500857) return # Needs to in our belongings if target.item.getoutmostchar() != player: player.socket.clilocmessage() return # Wear out the tools dyes = wolfpack.finditem(arguments[0]) i...
db7e036c1898654316b81a35e7db4d380b489499 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/db7e036c1898654316b81a35e7db4d380b489499/dyes.py