rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
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... |
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... |
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... | |
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... |
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... |
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... |
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... |
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... |
sys.stdout.write(bold("Done\n")) | sys.stdout.write(bold(green("Done\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... |
player.removeevent('magic.nightsight') | if player.hastag( 'magic.nightsight'): player.removeevent('magic.nightsight') | def nightsight(socket, command, arguments): player = socket.player player.removeevent('magic.nightsight') if player.hastag('nightsight'): bonus = player.gettag('nightsight') player.lightbonus = max(0, player.lightbonus - bonus) player.deltag('nightsight') else: player.settag('nightsight', 255) player.lightbonus = 255 ... |
return True | def onLogin( player ): socket = player.socket socket.sysmessage( "Welcome to %s" % ( wolfpack.serverversion() ) ) socket.sysmessage( "Report Bugs: http://bugs.wpdev.org/" ) player.hidden = 0 player.update() socket.resendplayer() return True | |
if not wolfpack.utilities.tobackpack(firstitem, player1): | if not tobackpack(firstitem, player1): | def onTradeStart( player1, player2, firstitem ): # If we are trading with someone else right now, # trading should be denied if player2.hastag('trade_partner'): partner = wolfpack.findchar(int(player2.gettag('trade_partner'))) if partner and partner != player1: player1.socket.sysmessage('Your trading partner is current... |
def __init__( self, addr, handler ): BaseServer.__init__( self, addr, handler ) self.socket = socket.socket( self.address_family, self.socket_type ) self.socket.setblocking( 0 ) self.server_bind() self.server_activate() def handle_request(self): try: request, client_address = self.get_request() request.setblocking( 1 ... | def __init__( self, addr, htdocs ): BaseServer.__init__( self, addr, WebserverHandler ) self.socket = socket.socket( self.address_family, self.socket_type ) self.socket.setblocking( 0 ) self.server_bind() self.server_activate() self.htdocs = htdocs def handle_request(self): try: request, client_address = self.get_re... | def __init__( self, addr, handler ): BaseServer.__init__( self, addr, handler ) self.socket = socket.socket( self.address_family, self.socket_type ) self.socket.setblocking( 0 ) self.server_bind() self.server_activate() |
basepath = 'web/' have_fork = 0 have_popen2 = 0 have_popen3 = 0 def is_cgi( self ): path = self.path i = path.rfind( '?' ) if i >= 0: scriptpath, query = path[:i], path[i+1:] else: scriptpath = path query = '' if self.is_python( scriptpath ): path = posixpath.dirname( scriptpath ) script = posixpath.basename( s... | def is_cgi( self ): path = self.path i = path.rfind( '?' ) if i >= 0: scriptpath, query = path[:i], path[i+1:] else: scriptpath = path query = '' if self.is_python( scriptpath ): path = posixpath.dirname( scriptpath ) script = posixpath.basename( scriptpath ) + '?' + query self.cgi_info = path, script return 1 ret... | def handle_error(self, request, client_address): # Ignore Socket Errors && IOErrors if sys.exc_type == socket.error or sys.exc_type == IOError: dummy = cStringIO.StringIO() traceback.print_exc( None, dummy ) dummy.close() return |
def __init__( self, port=2594 ): Thread.__init__( self ) self.port = port self.stopped = Event() self.httpd = None def cancel( self ): self.stopped.set() self.httpd.server_close() def run( self ): server_address = ( '', self.port ) time.sleep( 5 ) print "Remote Admin running on port %u\n" % self.port try: self.ht... | def __init__( self, port=2594 ): Thread.__init__( self ) self.port = port self.stopped = Event() self.httpd = None def cancel( self ): self.stopped.set() self.httpd.server_close() def run( self ): server_address = ( '', self.port ) time.sleep( 5 ) print "Remote Admin running on port %u\n" % self.port try: filepat... | def __init__( self, port=2594 ): Thread.__init__( self ) self.port = port self.stopped = Event() self.httpd = None |
char.log(LOG_TRACE, 'Character [%x] lost %.01f%% of %s [%.01f%%].\n' % (char.serial, points, SKILLS[i][SKILL_NAME], char.skill[i] / 10.0)) | char.log(LOG_TRACE, 'Character [%x] lost %.01f%% %s [%.01f%%].\n' % (char.serial, points, SKILLS[i][SKILL_NAME], char.skill[i] / 10.0)) | def gainskill(char, skill, totalskill, totalcap): value = char.skill[skill] / 10.0 lock = char.skilllock[skill] cap = char.skillcap[skill] / 10.0 info = SKILLS[skill] if lock == 0 and value < cap: # Skills lower than 10.0% will gain 0.1% - 0.5% at once if value < 10.0: points = randint(1, 5) / 10.0 else: points = 0.1 ... |
char.log(LOG_TRACE, 'Character [%x] gained %.01f%% of %s [%.01f%%].\n' % (char.serial, points, info[SKILL_NAME], char.skill[skill] / 10.0)) | char.log(LOG_TRACE, u'Character [%(serial)x] gained %(points).01f%% %(name)s [%(value).01f%%].\n' % { \ 'serial': char.serial, 'points': points, 'name': info[SKILL_NAME], 'value': (char.skill[skill] / 10.0) }) | def gainskill(char, skill, totalskill, totalcap): value = char.skill[skill] / 10.0 lock = char.skilllock[skill] cap = char.skillcap[skill] / 10.0 info = SKILLS[skill] if lock == 0 and value < cap: # Skills lower than 10.0% will gain 0.1% - 0.5% at once if value < 10.0: points = randint(1, 5) / 10.0 else: points = 0.1 ... |
if offset == 280: | if offset == 210: | def guildMembers(player, guild): name = guild.name abbreviation = '' if len(guild.abbreviation) > 0: abbreviation = ' [%s]' % guild.abbreviation dialog = wolfpack.gumps.cGump() dialog.setCallback("guilds.stone.guildMembersResponse") dialog.setArgs([guild.serial]) dialog.startPage(0) dialog.addResizeGump(64, 34, 9260,... |
if armor and wolfpack.armorinfo.ARMOR_RESNAME_BONI.has_key(resname): | if (armor or shield) and wolfpack.armorinfo.ARMOR_RESNAME_BONI.has_key(resname): | def onShowTooltip(viewer, object, tooltip): armor = properties.itemcheck(object, ITEM_ARMOR) weapon = properties.itemcheck(object, ITEM_WEAPON) shield = properties.itemcheck(object, ITEM_SHIELD) if (armor or weapon or shield) and object.amount == 1: # Reinsert the name if we need an ore prefix prefix1 = None if object... |
if armor and wolfpack.armorinfo.ARMOR_RESNAME_BONI.has_key(resname2): | if (armor or shield) and wolfpack.armorinfo.ARMOR_RESNAME_BONI.has_key(resname2): | def onShowTooltip(viewer, object, tooltip): armor = properties.itemcheck(object, ITEM_ARMOR) weapon = properties.itemcheck(object, ITEM_WEAPON) shield = properties.itemcheck(object, ITEM_SHIELD) if (armor or weapon or shield) and object.amount == 1: # Reinsert the name if we need an ore prefix prefix1 = None if object... |
elif isvendor( victim ): char.socket.clilocmessage( 1005598 ) return True | def char_steal( char, victim ): # check if hands are empty and target can be seen if not check( char, victim ): return True # check for vendors elif isvendor( victim ): char.socket.clilocmessage( 1005598 ) # You can't steal from shopkeepers. return True elif isplayervendor( victim ): char.socket.clilocmessage( 502709 )... | |
tosteal = None | tosteal = None loop = 0 possible = [] | def randomsteal(char, victim): if not victim: return True bag = victim.getbackpack() if not bag: char.socket.sysmessage( tr( "Bad luck, your victim doesn't have a backpack." ) ) return True # We can steal max. 10 Stones when we are a GM maxWeight = maxweight(char) containment = bag.content chance = len(containment) tos... |
spirits.controlslots = 1 | def target(self, char, mode, targettype, target, args, item): char.turnto(target) | |
if object.container == viewer: lower = 0 lower += fromchar(viewer, LOWERREQS) | def onShowTooltip(viewer, object, tooltip): armor = itemcheck(object, ITEM_ARMOR) weapon = itemcheck(object, ITEM_WEAPON) shield = itemcheck(object, ITEM_SHIELD) if (armor or weapon or shield) and object.amount == 1: # Reinsert the name if we need an ore prefix prefix1 = None if object.hastag('resname'): resname = str... | |
lower = fromchar(player, LOWERREQS) + fromitem(item, LOWERREQS) lower /= 100.0 | lower = fromitem(item, LOWERREQS) / 100.0 | def onWearItem(player, wearer, item, layer): lower = fromchar(player, LOWERREQS) + fromitem(item, LOWERREQS) lower /= 100.0 req_str = fromitem(item, REQSTR) if lower: req_str = int(ceil(req_str) * (1.0 - lower)) req_dex = fromitem(item, REQDEX) if lower: req_dex = int(ceil(req_dex) * (1.0 - lower)) req_int = fromite... |
if fromitem(item, LOWERREQS): for i in range(LAYER_RIGHTHAND, LAYER_MOUNT): litem = char.itemonlayer(i) if litem: litem.resendtooltip() | def onEquip(char, item, layer): changed = 0 # Resend all equipment with requirements if fromitem(item, LOWERREQS): for i in range(LAYER_RIGHTHAND, LAYER_MOUNT): litem = char.itemonlayer(i) if litem: litem.resendtooltip() # Bonus Strength if item.hastag('boni_str'): char.strength = char.strength + int(item.gettag('bon... | |
if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): | if self.requiretool and not self.checktool(player, wolfpack.finditem(arguments[0])): | def enhance(self, player, arguments, target): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return if not target.item: self.send(player, arguments) return if not player.canreach(target.item, -1): player.socket.clilocmessage(1061005) self.send(player, arguments) return # Check if we ... |
go_target(char, [follower.serial, 0], target) | follower.follow(target.char) | def follow_target(char, arguments, target): if not target.char: char.socket.sysmessage('Your pets can only follow characters.') return (pet, all) = arguments pet = wolfpack.findchar(pet) if all: for follower in char.followers: go_target(char, [follower.serial, 0], target) elif pet and (pet.owner == char or char.gm) an... |
if socket.hastag( 'wood_gem' ): veingem = wolfpack.finditem( socket.gettag( 'wood_gem' ) ) if not veingem: veingem = getvein( socket, pos, target ) if not veingem: socket.deltag( 'wood_gem' ) veingem = createwoodgem( target, pos ) socket.settag( 'wood_gem', int(veingem.serial) ) else: veingem = getvein( socket, pos, ta... | veingem = getvein( socket, pos, target ) 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... |
resourcecount = resource.gettag( 'resourcecount' ) | resourcecount = int(resource.gettag( 'resourcecount' )) | def hack_logs( char, target, tool, resource ): socket = char.socket pos = target.pos resname = resource.gettag( 'resname' ) amount = resource.gettag( 'resourcecount' ) resourcecount = resource.gettag( 'resourcecount' ) # No resource left to harvest? if resourcecount <= 0: socket.clilocmessage( 500488, '', GRAY ) ret... |
while len(newwholist) == 0 and page > 0: page -= 1 newwholist = wholist[page * 10:] | def showWhoGump(player, page): current_page = page # Collect the current list of sockets first wholist = [] worldsocket = wolfpack.sockets.first() while worldsocket: char = worldsocket.player if char.invisible and char.rank > player.rank: continue if not char.account: continue wholist.append(char) worldsocket = wolfp... | |
pages = (count + 9) / 10 player.socket.sysmessage(tr('Total sockets: %u') % count) | def showWhoGump(player, page): current_page = page # Collect the current list of sockets first wholist = [] worldsocket = wolfpack.sockets.first() while worldsocket: char = worldsocket.player if char.invisible and char.rank > player.rank: continue if not char.account: continue wholist.append(char) worldsocket = wolfp... | |
if item.amount > 1: item.amount -= 1 item.update() | if not char.checkskill( TINKERING, 0, 500 ): if random.randint( 1, 100 ) <= 25: additional = ' and break the parts' if item.amount > 1: item.amount -= 1 item.update() else: item.delete() else: additional = '' char.message( "You don't manage to create the sextant%s" % additional ) | def sextant_parts( char, item ): if item.amount > 1: item.amount -= 1 item.update() else: item.update if not char.checkskill( TINKERING, 0, 500 ): char.message( "You don't manage to create the sextant" ) else: if item.id == 0x1059: item = wolfpack.additem( '1057' ) else: item = wolfpack.additem( '1058' ) char.getback... |
item.update if not char.checkskill( TINKERING, 0, 500 ): char.message( "You don't manage to create the sextant" ) else: | if item.amount > 1: item.amount -= 1 item.update() else: item.remove() | def sextant_parts( char, item ): if item.amount > 1: item.amount -= 1 item.update() else: item.update if not char.checkskill( TINKERING, 0, 500 ): char.message( "You don't manage to create the sextant" ) else: if item.id == 0x1059: item = wolfpack.additem( '1057' ) else: item = wolfpack.additem( '1058' ) char.getback... |
char.getbackpack().container.additem( item, 1, 1, 0 ) | char.getbackpack().additem( item, 1, 1, 0 ) | def sextant_parts( char, item ): if item.amount > 1: item.amount -= 1 item.update() else: item.update if not char.checkskill( TINKERING, 0, 500 ): char.message( "You don't manage to create the sextant" ) else: if item.id == 0x1059: item = wolfpack.additem( '1057' ) else: item = wolfpack.additem( '1058' ) char.getback... |
char.message( 'You used a sextant' ) | char.message( 'Sorry but this feature is not implemented yet' ) | def sextant( char, item ): char.message( 'You used a sextant' ) return 1 |
hair.update() beard.update() | if hair: hair.update() if beard: beard.update() | def cast(self, char, mode, args=[], target=None, item=None): if char.incognito or char.polymorph: char.socket.clilocmessage(1005559) return |
player.socket.sysmessage('This gate leads nowhere...') | 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)) | def onCollide(player, item): if item.hastag('playersonly') and player.npc: return 0 if not item.hastag('target'): player.socket.sysmessage('This gate leads nowhere...') return 0 target = item.gettag('target').split(',') # Convert the target of the gate. try: target = map(int, target) except: player.socket.sysmessage... |
for x in range(-2, 2): for y in range(-2, 2): | for x in range(-2, 3): for y in range(-2, 3): | def find( char, object = None ): # check for dynamic items items = wolfpack.items( char.pos.x, char.pos.y, char.pos.map, 2 ) for item in items: if item.id in object: return True # Check for static items for x in range(-2, 2): for y in range(-2, 2): statics = wolfpack.statics(char.pos.x + x, char.pos.y + y, char.pos.ma... |
clearability(player) | clearability(attacker) | def hit(attacker, defender, weapon, time): combat.utilities.playhitsound(attacker, defender) (mindamage, maxdamage) = properties.getdamage(attacker) damage = random.randint(mindamage, maxdamage) damage = scaledamage(attacker, damage, checkability = True) # Slaying? (only against NPCs) if weapon and defender.npc and ... |
if not ret0: | if ret0: | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return False name = item.gettag( 'carpentry_type' ) if not deeds.has_key( name ): return False dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return False num_item = len( items ) if not num_item: return False # ... |
for y in range( pos.x - 1, pos.x + 2 ): for x in range( pos.y - 1, pos.y + 2 ): | for x in range( pos.x - 1, pos.x + 2 ): for y in range( pos.y - 1, pos.y + 2 ): | def setup_item( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return name = item.gettag( 'carpentry_type' ) if not deeds.has_key( name ): return dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return num_item = len( items ) if not num_item: return # put items if num_item ==... |
raise | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip... | |
if not deeds.haskey( name ): | if not deeds.has_key( name ): | def onShowToolTip( sender, target, tooltip ): # name in tooltip if not target.hastag( 'carpentry_type' ): return name = target.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return tooltip_id = deeds[ name ][ 0 ] tooltip.add( tooltip_id, "" ) # blessed tooltip.add( 1038021, "" ) tooltip.send( sender ) |
return | return True | def onUse( char, item ): if not char or not item: return # check if this char is in it's own house if char.multi == -1: # msg return 1 multi = wolfpack.finditem( char.multi ) if not multi or multi.ownserial != char.serial: # msg return 1 # send target cursor char.socket.clilocmessage( 0xF55DA, "", 0x3b2, 3 ) char.socke... |
if char.multi == -1: return 1 multi = wolfpack.finditem( char.multi ) | if not( char.multi ): char.socket.clilocmessage(500275) return True | def onUse( char, item ): if not char or not item: return # check if this char is in it's own house if char.multi == -1: # msg return 1 multi = wolfpack.finditem( char.multi ) if not multi or multi.ownserial != char.serial: # msg return 1 # send target cursor char.socket.clilocmessage( 0xF55DA, "", 0x3b2, 3 ) char.socke... |
return 1 | char.socket.clilocmessage(502096) return True char.socket.clilocmessage( 1049780, "", 0x3b2 ) | def onUse( char, item ): if not char or not item: return # check if this char is in it's own house if char.multi == -1: # msg return 1 multi = wolfpack.finditem( char.multi ) if not multi or multi.ownserial != char.serial: # msg return 1 # send target cursor char.socket.clilocmessage( 0xF55DA, "", 0x3b2, 3 ) char.socke... |
char.socket.clilocmessage( 0xF55DA, "", 0x3b2, 3 ) | def onUse( char, item ): if not char or not item: return # check if this char is in it's own house if char.multi == -1: # msg return 1 multi = wolfpack.finditem( char.multi ) if not multi or multi.ownserial != char.serial: # msg return 1 # send target cursor char.socket.clilocmessage( 0xF55DA, "", 0x3b2, 3 ) char.socke... | |
if char.distanceto( pos ) > 3: char.socket.clilocmessage( 500251, "", 0x3b2, 3 ) | if( target.item ): if( target.item.getoutmostchar() ): return if not( char.canreach( target, 3 ) ): char.socket.clilocmessage( 500251, "", 0x3b2 ) | def response( char, args, target ): item = args[0] if not item or item.getoutmostchar() != char: # msg return if not item.hastag( 'carpentry_type' ): return if not target.pos: return if char.distanceto( pos ) > 3: char.socket.clilocmessage( 500251, "", 0x3b2, 3 ) return # check if there is sufficient room for the item ... |
return 0 | return False | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return 0 name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return 0 num_item = len( items ) if not num_item: return 0 # check the spots r... |
if not deeds.haskey( name ): return 0 | if not deeds.has_key( name ): return False | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return 0 name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return 0 num_item = len( items ) if not num_item: return 0 # check the spots r... |
return check_spot( pos ) | return check_spot( pos.x, pos.y, pos.map ) | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return 0 name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return 0 num_item = len( items ) if not num_item: return 0 # check the spots r... |
ret0 = check_spot( pos ) | ret0 = check_spot( pos.x, pos.y, pos.map ) | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return 0 name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return 0 num_item = len( items ) if not num_item: return 0 # check the spots r... |
return 0 return 1 | return False return True | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return 0 name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return 0 num_item = len( items ) if not num_item: return 0 # check the spots r... |
return 0 def check_spot( pos ): if len( wolfpack.items( pos.x, pos.y, pos.map ) ): return 0 return 1 | return False | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return 0 name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return 0 num_item = len( items ) if not num_item: return 0 # check the spots r... |
return 0 return 1 | return False return True | def check_spot( x, y, map ): if len( wolfpack.items( x, y, map ) ): return 0 return 1 |
if not deeds.haskey( name ): | if not deeds.has_key( name ): | def setup_item( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return num_item = len( items ) if not num_items: return # put items if num_item ==... |
if not num_items: | if not num_item: | def setup_item( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return num_item = len( items ) if not num_items: return # put items if num_item ==... |
put_item( items[ 0 ] ) | put_item( items[ 0 ], pos.x, pos.y, pos.z, pos.map ) | def setup_item( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return num_item = len( items ) if not num_items: return # put items if num_item ==... |
put_item( items[ 1 ], x1, y1, pos.map ) | put_item( items[ 1 ], x1, y1, pos.z, pos.map ) | def setup_item( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return num_item = len( items ) if not num_items: return # put items if num_item ==... |
put_item( items[ 1 ], pos.x, pos.y, pos.map ) if dir == 1: put_item( items[ 0 ], pos.x, pos.y - 1, pos.map ) put_item( items[ 2 ], pos.x, pos.y + 1, pos.map ) else: put_item( items[ 0 ], pos.x - 1, pos.y, pos.map ) put_item( items[ 2 ], pos.x + 1, pos.y, pos.map ) | put_item( items[ 1 ], pos.x, pos.y, pos.z, pos.map ) if dir == 1: put_item( items[ 0 ], pos.x, pos.y - 1, pos.z, pos.map ) put_item( items[ 2 ], pos.x, pos.y + 1, pos.z, pos.map ) else: put_item( items[ 0 ], pos.x - 1, pos.y, pos.z, pos.map ) put_item( items[ 2 ], pos.x + 1, pos.y, pos.z, pos.map ) | def setup_item( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return num_item = len( items ) if not num_items: return # put items if num_item ==... |
put_item( items[ i ], x, y, pos.map ) | put_item( items[ i ], x, y, pos.z, pos.map ) | def setup_item( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return num_item = len( items ) if not num_items: return # put items if num_item ==... |
def put_item( str, pos ): | def put_item( str, x, y, z, map ): | def put_item( str, pos ): item = wolfpack.additem( str ) if not item: return 0 item.moveto( pos ) # locked down item.movable = 3 item.update() return 1 |
return 0 item.moveto( pos ) | return False item.moveto( x, y, z, map ) | def put_item( str, pos ): item = wolfpack.additem( str ) if not item: return 0 item.moveto( pos ) # locked down item.movable = 3 item.update() return 1 |
return 1 def put_item( str, x, y, map ): item = wolfpack.additem( str ) if not item: return 0 item.moveto( x, y, map ) item.movable = 3 item.update() return 1 | return True | def put_item( str, pos ): item = wolfpack.additem( str ) if not item: return 0 item.moveto( pos ) # locked down item.movable = 3 item.update() return 1 |
all = text.startswith('all ') | def onSpeech(pet, char, text, keywords): if not char.socket: return False text = text.lower() #check if can be controlled if not checkPetControl(pet, char, text, keywords): return False # Test All # Check for keywords all = text.startswith('all ') if all: # Test Ownership / Allow Friends/GMs to control if (pet.owne... | |
wolfpack.registercommand( "mysql_backup", cmdbackupdb ) | wolfpack.registercommand( "backupdb", cmdbackupdb ) | def onLoad(): if enabled == TRUE: if accountsdriver == 'mysql' or worlddriver == 'mysql': wolfpack.addtimer( time, "system.mysql_backup_db.timer", [] ) wolfpack.registercommand( "mysql_backup", cmdbackupdb ) |
tags = object.tags | tags = list(object.tags) | def taginfo_response(player, arguments, target): if target.char: object = target.char elif target.item: object = target.item else: player.socket.sysmessage('You have to target an item or a character.') return tags = object.tags dialog = wolfpack.gumps.cGump() dialog.setCallback(taginfo_callback) dialog.setArgs([objec... |
if sys.platform == "win32": return path + os.path.sep + file else: if file[0:3] == "lib": file = file[3:] if file[-3:] == ".so": file = file[0:-3] if file[-2:] == ".a": file = file[0:-2] result = "-L%s -l%s" % ( path, file ) return result | if file[0:3] == "lib": file = file[3:] if file[-3:] == ".so": file = file[0:-3] if file[-2:] == ".a": file = file[0:-2] if file[-4:] == ".lib": file = file[0:-4] result = "-L\"%s\" -l%s" % ( path, file ) return result | def buildLibLine( path, file ): if path == "" or file == "": return "" if sys.platform == "win32": return path + os.path.sep + file else: if file[0:3] == "lib": file = file[3:] if file[-3:] == ".so": file = file[0:-3] if file[-2:] == ".a": file = file[0:-2] result = "-L%s -l%s" % ( path, file ) return result |
def intoxication(char, args): | def intoxication_func(char, args): | def intoxication(char, args): intoxication = 0 if char.hastag('intoxication'): intoxication = int(char.gettag('intoxication')) intoxication -= 1 # Otherwise no effect if char.socket: if intoxication >= (char.strength + 9) / 10: if random.randint(0, 3) == 0 and not char.itemonlayer(LAYER_MOUNT): char.direction = rando... |
char.addtimer(3000, intoxication, [], 1, 0, 'intoxication') | char.addtimer(3000, intoxication_func, [], 1, 0, 'intoxication') | def intoxication(char, args): intoxication = 0 if char.hastag('intoxication'): intoxication = int(char.gettag('intoxication')) intoxication -= 1 # Otherwise no effect if char.socket: if intoxication >= (char.strength + 9) / 10: if random.randint(0, 3) == 0 and not char.itemonlayer(LAYER_MOUNT): char.direction = rando... |
char.addtimer(3000, intoxication, [], 1, 0, 'intoxication') | char.addtimer(3000, intoxication_func, [], 1, 0, 'intoxication') | def drink(char, item): quantity = 0 if item.hastag('quantity'): quantity = int(item.gettag('quantity')) btype = '' if item.hastag('fluid'): btype = unicode(item.gettag('fluid')) if not FLUIDS.has_key(btype): char.socket.sysmessage("You shouldn't drink this strange fluid.") return 1 if not CONTAINERS.has_key(item.id)... |
if not char.canreach(tosteal, 1): | if not char.canreach(victim, 1): | def stealitem( char, tosteal ): victim = tosteal.getoutmostchar() # check if hands are empty and target can be seen if not check( char, tosteal ): return True if not char.canreach(tosteal, 1): char.socket.clilocmessage( 502703 ) # You must be standing next to an item to steal it. return True elif not tosteal.container ... |
info = WEAPON_PROPERTIES[property] value = scaleValue(minintensity, maxintensity, info[0], info[1], info[2], luckchance) | def applyWeaponRandom(item, props, minintensity, maxintensity, luckchance): properties = WEAPON_PROPERTIES.keys() # No bestskill property for ranged weapons if itemcheck(item, ITEM_RANGED): properties.remove(BESTSKILL) # Select unique properties for i in range(0, props): property = random.choice(properties) if not P... | |
player.socket.attachtarget("commands.add.additem", [self.definition]) | player.socket.attachtarget("commands.add.additem", [self.definition, False]) | def make(self, player, arguments, nodelay=0): player.socket.sysmessage("Where do you want to place the item '%s'?" % self.definition) player.socket.attachtarget("commands.add.additem", [self.definition]) MakeAction.make(self, player, arguments, nodelay) |
damage = self.scaledamage(char, None, 48, 45, 5) chars = wolfpack.chars(char.pos.x, char.pos.y, char.pos.map, 8) | spellrange = 1 + int(char.skill[MAGERY] / 150.0) chars = wolfpack.chars(char.pos.x, char.pos.y, char.pos.map, spellrange) | def cast(self, char, mode, args): if not self.consumerequirements(char, mode): return |
if sys.platform == win32: | if sys.platform == "win32": | def main(): checkPython() checkQt() # Create config.pri global py_libpath global py_libfile global py_incpath global qt_qmake config = file("config.pri", "w") config.write("# WARNING: This file was automatically generated by configure.py\n ") config.write("# any changes to this file will be lost!\n") config... |
for item in wholist[:10]: gump.addButton( 20, 40 + offset, 0xFA5, 0xFA7, 2 + player.serial ) gump.addText( 54, 40 + offset, tr("%s [%s]") % ( player.name, player.account.name ), 0x834 ) gump.addText( 257, 40 + offset, unicode(player.socket.address), 0x834 ) | for char in wholist[:10]: gump.addButton( 20, 40 + offset, 0xFA5, 0xFA7, 2 + char.serial ) gump.addText( 54, 40 + offset, tr("%s [%s]") % ( char.name, char.account.name ), 0x834 ) gump.addText( 257, 40 + offset, unicode(char.socket.address), 0x834 ) | def showWhoGump(player, page): # Collect the current list of sockets first wholist = [] worldsocket = wolfpack.sockets.first() while worldsocket: char = worldsocket.player if char.invisible and char.rank > player.rank: continue if not char.account: continue wholist.append(char) worldsocket = wolfpack.sockets.next() c... |
if target.ai == "Monster_Mage" and target.char.skill[MAGERY] > 50: | if target.ai == "Monster_Mage" and target.skill[MAGERY] > 50: | def GetDifficultyFor( player, instrument, target ): # Difficulty TODO: Add another 100 points for each of the following abilities: # - Radiation or Aura Damage (Heat, Cold etc.) # - Summoning Undead # totalskills = 0 val = target.hitpoints + target.stamina + target.mana skills = target.skill for i in range(0, ALLSKILLS... |
try: if spawntype == 1: npc = wolfpack.addnpc(spawndef, spawner.pos) npc.settag('spawner', spawner.serial) npc.wandertype = 3 npc.wanderx1 = spawner.pos.x npc.wandery1 = spawner.pos.y npc.wanderradius = area npc.addscript( 'system.spawns' ) npc.update() elif spawntype == 0: pass except: if( spawner ): console.log(LOG_W... | try: if spawntype == 1: npc = wolfpack.addnpc(spawndef, spawner.pos) npc.settag('spawner', spawner.serial) npc.wandertype = 3 npc.wanderx1 = spawner.pos.x npc.wandery1 = spawner.pos.y npc.wanderradius = area npc.addscript( 'system.spawns' ) npc.update() elif spawntype == 0: pass except: if( spawner ): console.log(LOG_W... | def spawn(spawner, spawntype, spawndef, current, area): try: if spawntype == 1: npc = wolfpack.addnpc(spawndef, spawner.pos) npc.settag('spawner', spawner.serial) npc.wandertype = 3 npc.wanderx1 = spawner.pos.x npc.wandery1 = spawner.pos.y npc.wanderradius = area npc.addscript( 'system.spawns' ) npc.update() elif spawn... |
def __init__(self): Thread.__init__(self) self.stopped = Event() self.mlock = Lock() self.unprocessed = [] self.processed = [] def lock(self): self.mlock.acquire() def unlock(self): self.mlock.release() def cancel(self): self.stopped.set() def run(self): while not self.stopped.isSet(): self.lock() proc... | def __init__(self): Thread.__init__(self) self.stopped = Event() self.mlock = Lock() self.unprocessed = [] self.processed = [] def lock(self): self.mlock.acquire() def unlock(self): self.mlock.release() def cancel(self): self.stopped.set() def run(self): while not self.stopped.isSet(): self.lock() proc... | def spawn(spawner, spawntype, spawndef, current, area): try: if spawntype == 1: npc = wolfpack.addnpc(spawndef, spawner.pos) npc.settag('spawner', spawner.serial) npc.wandertype = 3 npc.wanderx1 = spawner.pos.x npc.wandery1 = spawner.pos.y npc.wanderradius = area npc.addscript( 'system.spawns' ) npc.update() elif spawn... |
if not char.npc: | if not char.npc or weapon: | def scaledamage(char, damage, checkskills = 1): if checkskills: char.checkskill(TACTICS, 0, 1200) # Tactics gain char.checkskill(ANATOMY, 0, 1200) # Anatomy gain weapon = char.getweapon() # Get the total damage bonus this character gets bonus = properties.fromchar(char, DAMAGEBONUS) # For axes a lumberjacking skill ... |
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... |
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('potion... | 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... |
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... |
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... |
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... |
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... |
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... |
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... |
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... | |
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... |
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... |
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... |
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... |
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... |
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... |
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... |
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 |
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(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.