rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
gump.addButton( 190, 340, 0xF3, 0xF1, -1 ) | gump.addButton( 190, 340, 0xF3, 0xF1, 0 ) | def iteminfo( socket, item ): if not socket or not item: return 0 page_ = 0 pages = 5 gump = cGump( 0, 0, 0, 0, 40 ) gump.setCallback( "commands.info.iteminfo_response" ) gump.setArgs( [item] ) gump.startPage( page_ ) gump.addResizeGump( 0, 40, 0xA28, 450, 350 ) #Background gump.addGump( 105, 18, 0x58B ) # Fancy top... |
socket.sysmessage( " flags: %s" % account.flags ) | socket.sysmessage( " blocked: %s" % unicode(account.flags & 0x00000001) ) socket.sysmessage( " allmove: %s" % unicode(account.flags & 0x00000002) ) socket.sysmessage( " allshow: %s" % unicode(account.flags & 0x00000004) ) socket.sysmessage( " showserials: %s" % unicode(account.flags & 0x00000008) ) socket.sysmessag... | def accountShow( socket, username, key ): account = None characcount = None char = socket.player characcount = wolfpack.accounts.find( char.account.name ) account = wolfpack.accounts.find( username ) if not account: return False # Usernames are limited to 16 characters in length if len( username ) > 16 or len( username... |
socket.sysmessage( " characters: %s" % account.characters ) | socket.sysmessage( " characters: %s" % chars) | def accountShow( socket, username, key ): account = None characcount = None char = socket.player characcount = wolfpack.accounts.find( char.account.name ) account = wolfpack.accounts.find( username ) if not account: return False # Usernames are limited to 16 characters in length if len( username ) > 16 or len( username... |
socket.sysmessage( "%s.characters = %s" % ( account.name, account.characters ) ) | socket.sysmessage( "%s.characters = %s" % ( account.name, chars ) ) | def accountShow( socket, username, key ): account = None characcount = None char = socket.player characcount = wolfpack.accounts.find( char.account.name ) account = wolfpack.accounts.find( username ) if not account: return False # Usernames are limited to 16 characters in length if len( username ) > 16 or len( username... |
if value.lower() == "true" or value.lower() == "false" or value in [ 0, 1 ]: | if value.lower() == "true" or value.lower() == "false" or int(value) in [ 0, 1 ]: | def accountSet( socket, username, key, value ): account = None characcount = None char = socket.player characcount = wolfpack.accounts.find( char.account.name ) account = wolfpack.accounts.find( username ) if not account: socket.sysmessage( "Error: No such account exists." ) return False if len( value ) == 0: socket.sy... |
if worldsocket.player.region == region: | topregion = worldsocket.player.region if topregion.parent: topregion = topregion.parent if topregion == region: | def changeweather( region ): # Ok. Now, lets check if this Region have to begins to Rain or Snow rainchance = region.rainchance snowchance = region.snowchance randomrain = random.randint(1, 100) randomsnow = random.randint(1, 100) # Rain (And possible Snow too) if randomrain <= rainchance: region.startrain() if rand... |
elif target.item.hasscript( 'lock' ): if target.item.hastag('locked') and int(target.item.gettag('locked')) == 1: target.item.deltag('locked') else: target.item.settag('locked',1) char.soundeffect(0x241) | elif target.item.hasscript( 'lock' ) and target.item.hastag('lock'): door_lock = str(target.item.gettag('lock')) key_lock = str(key.gettag('lock')) if door_lock == key_lock: if target.item.hastag('locked') and int(target.item.gettag('locked')) == 1: target.item.deltag('locked') else: target.item.settag('locked',1) cha... | def lock_response(char, args, target): if len(args) != 1: return key = wolfpack.finditem(args[0]) if not key or not char.canreach(key,5): char.socket.clilocmessage(501661) return # Check for an item target. if not target.item or not char.canreach(target.item,5): char.socket.clilocmessage(501666) return if target.ite... |
if not veingem.hastag( 'resname' ) or not veingem.hastag( 'resourcecount' ): return OOPS if veingem.hastag( 'resname2' ): chance = randint( 1, 10 ) if chance >= 6: resname = veingem.gettag( 'resname2' ) else: resname = veingem.gettag( 'resname' ) elif not veingem.hastag( 'resname2' ) and veingem.hastag( 'resname' ): ... | if not veingem.hastag('resname') or not veingem.hastag('resourcecount'): return OOPS if veingem.hastag('resname2') and random.random() >= 0.50: resname = veingem.gettag('resname2') else: resname = veingem.gettag('resname') resourcecount = veingem.gettag('resourcecount') reqskill = oretable[resname][REQSKILL] chance... | def domining( time, args ): char = args[0] char.soundeffect( args[1] ) tool = args[2] pos = args[3] socket = char.socket if char.socket.hastag( 'ore_gem' ): veingem = wolfpack.finditem( char.socket.gettag( 'ore_gem' ) ) if not veingem: veingem = getvein( socket, pos ) if not veingem: char.socket.deltag( 'ore_gem' ) ve... |
socket.sysmessage( "There is no metal here to mine.", GRAY ) if not veingem.hastag( 'resource_empty' ): wolfpack.addtimer( orerespawndelay, "skills.mining.respawnvein", [ veingem ], 1 ) veingem.settag( 'resource_empty', 'true' ) | socket.sysmessage("There is no ore here to mine.", GRAY) if not veingem.hastag('resource_empty'): wolfpack.addtimer(orerespawndelay, "skills.mining.respawnvein", [veingem], 1) veingem.settag('resource_empty', 1) | def domining( time, args ): char = args[0] char.soundeffect( args[1] ) tool = args[2] pos = args[3] socket = char.socket if char.socket.hastag( 'ore_gem' ): veingem = wolfpack.finditem( char.socket.gettag( 'ore_gem' ) ) if not veingem: veingem = getvein( socket, pos ) if not veingem: char.socket.deltag( 'ore_gem' ) ve... |
if gem.gettag( 'resourcecount' ) == 0: if not gem.hastag ( 'resource_empty' ) and gem.gettag( 'resourcecount' ) == 0: gem.settag( 'resource_empty', 'true' ) wolfpack.addtimer( orerespawndelay, "skills.mining.respawnvein", [ gem ], 1 ) | if not gem.hastag('resource_empty') and gem.gettag('resourcecount') == 0: gem.settag('resource_empty', 1) wolfpack.addtimer(orerespawndelay, "skills.mining.respawnvein", [gem], 1) | def successmining( char, gem, table, resname, amount, ore ): socket = char.socket message = table[ resname ][ SUCCESSCLILOC ] backpack = char.getbackpack() if not backpack: return OOPS resore = "%s%s" % ( resname, ore ) resourceitem = wolfpack.additem( str(resore) ) resourceitem.decay = 1 if (FELUCIA2XRESGAIN == TRUE) ... |
if account.rank > 1 and playeraccount.authorized( 'Misc', 'May Block Staff Accounts' ): continue else: | if account.rank <= 1 or not playeraccount.authorized( 'Misc', 'May Block Staff Accounts' ): | def commandUnban( socket, cmd, args ): player = socket.player playeraccount = player.account myrank = playeraccount.rank if len( args ) > 0: accname = args.lower() account = wolfpack.accounts.find( accname ) if account and account.rank <= myrank: if account.rank > 1 and playeraccount.authorized( 'Misc', 'May Block Staf... |
for i in range( 0, packet.size ): if (packet.getbyte(i) != statusRequest[i]): | for i in range(0, packet.size): if packet.getbyte(i) != statusRequest[i]: | def handleStatus(socket, packet): statusPacket = 1 for i in range( 0, packet.size ): if (packet.getbyte(i) != statusRequest[i]): statusPacket = 0 break if statusPacket: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % (wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serve... |
status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % (wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serverversion()) | status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version="%s"' % (wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serverversion()) | def handleStatus(socket, packet): statusPacket = 1 for i in range( 0, packet.size ): if (packet.getbyte(i) != statusRequest[i]): statusPacket = 0 break if statusPacket: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % (wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serve... |
packet = wolfpack.packet(87, len(status) + 1) | packet = wolfpack.packet(87, len(status) + 2) | def handleStatus(socket, packet): statusPacket = 1 for i in range( 0, packet.size ): if (packet.getbyte(i) != statusRequest[i]): statusPacket = 0 break if statusPacket: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % (wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serve... |
elif magic.utilities.hasSpell(char, 32): | elif magic.utilities.hasSpell(char, 31): | def callback(char, args, target): if target.button == 100000: return # Automatic Close item = wolfpack.finditem(args[0]) closeGump(char, item) if target.button == 0: return if not char.canreach(item, 1): return maymodify = item.getoutmostchar() == char or char.gm if target.button == 1000: if not maymodify: char.so... |
self.message[0] = unquote(values[5]) self.message[1] = unquote(values[6]) self.message[2] = unquote(values[7]) self.message[3] = unquote(values[8]) | self.message[0] = unicode(unquote(values[5])) self.message[1] = unicode(unquote(values[6])) self.message[2] = unicode(unquote(values[7])) self.message[3] = unicode(unquote(values[8])) | def __init__(self, char): if type(char) == str: values = char.split(';') self.account = unquote( values[0] ) self.serial = int(values[1]) self.name = unquote(values[2]) (x, y, z, m) = values[3].split(',') self.pos = wolfpack.coord(int(x), int(y), int(z), int(m)) self.category = unquote(values[4]) self.message = ['', ''... |
html = "<body text=\" | html = u"<body text=\" | def details(self, player): char = wolfpack.findchar(self.serial) if not char: return # Assign the page to the viewer if not self.assigned: # Requeue an old page the gm is assigned to global pages page = pages.findassigned(player.serial) if page: page.assigned = None player.socket.sysmessage('You requeue your previous... |
parser = xml.sax.make_parser() handler = DecorationHandler() parser.setContentHandler(handler) parser.parse( atts.getValue("file") ) | path = atts.getValue("file") if not os.path.isfile(path): console.log(LOG_ERROR, tr("File '%s' not found.\n") % (path)) return parser = xml.sax.make_parser() handler = DecorationHandler() parser.setContentHandler(handler) parser.parse(path) | def startElement( self, name, atts ): if name == "item": self.itemid = str(atts.getValue("id")); if atts.has_key("hue"): self.hue = int(hex2dec(str(atts.getValue("hue")))); else: self.hue = 0 if atts.has_key("amount"): self.amount = int(atts.getValue("amount")); else: self.amount = 0 self.statements = [] elif name == "... |
potionexplosion( item, [ char.serial, 4] ) | potionexplosion( item, [char, 4, item.amount] ) | def onUse( char, item ): socket = char.socket # Potions need to be on your body to use them, or in arms reach. if item.getoutmostchar() != char: char.message( "This potion is out of your reach..." ) return False # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return False else: potiontype = item.g... |
char = wolfpack.findchar(args[0]) counter = args[1] bonus = potion.amount if not bonus: bonus = 1 if counter > 0: potion.addtimer( 1000, "potions.potioncountdown", [char.serial, counter, bonus] ) return | if args[1] > 0: potion.addtimer( 1000, "potions.potioncountdown", [args[0], args[1], args[2]] ) | def potionexplosion( potion, args ): char = wolfpack.findchar(args[0]) counter = args[1] bonus = potion.amount if not bonus: bonus = 1 if counter > 0: potion.addtimer( 1000, "potions.potioncountdown", [char.serial, counter, bonus] ) return else: potion.soundeffect(0x307) # Boom! potion.effect( explosions[randint( 0, 2 ... |
potionregion( [char, potion, bonus] ) | potionregion( args[0], potion, args[2] ) | def potionexplosion( potion, args ): char = wolfpack.findchar(args[0]) counter = args[1] bonus = potion.amount if not bonus: bonus = 1 if counter > 0: potion.addtimer( 1000, "potions.potioncountdown", [char.serial, counter, bonus] ) return else: potion.soundeffect(0x307) # Boom! potion.effect( explosions[randint( 0, 2 ... |
bonus = args[2] | def potioncountdown( potion, args ): counter = args[1] bonus = args[2] if potion: if not bonus: bonus = 1 if counter >= 0: if counter > 0: if (counter - 1) > 0: potion.say("%u" % (counter - 1)) counter -= 1 potion.addtimer( 0, "potions.potionexplosion", [ args[0], counter, bonus ] ) return | |
if not bonus: bonus = 1 | def potioncountdown( potion, args ): counter = args[1] bonus = args[2] if potion: if not bonus: bonus = 1 if counter >= 0: if counter > 0: if (counter - 1) > 0: potion.say("%u" % (counter - 1)) counter -= 1 potion.addtimer( 0, "potions.potionexplosion", [ args[0], counter, bonus ] ) return | |
potion.addtimer( 0, "potions.potionexplosion", [ args[0], counter, bonus ] ) | potion.addtimer( 0, "potions.potionexplosion", [args[0], counter, args[2]] ) return def chainpotiontimer( char, potion, bomb, outradius ): if not checkLoS( potion, bomb, outradius ): | def potioncountdown( potion, args ): counter = args[1] bonus = args[2] if potion: if not bonus: bonus = 1 if counter >= 0: if counter > 0: if (counter - 1) > 0: potion.say("%u" % (counter - 1)) counter -= 1 potion.addtimer( 0, "potions.potionexplosion", [ args[0], counter, bonus ] ) return |
def potionregion( args ): char = args[0] potion = args[1] bonus = args[2] | def potionregion( char, potion, bonus=0 ): | def potionregion( args ): char = args[0] potion = args[1] bonus = args[2] if potion.gettag('potiontype') == 11: outradius = 1 elif potion.gettag('potiontype') == 12: outradius = 2 elif potion.gettag('potiontype') == 13: outradius = randint(2,3) else: outradius = 1 # Potion Keg Radius Override! if potion.hastag('kegfill... |
potion_chainlist = [] | outradius = max( 1, outradius ) | def potionregion( args ): char = args[0] potion = args[1] bonus = args[2] if potion.gettag('potiontype') == 11: outradius = 1 elif potion.gettag('potiontype') == 12: outradius = 2 elif potion.gettag('potiontype') == 13: outradius = randint(2,3) else: outradius = 1 # Potion Keg Radius Override! if potion.hastag('kegfill... |
x1 = int(potion.pos.x - outradius) y1 = int(potion.pos.y - outradius) x2 = int(potion.pos.x + outradius) y2 = int(potion.pos.y + outradius) | x1 = min( int(potion.pos.x - outradius), int(potion.pos.x + outradius) ) x2 = max( int(potion.pos.x - outradius), int(potion.pos.x + outradius) ) y1 = min( int(potion.pos.y - outradius), int(potion.pos.y + outradius) ) y2 = max( int(potion.pos.y - outradius), int(potion.pos.y + outradius) ) | def potionregion( args ): char = args[0] potion = args[1] bonus = args[2] if potion.gettag('potiontype') == 11: outradius = 1 elif potion.gettag('potiontype') == 12: outradius = 2 elif potion.gettag('potiontype') == 13: outradius = randint(2,3) else: outradius = 1 # Potion Keg Radius Override! if potion.hastag('kegfill... |
if not checkLoS( potion, chainbomb, outradius ): chainbomb = chainregion.next if chainbomb.hastag('exploding'): chainbomb = chainregion.next if not potion.hastag('potiontype') or not chainbomb.gettag('potiontype') in [11,12,13]: chainbomb = chainregion.next potion_chainlist.append( chainbomb ) | chainpotiontimer( char, potion, chainbomb, outradius ) | def potionregion( args ): char = args[0] potion = args[1] bonus = args[2] if potion.gettag('potiontype') == 11: outradius = 1 elif potion.gettag('potiontype') == 12: outradius = 2 elif potion.gettag('potiontype') == 13: outradius = randint(2,3) else: outradius = 1 # Potion Keg Radius Override! if potion.hastag('kegfill... |
for bomb in potion_chainlist: bomb.settag( 'exploding', char.serial ) if chainbomb.hastag( 'kegfill' ) and int( chainbomb.gettag( 'kegfill' ) ) >= 1: bomb.addtimer( randint(1000,2250), "potions.potioncountdown", [ char.serial, 0, int( bomb.gettag( 'kegfill' ) ) ] ) else: bomb.addtimer( randint( 1000, 2250 ), "potions.p... | def potionregion( args ): char = args[0] potion = args[1] bonus = args[2] if potion.gettag('potiontype') == 11: outradius = 1 elif potion.gettag('potiontype') == 12: outradius = 2 elif potion.gettag('potiontype') == 13: outradius = randint(2,3) else: outradius = 1 # Potion Keg Radius Override! if potion.hastag('kegfill... | |
x1 = int(char.pos.x - outradius) y1 = int(char.pos.y - outradius) x2 = int(char.pos.x + outradius) y2 = int(char.pos.y + outradius) damageregion = wolfpack.charregion( x1, y1, x2, y2, char.pos.map ) | x1 = min( int(char.pos.x - outradius), int(char.pos.x + outradius) ) x2 = max( int(char.pos.x - outradius), int(char.pos.x + outradius) ) y1 = min( int(char.pos.y - outradius), int(char.pos.y + outradius) ) y2 = max( int(char.pos.y - outradius), int(char.pos.y + outradius) ) | def potionregion( args ): char = args[0] potion = args[1] bonus = args[2] if potion.gettag('potiontype') == 11: outradius = 1 elif potion.gettag('potiontype') == 12: outradius = 2 elif potion.gettag('potiontype') == 13: outradius = randint(2,3) else: outradius = 1 # Potion Keg Radius Override! if potion.hastag('kegfill... |
socket.sysmessage( "An account with this name already exists!" ) | socket.sysmessage( "Error: Account %s exists!" % username ) | def accountCreate( socket, username, password ): char = socket.player characcount = wolfpack.accounts.find( char.account.name ) # Usernames and passwords are limited to 16 characters in length if len( username ) > 16 or len( password ) > 16: if len( username ) > 16: socket.sysmessage( "Error: Username exceeds the 16 ch... |
wolfpack.accounts.add( username, password ) | newaccount = wolfpack.accounts.add( username, password ) newaccount.acl = 'player' | def accountCreate( socket, username, password ): char = socket.player characcount = wolfpack.accounts.find( char.account.name ) # Usernames and passwords are limited to 16 characters in length if len( username ) > 16 or len( password ) > 16: if len( username ) > 16: socket.sysmessage( "Error: Username exceeds the 16 ch... |
socket.sysmessage( "Account creation failed!" ) | socket.sysmessage( "Error: Account creation failed!" ) | def accountCreate( socket, username, password ): char = socket.player characcount = wolfpack.accounts.find( char.account.name ) # Usernames and passwords are limited to 16 characters in length if len( username ) > 16 or len( password ) > 16: if len( username ) > 16: socket.sysmessage( "Error: Username exceeds the 16 ch... |
characcount = wolfpack.accounts.find( char.account ) key = key.lower() | characcount = wolfpack.accounts.find( char.account.name ) | def accountShow( socket, username, key ): char = socket.player characcount = wolfpack.accounts.find( char.account ) key = key.lower() # Usernames are limited to 16 characters in length if len( username ) > 16: socket.sysmessage( "The given username exceeds the 16 character limit!" ) return True # Find the account else:... |
if len( username ) > 16: socket.sysmessage( "The given username exceeds the 16 character limit!" ) return True | if len( username ) > 16 or len( username ) == 0: if len( username ) > 16: socket.sysmessage( "Error: Username exceeds the 16 character limit!" ) if len( username ) == 0: socket.sysmessage( "Error: Username is NULL!" ) return False | def accountShow( socket, username, key ): char = socket.player characcount = wolfpack.accounts.find( char.account ) key = key.lower() # Usernames are limited to 16 characters in length if len( username ) > 16: socket.sysmessage( "The given username exceeds the 16 character limit!" ) return True # Find the account else:... |
char.say('Bombing a character with %s!' % (object.name) ) | def throwobject( char, object, target, sendobject=0, movable=1, speed=10, fixeddir=0, explodes=0, hue=0, rendermode=0 ): # This will make the object leave the character's pack and land at the target location. if sendobject > 0 and object: if target.char: # Container Workaround if object.container: object.container = 0 ... | |
char.say('Bombing an item with %s!' % (object.name) ) | def throwobject( char, object, target, sendobject=0, movable=1, speed=10, fixeddir=0, explodes=0, hue=0, rendermode=0 ): # This will make the object leave the character's pack and land at the target location. if sendobject > 0 and object: if target.char: # Container Workaround if object.container: object.container = 0 ... | |
char.say('Bombing something else with %s!' % (object.name) ) | def throwobject( char, object, target, sendobject=0, movable=1, speed=10, fixeddir=0, explodes=0, hue=0, rendermode=0 ): # This will make the object leave the character's pack and land at the target location. if sendobject > 0 and object: if target.char: # Container Workaround if object.container: object.container = 0 ... | |
gainstat(char, 2) def onSkillGain(char, skill, lower, higher, success): 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[skill] / 10.0 lower /= 10.0 h... | gainstat(char, 2) | 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 ... |
gump.addHtmlGump( 50, 180, 340, 80, html ) | gump.addHtmlGump( 50, 180, 340, 80, unicode(html) ) | def details(self, player): char = wolfpack.findchar(self.serial) if not char: return # Assign the page to the viewer if not self.assigned: # Requeue an old page the gm is assigned to global pages page = pages.findassigned(player.serial) if page: page.assigned = None player.socket.sysmessage('You requeue your previous... |
trade.setascii( 17, playername ) | trade.setascii( 17, unicode(playername) ) | def sendtradepacket( socket, action, partnerserial, box1serial, box2serial, playername ): #Sending 0x6F packet. Length may vary when playername is defined packetlength = 0x10 trade = wolfpack.packet( 0x6F, packetlength ) if playername != "": packetlength += len( playername ) + 2 trade.resize( packetlength ) trade.setb... |
if nightsight: | if nightsight and char.player: | def onEquip(char, item, layer): changed = 0 # Bonus Str bonus = properties.fromitem(item, BONUSSTRENGTH) if char.strength + bonus < 1: bonus = 1 - char.strength if char.strength + bonus > char.strengthcap: bonus = max(0, char.strengthcap - char.strength) if bonus != 0: char.strength += bonus char.strength2 += bonus it... |
def consumematerial(self, player, arguments, half = 0): if self.stackable: return True else: return CraftItemAction.consumematerial(player, arguments, half) | def getexceptionalchance(self, player, arguments): if not self.skills.has_key(BOWCRAFT): return False | |
result = srcpos.lineofsightnew(targpos) | result = char.canreach(targpos, 20, True) | def newlostarget(char, arguments, target): targpos = target.pos if target.item: targpos = target.item elif target.char: targpos = target.char srcpos = char.pos srcpos.z += 15 result = srcpos.lineofsightnew(targpos) char.socket.sysmessage('RESULT: ' + str(result)) |
gump.addXmfHtmlGump(180, 12, 510, 20, self.title, False, False, 0xFFFFFF) | gump.addXmfHtmlGump(180, 12, 510, 20, self.title, False, False, enabledcolor) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) |
gump.addXmfHtmlGump(180, 12, 510, 20, int(self.title), False, False, 0xFFFFFF) | gump.addXmfHtmlGump(180, 12, 510, 20, int(self.title), False, False, enabledcolor) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) |
gump.addText(50, 389, tr("Back"), 0x480) | gump.addText(50, 389, tr("Back"), enabbledhue) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) |
gump.addText(410, 389, tr("Make Now"), 0x480) | gump.addText(410, 389, tr("Make Now"), enabbledhue) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) |
gump.addXmfHtmlGump(245, 39, 285, 20, self.title, False, False, 0xFFFFFF) | gump.addXmfHtmlGump(245, 39, 285, 20, self.title, False, False, enabledcolor) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) |
gump.addXmfHtmlGump(245, 39, 285, 20, int(self.title), False, False, 0xFFFFFF) | gump.addXmfHtmlGump(245, 39, 285, 20, int(self.title), False, False, enabledcolor) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) |
gump.addText(245, 39, self.title, 0x480) | gump.addText(245, 39, self.title, enabbledhue) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) |
gump.addXmfHtmlGump(255, yoffset + 3, 275, 20, menu.subactions[action].title, False, False, 0xFFFFFF) | gump.addXmfHtmlGump(255, yoffset + 3, 275, 20, menu.subactions[action].title, False, False, enabledcolor) | def makehistory(self, player, arguments): gump = self.generate(arguments) self.addbuttons(gump, player, arguments, 1) |
gump.addText(255, yoffset + 3, menu.subactions[action].title, 0x480) | gump.addText(255, yoffset + 3, menu.subactions[action].title, enabbledhue) | def makehistory(self, player, arguments): gump = self.generate(arguments) self.addbuttons(gump, player, arguments, 1) |
gump.addText(xoffset + 35, yoffset + 3, materials[i][0], 0x3b1) | gump.addText(xoffset + 35, yoffset + 3, materials[i][0], disabledhue) | def materialselection(self, player, arguments, secondary = 0): gump = self.generate(arguments) self.addbuttons(gump, player, arguments, 1) |
gump.addText(xoffset + 35, yoffset + 3, materials[i][0], 0x480) | gump.addText(xoffset + 35, yoffset + 3, materials[i][0], enabbledhue) | def materialselection(self, player, arguments, secondary = 0): gump = self.generate(arguments) self.addbuttons(gump, player, arguments, 1) |
gump.addText(385, 313, tr("Repair Item"), 0x480) | gump.addText(385, 313, tr("Repair Item"), enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(385, 333, tr("Enhance Item"), 0x480) | gump.addText(385, 333, tr("Enhance Item"), enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(385, 353, tr("Smelt Item"), 0x480) | gump.addText(385, 353, tr("Smelt Item"), enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(50, 353, tr("Exit"), 0x480) | gump.addText(50, 353, tr("Exit"), enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(50, 333, self.name_makelast, 0x480) | gump.addText(50, 333, self.name_makelast, enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(50, 313, tr("Back"), 0x480) | gump.addText(50, 313, tr("Back"), enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(50, 313, tr("Previous Menu"), 0x480) | gump.addText(50, 313, tr("Previous Menu"), enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(50, 63, tr("Last Ten"), 0x480) | gump.addText(50, 63, tr("Last Ten"), enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(200, 353, message, 0x480) | gump.addText(200, 353, message, enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(200, 313, self.submaterials1[index][0], 0x480) | gump.addText(200, 313, self.submaterials1[index][0], enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(200, 333, self.submaterials2[index][0], 0x480) | gump.addText(200, 333, self.submaterials2[index][0], enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) |
gump.addText(50, yoffset + 3, self.submenus[actions + j].title, 0x480) | gump.addText(50, yoffset + 3, self.submenus[actions + j].title, enabbledhue) | def send(self, player, args = []): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return |
gump.addXmfHtmlGump(255, yoffset+3, 275, 20, int(self.subactions[menus + j].title), False, False, 0xFFFFFF) | gump.addXmfHtmlGump(255, yoffset+3, 275, 20, int(self.subactions[menus + j].title), False, False, 0x7FFF) | def send(self, player, args = []): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return |
gump.addText(255, yoffset+3, self.subactions[menus + j].title, 0x480) | gump.addText(255, yoffset+3, self.subactions[menus + j].title, enabbledhue) | def send(self, player, args = []): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return |
gump.addXmfHtmlGump(255, yoffset+3, 275, 20, int(self.subactions[menus + j].title), False, False, 0xDDDDDD) | gump.addXmfHtmlGump(255, yoffset+3, 275, 20, int(self.subactions[menus + j].title), 0, 0, disabledcolor) | def send(self, player, args = []): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return |
gump.addText(255, yoffset+3, self.subactions[menus + j].title, 0x3b1) | gump.addText(255, yoffset+3, self.subactions[menus + j].title, disabledhue) | def send(self, player, args = []): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return |
gump.addText(50, 293, tr("Previous Page"), 0x480) | gump.addText(50, 293, tr("Previous Page"), enabbledhue) | def send(self, player, args = []): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return |
gump.addText(385, 293, tr("Next Page"), 0x480) | gump.addText(385, 293, tr("Next Page"), enabbledhue) | def send(self, player, args = []): if self.requiretool and not self.checktool(player, wolfpack.finditem(args[0])): return |
ownerser = "invalid" | ownerser = "-1" | def charinfo( socket, char ): if not char or not socket: return page_ = 0 pages = 0 if char.npc: pages = 5 else: pages = 5 gump = cGump( 0, 0, 0, 0, 40 ) gump.setCallback( "commands.info.charinfo_response" ) gump.setArgs( [char] ) gump.startPage( page_ ) gump.addResizeGump( 0, 40, 0xA28, 450, 350 ) # Background gump... |
char.owner = wolfpack.findChar( int( hex2dec( textentries[ key ] ) ) ) | owner = wolfpack.findchar( int( hex2dec( textentries[ key ] ) ) ) if owner: char.owner = owner | def charinfo_response( player, args, choice ): socket = player.socket char = args[0] if choice.button == 0 or not char or not socket: return 1 textentries = choice.text keys = textentries.keys() for key in keys: if key == 1: char.name = textentries[ key ] elif key == 2: char.title = textentries[ key ] elif key == 3: ... |
value = int(char.gettag(tagname)) totalskills -= value / 10.0 | tagvalue = int(char.gettag(tagname)) totalskills -= tagvalue / 10.0 | 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... |
if value < lower or value >= higher: | if value >= higher: | 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... |
socket.sysmessage('Usage: send <x, y, z, map>|<location>') | player.socket.sysmessage('Usage: send <x, y, z, map>|<location>') | def sendresponse(player, arguments, target): if target.item: object = target.item elif target.char: if target.char.rank >= player.rank and player != target.char: player.socket.sysmessage("You've burnt your fingers!") return object = target.char else: player.socket.sysmessage('You need to target a character or an item.... |
gump.addInputField( 284, 160, 200, 16, 0x834, 40, unicode( char.fixedlight ) ) | gump.addInputField( 284, 160, 200, 16, 0x834, 40, unicode( char.lightbonus ) ) | def charinfo( socket, char ): if not char or not socket: return gump = wolfpack.gumps.cGump() gump.setCallback( "commands.info.charinfo_response" ) gump.setArgs( [char] ) gump.startPage(0) gump.addResizeGump( 64, 34, 9260, 464, 462 ) #Background gump.addGump(30, 33, 10421, 0) gump.addGump(59, 22, 10420, 0) gump.addGu... |
char.fixedlight = int( textentries[ key ] ) | char.lightbonus = int( textentries[ key ] ) | def charinfo_response( player, args, choice ): socket = player.socket char = args[0] if choice.button == 0 or not char or not socket: return 1 # check for rank #if char.rank >= player.rank and not player == char: # socket.sysmessage( "You've burnt your fingers!" ) # return 1 textentries = choice.text keys = textentri... |
if target.char.socket: | if target.char.player: | def response1( char, args, target ): socket = char.socket instrument = wolfpack.finditem(args[0]) if target.item: socket.clilocmessage( 0x7A755, "", 0x3b2, 3 ) # You can't incite that! return False if target.char: if target.char.socket: socket.clilocmessage( 0x7A754, "", 0x3b2, 3 ) # Verbal taunts might be more effec... |
if target.char.priv or target.char.dead: | if target.char.invulnerable or target.char.dead: | def response1( char, args, target ): socket = char.socket instrument = wolfpack.finditem(args[0]) if target.item: socket.clilocmessage( 0x7A755, "", 0x3b2, 3 ) # You can't incite that! return False if target.char: if target.char.socket: socket.clilocmessage( 0x7A754, "", 0x3b2, 3 ) # Verbal taunts might be more effec... |
creature1.target = target.char | creature1.attacktarget = target.char creature1.fight(target.char) | def response2( char, args, target ): socket = char.socket if not target.char: return False creature1 = wolfpack.findchar(args[0]) tobardtarget1 = args[1] instrument = wolfpack.finditem(args[2]) tobardtarget2 = tobard( target.char, "provoke" ) minimum = int( ( ( tobardtarget1 + tobardtarget2 ) / 2.0 ) - 25.0 ) maximum... |
target.char.target = creature1 | target.char.attacktarget = creature1 target.char.fight(creature1) | def response2( char, args, target ): socket = char.socket if not target.char: return False creature1 = wolfpack.findchar(args[0]) tobardtarget1 = args[1] instrument = wolfpack.finditem(args[2]) tobardtarget2 = tobard( target.char, "provoke" ) minimum = int( ( ( tobardtarget1 + tobardtarget2 ) / 2.0 ) - 25.0 ) maximum... |
player.socket.sysmessage('Creating items from %u,%u to %u,%u at z=%d.' % (x1, y1, x2, y2, z)) | player.log(LOG_MESSAGE, "Tiling %u items (%s) from %u,%u to %u,%u at z=%d.\n" % (count, ", ".join(ids), x1, y1, x2, y2, z)) player.socket.sysmessage('Creating %u items from %u,%u to %u,%u at z=%d.' % (count, x1, y1, x2, y2, z)) | def tileResponse(player, arguments, target): if len(arguments) < 3: player.socket.sysmessage('Please select the second corner.') player.socket.attachtarget("commands.tile.tileResponse", list(arguments) + [target.pos]) return x1 = min(arguments[2].x, target.pos.x) x2 = max(arguments[2].x, target.pos.x) y1 = min(argumen... |
char.socket.clilocmessage(500641) | if char.socket: char.socket.clilocmessage(500641) | def onDamage(char, type, amount, source): # You cannot be disturbed while using protection if char.propertyflags & 0x20000: return amount char.socket.clilocmessage(500641) fizzle(char) return amount |
def splashdamage(attacker, effect): | def splashdamage(attacker, effect, excludechar = None): | def splashdamage(attacker, effect): (physical, cold, fire, poison, energy) = (0, 0, 0, 0, 0) if effect == SPLASHPHYSICAL: sound = 0x10e hue = 50 physical = 100 elif effect == SPLASHFIRE: sound = 0x11d hue = 1160 fire = 100 elif effect == SPLASHCOLD: sound = 0xfc hue = 2100 cold = 100 elif effect == SPLASHPOISON: sound... |
chariterator = wolfpack.charregion(pos.x - 10, pos.y - 10, pos.x + 10, pos.y + 10, pos.map) | chariterator = wolfpack.charregion(pos.x - 3, pos.y - 3, pos.x + 3, pos.y + 3, pos.map) | def splashdamage(attacker, effect): (physical, cold, fire, poison, energy) = (0, 0, 0, 0, 0) if effect == SPLASHPHYSICAL: sound = 0x10e hue = 50 physical = 100 elif effect == SPLASHFIRE: sound = 0x11d hue = 1160 fire = 100 elif effect == SPLASHCOLD: sound = 0xfc hue = 2100 cold = 100 elif effect == SPLASHPOISON: sound... |
if attacker != target and (not party or party != target.party) and (not guild or guild != target.guild): if not target.dead and not target.invulnerable and not target.invisible and not target.hidden: tpos = target.pos distance = sqrt((pos.x - tpos.x) * (pos.x - tpos.x) + (pos.y - tpos.y) * (pos.y - tpos.y)) factor = ... | if attacker != target and excludechar != target and mayAreaHarm(attacker, target): tpos = target.pos distance = sqrt((pos.x - tpos.x) * (pos.x - tpos.x) + (pos.y - tpos.y) * (pos.y - tpos.y)) factor = min(1.0, (4 - distance) / 3) if factor > 0.0: damage = int(random.randint(mindamage, maxdamage) * factor) if damage ... | def splashdamage(attacker, effect): (physical, cold, fire, poison, energy) = (0, 0, 0, 0, 0) if effect == SPLASHPHYSICAL: sound = 0x10e hue = 50 physical = 100 elif effect == SPLASHFIRE: sound = 0x11d hue = 1160 fire = 100 elif effect == SPLASHCOLD: sound = 0xfc hue = 2100 cold = 100 elif effect == SPLASHPOISON: sound... |
splashdamage(attacker, effectid) | splashdamage(attacker, effectid, excludechar = defender) | 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 ... |
range( 6038, 6067 ) + \ range( 13422, 13446 ) + \ range( 13456, 13484 ) + \ range( 13493, 13256 ) | range( 6038, 6067 ) + \ range( 13422, 13446 ) + \ range( 13456, 13484 ) + \ range( 13493, 13526 ) | def iswater( tile ): return tile in range( 168, 172 ) + \ range( 6038, 6067 ) + \ range( 13422, 13446 ) + \ range( 13456, 13484 ) + \ range( 13493, 13256 ) |
break | return 1 | def onSpeech( listener, speaker, text, keywords ): for keyword in keywords: # withdraw if keyword == 0x0: # Search for the amount we want to withdraw (should be the only digits in there) result = amountre.search( text ) amount = 0 if result: amount = int( result.group( 1 ) ) # Invalid Withdraw Amount if not amount: #... |
return 1 | return False | def onSpeech( listener, speaker, text, keywords ): for keyword in keywords: # withdraw if keyword == 0x0: # Search for the amount we want to withdraw (should be the only digits in there) result = amountre.search( text ) amount = 0 if result: amount = int( result.group( 1 ) ) # Invalid Withdraw Amount if not amount: #... |
if not char.canreach( item, 2 ) or item.getoutmostchar(): | if not char.canreach( item, 2 ): | def dyingtub( char, item ): if not char.canreach( item, 2 ) or item.getoutmostchar(): char.socket.sysmessage( localemsg( 6 ) ) return 1 char.socket.sysmessage( localemsg( 18 ) ) char.socket.attachtarget( 'environment.dyingtub_response', [ item.serial ] ) return 1 |
if not dyetub or (not char.canreach( dyetub, 2 ) and dyetub.getoutmostchar() != char): | if not dyetub or not char.canreach( dyetub, 2 ): | def dyingtub_response( char, args, target ): dyetub = wolfpack.finditem( args[0] ) if not dyetub or (not char.canreach( dyetub, 2 ) and dyetub.getoutmostchar() != char): char.message( localemsg( 6 ) ) return if not target.item: char.message( localemsg( 8 ) ) return # Valid Target? if not char.gm: if target.item.geto... |
char.socket.sysmessage(tr('The book has to be in your belongings to be used.')) | char.socket.clilocmessage( 500207 ) | def onUse( char, item ): if item.getoutmostchar() != char: char.socket.sysmessage(tr('The book has to be in your belongings to be used.')) return True # This is annoying and eats bandwith but its the only way to "reopen" the spellbook # once its already open. #char.socket.removeobject(item) if item.container and item.... |
def checkQt(): | def checkQt(options): | def checkQt(): sys.stdout.write("Checking QT Configuration:\n") 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( gree... |
sys.stdout.write( " Checking QTDIR enviroment variable: " ) if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): | global qt_dir sys.stdout.write( " Checking QT installation: " ) if not options.qt_dir: if ( os.environ.has_key("QTDIR") and os.path.exists( os.environ["QTDIR"] ) ): qt_dir = os.environ["QTDIR"] sys.stdout.write( green("Pass\n") ) sys.stdout.write( " Found value for QTDIR: %s\n" % qt_dir ) ... | def checkQt(): sys.stdout.write("Checking QT Configuration:\n") 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( gree... |
sys.stdout.write( " Found value for QTDIR: %s\n" % os.environ["QTDIR"] ) | sys.stdout.write( " Manually specified value: %s\n" % qt_dir ) sys.stdout.write( " Verifying QT installation: " ) if ( qt_dir and qt_dir != "" and os.path.exists( qt_dir ) ): sys.stdout.write( green("Pass\n") ) | def checkQt(): sys.stdout.write("Checking QT Configuration:\n") 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( gree... |
sys.stdout.write( " You must properly setup the QTDIR environment variable!\n" ) | sys.stdout.write( " You must properly setup the QTDIR environment variable or use --qt-directory parameter!\n" ) | def checkQt(): sys.stdout.write("Checking QT Configuration:\n") 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( gree... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.