rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
def onUse(char, keg): | def onDropOnItem(potionkeg, potion): if ('potionkeg' not in potionkeg.events) or ('potions' not in potion.events): return 0 char = potion.container | def onUse(char, keg): socket = char.socket kegfill = int(keg.gettag('kegfill')) backpack = char.getbackpack() if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) if kegfill > 0: count = backpack.countitems(['f0e']) if count >= 1: backpack.removeitems(['f0e'], 1) newpot = wolfpack.addite... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
kegfill = int(keg.gettag('kegfill')) | if not potion.hastag('potiontype') or not potionkeg.hastag('kegfill'): socket.sysmessage("Only potions may be added to a potion keg!") return 0 char.say("Test") """ char.say("Step 1") if potionkeg.id in [ hex2dec(0x1ad6), hex2dec(0x1ad7) ]: char.say("Step 2") if potionkeg.hastag('kegfill') and potionkeg.hastag('potio... | def onUse(char, keg): socket = char.socket kegfill = int(keg.gettag('kegfill')) backpack = char.getbackpack() if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) if kegfill > 0: count = backpack.countitems(['f0e']) if count >= 1: backpack.removeitems(['f0e'], 1) newpot = wolfpack.addite... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) | if potionkeg.hastag('potiontype'): checkkegstatus( char, keg, potionkeg.gettag('potiontype') ) | def onUse(char, keg): socket = char.socket kegfill = int(keg.gettag('kegfill')) backpack = char.getbackpack() if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) if kegfill > 0: count = backpack.countitems(['f0e']) if count >= 1: backpack.removeitems(['f0e'], 1) newpot = wolfpack.addite... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
newpot = wolfpack.additem(potions[keg.gettag('potiontype')][POT_DEF]) | newpot = wolfpack.additem(potions[potionkeg.gettag('potiontype')][POT_DEF]) | def onUse(char, keg): socket = char.socket kegfill = int(keg.gettag('kegfill')) backpack = char.getbackpack() if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) if kegfill > 0: count = backpack.countitems(['f0e']) if count >= 1: backpack.removeitems(['f0e'], 1) newpot = wolfpack.addite... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
keg.settag('kegfill', kegfill ) | potionkeg.settag('kegfill', kegfill ) | def onUse(char, keg): socket = char.socket kegfill = int(keg.gettag('kegfill')) backpack = char.getbackpack() if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) if kegfill > 0: count = backpack.countitems(['f0e']) if count >= 1: backpack.removeitems(['f0e'], 1) newpot = wolfpack.addite... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
if keg.name != " keg.name = ' keg.deltag('potiontype') | if potionkeg.name != " potionkeg.name = ' potionkeg.deltag('potiontype') | def onUse(char, keg): socket = char.socket kegfill = int(keg.gettag('kegfill')) backpack = char.getbackpack() if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) if kegfill > 0: count = backpack.countitems(['f0e']) if count >= 1: backpack.removeitems(['f0e'], 1) newpot = wolfpack.addite... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
if keg.name != " keg.name = ' if keg.hastag('potiontype'): keg.deltag('potiontype') | if potionkeg.name != " potionkeg.name = ' if potionkeg.hastag('potiontype'): potionkeg.deltag('potiontype') | def onUse(char, keg): socket = char.socket kegfill = int(keg.gettag('kegfill')) backpack = char.getbackpack() if keg.hastag('potiontype'): checkkegstatus( char, keg, keg.gettag('potiontype') ) if kegfill > 0: count = backpack.countitems(['f0e']) if count >= 1: backpack.removeitems(['f0e'], 1) newpot = wolfpack.addite... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
def onDropOnItem(keg, potion): char = potion.container | def checkkegstatus(char, potionkeg, potiontype): if potionkeg.name != potions[ potiontype ][ KEG_NAME ]: potionkeg.name = potions[ potiontype ][ KEG_NAME ] return 1 | def onDropOnItem(keg, potion): char = potion.container if 'potionkeg' not in keg.events or 'potion' not in potion.events: char.say("Error with events!") return 0 if not potion.hastag('potiontype'): return 0 if keg.id == hex2dec(0x1ad6) or keg.id == hex2dec(0x1ad7): if keg.hastag('kegfill') and keg.hastag('potiontype... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py |
if 'potionkeg' not in keg.events or 'potion' not in potion.events: char.say("Error with events!") return 0 if not potion.hastag('potiontype'): return 0 if keg.id == hex2dec(0x1ad6) or keg.id == hex2dec(0x1ad7): if keg.hastag('kegfill') and keg.hastag('potiontype'): if potion.gettag('potiontype') == keg.gettag('potion... | def onDropOnItem(keg, potion): char = potion.container if 'potionkeg' not in keg.events or 'potion' not in potion.events: char.say("Error with events!") return 0 if not potion.hastag('potiontype'): return 0 if keg.id == hex2dec(0x1ad6) or keg.id == hex2dec(0x1ad7): if keg.hastag('kegfill') and keg.hastag('potiontype... | d14ce2db290f3d620430d0bc52fea152c525be8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d14ce2db290f3d620430d0bc52fea152c525be8b/potionkeg.py | |
if ( len( os.environ["QTDIR"] ) > 0 and os.path.exists( os.environ["QTDIR"] ) ): | if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): | def checkQt(): if sys.platform == "win32": QMAKE_EXECUTABLE = "qmake.exe" else: QMAKE_EXECUTABLE = "qmake" sys.stdout.write( "Checking QTDIR enviroment variable..." ) if ( len( os.environ["QTDIR"] ) > 0 and os.path.exists( os.environ["QTDIR"] ) ): sys.stdout.write( "ok\n" ) else: sys.stdout.write( red("failed") + "\n... | 97597a23d70e32c27d80da57b65547192eaf9307 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/97597a23d70e32c27d80da57b65547192eaf9307/configure.py |
def hack_kindling( char, pos ): socket = char.socket if pos.distance( char.pos ) > 3: char.socket.clilocmessage( 0x7A258 ) # You cannot reach that return 1 direction = char.directionto( pos ) if char.direction != direction: char.direction = direction char.updateflags() # Let's add some Kindling item = wolfpack.addit... | ff1e5179f20e994488b4adb347d69c41909b78b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ff1e5179f20e994488b4adb347d69c41909b78b4/lumberjacking.py | ||
char.socket.resendstatus() | char.socket.resendstatus() | def hack_kindling( char, pos ): socket = char.socket if pos.distance( char.pos ) > 3: char.socket.clilocmessage( 0x7A258 ) # You cannot reach that return 1 direction = char.directionto( pos ) if char.direction != direction: char.direction = direction char.updateflags() # Let's add some Kindling item = wolfpack.addit... | ff1e5179f20e994488b4adb347d69c41909b78b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ff1e5179f20e994488b4adb347d69c41909b78b4/lumberjacking.py |
chance = int( ( char.skill[ LUMBERJACKING ] - woodtable[ resname ][ MINSKILL ] ) / 10 ) | chance = max(0, char.skill[LUMBERJACKING] - woodtable[ resname ][ MINSKILL ]) / 1000.0 | 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] # Lets make sure we stayed next to the tree # Player can reach that ? if char.pos.map != pos.map or char.pos... | ff1e5179f20e994488b4adb347d69c41909b78b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ff1e5179f20e994488b4adb347d69c41909b78b4/lumberjacking.py |
if not char.checkskill( LUMBERJACKING, reqskill, 1200 ): char.socket.clilocmessage( 500495 ) | if not skills.checkskill(char, LUMBERJACKING, chance): socket.clilocmessage(500495) | 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] # Lets make sure we stayed next to the tree # Player can reach that ? if char.pos.map != pos.map or char.pos... | ff1e5179f20e994488b4adb347d69c41909b78b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ff1e5179f20e994488b4adb347d69c41909b78b4/lumberjacking.py |
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] # Lets make sure we stayed next to the tree # Player can reach that ? if char.pos.map != pos.map or char.pos... | ff1e5179f20e994488b4adb347d69c41909b78b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ff1e5179f20e994488b4adb347d69c41909b78b4/lumberjacking.py | ||
wolfpack.addtimer( 2000, "magic.runebook.recall0", [ char.serial, runes[ runenum ], runebook.serial, charges ] ) | wolfpack.addtimer( 2000, "magic.runebook.recall0", [ char.serial, runes[ runenum ], item.serial, charges ] ) | def callback( char, args, target ): # close the book char.socket.closegump( 0x87654322 ) # error checkings - will be removed later if( len( args ) < 1 ): char.socket.sysmessage( "script error 1. contact GM." ) return 1 item = args[0] if not item: char.socket.sysmessage( "script error 2. contact GM." ) return 1 # dist... | 2e9ff873ec19e3af483fde69b5da4640b7be6979 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2e9ff873ec19e3af483fde69b5da4640b7be6979/runebook.py |
char.socket.sysmessage( ) return 1 char.soundeffect( 0x1fd ) | char.socket.sysmessage( "You lack the mana to recall." ) return 1 | def recall1( self, args ): if( len( args ) < 2 ): return 1 char = wolfpack.findchar( args[ 0 ] ) rune = wolfpack.finditem( args[ 1 ] ) if not char: return 1 if not rune: char.socket.sysmessage( "runebook script error." ) return 1 # cast spell if( char.mana < 11 ): char.socket.sysmessage( ) return 1 char.soundeffect( 0x... | 2e9ff873ec19e3af483fde69b5da4640b7be6979 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2e9ff873ec19e3af483fde69b5da4640b7be6979/runebook.py |
if ( not potion or not potion.hastag( 'potiontype' ) ) or ( potion.gettag( 'potiontype' ) < 14 and potion.gettag( 'potiontype' ) > 17 ): | if ( not potion or not potion.hasintproperty( 'potiontype' ) ) or ( potion.getintproperty( 'potiontype' ) < 14 and potion.getintproperty( 'potiontype' ) > 17 ): | def selectpotion(char, args, target): # check if the targetted item is a poison potion potion = target.item if ( not potion or not potion.hastag( 'potiontype' ) ) or ( potion.gettag( 'potiontype' ) < 14 and potion.gettag( 'potiontype' ) > 17 ): char.socket.clilocmessage( 502139 ) return # assign target request char.s... | 767f8019e9bad1759f9ace7a1f8ac1acfe7e6f99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/767f8019e9bad1759f9ace7a1f8ac1acfe7e6f99/poisoning.py |
strength = int( potion.gettag( 'potiontype' ) ) - 14 | strength = int( potion.getintproperty( '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(0), normal, greater, deadly(3) strength = int( potion.gettag( 'potiontype' ) ) - 14 # consume the potion / add a blank bot... | 767f8019e9bad1759f9ace7a1f8ac1acfe7e6f99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/767f8019e9bad1759f9ace7a1f8ac1acfe7e6f99/poisoning.py |
socket.sysmessage( "Welcome to Wolfpack %s" % ( wolfpack.serverversion() ) ) socket.sysmessage( "Please refer to http://www.wpdev.org for bug reporting." ) | socket.sysmessage( "Welcome to %s" % ( wolfpack.serverversion() ) ) socket.sysmessage( "Report Bugs: http://bugs.wpdev.org/" ) | def onLogin( player ): socket = player.socket socket.sysmessage( "Welcome to Wolfpack %s" % ( wolfpack.serverversion() ) ) socket.sysmessage( "Please refer to http://www.wpdev.org for bug reporting." ) player.hidden = 0 player.update() return True | f787865b70f43dd28facce0a9058b065f37f4c73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f787865b70f43dd28facce0a9058b065f37f4c73/players.py |
char.socket.cilocmessage( 0x7A99C ) | char.socket.clilocmessage( 0x7A99C ) | def canUsePotion( char, item ): firsthand = char.itemonlayer( 1 ) secondhand = char.itemonlayer( 2 ) if not firsthand and not secondhand: return OK if firsthand and not secondhand and not firsthand.twohanded: return OK if not firsthand and secondhand and not secondhand.twohanded: return OK char.socket.cilocmessage(... | 8b2c827c8956ddbedfd8d2600ee0ac9d266ff046 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/8b2c827c8956ddbedfd8d2600ee0ac9d266ff046/potions.py |
self.includePath = "" self.librarySearchPath = "" self.toolPath = "" | self.incPath = "" self.libSearchPath = "" self._toolPath = "" | def __init__( self, output = sys.stdout ): self.output = output self.includePath = "" self.librarySearchPath = "" self.toolPath = "" self.libs = [] | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
return self.includePath | return self.incPath | def includePath( self ): return self.includePath | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
return self.librarySearchPath | return self.libSearchPath | def librarySearchPath( self ): return self.librarySearchPath | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
return self.toolPath | return self._toolPath | def toolPath( self ): return self.toolPath | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
self.includePath = path | self.incPath = path | def check( self, options ): self.out( "Checking Python Configuration:\n" ) | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
self.librarySearchPath = path | self.libSearchPath = path | def check( self, options ): self.out( "Checking Python Configuration:\n" ) | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
self.librarySearchPath = qt_dir | self.libSearchPath = qt_dir | def check( self, options ): self.out("Checking QT Configuration:\n") | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
self.toolPath = qmake_path | self._toolPath = qmake_path | def check( self, options ): self.out("Checking QT Configuration:\n") | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
qmakeFullPath = os.path.join(self.toolPath(), self.qmakeExecutable) | qt_qmake = os.path.join(self.toolPath(), self.qmakeExecutable) | def runQMake( self, projectfile, options ): qmakeFullPath = os.path.join(self.toolPath(), self.qmakeExecutable) if options: return os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, projectfile, options]) else: return os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, projectfile]) | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
PY_LIBDIR = buildLibLine( checkPython.librarySearchPath(), checkPython.libraryFiles() ) | PY_LIBDIR = buildLibLine( checkPython.librarySearchPath(), checkPython.libraryFiles()[0] ) | def main(): """ Entry Point """ parser = OptionParser(version="%prog 1.0") 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 color output support on this script") parser.add_opt... | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py |
config.write("QTDIR = %s\n" % checkQt.librarySearchPath() ) | def main(): """ Entry Point """ parser = OptionParser(version="%prog 1.0") 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 color output support on this script") parser.add_opt... | 81ffe7c25dbd734b2a6c3e023638f91202111b20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/81ffe7c25dbd734b2a6c3e023638f91202111b20/configure2.py | |
container = found[i].getoutmostitem() | item = found[i] container = item.getoutmostitem() | 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... | 982a8c05d91bd78b054dd54d3be586f4bf188f0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/982a8c05d91bd78b054dd54d3be586f4bf188f0e/__init__.py |
socket.sysmessage("Going to item '%s' [Serial: 0x%x; Top: 0x%x]." % (found[i].name, found[i].serial, container.serial)) pos = found[i].pos | socket.sysmessage("Going to item '%s' [Serial: 0x%x; Top: 0x%x]." % (item.name, item.serial, container.serial)) pos = container.pos | 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... | 982a8c05d91bd78b054dd54d3be586f4bf188f0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/982a8c05d91bd78b054dd54d3be586f4bf188f0e/__init__.py |
if item.container.isitem(): | if 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('... | 982a8c05d91bd78b054dd54d3be586f4bf188f0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/982a8c05d91bd78b054dd54d3be586f4bf188f0e/__init__.py |
else: char.addtimer( 0, "magic.runebook.recall1", [item.serial, target] ) | elif hasSpell(char, 32): char.addtimer( 0, "magic.runebook.recall1", [item.serial, target] ) else: char.socket.clilocmessage(502412) | def callback( char, args, target ): item = wolfpack.finditem(args[0]) closeGump(char, item) if target.button == 0: return if not char.canreach(item, 1): return button = target.button # Get selected rune number runenum = ( button - 1 ) % 100 target = getEntry(item, runenum) if not target: char.socket.clilocmessage... | 8491923fefd798ae658d5a42fb3daf2b1ed3b1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/8491923fefd798ae658d5a42fb3daf2b1ed3b1a4/runebook.py |
sys.stdout.write("Checking QT Configuration:\n") | def checkQt(): if sys.platform == "win32": QMAKE_EXECUTABLE = "qmake.exe" else: QMAKE_EXECUTABLE = "qmake" sys.stdout.write( "Checking QTDIR enviroment variable..." ) if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): sys.stdout.write( green("ok\n") ) else: sys.stdout.write( red("failed") +... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | |
sys.stdout.write( "Checking QTDIR enviroment variable..." ) | sys.stdout.write( " Checking QTDIR enviroment variable: " ) | def checkQt(): if sys.platform == "win32": QMAKE_EXECUTABLE = "qmake.exe" else: QMAKE_EXECUTABLE = "qmake" sys.stdout.write( "Checking QTDIR enviroment variable..." ) if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): sys.stdout.write( green("ok\n") ) else: sys.stdout.write( red("failed") +... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
sys.stdout.write( green("ok\n") ) else: sys.stdout.write( red("failed") + "\n" ) sys.stdout.write( "You must properly setup QTDIR" ) | sys.stdout.write( green("Pass\n") ) sys.stdout.write( " Found value for QTDIR: %s\n" % os.environ["QTDIR"] ) else: sys.stdout.write( red("Fail") + "\n" ) sys.stdout.write( " You must properly setup the QTDIR environment variable!\n" ) | def checkQt(): if sys.platform == "win32": QMAKE_EXECUTABLE = "qmake.exe" else: QMAKE_EXECUTABLE = "qmake" sys.stdout.write( "Checking QTDIR enviroment variable..." ) if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): sys.stdout.write( green("ok\n") ) else: sys.stdout.write( red("failed") +... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
sys.stdout.write( "Searching for qmake..." ) | sys.stdout.write( " Searching for qmake executable: " ) | def checkQt(): if sys.platform == "win32": QMAKE_EXECUTABLE = "qmake.exe" else: QMAKE_EXECUTABLE = "qmake" sys.stdout.write( "Checking QTDIR enviroment variable..." ) if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): sys.stdout.write( green("ok\n") ) else: sys.stdout.write( red("failed") +... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
QMAKESEARCHPATH.append( os.path.join(dir, QMAKE_EXECUTABLE) ) | QMAKESEARCHPATH.append( os.path.join( dir, QMAKE_EXECUTABLE ) ) | def checkQt(): if sys.platform == "win32": QMAKE_EXECUTABLE = "qmake.exe" else: QMAKE_EXECUTABLE = "qmake" sys.stdout.write( "Checking QTDIR enviroment variable..." ) if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): sys.stdout.write( green("ok\n") ) else: sys.stdout.write( red("failed") +... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
sys.stdout.write("\n") | def checkQt(): if sys.platform == "win32": QMAKE_EXECUTABLE = "qmake.exe" else: QMAKE_EXECUTABLE = "qmake" sys.stdout.write( "Checking QTDIR enviroment variable..." ) if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): sys.stdout.write( green("ok\n") ) else: sys.stdout.write( red("failed") +... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | |
elif sys.platform == "linux2": | elif sys.platform == "linux2" or sys.platform == "freebsd4" or sys.platform == "freebsd5": | 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/libmysqlclient*.so", \ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/us... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
elif sys.platform == "freebsd4" or sys.platform == "freebsd5": 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/... | 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/libmysqlclient*.so", \ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/us... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | |
sys.stdout.write("%s\n" % os.path.join( py_libpath, py_libfile ) ) | sys.stdout.write("%s\n" % os.path.join( mysql_libpath, mysql_libfile ) ) | 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/libmysqlclient*.so", \ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/us... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
sys.stdout.write( "Searching for MySQL includes... " ) | sys.stdout.write( " Searching for MySQL includes: " ) | 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/libmysqlclient*.so", \ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/us... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
else: PYTHONLIBSEARCHPATH = [] 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | |
elif sys.platform == "linux2": | elif sys.platform == "linux2" or sys.platform == "freebsd4" or sys.platform == "freebsd5": | 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
elif sys.platform == "freebsd4" or sys.platform == "freebsd5": 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/li... | 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | |
sys.stdout.write( "Checking Python version... " ) | sys.stdout.write( " Checking Python version: " ) | 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
sys.stdout.write( bold("Wolfpack requires Python version greater than 2.2.0 ") ) | sys.stdout.write( bold(" Wolfpack requires Python version >= 2.3.0\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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
sys.stdout.write( "Checking CPU byte order... %s\n" % sys.byteorder ) | sys.stdout.write( " Checking CPU byte order: %s\n" % sys.byteorder ) | 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
if lookForLib: sys.stdout.write( "Searching for Python library... " ) global py_libpath global py_libfile py_libfile = None py_libpath = None py_libfile, py_libpath = findFile( PYTHONLIBSEARCHPATH ) if ( py_libfile ): sys.stdout.write("%s\n" % os.path.join( py_libpath, py_libfile ) ) else: sys.stdout.write(red("Not Fo... | 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | |
py_incfile = None py_incpath = None sys.stdout.write( "Searching for Python includes... " ) | sys.stdout.write( " Searching for Python includes: " ) | 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
if lookForLib: sys.stdout.write( " Searching for Python library: " ) global py_libpath global py_libfile py_libfile, py_libpath = findFile( PYTHONLIBSEARCHPATH ) if ( py_libfile ): sys.stdout.write( "%s\n" % os.path.join( py_libpath, py_libfile ) ) else: sys.stdout.write(red("Not Found!") + "\n") sys.exit() s... | 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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | |
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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | ||
checkQt() | sys.stdout.write("\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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py |
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... | d980221e60ef0a27e1c9e50d015876701de198d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d980221e60ef0a27e1c9e50d015876701de198d2/configure.py | ||
item.id = ids[ item.id ] if not wolfpack.utilities.tocontainer(item, container): item.update() | item.id = ids[item.id] | 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 ] if not wolfpack.utilities.tocontainer(item, container): item.update() dropper.soundeffect(0x226) return True | bdda5c7aec91b93d868a3ffb957c94f62eff5f06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/bdda5c7aec91b93d868a3ffb957c94f62eff5f06/lightsource.py |
minskill = min(char.skill[skill], (1.0 - chance) * 1200) | minskill = min(char.skill[skill], int((1.0 - chance) * 1200) ) | def checkskill(char, skill, chance): # Normalize chance = min(1.0, max(0.02, chance)) minskill = min(char.skill[skill], (1.0 - chance) * 1200) maxskill = 1200 char.checkskill(skill, minskill, maxskill) return chance >= random.random() | c467b57218446b7e929ee314a4e70cb5555be325 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/c467b57218446b7e929ee314a4e70cb5555be325/aos.py |
char.log(LOG_TRACE, 'Gainchance for skill %s is %f.\n' % (SKILLNAMES[skill], gainchance)) | def onSkillGain(char, skill, lower, higher, success): # See if we can gain at all # GMs don't gain skills if char.dead or char.gm or char.polymorph: return if not SKILLS.has_key(skill): char.log(LOG_ERROR, "Is using an unidentified skill: %u\n" % skill) return info = SKILLS[skill] skills = char.skill value = skills[s... | db1ece49393a3a456480e3670ee92eec2ac8cb72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/db1ece49393a3a456480e3670ee92eec2ac8cb72/skillgain.py | |
def onSkillGain(char, skill, lower, higher, success): # See if we can gain at all # GMs don't gain skills if char.dead or char.gm or char.polymorph: return if not SKILLS.has_key(skill): char.log(LOG_ERROR, "Is using an unidentified skill: %u\n" % skill) return info = SKILLS[skill] skills = char.skill value = skills[s... | db1ece49393a3a456480e3670ee92eec2ac8cb72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/db1ece49393a3a456480e3670ee92eec2ac8cb72/skillgain.py | ||
if not text.lower().startswith( listener.name.lower() ) and not text.lower.startswith( 'vendor' ): return 0 if 369 not in keywords and 60 not in keywords: return 0 | def onSpeech( listener, speaker, text, keywords ): # Check if our name is in the beginning of the string #if not text.lower().startswith( listener.name.lower() ): # return 0 if ( speaker.distanceto( listener ) > 4 ): return 0 if ( abs( speaker.pos.z - listener.pos.z ) > 5 ): return 0 if speaker.id != 0x190 and speake... | 01c01a15c0d3b949729602195d1d899ae39d081e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/01c01a15c0d3b949729602195d1d899ae39d081e/barber.py | |
player.update(0, 1) if player.socket: player.socket.updateplayer() | player.update(0) if player.socket: | def onCollide(player, item): if item.hastag('playersonly') and player.npc: return 0 if not item.hastag('target'): if player.socket: player.socket.sysmessage('This gate leads nowhere...') else: console.log(LOG_ERROR, "NPC [%x] using gate [%x] without target.\n" % (player.serial, item.serial)) return 0 target = item.ge... | 64ef1e583b45e8a40327ce4398123b832634f728 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/64ef1e583b45e8a40327ce4398123b832634f728/gate.py |
return if (not target.validspawnspot() or wolfpack.findmulti(target)) and not char.gm: if char.socket: char.socketclilocmessage(501942) | def target(self, char, mode, targettype, target, args, item): char.turnto(target) | 733fb47eba4ff2bd69730a5d19e9f9f1c2c26839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/733fb47eba4ff2bd69730a5d19e9f9f1c2c26839/circle3.py | |
chance = chance * -1 | chance = 0 | def getexceptionalchance(self, player, arguments): if not self.skills.has_key(BOWCRAFT): return False | d3a229f3927dfab3f902c94177d231927ef4e830 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d3a229f3927dfab3f902c94177d231927ef4e830/bowcraft.py |
packet.setascii( offset, line ) offset += len( line ) + 1 | packet.setascii(offset, str(line)) offset += len(line) + 1 | def sendPage( char, serial, page, lines ): packetlength = 13 for line in lines: packetlength += len( line ) + 1 packet = wolfpack.packet( 0x66, packetlength ) packet.setshort( 1, packetlength ) packet.setint( 3, serial ) packet.setshort( 7, 1 ) # Always a single page # Page Info packet.setshort( 9, page ) packet.set... | 6bdc992224e998c2a81892e71231154caac1ab1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6bdc992224e998c2a81892e71231154caac1ab1a/book.py |
packet.send( char.socket ) | packet.send(char.socket) | def sendPage( char, serial, page, lines ): packetlength = 13 for line in lines: packetlength += len( line ) + 1 packet = wolfpack.packet( 0x66, packetlength ) packet.setshort( 1, packetlength ) packet.setint( 3, serial ) packet.setshort( 7, 1 ) # Always a single page # Page Info packet.setshort( 9, page ) packet.set... | 6bdc992224e998c2a81892e71231154caac1ab1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6bdc992224e998c2a81892e71231154caac1ab1a/book.py |
packet.setshort( 11, len( author ) + 1 ) packet.setascii( 13, author ) | packet.setshort( 11, len(title) + 1 ) packet.setascii( 13, title ) | def onUse( char, item ): char.objectdelay = 0 # Send BookOpen packet # Author / Title author = '' title = item.name if item.hastag( 'author' ): author = str( item.gettag( 'author' ) ) # Calculate Packet Length packetlength = 15 + len( author ) + 1 + len( title ) + 1 packet = wolfpack.packet( 0xd4, packetlength ) pa... | 6bdc992224e998c2a81892e71231154caac1ab1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6bdc992224e998c2a81892e71231154caac1ab1a/book.py |
packet.setshort( 13 + len( author ) + 1, len( title ) + 1 ) packet.setascii( 15 + len( author ) + 1, title ) | packet.setshort( 13 + len(title) + 1, len(author) + 1 ) packet.setascii( 15 + len(title) + 1, author ) | def onUse( char, item ): char.objectdelay = 0 # Send BookOpen packet # Author / Title author = '' title = item.name if item.hastag( 'author' ): author = str( item.gettag( 'author' ) ) # Calculate Packet Length packetlength = 15 + len( author ) + 1 + len( title ) + 1 packet = wolfpack.packet( 0xd4, packetlength ) pa... | 6bdc992224e998c2a81892e71231154caac1ab1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6bdc992224e998c2a81892e71231154caac1ab1a/book.py |
def onBookUpdatePage( char, item, page, content ): if item.hastag( 'protected' ): char.message( 'This book is protected' ) | def onBookUpdatePage(char, item, page, content): if item.hastag('protected'): char.message('This book is read only.') | def onBookUpdatePage( char, item, page, content ): if item.hastag( 'protected' ): char.message( 'This book is protected' ) return if item.hastag( 'pages' ): pages = int( item.gettag( 'pages' ) ) else: pages = 64 if page > pages or page < 1: return if len( content.strip() ) == 0: item.deltag( 'page%u' % page ) return... | 6bdc992224e998c2a81892e71231154caac1ab1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6bdc992224e998c2a81892e71231154caac1ab1a/book.py |
pages = int( item.gettag( 'pages' ) ) | pages = int(item.gettag('pages')) | def onBookUpdatePage( char, item, page, content ): if item.hastag( 'protected' ): char.message( 'This book is protected' ) return if item.hastag( 'pages' ): pages = int( item.gettag( 'pages' ) ) else: pages = 64 if page > pages or page < 1: return if len( content.strip() ) == 0: item.deltag( 'page%u' % page ) return... | 6bdc992224e998c2a81892e71231154caac1ab1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6bdc992224e998c2a81892e71231154caac1ab1a/book.py |
item.deltag( 'page%u' % page ) | item.deltag('page%u' % page) | def onBookUpdatePage( char, item, page, content ): if item.hastag( 'protected' ): char.message( 'This book is protected' ) return if item.hastag( 'pages' ): pages = int( item.gettag( 'pages' ) ) else: pages = 64 if page > pages or page < 1: return if len( content.strip() ) == 0: item.deltag( 'page%u' % page ) return... | 6bdc992224e998c2a81892e71231154caac1ab1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6bdc992224e998c2a81892e71231154caac1ab1a/book.py |
if str.upper() == "TRUE": | if str == "1" or str.upper() == "TRUE": | def str2bool( str ): if str.upper() == "TRUE": return True return False | c958a527c3ac8648857a79a75b4f436e6d15fd97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/c958a527c3ac8648857a79a75b4f436e6d15fd97/info.py |
target.char.update() | target.char.logouttime = 1 target.char.removefromview() | def disconnecttarget( char, args, target ): if not target.char or target.char.npc: char.socket.sysmessage( "That is not a valid character." ) if target.char: if target.char.socket: target.char.socket.disconnect() target.char.update() return 1 | 7956146249ca51ef89daeb4e6f6e412d81628ae7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/7956146249ca51ef89daeb4e6f6e412d81628ae7/disconnect.py |
duration = int(char.skill[MAGERY] / 100) | duration = int(char.skill[MAGERY] * 200) | def cast(self, char, mode, args): if char.polymorph: if char.socket: char.socket.clilocmessage(1005559) return 0 | bb85e52df70c752ff1b4e87021fa31c387cdbf53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/bb85e52df70c752ff1b4e87021fa31c387cdbf53/circle7.py |
if len(new_lock) != 0: key.settag('lock', new_lock) char.socket.sysmessage(tr('This key now unlocks: ') + new_lock) else: key.deltag('lock') char.socket.sysmessage(tr('You erase the lock information from the key.')) | if old_lock != new_lock: char.log(LOG_TRACE, tr("Changing lock of key 0x%x from '%s' to '%s'.\n") % (key.serial, old_lock, new_lock)) if len(new_lock) != 0: key.settag('lock', new_lock) char.socket.sysmessage(tr('This key now unlocks: ') + new_lock) else: key.deltag('lock') char.socket.sysmessage(tr('You erase the lock... | def gump_response(char, args, response): if len(args) < 1 or response.button != 1: return key = wolfpack.finditem(args[0]) if not char.canreach(key, 5): char.socket.clilocmessage(501661) return # Rename new_name = response.text[1][:30] # 30 Chars max. key.name = new_name char.socket.sysmessage(tr("You renamed the ke... | 955fda595af98652b038bcc6992ced8a56eb27dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/955fda595af98652b038bcc6992ced8a56eb27dd/key.py |
text = '<basefont color=" | text = tr('<basefont color=" | def rename_key(char, key): | 955fda595af98652b038bcc6992ced8a56eb27dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/955fda595af98652b038bcc6992ced8a56eb27dd/key.py |
text = '<basefont color=" | text = tr('<basefont color=" | def rename_key(char, key): | 955fda595af98652b038bcc6992ced8a56eb27dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/955fda595af98652b038bcc6992ced8a56eb27dd/key.py |
gump.addText(x=20, y=65, text='The name of this key:', hue=0x835) | gump.addText(x=20, y=65, text=tr('The name of this key:'), hue=0x835) | def rename_key(char, key): | 955fda595af98652b038bcc6992ced8a56eb27dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/955fda595af98652b038bcc6992ced8a56eb27dd/key.py |
gump.addText(x=235, y=65, text='The lock id of this key:', hue=0x835) | gump.addText(x=235, y=65, text=tr('The lock id of this key:'), hue=0x835) | def rename_key(char, key): | 955fda595af98652b038bcc6992ced8a56eb27dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/955fda595af98652b038bcc6992ced8a56eb27dd/key.py |
gump.addText(x=50, y=130, text='Modify key', hue=0x835) | gump.addText(x=50, y=130, text=tr('Modify key'), hue=0x835) | def rename_key(char, key): | 955fda595af98652b038bcc6992ced8a56eb27dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/955fda595af98652b038bcc6992ced8a56eb27dd/key.py |
gump.addText(x=50, y=170, text='Cancel', hue=0x835) | gump.addText(x=50, y=170, text=tr('Cancel'), hue=0x835) | def rename_key(char, key): | 955fda595af98652b038bcc6992ced8a56eb27dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/955fda595af98652b038bcc6992ced8a56eb27dd/key.py |
gump.addText( 275, 80 + offset, tr("Category: ") + page.category, 0x844 + 5 * pagetype ) gump.addText( 275, 60 + offset, tr("Time: ") + time.strftime(FORMAT_DATETIME, time.localtime(page.created)), 0x844 + 5 * pagetype ) | gump.addText( 300, 80 + offset, tr("Category: ") + page.category, 0x844 + 5 * pagetype ) gump.addText( 300, 60 + offset, tr("Time: ") + time.strftime(FORMAT_DATETIME, time.localtime(page.created)), 0x844 + 5 * pagetype ) | 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 )... | 54c08f9873dd8c0d1b800611103295c1283b1cc5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/54c08f9873dd8c0d1b800611103295c1283b1cc5/pages.py |
message = "Casting spell %u (%s) on character %s (0x%x).\n" % (spell.spellid, spell.__class__.__name__, target.char.name, target.char.serial) | if type(self.spellid) == int: message = "Casting spell %u (%s) on character %s (0x%x).\n" % (spell.spellid, spell.__class__.__name__, target.char.name, target.char.serial) else: message = "Casting spell %s on character %s (0x%x).\n" % (spell.__class__.__name__, target.char.name, target.char.serial) | 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 ... | a12afe8126125dca6fb067ee00652b191f3f6947 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/a12afe8126125dca6fb067ee00652b191f3f6947/__init__.py |
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 # See if we h... | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
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 # See if we h... | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
chance = ( (player.skill[BLACKSMITHING] - minskill) / (maxskill - minskill) ) / 10.0 | penalty = self.skills[BLACKSMITHING][2] if not penalty: penalty = 250 minskill += penalty maxskill += penalty chance = ( player.skill[BLACKSMITHING] - minskill ) / 10 if chance > 100: chance = 100 elif chance < 0: chance = chance * -1 chance = chance * .01 | def getexceptionalchance(self, player, arguments): # Only works if this item requires blacksmithing if not self.skills.has_key(BLACKSMITHING): return 0 | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py |
def applyproperties(self, player, arguments, item, exceptional): # See if special ingots were used in the creation of # this item. All items crafted by blacksmiths gain the # color! if self.submaterial1 > 0: material = self.parent.getsubmaterial1used(player, arguments) material = self.parent.submaterials1[material] ite... | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
def playcrafteffect(self, player, arguments): player.soundeffect(0x2a) | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
def repair(self, player, arguments, target): if not checkanvilandforge(player): player.socket.clilocmessage(1044282) return | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
def smelt(self, player, arguments, target): if not checkanvilandforge(player): player.socket.clilocmessage(1042678) return | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
def smelt(self, player, arguments, target): if not checkanvilandforge(player): player.socket.clilocmessage(1042678) return | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
def smelt(self, player, arguments, target): if not checkanvilandforge(player): player.socket.clilocmessage(1042678) return | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
def smelt(self, player, arguments, target): if not checkanvilandforge(player): player.socket.clilocmessage(1042678) return | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
console.log(LOG_ERROR, "Submenu with missing id attribute in menu %s.\n" % menu.id) else: loadMenu(child.getattribute('id'), menu) | console.log(LOG_ERROR, "Submenu with missing id attribute in menu %s.\n" % menu.id) else: loadMenu(child.getattribute('id'), menu) | def loadMenu(id, parent = None): definition = wolfpack.getdefinition(WPDT_MENU, id) if not definition: if parent: console.log(LOG_ERROR, "Unknown submenu %s in menu %s.\n" % (id, parent.id)) else: console.log(LOG_ERROR, "Unknown menu: %s.\n" % id) return name = definition.getattribute('name', '') menu = BlacksmithingM... | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py |
itemid = itemchild.value | itemid = itemchild.value | 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 | ||
itemdef = child.getattribute('definition') | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py | ||
action.submaterial1 = hex2dec(subchild.getattribute('amount', '0')) | action.submaterial1 = hex2dec(subchild.getattribute('amount', '0')) | itemdef = child.getattribute('definition') | 2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2fed29196e764f322a3e1d3a6ba446c5f0a6a9a8/blacksmithing.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.