rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def selecttarget( char, args, target ): # you cannot use skill while dead if char.dead: socket.clilocmessage( 502796 ) return potion = wolfpack.finditem(args[ 0 ]) if not potion: return # target item must exists in backpack #if not target.item.getoutmostitem() == char.backpack: # char.socket.clilocmessage( 500295 ) #...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
if not ( target.item.hasscript( 'food' ) or target.item.hasscript( 'blades' ) ): char.socket.clilocmessage( 502145 )
global ALLOWED if not target.item.id in ALLOWED: char.socket.clilocmessage(1060204)
def selecttarget( char, args, target ): # you cannot use skill while dead if char.dead: socket.clilocmessage( 502796 ) return potion = wolfpack.finditem(args[ 0 ]) if not potion: return # target item must exists in backpack #if not target.item.getoutmostitem() == char.backpack: # char.socket.clilocmessage( 500295 ) #...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
def selecttarget( char, args, target ): # you cannot use skill while dead if char.dead: socket.clilocmessage( 502796 ) return potion = wolfpack.finditem(args[ 0 ]) if not potion: return # target item must exists in backpack #if not target.item.getoutmostitem() == char.backpack: # char.socket.clilocmessage( 500295 ) #...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
strength = int( potion.gettag( 'potiontype' ) ) - 13
strength = int( potion.gettag( 'potiontype' ) ) - 14
def poisonit( char, args ): potion = wolfpack.finditem(args[ 0 ]) item = wolfpack.finditem(args[ 1 ]) if not potion or not item: return skill = char.skill[ POISONING ] # poison strength : lesser(1), normal, greater, deadly(4) strength = int( potion.gettag( 'potiontype' ) ) - 13 # consume the potion / add a blank bot...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
bottle.moveto( char.pos.x, char.pos.y, char.pos.z, char.pos.map ) bottle.update()
bottle.update()
def poisonit( char, args ): potion = wolfpack.finditem(args[ 0 ]) item = wolfpack.finditem(args[ 1 ]) if not potion or not item: return skill = char.skill[ POISONING ] # poison strength : lesser(1), normal, greater, deadly(4) strength = int( potion.gettag( 'potiontype' ) ) - 13 # consume the potion / add a blank bot...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
if skill < ( strength + 0.8 ) * 200:
if not char.checkskill( POISONING, MINSKILLS[strength], MAXSKILLS[strength] ):
def poisonit( char, args ): potion = wolfpack.finditem(args[ 0 ]) item = wolfpack.finditem(args[ 1 ]) if not potion or not item: return skill = char.skill[ POISONING ] # poison strength : lesser(1), normal, greater, deadly(4) strength = int( potion.gettag( 'potiontype' ) ) - 13 # consume the potion / add a blank bot...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
char.checkskill( POISONING, 0, 1000 ) if random.randint( 0, 20 ) > ( skill - strength * 200 ): strength = strength - 1 if strength < 1: char.socket.clilocmessage( 502148 ) return 1 char.socket.clilocmessage( 1010518 ) else: char.socket.clilocmessage( 1010517 )
char.socket.clilocmessage(1010517)
def poisonit( char, args ): potion = wolfpack.finditem(args[ 0 ]) item = wolfpack.finditem(args[ 1 ]) if not potion or not item: return skill = char.skill[ POISONING ] # poison strength : lesser(1), normal, greater, deadly(4) strength = int( potion.gettag( 'potiontype' ) ) - 13 # consume the potion / add a blank bot...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
item.settag( 'poisoning_uses', 20 - strength * 2 )
item.settag( 'poisoning_uses', 18 - strength * 2 )
def poisonit( char, args ): potion = wolfpack.finditem(args[ 0 ]) item = wolfpack.finditem(args[ 1 ]) if not potion or not item: return skill = char.skill[ POISONING ] # poison strength : lesser(1), normal, greater, deadly(4) strength = int( potion.gettag( 'potiontype' ) ) - 13 # consume the potion / add a blank bot...
2616b0716784beecde638fa774c10ba40680b82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2616b0716784beecde638fa774c10ba40680b82a/poisoning.py
file.replace('\\', '/')
file.replace("\\", '/')
def translate_path(self, uri): """ Translate a /-separated PATH to the local filename syntax.
03aa1b9acfbc8f3ae5c1277299af543472feb06d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/03aa1b9acfbc8f3ae5c1277299af543472feb06d/webadmin.py
filepath = os.path.normpath(os.path.abspath('web\\'))
filepath = os.path.normpath( os.path.abspath( 'web/' ) )
def run( self ):
03aa1b9acfbc8f3ae5c1277299af543472feb06d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/03aa1b9acfbc8f3ae5c1277299af543472feb06d/webadmin.py
chance = max(0, char.skill[MINING] - mining.ORES[resname][mining.MINSKILL]) / 1000.0 if not char.skill[MINING] >= reqskill:
minskill = reqskill - 250 maxskill = reqskill + 250 if char.skill[MINING] < reqskill:
def dosmelt(char, args): ore = args[0] forge = args[1] resname = args[2] if not mining.ORES.has_key(resname): char.socket.sysmessage('You cannot smelt that kind of ore.') return 0 success = 0 reqskill = mining.ORES[resname][mining.REQSKILL] chance = max(0, char.skill[MINING] - mining.ORES[resname][mining.MINSKILL]) /...
ae1ff668425461a948f5dcd3a80d6434aec57495 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ae1ff668425461a948f5dcd3a80d6434aec57495/ore.py
if not skills.checkskill(char, MINING, chance):
if not char.checkskill(MINING, minskill, maxskill):
def dosmelt(char, args): ore = args[0] forge = args[1] resname = args[2] if not mining.ORES.has_key(resname): char.socket.sysmessage('You cannot smelt that kind of ore.') return 0 success = 0 reqskill = mining.ORES[resname][mining.REQSKILL] chance = max(0, char.skill[MINING] - mining.ORES[resname][mining.MINSKILL]) /...
ae1ff668425461a948f5dcd3a80d6434aec57495 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ae1ff668425461a948f5dcd3a80d6434aec57495/ore.py
return _wolfpack.allitemsserials()
return _wolfpack.allcharsserials()
def allcharsserials(): return _wolfpack.allitemsserials()
6dcf7b8ddb92446376d5fcb69c3b1ed50f842162 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6dcf7b8ddb92446376d5fcb69c3b1ed50f842162/__init__.py
gump.setType(0x87bde41a)
gump.setType(0x77bde41a)
def pages_gump(player, i=0): player.socket.closegump(0x87bde41a) global pages pages.check() # Make sure all pages are valid count = (pages.count() + 4) / 5 if count < 1: count = 1 if i >= count or i < 0: i = 0 gump = wolfpack.gumps.cGump() #gump.startPage(0) # Gump Background gump.addBackground( 0xE10, 480, 360 )...
129a2c61c4cc818ee858983131df6be24765e793 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/129a2c61c4cc818ee858983131df6be24765e793/pages.py
baseid = argstring
if argstring.lower() == "nomulti": socket.sysmessage("You choose to nuke anything except items in multis") baseid = argstring else: if argstring.lower() == "onlymulti": socket.sysmessage("You choose to nuke just items in multis") baseid = argstring else: baseid = argstring
def nuke( socket, command, argstring ): argstring = argstring.strip() # Remove trailing and leading whitespaces if len( argstring ) > 0: if argstring.lower() == "all": gump = WarningGump( 1060635, 30720, "Wiping <i>all</i> items in the world.<br>Do you wish to proceed?", 0xFFC000, 420, 400, wipeAllWorld, [] ) gump.send...
0249c95b100a046523998d2d414958efb72b5f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/0249c95b100a046523998d2d414958efb72b5f6f/wipe.py
message = "Casting spell %u (%s) on item %s (0x%x).\n" % (spell.spellid, spell.__class__.__name__, target.item.getname(), target.item.serial)
message = u"Casting spell %u (%s) on item %s (0x%x).\n" % (spell.spellid, spell.__class__.__name__, target.item.getname(), target.item.serial)
def target_response( char, args, target ): if char.socket: 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 (spell.validtar...
b0df2e721d400d7edd213cbe32f90ad5ae850d25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b0df2e721d400d7edd213cbe32f90ad5ae850d25/__init__.py
anvil = 1
anvil = True
def checkanvilandforge(char): # Check dynamic items. # We should later check for statics too forge = 0 anvil = 0 items = wolfpack.items(char.pos.x, char.pos.y, char.pos.map, 5) for item in items: if item.id == 0xFAF or item.id == 0xFB0: anvil = 1 elif item.id == 0xFB1 or (item.id >= 0x197A and item.id <= 0x19A9): forge...
54bd81337ecab5c984998ef9032c8f3e8104828a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/54bd81337ecab5c984998ef9032c8f3e8104828a/blacksmithing.py
forge = 1
forge = True
def checkanvilandforge(char): # Check dynamic items. # We should later check for statics too forge = 0 anvil = 0 items = wolfpack.items(char.pos.x, char.pos.y, char.pos.map, 5) for item in items: if item.id == 0xFAF or item.id == 0xFB0: anvil = 1 elif item.id == 0xFB1 or (item.id >= 0x197A and item.id <= 0x19A9): forge...
54bd81337ecab5c984998ef9032c8f3e8104828a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/54bd81337ecab5c984998ef9032c8f3e8104828a/blacksmithing.py
item.health = item.maxhealth
item.health = item.maxhealth
def repair(self, player, arguments, target): if not checkanvilandforge(player): player.socket.clilocmessage(1044282) return
54bd81337ecab5c984998ef9032c8f3e8104828a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/54bd81337ecab5c984998ef9032c8f3e8104828a/blacksmithing.py
char.socket.cloclocmessage( 1011350 )
char.socket.cliclocmessage( 1011350 )
def tracking( char, skill ): if skill != TRACKING: return 0 if char.socket.hastag( 'skill_delay' ): cur_time = servertime() if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 else: char.socket.deltag( 'skill_delay' ) char.socket.cloclocmessage( 1011350 ) # Wh...
63ee125550bb2b8e8f78aea83c5e0d84c21c5e0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/63ee125550bb2b8e8f78aea83c5e0d84c21c5e0f/tracking.py
if target.char.priv & 0x04 or target.char.dead:
if target.char.invulnerable or target.char.dead:
def response( char, args, target ): socket = char.socket # you cannot use skill while dead if char.dead: socket.clilocmessage( 502796, "", 0x3b2, 3, char ) return # Check for a valid target if not target.char: socket.clilocmessage( 502801, "", 0x3b2, 3, char ) return # it's a player if target.char.socket: socket.cl...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
skills.animaltaming.removetags( totame )
removetags( totame )
def callback( char, args ): if len( args ) < 2: return # animal = args[ 1 ] totame = wolfpack.findchar( args[ 1 ] ) if not totame: return if not char: return # tamer dead : 502796 if char.dead: skills.animaltaming.removetags( totame ) char.socket.clilocmessage( 502796, "", 0x3b2, 3, totame ) return # out of range :...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
skills.animaltaming.removetags( totame )
removetags( totame )
def callback( char, args ): if len( args ) < 2: return # animal = args[ 1 ] totame = wolfpack.findchar( args[ 1 ] ) if not totame: return if not char: return # tamer dead : 502796 if char.dead: skills.animaltaming.removetags( totame ) char.socket.clilocmessage( 502796, "", 0x3b2, 3, totame ) return # out of range :...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
skills.animaltaming.removetags( totame )
removetags( totame )
def callback( char, args ): if len( args ) < 2: return # animal = args[ 1 ] totame = wolfpack.findchar( args[ 1 ] ) if not totame: return if not char: return # tamer dead : 502796 if char.dead: skills.animaltaming.removetags( totame ) char.socket.clilocmessage( 502796, "", 0x3b2, 3, totame ) return # out of range :...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
skills.animaltaming.removetags( totame )
removetags( totame )
def callback( char, args ): if len( args ) < 2: return # animal = args[ 1 ] totame = wolfpack.findchar( args[ 1 ] ) if not totame: return if not char: return # tamer dead : 502796 if char.dead: skills.animaltaming.removetags( totame ) char.socket.clilocmessage( 502796, "", 0x3b2, 3, totame ) return # out of range :...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
skills.animaltaming.removetags( totame )
removetags( totame )
def callback( char, args ): if len( args ) < 2: return # animal = args[ 1 ] totame = wolfpack.findchar( args[ 1 ] ) if not totame: return if not char: return # tamer dead : 502796 if char.dead: skills.animaltaming.removetags( totame ) char.socket.clilocmessage( 502796, "", 0x3b2, 3, totame ) return # out of range :...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
totame.tamed = true
totame.tamed = 1
def callback( char, args ): if len( args ) < 2: return # animal = args[ 1 ] totame = wolfpack.findchar( args[ 1 ] ) if not totame: return if not char: return # tamer dead : 502796 if char.dead: skills.animaltaming.removetags( totame ) char.socket.clilocmessage( 502796, "", 0x3b2, 3, totame ) return # out of range :...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
skills.animaltaming.removetags( totame )
removetags( totame )
def callback( char, args ): if len( args ) < 2: return # animal = args[ 1 ] totame = wolfpack.findchar( args[ 1 ] ) if not totame: return if not char: return # tamer dead : 502796 if char.dead: skills.animaltaming.removetags( totame ) char.socket.clilocmessage( 502796, "", 0x3b2, 3, totame ) return # out of range :...
592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/592cd6f0b1b67bd3de2ce51301b995a7dd5ea1a5/animaltaming.py
if not veingem: veingem = createwoodgem( target, pos )
def response( args ): target = args[0] tool = args[1] char = args[2] socket = char.socket pos = target.pos if not socket: return False if socket.hastag('is_lumberjacking') and ( socket.gettag( 'is_lumberjacking' ) > wolfpack.time.currenttime() ): socket.clilocmessage( 500119, "", GRAY ) return False else: socket.delt...
51c43553980d27f067d6941661cdfa9a5efc9576 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/51c43553980d27f067d6941661cdfa9a5efc9576/lumberjacking.py
if resourcecount <= 0:
if resourcecount <= 0 and not resource.hastag( 'resource_empty' ): resource.settag( 'resource_empty', 'true' ) resource.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", [], True ) socket.clilocmessage( 500488, '', GRAY ) return False elif resource.hastag( 'resource_empty' ):
def hack_logs( char, target, tool, resource ): socket = char.socket pos = target.pos resname = resource.gettag( 'resname' ) amount = resource.gettag( 'resourcecount' ) resourcecount = int(resource.gettag( 'resourcecount' )) # No resource left to harvest? if resourcecount <= 0: socket.clilocmessage( 500488, '', GRAY ...
51c43553980d27f067d6941661cdfa9a5efc9576 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/51c43553980d27f067d6941661cdfa9a5efc9576/lumberjacking.py
elif resource.gettag( 'resourcecount' ) == 0: if not resource.hastag ('resource_empty') and int( resource.gettag( 'resourcecount' ) ) == 0: resource.settag( 'resource_empty', 'true' ) resource.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", [], True )
def successlumberjacking( char, args ): socket = char.socket pos = args[0] # Target POS resource = wolfpack.finditem(args[1]) amount = args[2] tool = wolfpack.finditem(args[3]) resname = args[4] table = args[5] if not tool: return False # Lets make sure we stayed next to the tree # Player can reach that ? if char.pos...
51c43553980d27f067d6941661cdfa9a5efc9576 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/51c43553980d27f067d6941661cdfa9a5efc9576/lumberjacking.py
socket.systemmessage(unicode(message))
socket.sysmessage(unicode(message))
def successmining( char, gem, table, resname, amount, ore ): socket = char.socket message = table[ resname ][ SUCCESSCLILOC ] backpack = char.getbackpack() if not backpack: return OOPS resore = "%s%s" % ( resname, ore ) resourceitem = wolfpack.additem( str(resore) ) resourceitem.decay = 1 if (FELUCIA2XRESGAIN == TRUE) ...
ffb25cb2777db82cad945222c89b655593f07b02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ffb25cb2777db82cad945222c89b655593f07b02/mining.py
valid = 0 if valid and not item.hastag('spawntype') or not item.hastag('spawndef'): valid = 0
valid = False if valid and (not item.hastag('spawntype') or not item.hastag('spawndef')): valid = False
def processSpawns(process): # Process the designated partition for i in range(0, len(process)): item = wolfpack.finditem(process[i]) # Check if the spawn is valid. valid = item != None if valid and not item.hasscript( 'spawngem' ): valid = 0 if valid and not item.hastag('spawntype') or not item.hastag('spawndef'): val...
54a1f1818e5511f522b9e86d7e44dbde33773e22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/54a1f1818e5511f522b9e86d7e44dbde33773e22/spawns.py
if response.button == 1 and player in guild.members:
if response.button == 1 and (player in guild.members or player in guild.canidates):
def guildMembershipResponse(player, arguments, response): guild = wolfpack.findguild(arguments[0]) if not guild: player.socket.sysmessage(tr('The guild you try to manage has already been disbanded.')) return if response.button == 1 and player in guild.members: # Toggle Guildsign if 1 in response.switches: if player i...
602669979f8782f06952bee0b4285aee74e248c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/602669979f8782f06952bee0b4285aee74e248c3/stone.py
text = '<basefont color="
text = '<basefont color="
def import_command( socket, command, arguments ): char = socket.player gump = cGump( x=100, y=100, callback="commands.import.callback" ) gump.addBackground( id=0x2436, width=350, height=300 ) text = '<basefont color="#FEFEFE"><h3>Import</h3><br><basefont color="#FEFEFE">Enter the name of the worldfile you want to im...
76153deff83a68e714f330e333f07bb8c8071dd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/76153deff83a68e714f330e333f07bb8c8071dd3/import.py
def parseSphere(file, map):
def parseSphere51a(file, map):
def parseSphere(file, map): itemid = -1 props = {} count = 0 warnings = '' while 1: line = file.readline() if not line: break line = line.strip() if line.startswith('[WORLDITEM ') and line.endswith(']'): itemid = int(line[11:len(line)-1], 16) elif itemid != -1 and "=" in line: (key, value) = line.split('=', 1) props[...
76153deff83a68e714f330e333f07bb8c8071dd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/76153deff83a68e714f330e333f07bb8c8071dd3/import.py
socket = player.socket
def npcquestmenu(npc, player, questamount): socket = player.socket dialog = cGump( nomove=1, x=100, y=30 ) dialog.addResizeGump(37, 14, 9260, 445, 422) dialog.addTiledGump(81, 35, 358, 386, 5124, 0) dialog.addTiledGump(55, 32, 30, 391, 10460, 0) dialog.addTiledGump(439, 32, 30, 391, 10460, 0) dialog.addGump(-12, 290,...
b8f71f77d22ecdf17f3ee0893d4502f7fec28c6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b8f71f77d22ecdf17f3ee0893d4502f7fec28c6b/npcs.py
dialog.addText(136, 79, npc.name + ", from: " + npc.region.name, 1149)
if npc.region: dialog.addText(136, 79, npc.name + ", from: " + npc.region.name, 1149) else: dialog.addText(136, 79, npc.name, 1149)
def npcquestmenu(npc, player, questamount): socket = player.socket dialog = cGump( nomove=1, x=100, y=30 ) dialog.addResizeGump(37, 14, 9260, 445, 422) dialog.addTiledGump(81, 35, 358, 386, 5124, 0) dialog.addTiledGump(55, 32, 30, 391, 10460, 0) dialog.addTiledGump(439, 32, 30, 391, 10460, 0) dialog.addGump(-12, 290,...
b8f71f77d22ecdf17f3ee0893d4502f7fec28c6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b8f71f77d22ecdf17f3ee0893d4502f7fec28c6b/npcs.py
value = fishItem[ 1 ] * skill + fishItem[ 2 ]
value = int( fishItem[ 1 ] * skill + fishItem[ 2 ] )
def getFish( fishSkill, deepwater ): # 120 is the maximum skill we're going to use here skill = min( 120, floor( fishSkill / 10 ) ) itemid = None itemname = None possibleitems = [] maxvalue = 0 # We calculate a random value from 0 to this value and # then check the array above for matching items # Fill items and nam...
b79b40743237665356761a7dbc1733ccefd6be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b79b40743237665356761a7dbc1733ccefd6be8b/fishing.py
gems = wolfpack.items( pos.x, pos.y, pos.map, 4 )
gems = wolfpack.items( pos.x, pos.y, pos.map, 0 )
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...
885b24a349a38741c41174fd7250a177bce2354e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/885b24a349a38741c41174fd7250a177bce2354e/lumberjacking.py
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 break
if gem.hastag('resource') and gem.gettag('resource') == 'wood' and gem.hastag('resname') and gem.id == 0x1ea7: return gem break
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...
885b24a349a38741c41174fd7250a177bce2354e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/885b24a349a38741c41174fd7250a177bce2354e/lumberjacking.py
return
return OOPS
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
return
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
if potiontype in [ 1, 2, 3 ]:
elif potiontype in [1,2,3]:
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.socket.clilocmessage(1005000)
socket.clilocmessage(1005000)
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.socket.clilocmessage(1049547)
socket.clilocmessage(1049547) if char.hitpoints > char.maxhitpoints: char.hitpoints = char.maxhitpoints char.updatehealth()
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
return
return OK
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
elif potiontype in [ 4, 5, 6 ]:
elif potiontype in [4,5,6]:
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
return
return OK
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
elif potiontype in [ 7, 8 ]:
elif potiontype in [7,8]:
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
agilityPotion(char, item, potiontype)
agilityPotion( char, item, potiontype )
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.socket.clilocmessage(502173) return
socket.clilocmessage(502173) return OK
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.socket.clilocmessage( 502173, '', GRAY ) return
socket.clilocmessage( 502173, '', GRAY ) return OK
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
return elif potiontype in [ 0 ]: nightsightPotion( char, potion ) return
return OK elif potiontype in [ 18, 19 ]: refreshPotion( char, item, potiontype ) return OK
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
socket.sysmessage( 'Unknown potion...' ) return
return OOPS
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 # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return OOPS else: potiontype = item.gettag( ...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
def nightsightPotion( char, potion ): char.message( "This potion should help you to see in the dark!" ) char.message( "But... It's not done yet. Sorry :(" )
def consumePotion( char, potion, givebottle ): if potion.amount == 1: potion.delete() else: potion.amount -= 1 potion.update() if givebottle == TRUE: # Lets add an empty bottle! bottle = wolfpack.additem( 'f0e' ) # Empty Bottle Definition if not wolfpack.utilities.tocontainer( bottle, char.getbackpack() ): bottle.upd...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.settag( "heal_timer", wolfpack.time.servertime() + HEAL_POT_DELAY ) return
char.settag( "heal_timer", time.servertime() + HEAL_POT_DELAY ) return OK
def checkHealTimer( char ): if not char.hastag( "heal_timer" ): char.settag( "heal_timer", wolfpack.time.servertime() + HEAL_POT_DELAY ) return # Compare elapsed = int( char.gettag( "heal_timer" ) ) if elapsed > wolfpack.time.servertime(): char.socket.clilocmessage( 500235, '', GRAY ) # You must wait 10 seconds befor...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
if elapsed > wolfpack.time.servertime():
if elapsed > time.servertime():
def checkHealTimer( char ): if not char.hastag( "heal_timer" ): char.settag( "heal_timer", wolfpack.time.servertime() + HEAL_POT_DELAY ) return # Compare elapsed = int( char.gettag( "heal_timer" ) ) if elapsed > wolfpack.time.servertime(): char.socket.clilocmessage( 500235, '', GRAY ) # You must wait 10 seconds befor...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.settag( "heal_timer", wolfpack.time.servertime() + HEAL_POT_DELAY ) return def healPotion( char, potion, healtype ): if not canUsePotion( char, potion ) or not checkHealTimer( char ): return OOPS amount = 0 if healtype == 1: amount = randint( POTION_LESSERHEAL_RANGE[0], POTION_LESSERHEAL_RANGE[1] ) elif he...
char.settag( "heal_timer", time.servertime() + HEAL_POT_DELAY ) return OK
def checkHealTimer( char ): if not char.hastag( "heal_timer" ): char.settag( "heal_timer", wolfpack.time.servertime() + HEAL_POT_DELAY ) return # Compare elapsed = int( char.gettag( "heal_timer" ) ) if elapsed > wolfpack.time.servertime(): char.socket.clilocmessage( 500235, '', GRAY ) # You must wait 10 seconds befor...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus
char.dexterity2 -= bonus char.dexterity -= bonus
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstami...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
return
return OK
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstami...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.strength = char.strength - bonus
char.strength2 -= bonus char.strength -= bonus
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstami...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
return
return OK
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstami...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.intelligence = char.intelligence - bonus char.maxmana = char.maxmana - bonus
char.intelligence2 -= bonus char.intelligence -= bonus
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstami...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
return
return OK else: return OOPS """ ----------------------------- -- POTION FUNCTIONS -- ----------------------------- """ def nightsightPotion( char, potion ): if char.hastag('nightsight'): bonus = char.gettag('nightsight') char.lightbonus = max(0, char.lightbonus - bonus) bonus = min(18, math.floor(18 * (char.skill...
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstami...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
if not canUsePotion( char, potion ): return OOPS
def agilityPotion( char, potion, agilitytype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if agilitytype == 6: bonus = 10 # Greater Agility elif agilitytype == 7: bonus = 20 else: return OOPS char.dexterity = char.dexterity + bonus char.maxstamina = char.maxstamina + bonus wolfpack.addti...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
if agilitytype == 6:
if agilitytype == 7:
def agilityPotion( char, potion, agilitytype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if agilitytype == 6: bonus = 10 # Greater Agility elif agilitytype == 7: bonus = 20 else: return OOPS char.dexterity = char.dexterity + bonus char.maxstamina = char.maxstamina + bonus wolfpack.addti...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
def agilityPotion( char, potion, agilitytype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if agilitytype == 6: bonus = 10 # Greater Agility elif agilitytype == 7: bonus = 20 else: return OOPS char.dexterity = char.dexterity + bonus char.maxstamina = char.maxstamina + bonus wolfpack.addti...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
elif agilitytype == 7:
elif agilitytype == 8:
def agilityPotion( char, potion, agilitytype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if agilitytype == 6: bonus = 10 # Greater Agility elif agilitytype == 7: bonus = 20 else: return OOPS char.dexterity = char.dexterity + bonus char.maxstamina = char.maxstamina + bonus wolfpack.addti...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
else: return OOPS char.dexterity = char.dexterity + bonus char.maxstamina = char.maxstamina + bonus
else: return OOPS char.dexterity2 = bonus char.dexterity += bonus
def agilityPotion( char, potion, agilitytype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if agilitytype == 6: bonus = 10 # Greater Agility elif agilitytype == 7: bonus = 20 else: return OOPS char.dexterity = char.dexterity + bonus char.maxstamina = char.maxstamina + bonus wolfpack.addti...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
if strengthtype == 8:
if strengthtype == 9:
def strengthPotion( char, potion, strengthtype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if strengthtype == 8: bonus = 10 # Greater Agility elif strengthtype == 9: bonus = 20 else: return OOPS char.strength = char.strength + bonus char.maxhitpoints = char.maxhitpoints + bonus wolfpack...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
def strengthPotion( char, potion, strengthtype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if strengthtype == 8: bonus = 10 # Greater Agility elif strengthtype == 9: bonus = 20 else: return OOPS char.strength = char.strength + bonus char.maxhitpoints = char.maxhitpoints + bonus wolfpack...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
elif strengthtype == 9:
elif strengthtype == 10:
def strengthPotion( char, potion, strengthtype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if strengthtype == 8: bonus = 10 # Greater Agility elif strengthtype == 9: bonus = 20 else: return OOPS char.strength = char.strength + bonus char.maxhitpoints = char.maxhitpoints + bonus wolfpack...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
else: return OOPS char.strength = char.strength + bonus char.maxhitpoints = char.maxhitpoints + bonus
else: return OOPS char.strength2 = bonus char.strength += bonus
def strengthPotion( char, potion, strengthtype ): if not canUsePotion( char, potion ): return OOPS bonus = 0 # Agility if strengthtype == 8: bonus = 10 # Greater Agility elif strengthtype == 9: bonus = 20 else: return OOPS char.strength = char.strength + bonus char.maxhitpoints = char.maxhitpoints + bonus wolfpack...
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
char.socket.sysmessage( "You shouldn't drink that..." )
levels = [14, 15, 16, 17] if poisontype == levels[0]: poison.poison(char, 0) elif poisontype == levels[1]: poison.poison(char, 1) elif poisontype == levels[2]: poison.poison(char, 2) elif poisontype == levels[3]: poison.poison(char, 3) else: return OOPS char.action( ANIM_FIDGET3 ) char.soundeffect( SOUND_DRINK1 ) cons...
def poisonPotion( char, potion, poisontype ): char.socket.sysmessage( "You shouldn't drink that..." ) return
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
def poisonPotion( char, potion, poisontype ): char.socket.sysmessage( "You shouldn't drink that..." ) return
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
multiitem.delete() contador += 1
try: n = multiitem.player except: multiitem.delete() contador += 1
def demolish( char, item ): if not checkAccess(char, item.multi, ACCESS_OWNER): char.socket.sysmessage('You are not the owner of this house.') return # If Sign has no Multi, then we have problems here if not item.hastag( 'house' ): return # Assign the Multi multi = wolfpack.findobject( item.gettag( 'house' ) ) # Look...
a2fd610888e3d041105cedc0005e7dac12691c57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a2fd610888e3d041105cedc0005e7dac12691c57/signpost.py
thread = WebserverThread( WEBSERVER_THREAD )
thread = WebserverThread( REMOTEADMIN_PORT )
def onLoad(): web.sessions.clear_sessions() # Start the Thread global thread thread = WebserverThread( WEBSERVER_THREAD ) thread.start()
0a56b4614e2d6b257f50d390643560dd6bb4735c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/0a56b4614e2d6b257f50d390643560dd6bb4735c/webadmin.py
char.socket.attachtarget( "weapons.blades.response", [ item.serial ] )
char.socket.attachtarget( "blades.response", [ item.serial ] )
def onUse( char, item ): char.socket.clilocmessage( 0xF69A6 ) # What do you want to use this on? char.socket.attachtarget( "weapons.blades.response", [ item.serial ] ) return 1
5147a70bf9b73b5ace738b2e0f0cf2a9084b42f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/5147a70bf9b73b5ace738b2e0f0cf2a9084b42f3/blades.py
fp.write(data)
fp.write(data.encode('utf-8'))
def run(self): while not self.stopped.isSet(): # Check if status data is available and process it data = None self.mutex.acquire() if self.data: data = self.data self.data = None self.mutex.release() if data: global outputfile try: fp = file(outputfile, 'wu') fp.write(data) fp.close() except Exception, e: console.log(...
76b76910d014f05ff8a733d846563cd87da7c8f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/76b76910d014f05ff8a733d846563cd87da7c8f6/status.py
for path in glob.glob(pathexp): if os.path.exists(path): for file in dircache.listdir(path):
for path in glob.glob( pathexp ): if os.path.exists( path ): for file in dircache.listdir( path ):
def findFile( searchpath ): path = "" file = "" for entry in searchpath: pathexp, fileexp = os.path.split( entry ) for path in glob.glob(pathexp): if os.path.exists(path): for file in dircache.listdir(path): if fnmatch.fnmatch( file, fileexp ): return (file, path) return (None, None)
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
return (file, path) return (None, None)
return ( file, path ) return ( None, None )
def findFile( searchpath ): path = "" file = "" for entry in searchpath: pathexp, fileexp = os.path.split( entry ) for path in glob.glob(pathexp): if os.path.exists(path): for file in dircache.listdir(path): if fnmatch.fnmatch( file, fileexp ): return (file, path) return (None, None)
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so", \ "/usr/local/lib/libmysqlclient*.so", \ "/usr/lib/libmysqlclient*.so" ] MySQL_LIBSTATICSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.a", \ "/usr/lib/mysql/libmysqlclient*.a", \ "/usr/local/lib/libmysqlclien...
MySQL_LIBSEARCHPATH = [ \ "/usr/local/lib/libmysqlclient*.so", \ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so" ] MySQL_LIBSTATICSEARCHPATH = [ \ "/usr/local/lib/libmysqlclient*.a", \ "/usr/local/lib/mysql/libmysqlclient*.a", \ "/usr/lib/libmysqlclient*...
def checkMySQL(options): if sys.platform == "win32": MySQL_LIBSEARCHPATH = [ sys.prefix + "\Libs\mysqlclient*.lib" ] MySQL_INCSEARCHPATH = [ sys.prefix + "\include\mysql.h" ] elif sys.platform == "linux2": MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so", \ "/usr/...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so", \ "/usr/local/lib/libmysqlclient*.so", \ "/usr/lib/libmysqlclient*.so" ] MySQL_LIBSTATICSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.a", \ "/usr/lib/mysql/libmysqlclient*.a", \ "/usr/local/lib/libmysqlclien...
MySQL_LIBSEARCHPATH = [ \ "/usr/local/lib/libmysqlclient*.so", \ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so" ] MySQL_LIBSTATICSEARCHPATH = [ \ "/usr/local/lib/libmysqlclient*.a", \ "/usr/local/lib/mysql/libmysqlclient*.a", \ "/usr/lib/libmysqlclient*...
def checkMySQL(options): if sys.platform == "win32": MySQL_LIBSEARCHPATH = [ sys.prefix + "\Libs\mysqlclient*.lib" ] MySQL_INCSEARCHPATH = [ sys.prefix + "\include\mysql.h" ] elif sys.platform == "linux2": MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so", \ "/usr/...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
PYTHONLIBSEARCHPATH += [ "/usr/local/lib/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython*/libpython2.3*.so", \ "/usr/lib/libpython2.3*.so", \ "/usr/lib/[Pp]ython*/libpython2.3*.so", \ "/usr/lib/[Pp]ython*/config/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython*/config/libpython2.3*.so"] PYTHONLIBSTATICSEARCHPATH += [ "/us...
PYTHONLIBSEARCHPATH += [ \ "/usr/local/lib/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython*/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython*/config/libpython2.3*.so", \ "/usr/lib/libpython2.3*.so", \ "/usr/lib/[Pp]ython*/libpython2.3*.so", \ "/usr/lib/[Pp]ython*/config/libpython2.3*.so" ] PYTHONLIBSTATICSEARCHPATH += [ \...
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
PYTHONLIBSEARCHPATH += [ "/usr/local/lib/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython2.3*/libpython2.3*.so", \ "/usr/lib/libpython2.3*.so", \ "/usr/lib/[Pp]ython2.3*/libpython2.3*.so", \ "/usr/lib/[Pp]ython2.3*/config/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython2.3*/config/libpython2.3*.so"] PYTHONLIBSTATICSEARCHPA...
PYTHONLIBSEARCHPATH += [ \ "/usr/local/lib/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython2.3*/libpython2.3*.so", \ "/usr/local/lib/[Pp]ython2.3*/config/libpython2.3*.so", \ "/usr/lib/libpython2.3*.so", \ "/usr/lib/[Pp]ython2.3*/libpython2.3*.so", \ "/usr/lib/[Pp]ython2.3*/config/libpython2.3*.so" ] PYTHONLIBSTATICSEARC...
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
PYTHONINCSEARCHPATH += [ "/System/Library/Frameworks/Python.framework/Versions/Current/Headers/Python.h" ]
PYTHONINCSEARCHPATH += [ \ "/System/Library/Frameworks/Python.framework/Versions/Current/Headers/Python.h" ]
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
PYTHONLIBSTATICSEARCHPATH += ["/System/Library/Frameworks/Python.framework/Versions/Current/Python", \ "/System/Library/Frameworks/Python.framework/Versions/Current/lib/[Pp]ython*/config/libpython*.a", \ "/usr/local/lib/[Pp]ython*/config/libpython*.a"]
PYTHONLIBSTATICSEARCHPATH += [ \ "/usr/local/lib/[Pp]ython*/config/libpython*.a", \ "/System/Library/Frameworks/Python.framework/Versions/Current/Python", \ "/System/Library/Frameworks/Python.framework/Versions/Current/lib/[Pp]ython*/config/libpython*.a" ]
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
sys.stdout.write(green("ok\n")) else: sys.stdout.write( red("failed") + "\n" )
sys.stdout.write(green("Pass\n")) else: sys.stdout.write( red("Fail") + "\n" )
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
sys.stdout.write(yellow("Warning:") + " Wolfpack support for big endian systems is completely experimental and unlikey to work\n" )
sys.stdout.write(yellow("Warning:") + " Wolfpack support for big endian systems is completely experimental and unlikey to work!\n" )
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
py_libfile = None py_libpath = None
def checkPython( options, lookForHeaders, lookForLib ): PYTHONINCSEARCHPATH = [ distutils.sysconfig.get_python_inc() + os.path.sep + "Python.h" ] if distutils.sysconfig.get_config_vars().has_key("DESTSHARED"): PYTHONLIBSEARCHPATH = [ distutils.sysconfig.get_config_vars()["DESTSHARED"] + os.path.sep + "libpython*" ] els...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
parser.add_option("--python-includes", dest="py_incpath", help="Python include directory")
parser.add_option("--python-includes", dest="py_incpath", help="Python include path")
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
parser.add_option("--disable-translation", action="store_true", dest="disable_translation", help="Disable non-English language support.")
parser.add_option("--enable-translation", action="store_true", dest="enable_translation", help="Enable non-English language support.")
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
checkPython(options, True, not (sys.platform == "darwin") )
pyIncSearch = True pyLibSearch = True if sys.platform == "darwin": pyLibSearch = False checkPython( options, pyIncSearch, pyLibSearch )
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
if options.disable_translation: DEFINES += "QT_NO_TRANSLATION "
if not options.enable_translation: DEFINES += "QT_NO_TRANSLATION "
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
config.write("
config.write("
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
sys.stdout.write(green("Generating makefile..."))
sys.stdout.write("Generating makefile... ")
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
sys.stdout.write("Generating Visual Studio project files...\n")
sys.stdout.write("Generating Visual Studio project files... \n")
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable...
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py