wpdev-commits Mailing List for Wolfpack Emu (Page 15)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
From: Sebastian H. <dar...@us...> - 2004-10-13 19:11:22
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31346/skills Modified Files: blacksmithing.py poisoning.py Log Message: bugfixes Index: poisoning.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/poisoning.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** poisoning.py 25 Aug 2004 17:03:06 -0000 1.5 --- poisoning.py 13 Oct 2004 19:11:13 -0000 1.6 *************** *** 34,38 **** # check if the targetted item is a poison potion potion = target.item ! if ( not potion.hastag( 'potiontype' ) ) or ( potion.gettag( 'potiontype' ) < 14 and potion.gettag( 'potiontype' ) > 17 ): char.socket.clilocmessage( 502139 ) return --- 34,38 ---- # 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 Index: blacksmithing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/blacksmithing.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** blacksmithing.py 13 Oct 2004 18:45:42 -0000 1.25 --- blacksmithing.py 13 Oct 2004 19:11:13 -0000 1.26 *************** *** 313,317 **** if item.maxhealth <= weaken: player.socket.clilocmessage(500424) ! player.log("Tries to repair item %s (0x%x) and destroys it.\n" % (item.baseid, item.serial)) item.delete() elif player.checkskill(BLACKSMITHING, 0, 1000): --- 313,317 ---- if item.maxhealth <= weaken: player.socket.clilocmessage(500424) ! player.log(LOG_MESSAGE, "Tries to repair item %s (0x%x) and destroys it.\n" % (item.baseid, item.serial)) item.delete() elif player.checkskill(BLACKSMITHING, 0, 1000): *************** *** 320,324 **** item.health = item.maxhealth item.resendtooltip() ! player.log("Repairs item %s (0x%x) and weakens it by %u points.\n" % (item.baseid, item.serial, weaken)) else: player.socket.clilocmessage(1044280) --- 320,324 ---- item.health = item.maxhealth item.resendtooltip() ! player.log(LOG_MESSAGE, "Repairs item %s (0x%x) and weakens it by %u points.\n" % (item.baseid, item.serial, weaken)) else: player.socket.clilocmessage(1044280) *************** *** 326,330 **** item.health = max(0, item.health - weaken) item.resendtooltip() ! player.log("Fails to repair item %s (0x%x) and weakens it by %u points.\n" % (item.baseid, item.serial, weaken)) # Warn the user if we'll break the item next time --- 326,330 ---- item.health = max(0, item.health - weaken) item.resendtooltip() ! player.log(LOG_MESSAGE, "Fails to repair item %s (0x%x) and weakens it by %u points.\n" % (item.baseid, item.serial, weaken)) # Warn the user if we'll break the item next time |
From: Sebastian H. <dar...@us...> - 2004-10-13 19:11:22
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31346 Modified Files: lightsource.py Log Message: bugfixes Index: lightsource.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/lightsource.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** lightsource.py 2 Aug 2004 21:20:07 -0000 1.9 --- lightsource.py 13 Oct 2004 19:11:13 -0000 1.10 *************** *** 10,13 **** --- 10,14 ---- import wolfpack + import wolfpack.utilities # List of "burning" lightsources *************** *** 121,128 **** if item.id in burning and ids.has_key( item.id ): item.id = ids[ item.id ] ! item.update() ! dropper.soundeffect( 0x226, 0 ) ! return False def onDropOnChar( char, item ): --- 122,130 ---- 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 def onDropOnChar( char, item ): |
From: Sebastian H. <dar...@us...> - 2004-10-13 18:45:55
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23692/system Modified Files: makemenus.py Log Message: enhancing Index: makemenus.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/makemenus.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** makemenus.py 12 Oct 2004 11:02:31 -0000 1.30 --- makemenus.py 13 Oct 2004 18:45:43 -0000 1.31 *************** *** 4,11 **** from wolfpack.gumps import cGump import math ! from wolfpack import console from wolfpack.consts import * import random - from wolfpack import tr # Known menus --- 4,10 ---- from wolfpack.gumps import cGump import math ! from wolfpack import console, properties, tr from wolfpack.consts import * import random # Known menus *************** *** 760,765 **** # def enhance(self, player, arguments, target): ! pass # # Adds the neccesary buttons to a gump. --- 759,988 ---- # def enhance(self, player, arguments, target): ! 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 have a special material selected (not the default one) ! index = self.getsubmaterial1used(player, arguments) ! if index == 0: ! player.socket.clilocmessage(1061010) ! self.send(player, arguments) ! return ! ! # Check if we are skilled enough to use the material ! minvalue = self.submaterials1[index][2] ! skillid = self.submaterials1[index][1] ! ! if player.skill[skillid] < minvalue: ! if self.submaterial1noskill != 0: ! player.socket.clilocmessage(self.submaterial1noskill) ! else: ! player.socket.clilocmessage(1044153) ! ! # Only armors and weapons and shields can be enhanced ! item = target.item ! shield = properties.itemcheck(item, ITEM_SHIELD) ! armor = properties.itemcheck(item, ITEM_ARMOR) ! weapon = properties.itemcheck(item, ITEM_WEAPON) ! if not shield and not armor and not weapon: ! player.socket.clilocmessage(1061011) ! self.send(player, arguments) ! return ! ! # Try to find the craft action for the item ! action = self.findcraftitem(item.baseid) ! ! if not action or action.submaterial1 == 0: ! player.socket.clilocmessage(1061011) ! self.send(player, arguments) ! return ! ! # Do we meet the minimum skill requirements? ! if not action.checkskills(player, arguments, False): ! player.socket.clilocmessage(1044153) ! self.send(player, arguments) ! return ! ! # Is the item already enhanced? ! if item.hastag('resname'): ! resname = str(item.gettag('resname')) ! # Only the first would be allowed ! if self.submaterials1[0][5] != resname: ! player.socket.clilocmessage(1061012) ! self.send(player, arguments) ! return ! ! # Do we have the required amount of resources? ! if not action.checkmaterial(player, arguments): ! self.send(player, arguments) ! return 0 ! ! # Collect information about the important bonuses of the item. ! physical = 0 ! fire = 0 ! cold = 0 ! poison = 0 ! energy = 0 ! durability = 0 ! luck = 0 ! lowerrequirements = 0 ! damageincrease = 0 + # These are flags + physicalBonus = False + fireBonus = False + coldBonus = False + energyBonus = False + poisonBonus = False + durabilityBonus = False + luckBonus = False + lowerrequirementsBonus = False + damageincreaseBonus = False + + resname = self.submaterials1[index][5] # This resname is for the material used to enhance + + if weapon: + failChance = 20 + durability = item.maxhealth + luck = properties.fromitem(item, LUCK) + damageincrease = properties.fromitem(item, DAMAGEBONUS) + lowerrequirements = properties.fromitem(item, LOWERREQS) + + fireBonus = properties.fromresource(resname, DAMAGE_FIRE, ITEM_WEAPON) > 0 + coldBonus = properties.fromresource(resname, DAMAGE_COLD, ITEM_WEAPON) > 0 + energyBonus = properties.fromresource(resname, DAMAGE_ENERGY, ITEM_WEAPON) > 0 + poisonBonus = properties.fromresource(resname, DAMAGE_POISON, ITEM_WEAPON) > 0 + + durabilityBonus = properties.fromresource(resname, DURABILITYBONUS, ITEM_ARMOR) > 0 + luckBonus = properties.fromresource(resname, LUCK, ITEM_ARMOR) > 0 + lowerrequirementsBonus = properties.fromresource(resname, LOWERREQS, ITEM_ARMOR) > 0 + damageincreaseBonus = damageincrease > 0 + itemtype = ITEM_WEAPON + else: + failChance = 20 + physical = properties.fromresource(resname, RESISTANCE_PHYSICAL, ITEM_ARMOR) + fire = properties.fromresource(resname, RESISTANCE_FIRE, ITEM_ARMOR) + cold = properties.fromresource(resname, RESISTANCE_COLD, ITEM_ARMOR) + poison = properties.fromresource(resname, RESISTANCE_POISON, ITEM_ARMOR) + energy = properties.fromresource(resname, RESISTANCE_ENERGY, ITEM_ARMOR) + + durability = item.maxhealth + luck = properties.fromitem(item, LUCK) + lowerrequirements = properties.fromitem(item, LOWERREQS) + + physicalBonus = physical > 0 + fireBonus = fire > 0 + coldBonus = cold > 0 + energyBonus = energy > 0 + poisonBonus = poison > 0 + durabilityBonus = properties.fromresource(resname, DURABILITYBONUS, ITEM_ARMOR) > 0 + luckBonus = properties.fromresource(resname, LUCK, ITEM_ARMOR) > 0 + lowerrequirementsBonus = properties.fromresource(resname, LOWERREQS, ITEM_ARMOR) > 0 + damageincreaseBonus = False + itemtype = ITEM_ARMOR + + # failChance = chance to fail + # Get the primary skill for crafting the item + primarySkill = -1 + primarySkillValue = -1 + + for (skill, value) in action.skills.items(): + if value > primarySkillValue: + primarySkill = skill + primarySkillValue = value + + if primarySkill != -1: + if player.skill[primarySkill] >= 1000: + failChance -= (player.skill[primarySkill] - 900) / 100 + + # Check for every property the item has. + result = 1 + if physicalBonus: + result = self.checkenhancement(result, failChance + physical, player) + + if fireBonus: + result = self.checkenhancement(result, failChance + fire, player) + + if coldBonus: + result = self.checkenhancement(result, failChance + cold, player) + + if poisonBonus: + result = self.checkenhancement(result, failChance + poison, player) + + if energyBonus: + result = self.checkenhancement(result, failChance + energy, player) + + if durabilityBonus: + result = self.checkenhancement(result, failChance + durability / 40, player) + + if luckBonus: + result = self.checkenhancement(result, failChance + 10 + luck / 2, player) + + if lowerrequirementsBonus: + result = self.checkenhancement(result, failChance + lowerrequirements / 4, player) + + if damageincreaseBonus: + result = self.checkenhancement(result, failChance + damageincrease / 5, player) + + # Broken + if result == -1: + action.consumematerial(player, arguments, True) # Consume half the material + item.delete() # Delete the item + player.socket.clilocmessage(1061080) + + # Failure + elif result == 0: + action.consumematerial(player, arguments, True) # Consume half the material + player.socket.clilocmessage(1061082) + + # Success + else: + action.consumematerial(player, arguments, False) # Consume the material + player.socket.clilocmessage(1061008) + + # Attach the properties to the item + item.settag('resname', resname) + # Check for every property if the item had a tag already + for (key, info) in properties.PROPERTIES.items(): + if item.hastag(info[0]): # See if the property is overriden + value = item.gettag(info[0]) # Get the overriden value + resvalue = properties.fromresource(resname, key, itemtype) # Get the bonus for the resource + if resvalue != info[1]: # See if the resource has a bonus + value = value + resvalue # Add the resources bonus + item.settag(info[0], value) # Save the new overriden value for the item + + # Manually increase the durability bonus + healthbonus = properties.fromresource(resname, DURABILITYBONUS, itemtype) + if healthbonus != 0: + bonus = int(math.ceil(item.maxhealth * (healthbonus / 100.0))) + item.maxhealth = max(1, item.maxhealth + bonus) + item.health = item.maxhealth + + item.color = self.submaterials1[index][4] # Change the color to the resources color + item.update() + item.resendtooltip() + + self.send(player, arguments) + + # + # Check the enhancement result for a given property + # with a given fail chance. + # + def checkenhancement(self, result, chance, player): + if result: # Only calculate if we still have a chance to succeed + rnd = random.randrange(0, 100) + + if 10 > rnd: # 10% failure chance + result = 0 + elif chance > rnd: # Rest break chance + result = -1 + + return result + # # Adds the neccesary buttons to a gump. *************** *** 904,909 **** # Enhance Item elif response.button == 11: ! player.socket.clilocmessage(1061004) ! player.socket.attachtarget("system.makemenus.MakeMenuTarget", [self.id, 2] + arguments) # Smelt Item --- 1127,1150 ---- # Enhance Item elif response.button == 11: ! # Check if we have a special material selected (not the default one) ! index = self.getsubmaterial1used(player, arguments) ! if index == 0: ! player.socket.clilocmessage(1061010) ! self.send(player, arguments) # Resend menu ! else: ! # Check if we are skilled enough to use the material ! minvalue = self.submaterials1[index][2] ! skillid = self.submaterials1[index][1] ! ! if player.skill[skillid] < minvalue: ! if self.submaterial1noskill != 0: ! player.socket.clilocmessage(self.submaterial1noskill) ! else: ! player.socket.clilocmessage(1044153) ! ! self.send(player, arguments) # Resend menu ! else: ! player.socket.clilocmessage(1061004) ! player.socket.attachtarget("system.makemenus.MakeMenuTarget", [self.id, 2] + arguments) # Smelt Item |
From: Sebastian H. <dar...@us...> - 2004-10-13 18:45:55
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23692/wolfpack Modified Files: properties.py Log Message: enhancing Index: properties.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/properties.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** properties.py 9 Oct 2004 23:31:03 -0000 1.20 --- properties.py 13 Oct 2004 18:45:43 -0000 1.21 *************** *** 175,178 **** --- 175,206 ---- # + # Get a property bonus from a given resource + # + def fromresource(resource, property, type): + if not PROPERTIES.has_key(property): + raise Exception, "Unknown property value %u" % property + + info = PROPERTIES[property] + + if type == ITEM_ARMOR or type == ITEM_SHIELD: + resboni = wolfpack.armorinfo.ARMOR_RESNAME_BONI + elif type == ITEM_WEAPON: + resboni = wolfpack.weaponinfo.WEAPON_RESNAME_BONI + else: + return info[1] + + # Default value for unknown resources + if not resboni.has_key(resource): + return info[1] + + resboni = resboni[resource] + + # Unkown property for this resource + if not resboni.has_key(property): + return info[1] + + return resboni[property] + + # # Calculates a certain property for the character by # recursing trough all of his equipment. |
From: Sebastian H. <dar...@us...> - 2004-10-13 18:45:55
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23692/skills Modified Files: blacksmithing.py inscription.py tailoring.py Log Message: enhancing Index: tailoring.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/tailoring.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tailoring.py 4 Sep 2004 16:44:49 -0000 1.8 --- tailoring.py 13 Oct 2004 18:45:42 -0000 1.9 *************** *** 141,145 **** self.allowmark = 1 self.allowrepair = 1 ! #self.allowenhance = 1 self.submaterials1 = LEATHERS self.submaterial1missing = 1044463 --- 141,145 ---- self.allowmark = 1 self.allowrepair = 1 ! self.allowenhance = True self.submaterials1 = LEATHERS self.submaterial1missing = 1044463 Index: blacksmithing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/blacksmithing.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** blacksmithing.py 12 Oct 2004 11:02:31 -0000 1.24 --- blacksmithing.py 13 Oct 2004 18:45:42 -0000 1.25 *************** *** 112,115 **** --- 112,116 ---- else: item.settag('remaining_uses', uses - 1) + item.resendtooltip() return True *************** *** 276,280 **** return ! if target.item.container != player.getbackpack(): player.socket.clilocmessage(1044275) return --- 277,281 ---- return ! if not player.canreach(target.item, -1): player.socket.clilocmessage(1044275) return Index: inscription.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/inscription.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** inscription.py 21 Jul 2004 14:20:42 -0000 1.8 --- inscription.py 13 Oct 2004 18:45:42 -0000 1.9 *************** *** 190,194 **** action.materials.append([['1f60'], 1, 1044446]) # 8 runes ! action.materials.append([['1f14'], 8, 1044447]) # bulk order book : TODO : not yet defined in xml #actionid = 1028793 --- 190,194 ---- action.materials.append([['1f60'], 1, 1044446]) # 8 runes ! action.materials.append([['1f14', '1f15', '1f16', '1f17'], 8, 1044447]) # bulk order book : TODO : not yet defined in xml #actionid = 1028793 |
From: Sebastian H. <dar...@us...> - 2004-10-13 18:45:54
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23692 Modified Files: equipment.py Log Message: enhancing Index: equipment.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/equipment.py,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** equipment.py 8 Oct 2004 18:51:52 -0000 1.46 --- equipment.py 13 Oct 2004 18:45:42 -0000 1.47 *************** *** 354,358 **** # Add a Bonus for the skill ! tooltip.add(1060451 + i, "#%u\t%0.01f%%" % (1044060 + skill, bonus / 10.0)) except: object.deltag('skillbonus_%u' % i) --- 354,358 ---- # Add a Bonus for the skill ! tooltip.add(1060451 + i, "#%u\t%u" % (1044060 + skill, int(bonus / 10))) except: object.deltag('skillbonus_%u' % i) *************** *** 476,481 **** # Add a Bonus for the skill - if char.skill[skill] + bonus > char.skillcap[skill]: - bonus = max(0, char.skillcap[skill] - char.skill[skill]) if char.skill[skill] + bonus < 0: bonus = - char.skill[skill] --- 476,479 ---- *************** *** 586,591 **** # If the bonus would add over the skill limit, # make sure it doesnt - if bonus < 0 and char.skill[skill] - bonus > char.skillcap[skill]: - bonus = - (char.skillcap[skill] - char.skill[skill]) if char.skill[skill] - bonus < 0: bonus = char.skill[skill] --- 584,587 ---- |
From: Sebastian H. <dar...@us...> - 2004-10-13 18:45:43
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/professions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23642/items/professions Modified Files: blacksmith.xml Log Message: enhancing Index: blacksmith.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/professions/blacksmith.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** blacksmith.xml 10 Sep 2004 22:17:09 -0000 1.14 --- blacksmith.xml 13 Oct 2004 18:45:32 -0000 1.15 *************** *** 330,334 **** <id>0x13e3</id> <category>Professions\Blacksmith\Smith's Hammer (W/E)</category> ! <weight>8.0</weight> </item> --- 330,334 ---- <id>0x13e3</id> <category>Professions\Blacksmith\Smith's Hammer (W/E)</category> ! <weight>8.0</weight> </item> *************** *** 392,395 **** <weight>0.2</weight> </item> ! </definitions> --- 392,424 ---- <weight>0.2</weight> </item> ! ! <!-- Rewards --> ! <item id="ancient_smiths_hammer"> ! <id>0x13e3</id> ! <weight>8.0</weight> ! <color>0x482</color> ! <name>#1045127</name> ! <tag name="remaining_uses" type="int" value="600" /> ! <basescripts>skills.blacksmithing,equipment</basescripts> ! </item> ! ! <item id="ancient_smiths_hammer_10" inherit="ancient_smiths_hammer"> ! <category>Professions\Blacksmith\Rewards\Ancient Smiths Hammer (10)</category> ! <tag name="skillbonus_0" value="7,100" /> ! </item> ! ! <item id="ancient_smiths_hammer_15" inherit="ancient_smiths_hammer"> ! <category>Professions\Blacksmith\Rewards\Ancient Smiths Hammer (15)</category> ! <tag name="skillbonus_0" value="7,150" /> ! </item> ! ! <item id="ancient_smiths_hammer_30" inherit="ancient_smiths_hammer"> ! <category>Professions\Blacksmith\Rewards\Ancient Smiths Hammer (30)</category> ! <tag name="skillbonus_0" value="7,300" /> ! </item> ! ! <item id="ancient_smiths_hammer_60" inherit="ancient_smiths_hammer"> ! <category>Professions\Blacksmith\Rewards\Ancient Smiths Hammer (60)</category> ! <tag name="skillbonus_0" value="7,600" /> ! </item> </definitions> |
From: Sebastian H. <dar...@us...> - 2004-10-13 18:45:35
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23610/webroot Modified Files: ChangeLog.wolfpack Log Message: fixes Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.150 retrieving revision 1.151 diff -C2 -d -r1.150 -r1.151 *** ChangeLog.wolfpack 13 Oct 2004 00:16:15 -0000 1.150 --- ChangeLog.wolfpack 13 Oct 2004 18:45:26 -0000 1.151 *************** *** 64,67 **** --- 64,69 ---- - Allowed translation of the base makemenu. - Added tilecolor command. + - Making runebooks now allows to use all 4 types of runes. + - Implemented item enhancement via tailoring and blacksmithing. * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
Update of /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22418/samurai Modified Files: daisho.xml kama.xml lajatang.xml no-dachi.xml sai.xml tekagi.xml tessen.xml wakizashi.xml Log Message: Some adjustments from given data. Index: tessen.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/tessen.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tessen.xml 8 Oct 2004 18:51:07 -0000 1.2 --- tessen.xml 13 Oct 2004 18:41:51 -0000 1.3 *************** *** 9,13 **** <definitions> ! <!-- Guessing Fencing --> <!-- Tessen --> <item id="27a3"> --- 9,13 ---- <definitions> ! <!-- Macefighting --> <!-- Tessen --> <item id="27a3"> *************** *** 21,32 **** <weight>4.0</weight> <basescripts>equipment</basescripts> ! <type>1005</type> <category>Weapons\Samurai\Tessen</category> <!-- Properties --> ! <!--<tag name="resname" value="iron" />--> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 21,32 ---- <weight>4.0</weight> <basescripts>equipment</basescripts> ! <type>1004</type> <category>Weapons\Samurai\Tessen</category> <!-- Properties --> ! <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="10" /> ! <intproperty name="speed" value="50" /> ! <intproperty name="mindamage" value="10" /> ! <intproperty name="maxdamage" value="12" /> </item> Index: tekagi.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/tekagi.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tekagi.xml 8 Oct 2004 18:51:07 -0000 1.2 --- tekagi.xml 13 Oct 2004 18:41:50 -0000 1.3 *************** *** 9,13 **** <definitions> ! <!-- Guessing Wrestling --> <!-- Tekagi --> <item id="27ab"> --- 9,13 ---- <definitions> ! <!-- Fencing --> <!-- Tekagi --> <item id="27ab"> *************** *** 21,32 **** <weight>4.0</weight> <basescripts>equipment</basescripts> ! <type>1000</type> <category>Weapons\Samurai\Tekagi</category> <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 21,32 ---- <weight>4.0</weight> <basescripts>equipment</basescripts> ! <type>1005</type> <category>Weapons\Samurai\Tekagi</category> <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="10" /> ! <intproperty name="speed" value="53" /> ! <intproperty name="mindamage" value="10" /> ! <intproperty name="maxdamage" value="12" /> </item> Index: daisho.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/daisho.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** daisho.xml 8 Oct 2004 18:51:07 -0000 1.2 --- daisho.xml 13 Oct 2004 18:41:50 -0000 1.3 *************** *** 9,13 **** <definitions> ! <!-- Guessing Swordsmanship --> <!-- Daisho --> <item id="27a9"> --- 9,13 ---- <definitions> ! <!-- Swordsmanship --> <!-- Daisho --> <item id="27a9"> *************** *** 25,32 **** <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 25,32 ---- <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="40" /> ! <intproperty name="speed" value="40" /> ! <intproperty name="mindamage" value="13" /> ! <intproperty name="maxdamage" value="15" /> </item> Index: wakizashi.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/wakizashi.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wakizashi.xml 7 Oct 2004 22:31:25 -0000 1.1 --- wakizashi.xml 13 Oct 2004 18:41:51 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- <definitions> + <!-- Swordsmanship --> <!-- Wakizashi --> <item id="27a4"> *************** *** 24,31 **** <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 25,32 ---- <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="20" /> ! <intproperty name="speed" value="44" /> ! <intproperty name="mindamage" value="11" /> ! <intproperty name="maxdamage" value="13" /> </item> Index: sai.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/sai.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sai.xml 8 Oct 2004 18:51:07 -0000 1.2 --- sai.xml 13 Oct 2004 18:41:50 -0000 1.3 *************** *** 9,13 **** <definitions> ! <!-- Guessing Fencing --> <!-- Sai --> <item id="27af"> --- 9,13 ---- <definitions> ! <!-- Fencing --> <!-- Sai --> <item id="27af"> *************** *** 25,32 **** <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 25,32 ---- <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="15" /> ! <intproperty name="speed" value="55" /> ! <intproperty name="mindamage" value="9" /> ! <intproperty name="maxdamage" value="11" /> </item> Index: no-dachi.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/no-dachi.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** no-dachi.xml 8 Oct 2004 18:51:07 -0000 1.2 --- no-dachi.xml 13 Oct 2004 18:41:50 -0000 1.3 *************** *** 9,13 **** <definitions> ! <!-- Guessing Swordsmanship --> <!-- No-Dachi --> <item id="27a2"> --- 9,13 ---- <definitions> ! <!-- Swordsmanship --> <!-- No-Dachi --> <item id="27a2"> *************** *** 25,32 **** <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 25,32 ---- <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="40" /> ! <intproperty name="speed" value="32" /> ! <intproperty name="mindamage" value="16" /> ! <intproperty name="maxdamage" value="18" /> </item> Index: kama.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/kama.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kama.xml 8 Oct 2004 18:51:07 -0000 1.2 --- kama.xml 13 Oct 2004 18:41:50 -0000 1.3 *************** *** 9,13 **** <definitions> ! <!-- Guessing fencing --> <!-- Kama --> <item id="27ad"> --- 9,13 ---- <definitions> ! <!-- Fencing --> <!-- Kama --> <item id="27ad"> *************** *** 25,32 **** <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 25,32 ---- <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="15" /> ! <intproperty name="speed" value="55" /> ! <intproperty name="mindamage" value="9" /> ! <intproperty name="maxdamage" value="11" /> </item> Index: lajatang.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/samurai/lajatang.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lajatang.xml 8 Oct 2004 18:51:07 -0000 1.2 --- lajatang.xml 13 Oct 2004 18:41:50 -0000 1.3 *************** *** 9,13 **** <definitions> ! <!-- Guessing Fencing --> <!-- Lajatang --> <item id="27a7"> --- 9,13 ---- <definitions> ! <!-- Fencing --> <!-- Lajatang --> <item id="27a7"> *************** *** 25,32 **** <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="35" /> ! <intproperty name="speed" value="37" /> ! <intproperty name="mindamage" value="14" /> ! <intproperty name="maxdamage" value="16" /> </item> --- 25,32 ---- <!-- Properties --> <tag name="resname" value="iron" /> ! <intproperty name="req_strength" value="65" /> ! <intproperty name="speed" value="32" /> ! <intproperty name="mindamage" value="16" /> ! <intproperty name="maxdamage" value="18" /> </item> |
From: Sebastian H. <dar...@us...> - 2004-10-13 14:47:22
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26848 Modified Files: ChangeLog Log Message: Spawnregion updates Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** ChangeLog 12 Oct 2004 12:55:30 -0000 1.107 --- ChangeLog 13 Oct 2004 14:45:53 -0000 1.108 *************** *** 46,49 **** --- 46,52 ---- - GMs now can really move everything. - Logged out characters are no longer shown in gray because of client bugs. + - Invis items can now be used to block the line of sight. + - Fixed the spawnregion python interface and added documentation. + - Made the spawnregion info gump show the active/inactive state and the groups for spawnregions. Wolfpack 12.9.11 Beta (26. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-10-13 14:47:19
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26712/python Modified Files: global.cpp pyspawnregion.cpp Log Message: Spawnregion updates Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** global.cpp 1 Oct 2004 19:43:57 -0000 1.163 --- global.cpp 13 Oct 2004 14:45:20 -0000 1.164 *************** *** 62,65 **** --- 62,66 ---- #include "tempeffect.h" #include "worlditerator.h" + #include "pyspawnregion.h" // Library Includes *************** *** 568,571 **** --- 569,591 ---- /* + \function wolfpack.spawnregion + \param id The spawnregion id. + \return A <object id="spawnregion">spawnregion</object> object or None if there is no region with the given name. + \description Finds a spawnregion with the given id. + */ + static PyObject* wpSpawnregion( PyObject* self, PyObject* args ) + { + Q_UNUSED( self ); + + // Three arguments + char *name; + if ( !PyArg_ParseTuple( args, "s:wolfpack.spawnregion", &name) ) + return 0; + + cSpawnRegion *spawn = SpawnRegions::instance()->region(name); + return PyGetSpawnRegionObject(spawn); + } + + /* \function wolfpack.currenttime \return An interger value. *************** *** 1845,1848 **** --- 1865,1869 ---- { "effect", wpEffect, METH_VARARGS, "Shows a graphical effect." }, { "region", wpRegion, METH_VARARGS, "Gets the region at a specific position" }, + { "spawnregion", wpSpawnregion, METH_VARARGS, 0 }, { "currenttime", wpCurrenttime, METH_NOARGS, "Time in ms since server-start" }, { "newguild", wpNewguild, METH_VARARGS, 0}, Index: pyspawnregion.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/pyspawnregion.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pyspawnregion.cpp 2 Oct 2004 22:15:52 -0000 1.6 --- pyspawnregion.cpp 13 Oct 2004 14:45:20 -0000 1.7 *************** *** 63,67 **** /* ! \method spawnregion.removeitem \param serial \description Remove the given object from a spawnregion, freeing the slot for a new item --- 63,83 ---- /* ! \method spawnregion.add ! \param object ! \description Add the given object to this spawnregion. ! */ ! static PyObject* wpSpawnRegion_add( wpSpawnRegion *self, PyObject *args) { ! cUObject *object; ! ! if (!PyArg_ParseTuple(args, "O&:spawnregion.add(obj)", &PyConvertObject, &object)) { ! return 0; ! } ! ! object->setSpawnregion(self->pRegion); ! Py_RETURN_NONE; ! } ! ! /* ! \method spawnregion.remove \param serial \description Remove the given object from a spawnregion, freeing the slot for a new item *************** *** 96,112 **** /* ! \method spawnregion.spawn ! \param baseids [Optional] is a list of BaseIDs to be spawned from ! \description Remove the given object from a spawnregion, freeing the slot for a new item ! to be spawned. */ ! static PyObject* wpSpawnRegion_spawn( wpSpawnRegion* /*self*/, PyObject* args ) { ! PyObject* baseids = 0; ! if ( !PyArg_ParseTuple( args, "|O!:spawnregion.spawn([baseids])", &PyList_Type, &baseids ) ) ! { ! return 0; ! } ! Py_RETURN_NONE; } --- 112,131 ---- /* ! \method spawnregion.respawn ! \description Issue a spawn cycle of this spawnregion. */ ! static PyObject* wpSpawnRegion_respawn( wpSpawnRegion* self, PyObject* args ) { ! self->pRegion->reSpawn(); ! Py_RETURN_NONE; ! } ! ! /* ! \method spawnregion.clear ! \description Clear this spawnregion. ! */ ! static PyObject* wpSpawnRegion_clear( wpSpawnRegion* self, PyObject* args ) ! { ! self->pRegion->deSpawn(); Py_RETURN_NONE; } *************** *** 114,119 **** static PyMethodDef wpSpawnRegionMethods[] = { { "remove", ( getattrofunc ) wpSpawnRegion_remove, METH_VARARGS, NULL }, ! { "spawn", ( getattrofunc ) wpSpawnRegion_spawn, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; --- 133,140 ---- static PyMethodDef wpSpawnRegionMethods[] = { + { "add", ( getattrofunc ) wpSpawnRegion_add, METH_VARARGS, NULL }, { "remove", ( getattrofunc ) wpSpawnRegion_remove, METH_VARARGS, NULL }, ! { "respawn", ( getattrofunc ) wpSpawnRegion_respawn, METH_VARARGS, NULL }, ! { "clear", ( getattrofunc ) wpSpawnRegion_clear, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; *************** *** 129,211 **** } /* ! \rproperty spawnregion.maxitemspawn */ ! else if ( !strcmp( name, "maxitemspawn" ) ) { return PyInt_FromLong( self->pRegion->maxItems() ); } /* ! \rproperty spawnregion.maxnpcspawn */ ! else if ( !strcmp( name, "maxnpcspawn" ) ) { return PyInt_FromLong( self->pRegion->maxNpcs() ); } /* ! \rproperty spawnregion.npcspawncount */ ! else if ( !strcmp( name, "npcspawncount" ) ) { return PyInt_FromLong( self->pRegion->npcs() ); } /* ! \rproperty spawnregion.itemspawncount */ ! else if ( !strcmp( name, "itemspawncount" ) ) { return PyInt_FromLong( self->pRegion->items() ); } /* ! \rproperty spawnregion.npcspawnlist ! */ ! else if ( !strcmp( name, "npcspawnlist" ) ) ! { ! /* QStringList sections = self->pRegion->npcSections(); ! PyObject* tuple = PyTuple_New( sections.size() ); ! for ( uint i = 0; i < sections.size(); ++i ) ! { ! PyTuple_SetItem( tuple, i, QString2Python( sections[i] ) ); ! } ! return tuple;*/ ! } ! /* ! \rproperty spawnregion.itemspawnlist ! */ ! else if ( !strcmp( name, "itemspawnlist" ) ) ! { ! /*QStringList sections = self->pRegion->itemSections(); ! PyObject* tuple = PyTuple_New( sections.size() ); ! for ( uint i = 0; i < sections.size(); ++i ) ! { ! PyTuple_SetItem( tuple, i, QString2Python( sections[i] ) ); ! } ! return tuple;*/ ! } ! /* ! \rproperty spawnregion.spawneditems */ ! else if ( !strcmp( name, "spawneditems" ) ) { QPtrList<cUObject> objects = self->pRegion->spawnedItems(); PyObject* list = PyList_New( objects.count() ); cUObject *object; for ( object = objects.first(); object; object = objects.next() ) ! PyList_Append( list, PyInt_FromLong( object->serial() ) ); return list; } /* ! \rproperty spawnregion.spawnednpcs */ ! else if ( !strcmp( name, "spawnednpcs" ) ) { QPtrList<cUObject> objects = self->pRegion->spawnedNpcs(); PyObject* list = PyList_New( objects.count() ); cUObject *object; for ( object = objects.first(); object; object = objects.next() ) ! PyList_Append( list, PyInt_FromLong( object->serial() ) ); return list; } return Py_FindMethod( wpSpawnRegionMethods, ( PyObject * ) self, name ); --- 150,218 ---- } /* ! \rproperty spawnregion.maxitems The maximum number of items spawned by this region. */ ! else if ( !strcmp( name, "maxitems" ) ) { return PyInt_FromLong( self->pRegion->maxItems() ); } /* ! \rproperty spawnregion.maxnpcs The maximum number of npcs spawned by this region. */ ! else if ( !strcmp( name, "maxnpcs" ) ) { return PyInt_FromLong( self->pRegion->maxNpcs() ); } /* ! \rproperty spawnregion.spawnednpcs The number of npcs currently spawned in this region. */ ! else if ( !strcmp( name, "spawnednpcs" ) ) { return PyInt_FromLong( self->pRegion->npcs() ); } /* ! \rproperty spawnregion.spawneditems The number of items currently spawned in this region. */ ! else if ( !strcmp( name, "spawneditems" ) ) { return PyInt_FromLong( self->pRegion->items() ); } /* ! \rproperty spawnregion.items A list of serials for the items currently spawned in this region. */ ! else if ( !strcmp( name, "items" ) ) { QPtrList<cUObject> objects = self->pRegion->spawnedItems(); PyObject* list = PyList_New( objects.count() ); cUObject *object; + int offset = 0; for ( object = objects.first(); object; object = objects.next() ) ! PyList_SetItem( list, offset++, PyInt_FromLong( object->serial() ) ); return list; } /* ! \rproperty spawnregion.npcs A list of serials for the npcs currently spawned in this region. */ ! else if ( !strcmp( name, "npcs" ) ) { QPtrList<cUObject> objects = self->pRegion->spawnedNpcs(); PyObject* list = PyList_New( objects.count() ); cUObject *object; + int offset = 0; for ( object = objects.first(); object; object = objects.next() ) ! PyList_SetItem( list, offset++, PyInt_FromLong( object->serial() ) ); return list; } + /* + \property spawnregion.active Indicates whether this spawnregion is currently active. + */ + else if (!strcmp( name, "active") ) { + if (self->pRegion->active()) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } + } return Py_FindMethod( wpSpawnRegionMethods, ( PyObject * ) self, name ); *************** *** 217,221 **** Q_UNUSED( name ); Q_UNUSED( value ); ! // SpawnRegions have no changeable attributes yet return 0; } --- 224,236 ---- Q_UNUSED( name ); Q_UNUSED( value ); ! ! if (!strcmp(name, "active")) { ! if (PyObject_IsTrue(value)) { ! self->pRegion->setActive(true); ! } else { ! self->pRegion->setActive(false); ! } ! } ! return 0; } |
From: Sebastian H. <dar...@us...> - 2004-10-13 14:46:55
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26712 Modified Files: coord.cpp gumps.cpp spawnregions.cpp spawnregions.h Log Message: Spawnregion updates Index: spawnregions.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** spawnregions.h 2 Oct 2004 22:22:57 -0000 1.32 --- spawnregions.h 13 Oct 2004 14:45:20 -0000 1.33 *************** *** 109,112 **** --- 109,116 ---- } + inline void setActive(bool value) { + active_ = value; + } + inline unsigned int nextTime() { return nextTime_; Index: spawnregions.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** spawnregions.cpp 12 Oct 2004 23:59:28 -0000 1.79 --- spawnregions.cpp 13 Oct 2004 14:45:20 -0000 1.80 *************** *** 656,667 **** void cSpawnRegion::onSpawn( cUObject* obj ) { ! cPythonScript* global = ScriptManager::instance()->getGlobalHook( EVENT_CREATE ); ! if ( global ) ! { PyObject* args = Py_BuildValue( "NN", PyGetSpawnRegionObject( this ), PyGetObjectObject( obj ) ); - global->callEventHandler( EVENT_SPAWN, args ); - Py_DECREF( args ); } --- 656,664 ---- void cSpawnRegion::onSpawn( cUObject* obj ) { ! cPythonScript* global = ScriptManager::instance()->getGlobalHook( EVENT_SPAWN ); ! if ( global ) { PyObject* args = Py_BuildValue( "NN", PyGetSpawnRegionObject( this ), PyGetObjectObject( obj ) ); global->callEventHandler( EVENT_SPAWN, args ); Py_DECREF( args ); } *************** *** 671,684 **** void cSpawnRegion::reSpawn( void ) { ! unsigned int i = 0; ! for ( i = 0; i < npcsPerCycle_; ++i ) ! if ( npcs() < maxNpcAmt_ ) ! spawnSingleNPC(); // spawn a random npc ! for ( i = 0; i < this->itemsPerCycle_; i++ ) ! if ( items() < this->maxItemAmt_ ) ! spawnSingleItem(); // spawn a random item ! this->nextTime_ = Server::instance()->time() + RandomNum( this->minTime_, this->maxTime_ ) * MY_CLOCKS_PER_SEC; } --- 668,683 ---- void cSpawnRegion::reSpawn( void ) { ! if (active_) { ! unsigned int i = 0; ! for ( i = 0; i < npcsPerCycle_; ++i ) ! if ( npcs() < maxNpcAmt_ ) ! spawnSingleNPC(); // spawn a random npc ! for ( i = 0; i < this->itemsPerCycle_; i++ ) ! if ( items() < this->maxItemAmt_ ) ! spawnSingleItem(); // spawn a random item ! this->nextTime_ = Server::instance()->time() + RandomNum( this->minTime_, this->maxTime_ ) * MY_CLOCKS_PER_SEC; ! } } Index: gumps.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** gumps.cpp 8 Oct 2004 10:57:10 -0000 1.173 --- gumps.cpp 13 Oct 2004 14:45:20 -0000 1.174 *************** *** 140,143 **** --- 140,149 ---- addText( 50, 140, tr( "NPCs: %1 of %2" ).arg( region->npcs() ).arg( region->maxNpcs() ), 0x834 ); addText( 50, 160, tr( "Items: %1 of %2" ).arg( region->items() ).arg( region->maxItems() ), 0x834 ); + if (region->active()) { + addText( 50, 180, tr( "Active" ), 0x834 ); + } else { + addText( 50, 180, tr( "Inactive" ), 0x834 ); + } + addText( 50, 200, tr( "Groups: %1" ).arg(region->groups().join(", ")), 0x834 ); //addText( 50, 180, tr( "Coordinates: %1" ).arg( allrectangles.size() ), 0x834 ); Index: coord.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/coord.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** coord.cpp 16 Sep 2004 18:46:33 -0000 1.63 --- coord.cpp 13 Oct 2004 14:45:20 -0000 1.64 *************** *** 148,152 **** for (P_ITEM ditem = ditems->first(); ditem; ditem = ditems->next()) { // If the item is invisible or a multi, skip past it. ! if (ditem->visible() != 0 || ditem->isMulti()) { continue; } --- 148,152 ---- for (P_ITEM ditem = ditems->first(); ditem; ditem = ditems->next()) { // If the item is invisible or a multi, skip past it. ! if (ditem->isMulti()) { continue; } |
From: Sebastian H. <dar...@us...> - 2004-10-13 00:17:30
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13425 Modified Files: scripts.xml Log Message: tilecolor Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** scripts.xml 9 Oct 2004 05:11:55 -0000 1.168 --- scripts.xml 13 Oct 2004 00:17:19 -0000 1.169 *************** *** 121,124 **** --- 121,125 ---- <script>commands.testlos</script> <script>commands.tile</script> + <script>commands.tilecolor</script> <script>commands.travel</script> <script>commands.turnitem</script> |
From: Sebastian H. <dar...@us...> - 2004-10-13 00:16:24
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13160/webroot Modified Files: ChangeLog.wolfpack Log Message: hopefully fixes some errors related to duplicate save items. Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** ChangeLog.wolfpack 12 Oct 2004 11:02:22 -0000 1.149 --- ChangeLog.wolfpack 13 Oct 2004 00:16:15 -0000 1.150 *************** *** 63,66 **** --- 63,67 ---- - Withdraw now updates the gold put into the players backpack. - Allowed translation of the base makemenu. + - Added tilecolor command. * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-10-13 00:16:10
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13094/commands Added Files: tilecolor.py Log Message: tilecolor --- NEW FILE: tilecolor.py --- """ \command tilecolor \description Dyes all items in an area with the given color. \usage - <code>tilecolor color</code> - <code>tilecolor color1,color2,...,colorn</coode> Color is the id of the color you want to hue the items in. If you give more than one color, one color is randomly selected from the given list for every tile that is found. """ import wolfpack from wolfpack.consts import * import random from wolfpack.utilities import hex2dec # # Gather another corner if neccesary and start tiling # def tileResponse(player, arguments, target): if len(arguments) < 2: player.socket.sysmessage('Please select the second corner.') player.socket.attachtarget("commands.tilecolor.tileResponse", [arguments[0], target.pos]) return x1 = min(arguments[1].x, target.pos.x) x2 = max(arguments[1].x, target.pos.x) y1 = min(arguments[1].y, target.pos.y) y2 = max(arguments[1].y, target.pos.y) colors = arguments[0] unlimited = player.account.authorized('Misc', 'Unlimited Tilecolor') count = ((x2 - x1) + 1) * ((y2 - y1) + 1) # Cap at 500 items if not an admin is using it if not unlimited and count > 250: player.socket.sysmessage('You are not allowed to tile more than 250 items at once.') return player.log(LOG_MESSAGE, "Dying items (%s) from %u,%u to %u,%u.\n" % (", ".join(colors), x1, y1, x2, y2)) player.socket.sysmessage('Dying items from %u,%u to %u,%u.' % (x1, y1, x2, y2)) try: colors = map(hex2dec, colors) except: player.socket.sysmessage('You have to pass a comma separated list of numbers.') player.socket.sysmessage('Hexadecimal numbers have to be in the 0x123 format.') raise mapid = player.pos.map for x in range(x1, x2 + 1): for y in range(y1, y2 + 1): items = wolfpack.items(x, y, mapid, 0) for item in items: color = random.choice(colors) # This should be a trace log #player.log(LOG_MESSAGE, "Dying item 0x%x (%s) from color 0x%x to 0x%x.\n" % (item.serial, item.baseid, item.color, color)) item.color = color item.update() # # Gather arguments and validate id list. # def commandTilecolor(socket, command, arguments): if len(arguments) == 0 or arguments.count(' ') > 0: socket.sysmessage('Usage: .tilecolor id{,id}') return (ids, ) = arguments.split(' ') ids = ids.split(',') socket.sysmessage('Please select the first corner.') socket.attachtarget('commands.tilecolor.tileResponse', [ids]) # # Register the command # def onLoad(): wolfpack.registercommand("tilecolor", commandTilecolor) |
From: Sebastian H. <dar...@us...> - 2004-10-12 23:59:38
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9823 Modified Files: basechar.cpp basics.cpp basics.h items.cpp spawnregions.cpp world.cpp Log Message: hopefully fixes some errors related to duplicate save items. Index: basics.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basics.h,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** basics.h 2 Oct 2004 22:15:49 -0000 1.37 --- basics.h 12 Oct 2004 23:59:28 -0000 1.38 *************** *** 144,147 **** --- 144,148 ---- private: class cBufferedReaderPrivate *d; + QString error_; public: *************** *** 167,170 **** --- 168,183 ---- unsigned int objectCount(); + + inline void setError(const QString &error) { + error_ = error; + } + + inline bool hasError() { + return !error_.isNull(); + } + + inline const QString &error() { + return error_; + } }; Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 *** basechar.cpp 9 Oct 2004 14:28:58 -0000 1.160 --- basechar.cpp 12 Oct 2004 23:59:27 -0000 1.161 *************** *** 1058,1063 **** { // This is not allowed ! if ( ser == INVALID_SERIAL ) return; if ( this->serial() != INVALID_SERIAL ) --- 1058,1070 ---- { // This is not allowed ! if ( ser == INVALID_SERIAL || ser == serial_ ) ! return; ! ! // is the new serial already occupied? ! P_CHAR other = World::instance()->findChar(ser); ! if (other && other != this) { ! Console::instance()->log(LOG_ERROR, tr("Trying to change the serial of char 0x%1 to the already occupied serial 0x%2.\n").arg(serial_, 0, 16).arg(ser, 0, 16)); return; + } if ( this->serial() != INVALID_SERIAL ) *************** *** 3535,3538 **** --- 3542,3546 ---- pItem->remove(); } + content_.clear(); // Clear the content if ( multi_ ) Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** world.cpp 9 Oct 2004 14:29:00 -0000 1.134 --- world.cpp 12 Oct 2004 23:59:28 -0000 1.135 *************** *** 451,455 **** try { object->load( reader ); ! objects.append(object); } catch (wpException& e) { Console::instance()->log( LOG_WARNING, e.error() + "\n" ); --- 451,486 ---- try { object->load( reader ); ! ! if (reader.hasError()) { ! Console::instance()->log(LOG_ERROR, reader.error()); ! reader.setError(QString::null); ! ! cUObject *obj = dynamic_cast<cUObject*>(object); ! if (obj) { ! obj->setSpawnregion(0); ! SectorMaps::instance()->remove(obj); ! unregisterObject(obj); ! ! if (obj->multi()) { ! obj->multi()->removeObject(obj); ! obj->setMulti(0); ! } ! } ! ! P_ITEM item = dynamic_cast<P_ITEM>(object); ! if (item) { ! item->removeFromCont(); ! item->setOwner(0); ! } ! ! P_NPC npc = dynamic_cast<P_NPC>(object); ! if (npc) { ! npc->setOwner(0); ! npc->setAI(0); ! } ! delete object; ! } else { ! objects.append(object); ! } } catch (wpException& e) { Console::instance()->log( LOG_WARNING, e.error() + "\n" ); *************** *** 1187,1192 **** _itemCount--; if ( _lastItemSerial == serial ) ! _lastItemSerial--; } else if ( isCharSerial( serial ) ) --- 1218,1225 ---- _itemCount--; + /* + This isn't good... if ( _lastItemSerial == serial ) ! _lastItemSerial--;*/ } else if ( isCharSerial( serial ) ) *************** *** 1213,1218 **** _charCount--; if ( _lastCharSerial == serial ) ! _lastCharSerial--; } else --- 1246,1253 ---- _charCount--; + /* + This sometimes kills stuff... if ( _lastCharSerial == serial ) ! _lastCharSerial--;*/ } else Index: basics.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basics.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** basics.cpp 2 Oct 2004 22:15:49 -0000 1.41 --- basics.cpp 12 Oct 2004 23:59:28 -0000 1.42 *************** *** 354,357 **** --- 354,358 ---- cBufferedReader::cBufferedReader( const QCString& magic, unsigned int version ) { + error_ = QString::null; d = new cBufferedReaderPrivate; d->buffer.resize( 4096 ); Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.453 retrieving revision 1.454 diff -C2 -d -r1.453 -r1.454 *** items.cpp 9 Oct 2004 14:28:59 -0000 1.453 --- items.cpp 12 Oct 2004 23:59:28 -0000 1.454 *************** *** 348,351 **** --- 348,355 ---- void cItem::save( cBufferedWriter& writer, unsigned int version ) { + if (free || (container_ && container_->free)) { + Console::instance()->log(LOG_ERROR, tr("Saving item 0x%1 although it's already freed.\n").arg(serial_, 0, 16)); + } + cUObject::save( writer, version ); *************** *** 375,379 **** color_ = reader.readShort(); // Here we assume that containers are always before us in the save ! cUObject* container = World::instance()->findObject( reader.readInt() ); layer_ = reader.readByte(); amount_ = reader.readShort(); --- 379,384 ---- color_ = reader.readShort(); // Here we assume that containers are always before us in the save ! SERIAL containerSerial = reader.readInt(); ! cUObject* container = World::instance()->findObject( containerSerial ); layer_ = reader.readByte(); amount_ = reader.readShort(); *************** *** 393,397 **** if ( iContainer ) { ! iContainer->addItem( this, false, true, true ); } else --- 398,402 ---- if ( iContainer ) { ! iContainer->addItem( this, false, true, false ); } else *************** *** 403,406 **** --- 408,415 ---- } } + } else { + if (containerSerial != INVALID_SERIAL) { // Indicate an error + reader.setError(tr("Deleting item 0x%1 because of invalid container 0x%2.\n").arg(serial_, 0, 16).arg(containerSerial, 0, 16)); + } } } *************** *** 480,485 **** void cItem::setSerial( const SERIAL ser ) { ! if ( ser == INVALID_SERIAL ) return; if ( serial() != INVALID_SERIAL ) --- 489,501 ---- void cItem::setSerial( const SERIAL ser ) { ! if ( ser == INVALID_SERIAL || ser == serial_ ) ! return; ! ! // is the new serial already occupied? ! P_ITEM other = World::instance()->findItem(ser); ! if (other && other != this) { ! Console::instance()->log(LOG_ERROR, tr("Trying to change the serial of item 0x%1 to the already occupied serial 0x%2.\n").arg(serial_, 0, 16).arg(ser, 0, 16)); return; + } if ( serial() != INVALID_SERIAL ) *************** *** 1083,1087 **** if ( item ) ! item->addItem( nItem, false, true, true ); } } --- 1099,1103 ---- if ( item ) ! item->addItem( nItem, false, true, false ); } } Index: spawnregions.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** spawnregions.cpp 11 Oct 2004 20:27:01 -0000 1.78 --- spawnregions.cpp 12 Oct 2004 23:59:28 -0000 1.79 *************** *** 918,921 **** --- 918,928 ---- object->setSpawnregion( region ); } + } else { + cUObject *object; + QPtrList<cUObject> &list = it.data(); + for ( object = list.first(); object; object = list.next() ) + { + object->remove(); + } } } |
From: Sebastian H. <dar...@us...> - 2004-10-12 23:59:38
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9823/python Modified Files: char.cpp item.cpp Log Message: hopefully fixes some errors related to duplicate save items. Index: item.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** item.cpp 8 Oct 2004 01:13:16 -0000 1.137 --- item.cpp 12 Oct 2004 23:59:28 -0000 1.138 *************** *** 707,710 **** --- 707,713 ---- P_ITEM pItem = getArgItem( 0 ); + if (pItem->free) + Py_RETURN_FALSE; + // Secondary Parameters bool randomPos = true; Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -d -r1.203 -r1.204 *** char.cpp 1 Oct 2004 23:26:38 -0000 1.203 --- char.cpp 12 Oct 2004 23:59:28 -0000 1.204 *************** *** 2242,2246 **** if ( pItem ) ! self->pChar->addItem( ( cBaseChar::enLayer ) layer, pItem, handleWeight, noRemove ); Py_RETURN_NONE; --- 2242,2246 ---- if ( pItem ) ! self->pChar->addItem( ( cBaseChar::enLayer ) layer, pItem, handleWeight, false ); Py_RETURN_NONE; |
From: Sebastian H. <dar...@us...> - 2004-10-12 17:51:52
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/professions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27872/items/professions Modified Files: fletcher.xml Log Message: bowyer updates Index: fletcher.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/professions/fletcher.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** fletcher.xml 10 Sep 2004 22:17:09 -0000 1.10 --- fletcher.xml 12 Oct 2004 17:51:34 -0000 1.11 *************** *** 100,103 **** --- 100,105 ---- <category>Professions\Fletcher\Feather</category> <weight>0.1</weight> + <sellprice>1</sellprice> + <buyprice>2</buyprice> </item> *************** *** 118,121 **** --- 120,125 ---- <category>Professions\Fletcher\Shaft</category> <weight>0.1</weight> + <sellprice>1</sellprice> + <buyprice>3</buyprice> </item> |
From: Sebastian H. <dar...@us...> - 2004-10-12 17:51:51
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/vendors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27872/npcs/humans/vendors Modified Files: bowyer.xml Log Message: bowyer updates Index: bowyer.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/vendors/bowyer.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** bowyer.xml 26 Sep 2004 12:52:23 -0000 1.6 --- bowyer.xml 12 Oct 2004 17:51:35 -0000 1.7 *************** *** 9,28 **** <definitions> ! <!-- A bowyer vendor --> ! <npc id="bowyer_male"> ! <inherit>vendor_male</inherit> ! <title context="Vendor Male Titles">the Bowyer</title> ! <equipped> ! <item id="13b1" /> <!-- Bow --> ! <item id="13c7" /> <!-- Leather Gorget --> ! </equipped> <shopkeeper> <restockable> <item id="1022"><amount>20</amount></item> </restockable> <sellable> <item id="1022" /> </sellable> </shopkeeper> <archery><random min="600" max="830" /></archery> <bowcrafting><random min="900" max="1000" /></bowcrafting> --- 9,46 ---- <definitions> ! <npc id="bowyer_inventory"> <shopkeeper> <restockable> <item id="1022"><amount>20</amount></item> + <item id="1bfb"><amount>60</amount></item> + <item id="f3f"><amount>60</amount></item> + <item id="1bd1"><amount>60</amount></item> + <item id="1bd4"><amount>60</amount></item> + <item id="13fd"><amount>20</amount></item> + <item id="13b2"><amount>20</amount></item> + <item id="f50"><amount>20</amount></item> </restockable> <sellable> <item id="1022" /> + <item id="1bfb" /> + <item id="f3f" /> + <item id="1bd1" /> + <item id="1bd4" /> + <item id="13fd" /> + <item id="13b2" /> + <item id="f50" /> </sellable> </shopkeeper> + </npc> + + <!-- A bowyer vendor --> + <npc id="bowyer_male"> + <inherit>vendor_male</inherit> + <title context="Vendor Male Titles">the Bowyer</title> + <equipped> + <item id="13b1" /> <!-- Bow --> + <item id="13c7" /> <!-- Leather Gorget --> + </equipped> + <inherit id="bowyer_inventory" /> <archery><random min="600" max="830" /></archery> <bowcrafting><random min="900" max="1000" /></bowcrafting> *************** *** 33,48 **** <inherit>vendor_female</inherit> <title context="Vendor Female Titles">the Bowyer</title> ! <equipped> ! <item id="13b1" /> <!-- Bow --> ! <item id="13c7" /> <!-- Leather Gorget --> ! </equipped> ! <shopkeeper> ! <restockable> ! <item id="1022"><amount>20</amount></item> ! </restockable> ! <sellable> ! <item id="1022" /> ! </sellable> ! </shopkeeper> <archery><random min="600" max="830" /></archery> <bowcrafting><random min="900" max="1000" /></bowcrafting> --- 51,55 ---- <inherit>vendor_female</inherit> <title context="Vendor Female Titles">the Bowyer</title> ! <inherit id="bowyer_inventory" /> <archery><random min="600" max="830" /></archery> <bowcrafting><random min="900" max="1000" /></bowcrafting> |
From: Sebastian H. <dar...@us...> - 2004-10-12 13:14:49
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27381/network Modified Files: uosocket.cpp Log Message: logfix Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.428 retrieving revision 1.429 diff -C2 -d -r1.428 -r1.429 *** uosocket.cpp 10 Oct 2004 12:19:10 -0000 1.428 --- uosocket.cpp 12 Oct 2004 13:13:49 -0000 1.429 *************** *** 3157,3161 **** if (owner && owner != _player) { ! log(LOG_NOTICE, tr("Looking into corpse of player '%1' ('%2', 0x%3)").arg(owner->name()).arg(owner->account() ? owner->account()->login() : QString("unknown")).arg(owner->serial(), 0, 16)); } } --- 3157,3161 ---- if (owner && owner != _player) { ! log(LOG_NOTICE, tr("Looking into corpse of player '%1' ('%2', 0x%3)\n").arg(owner->name()).arg(owner->account() ? owner->account()->login() : QString("unknown")).arg(owner->serial(), 0, 16)); } } |
From: Sebastian H. <dar...@us...> - 2004-10-12 12:55:40
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23782 Modified Files: ChangeLog Log Message: fix for .allshow bugs Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** ChangeLog 11 Oct 2004 20:27:01 -0000 1.106 --- ChangeLog 12 Oct 2004 12:55:30 -0000 1.107 *************** *** 44,47 **** --- 44,49 ---- - Made AI checks occur more often if the npc moves faster. - Added an option to disable spawnregions alltogether for build servers etc. + - GMs now can really move everything. + - Logged out characters are no longer shown in gray because of client bugs. Wolfpack 12.9.11 Beta (26. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-10-12 12:55:24
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23682/network Modified Files: uotxpackets.cpp Log Message: fix for .allshow bugs Index: uotxpackets.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uotxpackets.cpp,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** uotxpackets.cpp 31 Aug 2004 15:18:25 -0000 1.102 --- uotxpackets.cpp 12 Oct 2004 12:55:14 -0000 1.103 *************** *** 286,293 **** P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! } if ( pChar->isHidden() || pChar->isInvisible() ) --- 286,293 ---- P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! /*if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! }*/ if ( pChar->isHidden() || pChar->isInvisible() ) *************** *** 349,356 **** P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! } if ( pChar->isHidden() || pChar->isInvisible() ) --- 349,356 ---- P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! /*if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! }*/ if ( pChar->isHidden() || pChar->isInvisible() ) *************** *** 435,442 **** P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! } if ( pChar->isHidden() || pChar->isInvisible() ) --- 435,442 ---- P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! /*if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! }*/ if ( pChar->isHidden() || pChar->isInvisible() ) *************** *** 585,592 **** P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! } if ( pChar->isHidden() || pChar->isInvisible() ) --- 585,592 ---- P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); ! /*if ( player && !player->socket() && !player->logoutTime() ) { setFlag( flag() | 0x80 ); ! }*/ if ( pChar->isHidden() || pChar->isInvisible() ) |
From: Sebastian H. <dar...@us...> - 2004-10-12 12:55:23
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23682 Modified Files: dragdrop.cpp Log Message: fix for .allshow bugs Index: dragdrop.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v retrieving revision 1.246 retrieving revision 1.247 diff -C2 -d -r1.246 -r1.247 *** dragdrop.cpp 24 Sep 2004 04:47:23 -0000 1.246 --- dragdrop.cpp 12 Oct 2004 12:55:05 -0000 1.247 *************** *** 75,79 **** // Check if the item can be reached ! if (pItem->getOutmostChar() != pChar && !pChar->lineOfSight(pItem)) { socket->bounceItem( pItem, BR_OUT_OF_REACH ); return; --- 75,79 ---- // Check if the item can be reached ! if ( !pChar->isGM() && pItem->getOutmostChar() != pChar && !pChar->lineOfSight(pItem)) { socket->bounceItem( pItem, BR_OUT_OF_REACH ); return; |
From: Sebastian H. <dar...@us...> - 2004-10-12 11:03:06
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31752/system Modified Files: makemenus.py Log Message: translation Index: makemenus.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/makemenus.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** makemenus.py 1 Oct 2004 16:34:11 -0000 1.29 --- makemenus.py 12 Oct 2004 11:02:31 -0000 1.30 *************** *** 7,10 **** --- 7,11 ---- from wolfpack.consts import * import random + from wolfpack import tr # Known menus *************** *** 131,135 **** if not tobackpack(item, player): item.update() ! player.socket.sysmessage('You put the new item into your backpack.') MakeAction.make(self, player, arguments, nodelay) --- 132,136 ---- if not tobackpack(item, player): item.update() ! player.socket.sysmessage(tr('You put the new item into your backpack.')) MakeAction.make(self, player, arguments, nodelay) *************** *** 170,181 **** if self.itemid != 0: gump.addTilePic(15, 42, self.itemid) ! gump.addHtmlGump(10, 132, 150, 20, centerhtml % "SKILLS") ! gump.addHtmlGump(10, 217, 150, 20, centerhtml % "MATERIALS") ! gump.addHtmlGump(10, 302, 150, 20, centerhtml % "OTHER") ! gump.addHtmlGump(170, 39, 70, 20, whitehtml % "ITEM") gump.addButton(15, 387, 0xFAE, 0xFB0, 0) # Back to the parent menu of this node ! gump.addText(50, 389, "Back", 0x480) gump.addButton(375, 387, 4005, 4007, 1) # Make the item ! gump.addText(410, 389, "Make Now", 0x480) # Item Name --- 171,182 ---- if self.itemid != 0: gump.addTilePic(15, 42, self.itemid) ! gump.addHtmlGump(10, 132, 150, 20, centerhtml % tr("SKILLS")) ! gump.addHtmlGump(10, 217, 150, 20, centerhtml % tr("MATERIALS")) ! gump.addHtmlGump(10, 302, 150, 20, centerhtml % tr("OTHER")) ! gump.addHtmlGump(170, 39, 70, 20, whitehtml % tr("ITEM")) gump.addButton(15, 387, 0xFAE, 0xFB0, 0) # Back to the parent menu of this node ! gump.addText(50, 389, tr("Back"), 0x480) gump.addButton(375, 387, 4005, 4007, 1) # Make the item ! gump.addText(410, 389, tr("Make Now"), 0x480) # Item Name *************** *** 207,211 **** # Sysmessage sent if you don't have enough material. # Integer or String allowed ! self.lackmaterial = "You don't have enough material to make that." # --- 208,212 ---- # Sysmessage sent if you don't have enough material. # Integer or String allowed ! self.lackmaterial = tr("You don't have enough material to make that.") # *************** *** 230,234 **** if material >= len(materials): if not silent: ! player.socket.sysmessage("You try to craft with an invalid material.") return 0 material = materials[material] --- 231,235 ---- if material >= len(materials): if not silent: ! player.socket.sysmessage(tr("You try to craft with an invalid material.")) return 0 material = materials[material] *************** *** 257,261 **** if material >= len(materials): if not silent: ! player.socket.sysmessage("You try to craft with an invalid material.") return 0 material = materials[material] --- 258,262 ---- if material >= len(materials): if not silent: ! player.socket.sysmessage(tr("You try to craft with an invalid material.")) return 0 material = materials[material] *************** *** 365,369 **** def getotherhtml(self, player, arguments): chance = self.getexceptionalchance(player, arguments) * 100 ! return 'Chance to create an exceptional item: %0.02f%%.<br>' % chance # --- 366,370 ---- def getotherhtml(self, player, arguments): chance = self.getexceptionalchance(player, arguments) * 100 ! return tr('Chance to create an exceptional item: %0.02f%%.<br>') % chance # *************** *** 588,592 **** self.title = title self.gumptype = 0 ! self.name_makelast = "Make Last" self.delay = 0 # Delay in ms until item is crafted. --- 589,593 ---- self.title = title self.gumptype = 0 ! self.name_makelast = tr("Make Last") self.delay = 0 # Delay in ms until item is crafted. *************** *** 768,786 **** if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) ! gump.addText(385, 313, "Repair Item", 0x480) # Allow enhancement of items if self.allowenhance: gump.addButton(350, 330, 4005, 4007, 11) ! gump.addText(385, 333, "Enhance Item", 0x480) # Allow smelting of items if self.allowsmelt: gump.addButton(350, 350, 4005, 4007, 12) ! gump.addText(385, 353, "Smelt Item", 0x480) # EXIT button , return value: 0 gump.addButton(15, 350, 0xFB1, 0xFB3, 0) ! gump.addText(50, 353, "Exit", 0x480) # MAKE LAST button , return value: 2 --- 769,787 ---- if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) ! gump.addText(385, 313, tr("Repair Item"), 0x480) # Allow enhancement of items if self.allowenhance: gump.addButton(350, 330, 4005, 4007, 11) ! gump.addText(385, 333, tr("Enhance Item"), 0x480) # Allow smelting of items if self.allowsmelt: gump.addButton(350, 350, 4005, 4007, 12) ! gump.addText(385, 353, tr("Smelt Item"), 0x480) # EXIT button , return value: 0 gump.addButton(15, 350, 0xFB1, 0xFB3, 0) ! gump.addText(50, 353, tr("Exit"), 0x480) # MAKE LAST button , return value: 2 *************** *** 793,805 **** if submenu: gump.addButton(15, 310, 0xFAE, 0xFB0, 9) ! gump.addText(50, 313, "Back", 0x480) elif self.parent: gump.addButton(15, 310, 0xFAE, 0xFB0, 3) ! gump.addText(50, 313, "Previous Menu", 0x480) # LAST 10 if not submenu: gump.addButton(15, 60, 0xFAB, 0xFAD, 1) ! gump.addText(50, 63, "Last Ten", 0x480) # MARK ITEM button --- 794,806 ---- if submenu: gump.addButton(15, 310, 0xFAE, 0xFB0, 9) ! gump.addText(50, 313, tr("Back"), 0x480) elif self.parent: gump.addButton(15, 310, 0xFAE, 0xFB0, 3) ! gump.addText(50, 313, tr("Previous Menu"), 0x480) # LAST 10 if not submenu: gump.addButton(15, 60, 0xFAB, 0xFAD, 1) ! gump.addText(50, 63, tr("Last Ten"), 0x480) # MARK ITEM button *************** *** 807,814 **** if not player.hastag('markitem'): buttonid = 4 # DONT MARK ITEM -> MARK ITEM ! message = "Dont Mark Item" else: buttonid = 5 # Turns to "DONT MARK ITEM" ! message= "Mark Item" gump.addButton(165, 350, 4005, 4007, buttonid) --- 808,815 ---- if not player.hastag('markitem'): buttonid = 4 # DONT MARK ITEM -> MARK ITEM ! message = tr("Dont Mark Item") else: buttonid = 5 # Turns to "DONT MARK ITEM" ! message= tr("Mark Item") gump.addButton(165, 350, 4005, 4007, buttonid) *************** *** 863,867 **** elif response.button == 2: if not self.makelast(player, arguments): ! player.socket.sysmessage("You didn't make anything yet.") self.send(player, arguments) --- 864,868 ---- elif response.button == 2: if not self.makelast(player, arguments): ! player.socket.sysmessage(tr("You didn't make anything yet.")) self.send(player, arguments) *************** *** 969,977 **** data = self.submaterials1[material] if data[2] and player.skill[data[1]] < data[2]: ! player.socket.sysmessage('You are not skilled enough to use this material.') else: self.setsubmaterial1used(player, arguments, material) else: ! player.socket.sysmessage('You selected an invalid material.') self.send(player, arguments) --- 970,978 ---- data = self.submaterials1[material] if data[2] and player.skill[data[1]] < data[2]: ! player.socket.sysmessage(tr('You are not skilled enough to use this material.')) else: self.setsubmaterial1used(player, arguments, material) else: ! player.socket.sysmessage(tr('You selected an invalid material.')) self.send(player, arguments) *************** *** 982,990 **** data = self.submaterials2[material] if data[2] and player.skill[data[1]] < data[2]: ! player.socket.sysmessage('You are not skilled enough to use this material.') else: self.setsubmaterial2used(player, arguments, material) else: ! player.socket.sysmessage('You selected an invalid material.') self.send(player, arguments) --- 983,991 ---- data = self.submaterials2[material] if data[2] and player.skill[data[1]] < data[2]: ! player.socket.sysmessage(tr('You are not skilled enough to use this material.')) else: self.setsubmaterial2used(player, arguments, material) else: ! player.socket.sysmessage(tr('You selected an invalid material.')) self.send(player, arguments) *************** *** 1016,1021 **** gump.addHtmlGump(10, 12, 510, 20, centerhtml % self.title) ! gump.addHtmlGump(10, 39, 200, 20, centerhtml % "CATEGORIES") ! gump.addHtmlGump(215, 39, 305, 20, centerhtml % "SELECTIONS") return gump --- 1017,1022 ---- gump.addHtmlGump(10, 12, 510, 20, centerhtml % self.title) ! gump.addHtmlGump(10, 39, 200, 20, centerhtml % tr("CATEGORIES")) ! gump.addHtmlGump(215, 39, 305, 20, centerhtml % tr("SELECTIONS")) return gump *************** *** 1070,1079 **** if i > 0: gump.addPageButton(15, 290, 0xFAE, 0xFB0, i) ! gump.addText(50, 293, "Previous Page", 0x480) # Add a next button if i+1 < pages: gump.addPageButton(350, 290, 4005, 4007, i + 2) ! gump.addText(385, 293, "Next Page", 0x480) gump.setArgs([self.id] + args) --- 1071,1080 ---- if i > 0: gump.addPageButton(15, 290, 0xFAE, 0xFB0, i) ! gump.addText(50, 293, tr("Previous Page"), 0x480) # Add a next button if i+1 < pages: gump.addPageButton(350, 290, 4005, 4007, i + 2) ! gump.addText(385, 293, tr("Next Page"), 0x480) gump.setArgs([self.id] + args) |
From: Sebastian H. <dar...@us...> - 2004-10-12 11:03:05
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31752/skills Modified Files: blacksmithing.py carpentry.py Log Message: translation Index: carpentry.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/carpentry.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** carpentry.py 20 Sep 2004 18:11:32 -0000 1.19 --- carpentry.py 12 Oct 2004 11:02:31 -0000 1.20 *************** *** 7,11 **** from wolfpack.utilities import hex2dec, tobackpack, createlockandkey import random ! from skills.blacksmithing import METALS # --- 7,11 ---- from wolfpack.utilities import hex2dec, tobackpack, createlockandkey import random ! import skills.blacksmithing # *************** *** 167,171 **** self.allowmark = 1 #self.allowrepair = 1 ! self.submaterials1 = METALS self.submaterial1missing = 1042081 # Ingots self.submaterial1noskill = 500586 --- 167,171 ---- self.allowmark = 1 #self.allowrepair = 1 ! self.submaterials1 = skills.blacksmithing.METALS self.submaterial1missing = 1042081 # Ingots self.submaterial1noskill = 500586 Index: blacksmithing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/blacksmithing.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** blacksmithing.py 12 Oct 2004 10:40:01 -0000 1.23 --- blacksmithing.py 12 Oct 2004 11:02:31 -0000 1.24 *************** *** 19,31 **** # The last value is the resname to use for newly crafted items METALS = [ ! ['Iron', BLACKSMITHING, 0, ['iron_ingot'], 0x0, 'iron'], ! ['Dull Copper', BLACKSMITHING, 650, ['dullcopper_ingot'], 0x973, 'dullcopper'], ! ['Shadow Iron', BLACKSMITHING, 700, ['shadowiron_ingot'], 0x966, 'shadowiron'], ! ['Copper', BLACKSMITHING, 750, ['copper_ingot'], 0x96d, 'copper'], ! ['Bronze', BLACKSMITHING, 800, ['bronze_ingot'], 0x972, 'bronze'], ! ['Gold', BLACKSMITHING, 850, ['gold_ingot'], 0x8a5, 'gold'], ! ['Agapite', BLACKSMITHING, 900, ['agapite_ingot'], 0x979, 'agapite'], ! ['Verite', BLACKSMITHING, 950, ['verite_ingot'], 0x89f, 'verite'], ! ['Valorite', BLACKSMITHING, 990, ['valorite_ingot'], 0x8ab, 'valorite'], ] --- 19,31 ---- # The last value is the resname to use for newly crafted items METALS = [ ! ['Iron', BLACKSMITHING, 0, ['iron_ingot'], 0x0, 'iron'], ! ['Dull Copper', BLACKSMITHING, 650, ['dullcopper_ingot'], 0x973, 'dullcopper'], ! ['Shadow Iron', BLACKSMITHING, 700, ['shadowiron_ingot'], 0x966, 'shadowiron'], ! ['Copper', BLACKSMITHING, 750, ['copper_ingot'], 0x96d, 'copper'], ! ['Bronze', BLACKSMITHING, 800, ['bronze_ingot'], 0x972, 'bronze'], ! ['Gold', BLACKSMITHING, 850, ['gold_ingot'], 0x8a5, 'gold'], ! ['Agapite', BLACKSMITHING, 900, ['agapite_ingot'], 0x979, 'agapite'], ! ['Verite', BLACKSMITHING, 950, ['verite_ingot'], 0x89f, 'verite'], ! ['Valorite', BLACKSMITHING, 990, ['valorite_ingot'], 0x8ab, 'valorite'], ] *************** *** 250,257 **** def __init__(self, id, parent, title): MakeMenu.__init__(self, id, parent, title) ! self.allowmark = 1 ! self.allowrepair = 1 ! #self.allowenhance = 1 ! self.allowsmelt = 1 self.submaterials1 = METALS self.submaterials2 = SCALES --- 250,257 ---- def __init__(self, id, parent, title): MakeMenu.__init__(self, id, parent, title) ! self.allowmark = True ! self.allowrepair = True ! self.allowenhance = True ! self.allowsmelt = True self.submaterials1 = METALS self.submaterials2 = SCALES |