wpdev-commits Mailing List for Wolfpack Emu (Page 55)
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: Klaus M. <nad...@us...> - 2004-09-02 15:17:40
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21556/xmlscripts/scripts Modified Files: scissors.py Log Message: bugfix #259 Index: scissors.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/scissors.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** scissors.py 11 Jul 2004 02:47:25 -0000 1.11 --- scissors.py 2 Sep 2004 15:17:31 -0000 1.12 *************** *** 194,198 **** char.soundeffect( 0x248 ) item_new = wolfpack.additem( "1766" ) ! item_new.amount = 50 item_new.color = target.item.color target.item.delete() --- 194,198 ---- char.soundeffect( 0x248 ) item_new = wolfpack.additem( "1766" ) ! item_new.amount = target.item.amount * 50 item_new.color = target.item.color target.item.delete() |
From: Klaus M. <nad...@us...> - 2004-09-02 15:10:07
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20139/wolfpack/python Modified Files: global.cpp Log Message: bugfix #262 Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.152 retrieving revision 1.153 diff -C2 -d -r1.152 -r1.153 *** global.cpp 31 Aug 2004 19:16:49 -0000 1.152 --- global.cpp 2 Sep 2004 15:09:57 -0000 1.153 *************** *** 1323,1327 **** /* ! \function wolfpack.newnpc \param createserial Defaults to true. This boolean value will indicate whether a serial will be assigned to the player. If you plan to reset the serial of the player anyway, you --- 1323,1327 ---- /* ! \function wolfpack.newplayer \param createserial Defaults to true. This boolean value will indicate whether a serial will be assigned to the player. If you plan to reset the serial of the player anyway, you *************** *** 1451,1455 **** \function wolfpack.queuecode \param function A python code object. ! \param arguments A tuple. \description This function queues a python code object to be executed in the main thread. This funciton is useful if you want to access wolfpack internals from within another --- 1451,1455 ---- \function wolfpack.queuecode \param function A python code object. ! \param arguments A tuple. \description This function queues a python code object to be executed in the main thread. This funciton is useful if you want to access wolfpack internals from within another |
From: Klaus M. <nad...@us...> - 2004-09-02 15:07:25
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/equipment In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19625/definitions/items/equipment Modified Files: drinks.xml food.xml Log Message: bugfix #261 Index: food.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/equipment/food.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** food.xml 27 Aug 2004 14:43:26 -0000 1.16 --- food.xml 2 Sep 2004 15:07:16 -0000 1.17 *************** *** 390,404 **** </item> - <!-- Milk --> - <!-- NOTE: Needs to create an empty pitcher when drunk --> - <item id="9f0"> - <inherit id="drinks_base" /> - <category>Equipment\Drinks\Pitcher of Milk 2</category> - <id>0x9f0</id> - <buyprice>8</buyprice> - <sellprice>4</sellprice> - <weight>2</weight> - </item> - <!-- Cut of Raw Rips --> <item id="9f1"> --- 390,393 ---- Index: drinks.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/equipment/drinks.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** drinks.xml 27 Aug 2004 14:43:26 -0000 1.4 --- drinks.xml 2 Sep 2004 15:07:16 -0000 1.5 *************** *** 160,164 **** <category>Equipment\Drinks\Pitcher of Milk 1</category> </item> ! <!-- Bucket of Water --> <item id="ffa"> --- 160,172 ---- <category>Equipment\Drinks\Pitcher of Milk 1</category> </item> ! ! <!-- Milk --> ! <item id="9f0" inherit="9ad"> ! <id>0x9f0</id> ! <category>Equipment\Drinks\Pitcher of Milk 2</category> ! <buyprice>8</buyprice> ! <sellprice>4</sellprice> ! </item> ! <!-- Bucket of Water --> <item id="ffa"> |
From: Richard M. <dr...@us...> - 2004-09-02 01:50:57
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24717/magic Modified Files: circle5.py Log Message: It changes your name now :P Index: circle5.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle5.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** circle5.py 1 Sep 2004 23:45:59 -0000 1.18 --- circle5.py 2 Sep 2004 01:50:47 -0000 1.19 *************** *** 6,9 **** --- 6,10 ---- import wolfpack.time from wolfpack.utilities import tobackpack, energydamage + from wolfpack.consts import * class BladeSpirits (Spell): *************** *** 124,128 **** if char.id == 0x190: ! char.name = 'Man' # Create new hair --- 125,129 ---- if char.id == 0x190: ! char.name = random.choice( wolfpack.list( "NAMES_MALE" ) ) # Create new hair *************** *** 130,134 **** newbeard = random.choice(['203e', '203f', '2040', '2041', '204b', '204c', '204d', '']) else: ! char.name = 'Woman' newhair = random.choice(['2044', '2045', '2046', '203c', '203b', '203d', '2047', '2048', '2049', '204a', '']) --- 131,135 ---- newbeard = random.choice(['203e', '203f', '2040', '2041', '204b', '204c', '204d', '']) else: ! char.name = random.choice( wolfpack.list( "NAMES_FEMALE" ) ) newhair = random.choice(['2044', '2045', '2046', '203c', '203b', '203d', '2047', '2048', '2049', '204a', '']) |
From: Richard M. <dr...@us...> - 2004-09-02 00:53:02
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14725 Modified Files: ChangeLog.wolfpack Log Message: Updates Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** ChangeLog.wolfpack 27 Aug 2004 17:27:26 -0000 1.48 --- ChangeLog.wolfpack 2 Sep 2004 00:52:52 -0000 1.49 *************** *** 6,15 **** Replace <property> with the name of the account property and <value> with the value you want to set: ! set account.<property> <value> ! show account.<property> - Moved the account property getters and setters into the cAccount class. - Added an e-mail field to the account database. - Added the "email" property for accounts to the python interface. ! - .exportdefinitions now exports data about NPCs and their equipment to the categories.db database. - .exportdefinitions now exports data about multis to the --- 6,15 ---- Replace <property> with the name of the account property and <value> with the value you want to set: ! .set account.<property> <value> ! .show account.<property> - Moved the account property getters and setters into the cAccount class. - Added an e-mail field to the account database. - Added the "email" property for accounts to the python interface. ! - .exportdefinitions now exports data about NPCS and their equipment to the categories.db database. - .exportdefinitions now exports data about multis to the *************** *** 19,30 **** - The number of backups kept can be limited. - Allowed scripts to be attached to base definitions by using ! <basescripts>a,b,c</basescripts>. ! Those scripts are attached to objects by using their baseid property. ! If you change the <basescripts> tags in the definition, all objects using ! that definition will use the new scripts automatically. - onDetach and onAttach are not called for those scripts. - hasscript(a) will return true if a is in the basescripts. - addscript now prepends a new script rather than appending it. ! - Fix for spawnregions where y1 > y2. * Definition Changes: - Tag Changes: --- 19,43 ---- - The number of backups kept can be limited. - Allowed scripts to be attached to base definitions by using ! <basescripts>a,b,c</basescripts>. Those scripts are attached to objects by ! using their baseid property. If you change the <basescripts> tags in the ! definition, all objects using that definition will use the new scripts ! automatically. - onDetach and onAttach are not called for those scripts. - hasscript(a) will return true if a is in the basescripts. - addscript now prepends a new script rather than appending it. ! - The python .scripts property includes all script names, including the ! scripts in basescripts. ! - Added a new property .basescripts to get a comma separated list of all ! scripts in the basescripts list. ! - New property: char.overweight Returns true if the character is overloaded. ! - New property: char.maxweight Returns the maximum stones a character can carry. ! - Stamina loss while walking. ! - Stamina loss when taking damage. ! - Overweight prevents walking now. ! - Walking is denied if stamina is 0. ! - Fixed an issue with account names containing foreign characters on save. ! - Fixed an issue with walking/running not being sent to other cliens. ! - Added wolfpack.queuecode to queue a python function for the next mainloop iteration. ! - Documentation fixes for item.addtimer. * Definition Changes: - Tag Changes: *************** *** 47,50 **** --- 60,68 ---- - Fixed an update bug with NPCs and the dye command. - Fixed a bug with the dupe command. + - Fixed bugs with the fishing skill. + - Fixed several magic related bugs. + - Adjusted timers in several skills to be item/char.addtimer. + - Improved/Fixed pet control functionality through word commands. + - Fixed a bug where equipment didn't update stats if double clicked to equip. * Misc. Changes: - Experimental Mac OSX Support |
From: Richard M. <dr...@us...> - 2004-09-02 00:52:41
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14635 Modified Files: ChangeLog Log Message: Documentation Fix Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ChangeLog 31 Aug 2004 19:16:48 -0000 1.18 --- ChangeLog 2 Sep 2004 00:52:29 -0000 1.19 *************** *** 3,9 **** Wolfpack 12.9.9 Beta (CVS) - Allowed viewing and setting account properties via .set and .show. ! Replace <property> with the name of the account property and <value> with the value you want to set: ! .set account.<property> <value> .show account.<property> - Moved the account property getters and setters into the cAccount class. --- 3,9 ---- Wolfpack 12.9.9 Beta (CVS) - Allowed viewing and setting account properties via .set and .show. ! Replace <property> with the name of the account property and <value> with the value you want to set: ! .set account.<property> <value> .show account.<property> - Moved the account property getters and setters into the cAccount class. *************** *** 31,38 **** - Stamina loss when taking damage. - Overweight prevents walking now. ! - Walking is denied if stamina is 0. - Fixed an issue with account names containing foreign characters on save. - Fixed an issue with walking/running not being sent to other cliens. - Added wolfpack.queuecode to queue a python function for the next mainloop iteration. Wolfpack 12.9.8 Beta (19. August 2004) --- 31,39 ---- - Stamina loss when taking damage. - Overweight prevents walking now. ! - Walking is denied if stamina is 0. - Fixed an issue with account names containing foreign characters on save. - Fixed an issue with walking/running not being sent to other cliens. - Added wolfpack.queuecode to queue a python function for the next mainloop iteration. + - Documentation fixes for item.addtimer. Wolfpack 12.9.8 Beta (19. August 2004) |
From: Richard M. <dr...@us...> - 2004-09-02 00:44:53
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12942 Modified Files: door.py potions.py wool.py Log Message: Updates for timers. Explosion potions _should_ be a little faster now... Index: door.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/door.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** door.py 25 Aug 2004 17:03:05 -0000 1.16 --- door.py 2 Sep 2004 00:44:26 -0000 1.17 *************** *** 244,248 **** # Add an autoclose tempeffect ! item.addtimer(CLOSEDOOR_DELAY, "door.autoclose", [ opencount ], 1) # Refresh a House if we opened it --- 244,248 ---- # Add an autoclose tempeffect ! item.addtimer( CLOSEDOOR_DELAY, "door.autoclose", [ opencount ], True ) # Refresh a House if we opened it *************** *** 325,329 **** if blocked == 1: ! item.addtimer(CLOSEDOOR_DELAY, "door.autoclose", [ int(item.gettag('opencount')) ], 1) else: # Find the door definition for this item --- 325,329 ---- if blocked == 1: ! item.addtimer( CLOSEDOOR_DELAY, "door.autoclose", [ int(item.gettag('opencount')) ], True ) else: # Find the door definition for this item Index: potions.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/potions.py,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** potions.py 25 Aug 2004 17:03:05 -0000 1.44 --- potions.py 2 Sep 2004 00:44:27 -0000 1.45 *************** *** 158,164 **** # Explosion Potion Function ! def potionexplosion(args): char = wolfpack.findchar(args[0]) - potion = wolfpack.finditem(args[1]) counter = args[2] bonus = args[3] --- 158,163 ---- # Explosion Potion Function ! def potionexplosion( potion, args ): char = wolfpack.findchar(args[0]) counter = args[2] bonus = args[3] *************** *** 166,174 **** bonus = 1 if counter > 0: ! wolfpack.addtimer(1000, "potions.potioncountdown", [char.serial, potion.serial, counter, bonus] ) return else: potion.soundeffect(0x307) # Boom! ! potion.effect( explosions[randint(0,2)], 20, 10) potionregion( [char, potion, bonus] ) potion.delete() --- 165,173 ---- 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 )], 20, 10 ) potionregion( [char, potion, bonus] ) potion.delete() *************** *** 176,184 **** # Explosion Potion Function ! def potioncountdown( time, args ): ! char = wolfpack.findchar(args[0]) ! potion = wolfpack.finditem(args[1]) ! counter = args[2] ! bonus = args[3] if potion: if not bonus: --- 175,181 ---- # Explosion Potion Function ! def potioncountdown( potion, args ): ! counter = args[1] ! bonus = args[2] if potion: if not bonus: *************** *** 189,193 **** potion.say("%u" % (counter - 1)) counter -= 1 ! potionexplosion([char.serial, potion.serial, counter, bonus]) return --- 186,190 ---- potion.say("%u" % (counter - 1)) counter -= 1 ! potion.addtimer( 0, "potions.potionexplosion", [ args[0], counter, bonus ] ) return *************** *** 250,259 **** if chainbomb.baseid in explodables: chainbomb.settag('exploding', 'true') ! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 0, chainbomb.amount] ) chainbomb = chainregion.next # Potion Kegs elif (chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype')) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ): chainbomb.settag('exploding', 'true') ! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 11, chainbomb.gettag('kegfill') ] ) chainbomb = chainregion.next else: --- 247,256 ---- if chainbomb.baseid in explodables: chainbomb.settag('exploding', 'true') ! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 0, chainbomb.amount] ) chainbomb = chainregion.next # Potion Kegs elif (chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype')) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ): chainbomb.settag('exploding', 'true') ! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 11, chainbomb.gettag('kegfill') ] ) chainbomb = chainregion.next else: *************** *** 285,293 **** if chainbomb.baseid in explodables: chainbomb.settag('exploding', 'true') ! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 0, chainbomb.amount] ) chainbomb = chainregion.next elif ( chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype') ) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ): chainbomb.settag('exploding', 'true') ! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 11, chainbomb.gettag('kegfill') ] ) chainbomb = chainregion.next else: --- 282,290 ---- if chainbomb.baseid in explodables: chainbomb.settag('exploding', 'true') ! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 0, chainbomb.amount] ) chainbomb = chainregion.next elif ( chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype') ) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ): chainbomb.settag('exploding', 'true') ! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 11, chainbomb.gettag('kegfill') ] ) chainbomb = chainregion.next else: *************** *** 525,529 **** char.updatestats() ! char.addtimer(AGILITY_TIME, "magic.utilities.statmodifier_expire", [1, bonus], 1, 1, "magic_statmodifier_1", "magic.utilities.statmodifier_dispel") char.action( ANIM_FIDGET3 ) --- 522,526 ---- char.updatestats() ! char.addtimer( AGILITY_TIME, "magic.utilities.statmodifier_expire", [1, bonus], 1, 1, "magic_statmodifier_1", "magic.utilities.statmodifier_dispel" ) char.action( ANIM_FIDGET3 ) *************** *** 572,576 **** char.updatestats() ! char.addtimer(STRENGTH_TIME, "magic.utilities.statmodifier_expire", [0, bonus], 1, 1, "magic_statmodifier_0", "magic.utilities.statmodifier_dispel") char.action( ANIM_FIDGET3 ) --- 569,573 ---- char.updatestats() ! char.addtimer( STRENGTH_TIME, "magic.utilities.statmodifier_expire", [0, bonus], 1, 1, "magic_statmodifier_0", "magic.utilities.statmodifier_dispel" ) char.action( ANIM_FIDGET3 ) Index: wool.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wool.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wool.py 11 Jul 2004 02:47:25 -0000 1.9 --- wool.py 2 Sep 2004 00:44:27 -0000 1.10 *************** *** 70,74 **** wheel = wolfpack.finditem( target.item.serial ) processtime = 5000 # 5 Seconds ! wolfpack.addtimer( processtime, "wool.ProcessTimer", [char, wheel, color] ) elif target.item.id in animids: --- 70,74 ---- wheel = wolfpack.finditem( target.item.serial ) processtime = 5000 # 5 Seconds ! char.addtimer( processtime, "wool.ProcessTimer", [wheel, color] ) elif target.item.id in animids: *************** *** 82,89 **** return True ! def ProcessTimer( time, args ): ! char = args[0] ! wheel = args[1] ! color = args[2] GetYarn( char, wheel, color ) return True --- 82,88 ---- return True ! def ProcessTimer( char, args ): ! wheel = args[0] ! color = args[1] GetYarn( char, wheel, color ) return True |
From: Richard M. <dr...@us...> - 2004-09-02 00:44:53
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12942/skills Modified Files: fishing.py lumberjacking.py mining.py Log Message: Updates for timers. Explosion potions _should_ be a little faster now... Index: mining.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/mining.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** mining.py 2 Sep 2004 00:07:08 -0000 1.34 --- mining.py 2 Sep 2004 00:44:29 -0000 1.35 *************** *** 170,174 **** if not veingem.hastag('resource_empty'): duration = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! veingem.addtimer( duration, "skills.mining.respawnvein", 1 ) veingem.settag('resource_empty', 1) return False --- 170,174 ---- if not veingem.hastag('resource_empty'): duration = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! veingem.addtimer( duration, "skills.mining.respawnvein", [], True ) veingem.settag('resource_empty', 1) return False *************** *** 240,244 **** if not gem.hastag('resource_empty') and resourcecount <= 1: delay = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! gem.addtimer( delay, "skills.mining.respawnvein", 1 ) gem.settag( 'resource_empty', 1 ) --- 240,244 ---- if not gem.hastag('resource_empty') and resourcecount <= 1: delay = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! gem.addtimer( delay, "skills.mining.respawnvein", [], True ) gem.settag( 'resource_empty', 1 ) Index: fishing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/fishing.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** fishing.py 2 Sep 2004 00:07:08 -0000 1.9 --- fishing.py 2 Sep 2004 00:44:27 -0000 1.10 *************** *** 261,265 **** resource.decay = 0 decaytime = random.randint( FISHING_REFILLTIME[0], FISHING_REFILLTIME[1] ) ! resource.addtimer( decaytime, 'skills.fishing.resourceDecayTimer', True ) resource.update() # Send to GMs --- 261,265 ---- resource.decay = 0 decaytime = random.randint( FISHING_REFILLTIME[0], FISHING_REFILLTIME[1] ) ! resource.addtimer( decaytime, 'skills.fishing.resourceDecayTimer', [], True ) resource.update() # Send to GMs *************** *** 284,288 **** socket.clilocmessage( 0xf61fd, "", 0x3b2, 3, 0, str(itemname) ) # You pull out an item along with a monster : ! def resourceDecayTimer( resource, arguments ): resource.delete() return --- 284,288 ---- socket.clilocmessage( 0xf61fd, "", 0x3b2, 3, 0, str(itemname) ) # You pull out an item along with a monster : ! def resourceDecayTimer( resource, args ): resource.delete() return Index: lumberjacking.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/lumberjacking.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** lumberjacking.py 2 Sep 2004 00:07:08 -0000 1.16 --- lumberjacking.py 2 Sep 2004 00:44:28 -0000 1.17 *************** *** 254,258 **** if not resource.hastag ('resource_empty') and int( resource.gettag( 'resourcecount' ) ) == 0: resource.settag( 'resource_empty', 'true' ) ! resource.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", True ) return True --- 254,258 ---- if not resource.hastag ('resource_empty') and int( resource.gettag( 'resourcecount' ) ) == 0: resource.settag( 'resource_empty', 'true' ) ! resource.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", [], True ) return True |
From: Richard M. <dr...@us...> - 2004-09-02 00:43:42
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12872/python Modified Files: item.cpp Log Message: Documentation fix Index: item.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** item.cpp 27 Aug 2004 14:41:18 -0000 1.126 --- item.cpp 2 Sep 2004 00:43:24 -0000 1.127 *************** *** 588,592 **** \description Set a delayed timer for a script function to execute. \param expiretime The INT value of the time. ! \param function The function to be executed. String. \param serialize Saves the timer. Useful if you crash. \return Returns true or false if the tag exists. --- 588,601 ---- \description Set a delayed timer for a script function to execute. \param expiretime The INT value of the time. ! \param expirecallback The full name of the function (preceding the name of the script and modules it is in) that should be called ! when the effect expires. The prototype for this function is: ! <code>def expire_callback(item, args): ! pass</code> ! Item is the item the effect was applied to. Args is the list of custom arguments you passed to addtimer. ! \param arguments A list of arguments that should be passed on to the effect. ! Please note that you should only pass on strings, integers and floats because ! they are the only objects that can be saved to the worldfile. If you want to ! pass on items or characters, please pass the serial instead and use the ! findchar and finditem functions in the wolfpack library. \param serialize Saves the timer. Useful if you crash. \return Returns true or false if the tag exists. *************** *** 1269,1273 **** else if ( PyFloat_Check( value ) ) val = cVariant( PyFloat_AsDouble( value ) ); ! else if ( value == Py_True ) val = cVariant( 1 ); // True else if ( value == Py_False ) --- 1278,1282 ---- else if ( PyFloat_Check( value ) ) val = cVariant( PyFloat_AsDouble( value ) ); ! else if ( value == Py_True ) val = cVariant( 1 ); // True else if ( value == Py_False ) |
From: Richard M. <dr...@us...> - 2004-09-02 00:07:18
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7087/skills Modified Files: fishing.py lumberjacking.py mining.py Log Message: Fixes to fishing. Changed object timers to item.addtimer and char.addtimer Index: mining.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/mining.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mining.py 16 Jul 2004 07:09:27 -0000 1.33 --- mining.py 2 Sep 2004 00:07:08 -0000 1.34 *************** *** 45,49 **** def mining( char, pos, tool ): ! wolfpack.addtimer( 1300, "skills.mining.domining", [ char, SOUND_MINING, tool, pos ] ) char.socket.settag( 'is_mining', ( wolfpack.time.currenttime() + miningdelay ) ) char.turnto( pos ) --- 45,49 ---- def mining( char, pos, tool ): ! char.addtimer( 1300, "skills.mining.domining", [ tool, pos ] ) char.socket.settag( 'is_mining', ( wolfpack.time.currenttime() + miningdelay ) ) char.turnto( pos ) *************** *** 137,147 **** #Sound effect ! def domining(time, args): ! char = args[0] ! char.soundeffect(args[1]) ! tool = args[2] ! pos = args[3] socket = char.socket ! socket.deltag('is_mining') # Recheck distance --- 137,146 ---- #Sound effect ! def domining(char, args): ! char.soundeffect( SOUND_MINING ) ! tool = args[0] ! pos = args[1] socket = char.socket ! socket.deltag( 'is_mining' ) # Recheck distance *************** *** 171,175 **** if not veingem.hastag('resource_empty'): duration = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! wolfpack.addtimer(duration, "skills.mining.respawnvein", [veingem], 1) veingem.settag('resource_empty', 1) return False --- 170,174 ---- if not veingem.hastag('resource_empty'): duration = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! veingem.addtimer( duration, "skills.mining.respawnvein", 1 ) veingem.settag('resource_empty', 1) return False *************** *** 235,239 **** item.update() ! resourcecount = max(1, int(gem.gettag('resourcecount'))) gem.settag('resourcecount', resourcecount - 1) --- 234,238 ---- item.update() ! resourcecount = max( 1, int( gem.gettag('resourcecount') ) ) gem.settag('resourcecount', resourcecount - 1) *************** *** 241,246 **** if not gem.hastag('resource_empty') and resourcecount <= 1: delay = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! wolfpack.addtimer(delay, "skills.mining.respawnvein", [gem], 1) ! gem.settag('resource_empty', 1) message = ORES[resname][SUCCESSMESSAGE] --- 240,245 ---- if not gem.hastag('resource_empty') and resourcecount <= 1: delay = random.randint(MINING_REFILLTIME[0], MINING_REFILLTIME[1]) ! gem.addtimer( delay, "skills.mining.respawnvein", 1 ) ! gem.settag( 'resource_empty', 1 ) message = ORES[resname][SUCCESSMESSAGE] *************** *** 252,257 **** return True ! def respawnvein( time, args ): ! vein = args[0] if vein and vein.hastag('resource_empty') and vein.gettag('resourcecount') == 0: vein.settag('resourcecount', random.randint( MINING_ORE[0], MINING_ORE[1] ) ) --- 251,255 ---- return True ! def respawnvein( vein, args ): if vein and vein.hastag('resource_empty') and vein.gettag('resourcecount') == 0: vein.settag('resourcecount', random.randint( MINING_ORE[0], MINING_ORE[1] ) ) Index: fishing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/fishing.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** fishing.py 16 Jul 2004 07:09:27 -0000 1.8 --- fishing.py 2 Sep 2004 00:07:08 -0000 1.9 *************** *** 220,224 **** socket = char.socket - socket.deltag( 'is_fishing' ) --- 220,223 ---- *************** *** 254,258 **** resource = wolfpack.additem( "1ea7" ) resource.name = 'Resource Item: fish' ! resource.settag( 'resourcecount', amount - 1 ) resource.settag( 'resource', 'fish' ) resource.visible = 0 # GM Visible only --- 253,257 ---- resource = wolfpack.additem( "1ea7" ) resource.name = 'Resource Item: fish' ! resource.settag( 'resourcecount', int( amount - 1 ) ) resource.settag( 'resource', 'fish' ) resource.visible = 0 # GM Visible only *************** *** 260,265 **** pos = args[ 0 ] resource.moveto( wolfpack.coord( int( floor( pos.x / 8 ) ) * 8, int( floor( pos.y / 8 ) ) * 8, int( pos.z - 5 ), pos.map ) ) ! resource.decay = 1 ! resource.decaytime = wolfpack.time.servertime() + ( random.randint(FISHING_REFILLTIME[0], FISHING_REFILLTIME[1]) ) resource.update() # Send to GMs --- 259,265 ---- pos = args[ 0 ] resource.moveto( wolfpack.coord( int( floor( pos.x / 8 ) ) * 8, int( floor( pos.y / 8 ) ) * 8, int( pos.z - 5 ), pos.map ) ) ! resource.decay = 0 ! decaytime = random.randint( FISHING_REFILLTIME[0], FISHING_REFILLTIME[1] ) ! resource.addtimer( decaytime, 'skills.fishing.resourceDecayTimer', True ) resource.update() # Send to GMs *************** *** 276,280 **** # Otherwise try to stack it elif not wolfpack.utilities.tobackpack( item, char ): ! item.update() # Success! --- 276,280 ---- # Otherwise try to stack it elif not wolfpack.utilities.tobackpack( item, char ): ! item.update() # Success! *************** *** 283,284 **** --- 283,288 ---- else: socket.clilocmessage( 0xf61fd, "", 0x3b2, 3, 0, str(itemname) ) # You pull out an item along with a monster : + + def resourceDecayTimer( resource, arguments ): + resource.delete() + return Index: lumberjacking.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/lumberjacking.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** lumberjacking.py 16 Jul 2004 07:09:27 -0000 1.15 --- lumberjacking.py 2 Sep 2004 00:07:08 -0000 1.16 *************** *** 111,117 **** # Delay for chopping trees and getting the logs # Animation Sequence ! def chop_tree( time, args ): ! char = args[0] ! pos = args[1] socket = char.socket --- 111,116 ---- # Delay for chopping trees and getting the logs # Animation Sequence ! def chop_tree( char, args ): ! pos = args[0] socket = char.socket *************** *** 155,161 **** char.action( 0xd ) char.soundeffect( 0x13e ) ! wolfpack.addtimer( 2000, "skills.lumberjacking.chop_tree", [char, pos] ) ! wolfpack.addtimer( 3500, "skills.lumberjacking.chop_tree", [char, pos] ) ! wolfpack.addtimer( 4000, "skills.lumberjacking.successlumberjacking", [char, pos, resource, amount, tool, resname, woodtable ] ) return --- 154,160 ---- char.action( 0xd ) char.soundeffect( 0x13e ) ! char.addtimer( 2000, "skills.lumberjacking.chop_tree", [pos] ) ! char.addtimer( 3500, "skills.lumberjacking.chop_tree", [pos] ) ! char.addtimer( 4000, "skills.lumberjacking.successlumberjacking", [pos, resource, amount, tool, resname, woodtable ] ) return *************** *** 183,195 **** char.socket.clilocmessage( 0x7A30B ) # You put some kindlings in your pack ! def successlumberjacking( time, args ): ! char = args[0] ! pos = args[1] # Target POS ! resource = args[2] ! amount = args[3] ! tool = args[4] ! resname = args[5] ! table = args[6] socket = char.socket # Lets make sure we stayed next to the tree --- 182,193 ---- char.socket.clilocmessage( 0x7A30B ) # You put some kindlings in your pack ! def successlumberjacking( char, args ): socket = char.socket + pos = args[0] # Target POS + resource = args[1] + amount = args[2] + tool = args[3] + resname = args[4] + table = args[5] # Lets make sure we stayed next to the tree *************** *** 256,264 **** if not resource.hastag ('resource_empty') and int( resource.gettag( 'resourcecount' ) ) == 0: resource.settag( 'resource_empty', 'true' ) ! wolfpack.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", [ resource ], 1 ) return True ! def respawnvein( time, args ): ! vein = args[0] if vein.hastag ('resource_empty') and int(vein.gettag( 'resourcecount' )) == 0: vein.settag( 'resourcecount', int( woodspawnamount ) ) --- 254,261 ---- if not resource.hastag ('resource_empty') and int( resource.gettag( 'resourcecount' ) ) == 0: resource.settag( 'resource_empty', 'true' ) ! resource.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", True ) return True ! def respawnvein( vein, args ): if vein.hastag ('resource_empty') and int(vein.gettag( 'resourcecount' )) == 0: vein.settag( 'resourcecount', int( woodspawnamount ) ) |
From: Richard M. <dr...@us...> - 2004-09-01 23:46:27
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4182/magic Modified Files: circle4.py circle5.py circle6.py firefield.py poisonfield.py Log Message: Fixes for bugs Incanus found regarding field spells and ranges. Index: circle6.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle6.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** circle6.py 25 Aug 2004 17:03:05 -0000 1.11 --- circle6.py 1 Sep 2004 23:45:59 -0000 1.12 *************** *** 226,230 **** # Affect chars who are occupying the field cells ! chars = wolfpack.chars(newitem.pos.x, newitem.pos.y, newitem.pos.map) for affected in chars: if affected.pos.z >= newitem.pos.z - 10 and affected.pos.z <= newitem.pos.z + 10: --- 226,230 ---- # Affect chars who are occupying the field cells ! chars = wolfpack.chars( newitem.pos.x, newitem.pos.y, newitem.pos.map, 0 ) for affected in chars: if affected.pos.z >= newitem.pos.z - 10 and affected.pos.z <= newitem.pos.z + 10: Index: firefield.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/firefield.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** firefield.py 25 Aug 2004 17:03:05 -0000 1.7 --- firefield.py 1 Sep 2004 23:45:59 -0000 1.8 *************** *** 7,21 **** # def onCollide(char, item): ! if char.dead: return ! if not char.hastag('in_firefield'): source = None if item.hastag('source'): ! source = wolfpack.findchar(int(item.gettag('source'))) ! char.settag('in_firefield', 1) ! energydamage(char, source, 2, fire=100) ! char.addtimer(350, 'magic.firefield.expire', []) return 0 --- 7,21 ---- # def onCollide(char, item): ! if char.dead or char.invulnerable: return ! if not char.hastag( 'in_firefield' ): source = None if item.hastag('source'): ! source = wolfpack.findchar( int( item.gettag('source') ) ) ! char.settag( 'in_firefield', 1) ! energydamage( char, source, 2, fire=100 ) ! char.addtimer( 350, 'magic.firefield.expire', [] ) return 0 *************** *** 24,27 **** --- 24,31 ---- # def expire(char, arguments): + if char.dead : + char.deltag( 'in_firefield' ) + return + items = wolfpack.items(char.pos.x, char.pos.y, char.pos.map, 0) *************** *** 30,34 **** source = None if item.hastag('source'): ! source = wolfpack.findchar(int(item.gettag('source'))) energydamage(char, source, 2, fire=100) --- 34,38 ---- source = None if item.hastag('source'): ! source = wolfpack.findchar( int( item.gettag('source') ) ) energydamage(char, source, 2, fire=100) *************** *** 37,39 **** return ! char.deltag('in_firefield') --- 41,43 ---- return ! char.deltag( 'in_firefield' ) Index: poisonfield.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/poisonfield.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** poisonfield.py 25 Aug 2004 17:03:05 -0000 1.6 --- poisonfield.py 1 Sep 2004 23:45:59 -0000 1.7 *************** *** 8,12 **** # def onCollide(char, item): ! if char.dead: return --- 8,12 ---- # def onCollide(char, item): ! if char.dead or char.invulnerable: return *************** *** 27,30 **** --- 27,34 ---- # def expire(char, arguments): + if char.dead: + char.deltag('in_poisonfield') + return + items = wolfpack.items(char.pos.x, char.pos.y, char.pos.map, 0) Index: circle5.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle5.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** circle5.py 1 Sep 2004 09:44:07 -0000 1.17 --- circle5.py 1 Sep 2004 23:45:59 -0000 1.18 *************** *** 163,169 **** hair.update() beard.update() ! char.incognito = 1 ! char.update() char.resendtooltip() --- 163,169 ---- hair.update() beard.update() ! char.incognito = 1 ! char.update() char.resendtooltip() *************** *** 308,312 **** # Affect chars who are occupying the field cells ! chars = wolfpack.chars(newitem.pos.x, newitem.pos.y, newitem.pos.map) for affected in chars: if affected.pos.z >= newitem.pos.z - 10 and affected.pos.z <= newitem.pos.z + 10: --- 308,312 ---- # Affect chars who are occupying the field cells ! chars = wolfpack.chars( newitem.pos.x, newitem.pos.y, newitem.pos.map, 0 ) for affected in chars: if affected.pos.z >= newitem.pos.z - 10 and affected.pos.z <= newitem.pos.z + 10: Index: circle4.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle4.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** circle4.py 25 Aug 2004 17:03:05 -0000 1.13 --- circle4.py 1 Sep 2004 23:45:59 -0000 1.14 *************** *** 224,232 **** # Affect chars who are occupying the field cells ! chars = wolfpack.chars(newitem.pos.x, newitem.pos.y, newitem.pos.map) if len(chars) > 0 : for affected in chars: if affected.pos.z >= newitem.pos.z - 10 and affected.pos.z <= newitem.pos.z + 10: ! newitem.callevent(EVENT_COLLIDE, (affected, newitem)) duration = int((4 + char.skill[ MAGERY ] * 0.05) * 1000) --- 224,232 ---- # Affect chars who are occupying the field cells ! chars = wolfpack.chars( newitem.pos.x, newitem.pos.y, newitem.pos.map, 0 ) if len(chars) > 0 : for affected in chars: if affected.pos.z >= newitem.pos.z - 10 and affected.pos.z <= newitem.pos.z + 10: ! newitem.callevent( EVENT_COLLIDE, (affected, newitem) ) duration = int((4 + char.skill[ MAGERY ] * 0.05) * 1000) |
From: Sebastian H. <dar...@us...> - 2004-09-01 20:12:51
|
Update of /cvsroot/wpdev/xmlscripts/definitions/spawnregions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30690/spawnregions Modified Files: index.xml Log Message: crud Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/spawnregions/index.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.xml 1 Sep 2004 20:08:31 -0000 1.7 --- index.xml 1 Sep 2004 20:12:41 -0000 1.8 *************** *** 12,19 **** <definitions> ! <!--<include file="definitions/spawnregions/felucca/index.xml" /> <include file="definitions/spawnregions/trammel/index.xml" /> <include file="definitions/spawnregions/ilshenar/index.xml" /> ! <include file="definitions/spawnregions/malas/index.xml" />--> </definitions> --- 12,19 ---- <definitions> ! <include file="definitions/spawnregions/felucca/index.xml" /> <include file="definitions/spawnregions/trammel/index.xml" /> <include file="definitions/spawnregions/ilshenar/index.xml" /> ! <include file="definitions/spawnregions/malas/index.xml" /> </definitions> |
From: Sebastian H. <dar...@us...> - 2004-09-01 20:08:43
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30008 Modified Files: scripts.xml Log Message: preliminary page system in python. Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -d -r1.158 -r1.159 *** scripts.xml 31 Aug 2004 01:01:42 -0000 1.158 --- scripts.xml 1 Sep 2004 20:08:30 -0000 1.159 *************** *** 178,187 **** --> ! <script>system.players</script> <script>system.poison</script> <script>system.regionchange</script> <script>system.skillgain</script> <script>system.spawns</script> ! <script>system.trading</script> <script>system.uogstatus</script> <script>system.webadmin</script> --- 178,188 ---- --> ! <script>system.pages</script> ! <script>system.players</script> <script>system.poison</script> <script>system.regionchange</script> <script>system.skillgain</script> <script>system.spawns</script> ! <script>system.trading</script> <script>system.uogstatus</script> <script>system.webadmin</script> |
From: Sebastian H. <dar...@us...> - 2004-09-01 20:08:43
|
Update of /cvsroot/wpdev/xmlscripts/definitions/spawnregions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30008/spawnregions Modified Files: index.xml spawntest.xml Log Message: preliminary page system in python. Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/spawnregions/index.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.xml 8 Jul 2004 14:27:10 -0000 1.6 --- index.xml 1 Sep 2004 20:08:31 -0000 1.7 *************** *** 12,19 **** <definitions> ! <include file="definitions/spawnregions/felucca/index.xml" /> <include file="definitions/spawnregions/trammel/index.xml" /> <include file="definitions/spawnregions/ilshenar/index.xml" /> ! <include file="definitions/spawnregions/malas/index.xml" /> </definitions> --- 12,19 ---- <definitions> ! <!--<include file="definitions/spawnregions/felucca/index.xml" /> <include file="definitions/spawnregions/trammel/index.xml" /> <include file="definitions/spawnregions/ilshenar/index.xml" /> ! <include file="definitions/spawnregions/malas/index.xml" />--> </definitions> Index: spawntest.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/spawnregions/spawntest.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** spawntest.xml 29 May 2004 23:48:55 -0000 1.7 --- spawntest.xml 1 Sep 2004 20:08:31 -0000 1.8 *************** *** 9,13 **** <definitions> ! <spawnregion id="spawntest"> <maxnpcamount>2</maxnpcamount> <mintime>2</mintime> --- 9,13 ---- <definitions> ! <!-- <spawnregion id="spawntest"> <maxnpcamount>2</maxnpcamount> <mintime>2</mintime> *************** *** 18,22 **** <npcspercycle>1</npcspercycle> <rectangle x1="1427" x2="1429" y1="1628" y2="1690" map="0" /> ! </spawnregion> </definitions> --- 18,22 ---- <npcspercycle>1</npcspercycle> <rectangle x1="1427" x2="1429" y1="1628" y2="1690" map="0" /> ! </spawnregion>--> </definitions> |
From: Sebastian H. <dar...@us...> - 2004-09-01 20:08:30
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29957/system Added Files: pages.py Log Message: preliminary page system in python. --- NEW FILE: pages.py --- import wolfpack from wolfpack.consts import * import wolfpack.gumps import time pages = None # # The class for a single page # class Page: def __init__(self, char): self.account = char.account.name self.serial = char.serial self.name = char.name self.pos = char.pos self.category = '' self.message = ['', '', '', ''] self.created = 0 self.assigned = None def tostring(self): pass # # The page system class # class Pages: def __init__(self): self.pages = {} """ Save the pages """ def save(self): pass """ Load the pages """ def load(self): pass """ Get a page from the pages map. """ def find(self, name): name = name.lower() if not self.pages.has_key(name): return None else: return self.pages[name] """ Add a page to the pages map. """ def add(self, page, notify = True): self.pages[page.account.lower()] = page self.save() if notify: pass """ Resolve page. """ def remove(self, page, notify = False): if self.pages.has_key(page.account.lower()): del self.pages[page.account.lower()] self.save() # Notify Counselors and GMs with the pagenotify flag activated if notify: pass # # help_response # def help_response(char, arguments, response): global pages if response.button == 0: return page = pages.find(char.account.name) # Delete previous page if page and 5 in response.switches: pages.remove(page, True) # Notify GMs char.socket.sysmessage('Your page has been removed.') return if len(response.text[1]) + len(response.text[2]) + len(response.text[3]) + len(response.text[4]) == 0: char.socket.sysmessage('You have to enter a message for your page.') onHelp(char) return # Gather information message = (response.text[1], response.text[2], response.text[3], response.text[4]) created = time.time() if not page: page = Page(char) page.message = message page.created = created if 1 in response.switches: page.category = 'BUG' elif 2 in response.switches: page.category = 'STUCK' elif 3 in response.switches: page.category = 'GAMEPLAY' else: page.category = 'BUILD' pages.add(page, True) char.socket.sysmessage('Your page has been queued.') # # The global onHelp event # def onHelp(char): global pages page = pages.find(char.account.name) gump = wolfpack.gumps.cGump() # Background if page: gump.addResizeGump(0, 40, 0xA28, 450, 330 + 40) else: gump.addResizeGump(0, 40, 0xA28, 450, 330) # Header gump.addGump( 105, 18, 0x58B ) # Fancy top-bar gump.addGump( 182, 0, 0x589 ) # "Button" like gump gump.addGump( 193, 10, 0x15E9 ) # "Button" like gump gump.addText( 190, 90, "Help menu", 0x530 ) gump.addText( 50, 120, "Message:", 0x834 ) gump.addResizeGump( 45, 140, 0xBB8, 345, 84 ) # Message input lines = ['', '', '', ''] if page: lines = page.message gump.addInputField( 50, 140, 330, 16, 0x834, 1, lines[0] ) gump.addInputField( 50, 160, 330, 16, 0x834, 2, lines[1] ) gump.addInputField( 50, 180, 330, 16, 0x834, 3, lines[2] ) gump.addInputField( 50, 200, 330, 16, 0x834, 4, lines[3] ) # Category selection category = 'BUG' if page: category = page.category gump.startGroup(1) gump.addText(50, 240, "Category:", 0x834) gump.addRadioButton( 50, 260, 0xD0, 0xD1, 1, category == 'BUG' ) gump.addText( 80, 260, 'BUG', 0x834 ) gump.addRadioButton( 250, 260, 0xD0, 0xD1, 2, category == 'STUCK' ) gump.addText( 280, 260, 'STUCK', 0x834 ) gump.addRadioButton( 50, 280, 0xD0, 0xD1, 3, category == 'GAMEPLAY' ) gump.addText( 80, 280, 'GAMEPLAY', 0x834 ) gump.addRadioButton( 250, 280, 0xD0, 0xD1, 4, category == 'BUILD' ) gump.addText( 280, 280, 'BUILD', 0x834 ) # Delete page if it exists if page: gump.addCheckbox( 50, 320, 0xd2, 0xd3, 5, 0 ) gump.addText( 80, 320, 'Delete page', 0x834 ) gump.addButton( 50, 320 + 40, 0xF9, 0xF8, 1 ) # OK button gump.addButton( 120, 320 + 40, 0xF3, 0xF1, 0 ) # Cancel button else: gump.addButton( 50, 320, 0xF9, 0xF8, 1 ) # OK button gump.addButton( 120, 320, 0xF3, 0xF1, 0 ) # Cancel button gump.startPage( 1 ); gump.setCallback('system.pages.help_response') gump.send(char.socket) return True # # Initialize the page system # def onLoad(): global pages pages = Pages() wolfpack.registerglobal(EVENT_HELP, "system.pages") # # Finalize the page system. # def onUnload(): pass |
From: Sebastian H. <dar...@us...> - 2004-09-01 20:04:03
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29050 Modified Files: scriptmanager.cpp Log Message: Added documentation for the onServerStart event. Index: scriptmanager.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/scriptmanager.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** scriptmanager.cpp 28 Aug 2004 12:09:51 -0000 1.25 --- scriptmanager.cpp 1 Sep 2004 20:03:52 -0000 1.26 *************** *** 158,161 **** --- 158,165 ---- } + /* + \event onServerStart + \condition Triggered when the server startup is complete. + */ void cScriptManager::onServerStart() { |
From: Klaus M. <nad...@us...> - 2004-09-01 09:44:32
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9163/magic Modified Files: circle5.py circle7.py Log Message: bugs fixed pointed out by Incanus Index: circle7.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle7.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** circle7.py 25 Aug 2004 17:03:05 -0000 1.13 --- circle7.py 1 Sep 2004 09:44:07 -0000 1.14 *************** *** 272,276 **** continue ! if self.checkresist(char, tgarget): target.effect(0x3779, 10, 20) else: --- 272,276 ---- continue ! if self.checkresist(char, target): target.effect(0x3779, 10, 20) else: Index: circle5.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle5.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** circle5.py 25 Aug 2004 17:03:05 -0000 1.16 --- circle5.py 1 Sep 2004 09:44:07 -0000 1.17 *************** *** 110,114 **** duration = int(1 + (6 * char.skill[MAGERY]) / 50.0) * 1000 - duration = 10000 char.orgskin = char.skin --- 110,113 ---- *************** *** 125,129 **** if char.id == 0x190: ! char.name = 'Mann' # Create new hair --- 124,128 ---- if char.id == 0x190: ! char.name = 'Man' # Create new hair *************** *** 131,135 **** newbeard = random.choice(['203e', '203f', '2040', '2041', '204b', '204c', '204d', '']) else: ! char.name = 'Frau' newhair = random.choice(['2044', '2045', '2046', '203c', '203b', '203d', '2047', '2048', '2049', '204a', '']) --- 130,134 ---- newbeard = random.choice(['203e', '203f', '2040', '2041', '204b', '204c', '204d', '']) else: ! char.name = 'Woman' newhair = random.choice(['2044', '2045', '2046', '203c', '203b', '203d', '2047', '2048', '2049', '204a', '']) *************** *** 162,167 **** char.additem(LAYER_BEARD, beard) char.incognito = 1 ! char.update() char.resendtooltip() --- 161,169 ---- char.additem(LAYER_BEARD, beard) + hair.update() + beard.update() + char.incognito = 1 ! char.update() char.resendtooltip() |
From: Richard M. <dr...@us...> - 2004-08-31 22:40:31
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv481 Modified Files: world.cpp Log Message: Another fix sent to me! Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** world.cpp 31 Aug 2004 22:04:39 -0000 1.120 --- world.cpp 31 Aug 2004 22:40:20 -0000 1.121 *************** *** 522,525 **** --- 522,533 ---- while ( type != 0xFF ); reader.close(); + + // post process all loaded objects + QPtrList<PersistentObject>::const_iterator cit(objects.begin()); + + while (cit != objects.end()) { + (*cit)->postload(reader.version()); + ++cit; + } } } *************** *** 789,801 **** PersistentBroker::instance()->disconnect(); } ! // post process all loaded objects ! QPtrList<PersistentObject>::const_iterator cit(objects.begin()); ! ! while (cit != objects.end()) { ! (*cit)->postload(0); ! ++cit; ! } unsigned int duration = getNormalizedTime() - loadStart; --- 797,811 ---- PersistentBroker::instance()->disconnect(); + + // post process all loaded objects + QPtrList<PersistentObject>::const_iterator cit(objects.begin()); + + while (cit != objects.end()) { + (*cit)->postload(0); + ++cit; + } } ! unsigned int duration = getNormalizedTime() - loadStart; |
From: Richard M. <dr...@us...> - 2004-08-31 22:10:17
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27489/scripts Modified Files: bandages.py Log Message: Fixes from spddmn Index: bandages.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/bandages.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** bandages.py 9 Jul 2004 21:47:45 -0000 1.8 --- bandages.py 31 Aug 2004 22:10:08 -0000 1.9 *************** *** 3,7 **** import random import wolfpack.utilities ! from wolfpack.consts import HEALING, ANATOMY --- 3,7 ---- import random import wolfpack.utilities ! from wolfpack.consts import HEALING, ANATOMY, VETERINARY, ANIMALLORE *************** *** 91,104 **** return 0 - # No resurrection feature in yet - if target.dead: - char.socket.sysmessage( 'You can''t heal a ghost.' ) - return 0 - - if target.poison != -1: - char.socket.clilocmessage(1010060) - # Already at full health ! if target.health >= target.strength: if target == char: char.socket.sysmessage( 'You are healthy.' ) --- 91,96 ---- return 0 # Already at full health ! if not target.poison and target.health >= target.maxhitpoints: if target == char: char.socket.sysmessage( 'You are healthy.' ) *************** *** 129,132 **** --- 121,132 ---- return + if target.char and target.char.dead and ( char.skill[ HEALING ] < 800 or char.skill[ ANATOMY ] < 800 ): + char.socket.sysmessage( 'You are not skilled enough to resurrect.' ) + return + + if target.char and target.char.poison and ( char.skill[ HEALING ] < 600 or char.skill[ ANATOMY ] < 600 ): + char.socket.sysmessage( 'You are not skilled enough to cure poison.' ) + return + # Consume Bandages bandages = wolfpack.finditem( args[0] ) *************** *** 147,171 **** # SkillCheck (0% to 80%) ! if not corpse: success = char.checkskill( HEALING, 0, 800 ) ! else: reschance = int( ( char.skill[ HEALING ] + char.skill[ ANATOMY ] ) * 0.17 ) rescheck = random.randint( 1, 100 ) ! ! if char.checkskill( HEALING, 800, 1000 ) and char.checkskill( ANATOMY, 800, 1000 ) and reschance < rescheck: success = 1 ! char.action( 0x09 ) if corpse: char.addtimer( random.randint( 2500, 5000 ), 'bandages.bandage_timer', [ 1, success, target.item.serial, baseid ] ) # It takes 5 seconds to bandage else: ! if char == target.char: char.socket.sysmessage( 'You start applying bandages on yourself' ) else: char.socket.sysmessage( 'You start applying bandages on %s' % target.char.name ) char.turnto( target.char ) ! ! char.addtimer( random.randint( 1500, 2500 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage char.socket.settag( 'using_bandages', 1 ) --- 147,182 ---- # SkillCheck (0% to 80%) ! if not corpse and not target.char.dead and not target.char.poison: success = char.checkskill( HEALING, 0, 800 ) ! elif corpse or target.char.dead: reschance = int( ( char.skill[ HEALING ] + char.skill[ ANATOMY ] ) * 0.17 ) rescheck = random.randint( 1, 100 ) ! if char.checkskill( HEALING, 800, 1000 ) and char.checkskill( ANATOMY, 800, 1000 ) and reschance > rescheck: ! success = 1 ! else: # must be poisoned ! reschance = int( ( char.skill[ HEALING ] + char.skill[ ANATOMY ] ) * 0.27 ) ! rescheck = random.randint( 1, 100 ) ! if char.checkskill( HEALING, 600, 1000 ) and char.checkskill( ANATOMY, 600, 1000 ) and reschance > rescheck: success = 1 ! ! #this is non osi, but cool! ! #char.action( 0x09 ) if corpse: char.addtimer( random.randint( 2500, 5000 ), 'bandages.bandage_timer', [ 1, success, target.item.serial, baseid ] ) # It takes 5 seconds to bandage else: ! if target.char.dead: ! target.char.socket.sysmessage( char.name + ' begins applying a bandage to you.' ) ! char.addtimer( random.randint( 2500, 5000 ), 'bandages.bandage_timer', [ 2, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage ! elif char == target.char: char.socket.sysmessage( 'You start applying bandages on yourself' ) + char.addtimer( random.randint( 1500, 2500 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage else: char.socket.sysmessage( 'You start applying bandages on %s' % target.char.name ) + if target.char.player: + target.char.socket.sysmessage( char.name + ' begins applying a bandage to you.' ) char.turnto( target.char ) ! char.addtimer( random.randint( 1500, 2500 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage char.socket.settag( 'using_bandages', 1 ) *************** *** 178,183 **** baseid = args[3] ! # Corpse Target ! if resurrect: target = wolfpack.finditem( args[2] ) --- 189,195 ---- baseid = args[3] ! ! if resurrect == 1: ! # Corpse Target target = wolfpack.finditem( args[2] ) *************** *** 215,249 **** target = wolfpack.findchar( args[2] ) if not validCharTarget( char, target ): return ! if not success: ! if target != char: ! char.socket.sysmessage( 'You fail applying bandages to %s.' % target.name ) ! else: ! char.socket.sysmessage( 'You fail applying bandages to yourself.' ) ! return ! # Human target ? ! if target.id == 0x190 or target.id == 0x191: ! firstskill = HEALING ! secondskill = ANATOMY else: ! firstskill = VETERINARY ! secondskill = ANIMALLORE ! # Heal a bit ! healmin = int( char.skill[ firstskill ] / 5 ) + int( char.skill[ secondskill ] / 5 ) + 3 ! healmax = int( char.skill[ firstskill ] / 5 ) + int( char.skill[ secondskill ] / 2 ) + 10 ! amount = random.randint( healmin, healmax ) ! target.health = min( target.maxhitpoints, target.health + amount ) ! target.updatehealth() ! if char == target: ! char.socket.sysmessage( 'You successfully apply bandages on yourself.' ) ! else: ! char.socket.sysmessage( 'You successfully apply bandages on %s' % target.name ) # Create bloody bandages --- 227,282 ---- target = wolfpack.findchar( args[2] ) + if not validCharTarget( char, target ): return + + if target.dead: + if not success: + char.socket.sysmessage( 'You fail to resurrect the target.' ) + return ! target.resurrect() ! target.update() ! char.socket.sysmessage( 'You successfully resurrect ' + target.name ) ! elif target.poison: ! if not success: ! char.socket.sysmessage( 'You fail to cure the target.' ) ! char.socket.clilocmessage(1010060) ! return ! ! target.poison=-1 ! target.update() ! ! char.socket.sysmessage( 'You successfully cured ' + target.name ) else: ! if not success: ! if target != char: ! char.socket.sysmessage( 'You fail applying bandages to %s.' % target.name ) ! else: ! char.socket.sysmessage( 'You fail applying bandages to yourself.' ) ! return ! # Human target ? ! if target.id == 0x190 or target.id == 0x191: ! firstskill = HEALING ! secondskill = ANATOMY ! else: ! firstskill = VETERINARY ! secondskill = ANIMALLORE ! # Heal a bit ! healmin = int( char.skill[ firstskill ] / 5 ) + int( char.skill[ secondskill ] / 5 ) + 3 ! healmax = int( char.skill[ firstskill ] / 5 ) + int( char.skill[ secondskill ] / 2 ) + 10 ! amount = random.randint( healmin, healmax ) ! target.health = min( target.maxhitpoints, target.health + amount ) ! target.updatehealth() ! ! if char == target: ! char.socket.sysmessage( 'You successfully apply bandages on yourself.' ) ! else: ! char.socket.sysmessage( 'You successfully apply bandages on %s' % target.name ) # Create bloody bandages *************** *** 257,259 **** item = wolfpack.additem( 'e22' ) if not wolfpack.utilities.tobackpack( item, char ): ! item.update() --- 290,292 ---- item = wolfpack.additem( 'e22' ) if not wolfpack.utilities.tobackpack( item, char ): ! item.update() \ No newline at end of file |
From: Richard M. <dr...@us...> - 2004-08-31 22:04:50
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26485 Modified Files: npc.cpp world.cpp Log Message: Fixes from spddwn. Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** world.cpp 27 Aug 2004 23:58:53 -0000 1.119 --- world.cpp 31 Aug 2004 22:04:39 -0000 1.120 *************** *** 421,424 **** --- 421,427 ---- void cWorld::load() { + unsigned int loadStart = getNormalizedTime(); + QPtrList<PersistentObject> objects; + if ( Config::instance()->databaseDriver() == "binary" ) { *************** *** 439,445 **** unsigned int lastpercent = 0; unsigned int percent = 0; - unsigned int loadStart = getNormalizedTime(); - QPtrList<PersistentObject> objects; - do { --- 442,445 ---- *************** *** 522,536 **** while ( type != 0xFF ); reader.close(); - - QPtrList<PersistentObject>::const_iterator cit(objects.begin()); - while (cit != objects.end()) { - (*cit)->postload(reader.version()); - ++cit; - } - - unsigned int duration = getNormalizedTime() - loadStart; - - Console::instance()->send( "\b\b\b\b" ); // 100% - Console::instance()->log( LOG_MESSAGE, QString( "The world loaded in %1 ms.\n" ).arg( duration ) ); } } --- 522,525 ---- *************** *** 608,611 **** --- 597,601 ---- object = PersistentFactory::instance()->createObject( type ); object->load( row, offset ); + objects.append(object); ++progress; *************** *** 759,762 **** --- 749,753 ---- pChar->flagUnchanged(); // We've just loaded, nothing changes } + if ( deleteItems.count() > 0 ) *************** *** 769,773 **** deleteItems.clear(); } ! // Load SpawnRegion information cDBResult result = PersistentBroker::instance()->query( "SELECT spawnregion,serial FROM spawnregions;" ); --- 760,764 ---- deleteItems.clear(); } ! // Load SpawnRegion information cDBResult result = PersistentBroker::instance()->query( "SELECT spawnregion,serial FROM spawnregions;" ); *************** *** 798,803 **** PersistentBroker::instance()->disconnect(); - Console::instance()->send( "Finished loading the world.\n" ); } cComponent::load(); --- 789,806 ---- PersistentBroker::instance()->disconnect(); } + + // post process all loaded objects + QPtrList<PersistentObject>::const_iterator cit(objects.begin()); + + while (cit != objects.end()) { + (*cit)->postload(0); + ++cit; + } + + unsigned int duration = getNormalizedTime() - loadStart; + + Console::instance()->send( "\n\b\b\b\b" ); // 100% + Console::instance()->log( LOG_MESSAGE, QString( "\nThe world loaded in %1 ms.\n" ).arg( duration ) ); cComponent::load(); *************** *** 1448,1450 **** return ( p->it++ )->second; ! } --- 1451,1453 ---- return ( p->it++ )->second; ! } \ No newline at end of file Index: npc.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** npc.cpp 29 Aug 2004 20:40:50 -0000 1.110 --- npc.cpp 31 Aug 2004 22:04:39 -0000 1.111 *************** *** 56,59 **** --- 56,60 ---- cNPC::cNPC() { + setWanderFollowTarget(0); nextMsgTime_ = 0; nextGuardCallTime_ = 0; *************** *** 110,113 **** --- 111,116 ---- owner_ = 0; setOwner( dynamic_cast<P_PLAYER>( World::instance()->findChar( owner ) ) ); + if ( wanderType() == enFollowTarget ) + setWanderType( enFreely ); } *************** *** 905,909 **** } else ! ret = Coord_cl( 0xFFFF, 0xFFFF, 0xFF, 0 ); return ret; --- 908,912 ---- } else ! ret = Coord_cl( 0xFFFF, 0xFFFF, (SI08) 0xFF, 0 ); return ret; *************** *** 938,942 **** { if ( path_.empty() ) ! return Coord_cl( 0xFFFF, 0xFFFF, 0xFF, 0 ); else return path_.back(); --- 941,945 ---- { if ( path_.empty() ) ! return Coord_cl( 0xFFFF, 0xFFFF, (SI08) 0xFF, 0 ); else return path_.back(); *************** *** 1452,1454 **** unsigned int cNPC::maxWeight() { return 0; ! } --- 1455,1457 ---- unsigned int cNPC::maxWeight() { return 0; ! } \ No newline at end of file |
From: Sebastian H. <dar...@us...> - 2004-08-31 20:27:51
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7518/magic Modified Files: __init__.py Log Message: Fix for custom spells Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/__init__.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** __init__.py 31 Aug 2004 20:21:25 -0000 1.13 --- __init__.py 31 Aug 2004 20:27:42 -0000 1.14 *************** *** 147,151 **** return ! if type(self.spellid) == int: message = "Casting spell %u (%s) on coordinate %s.\n" % (spell.spellid, spell.__class__.__name__, str(pos)) else: --- 147,151 ---- return ! if type(spell.spellid) == int: message = "Casting spell %u (%s) on coordinate %s.\n" % (spell.spellid, spell.__class__.__name__, str(pos)) else: |
From: Sebastian H. <dar...@us...> - 2004-08-31 19:24:25
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27655/python Added Files: pyaction.cpp pyaction.h Log Message: account syncro --- NEW FILE: pyaction.cpp --- #include "pyaction.h" cActionPythonCode::cActionPythonCode(PyObject *code, PyObject *args) { this->code = code; this->args = args; // Keep references around of both objects Py_INCREF(this->code); Py_INCREF(this->args); } cActionPythonCode::~cActionPythonCode() { // Free both objects. Py_DECREF(this->code); Py_DECREF(this->args); } void cActionPythonCode::execute() { // Execute the code object if (PyCallable_Check(code)) { PyObject *result = PyObject_CallObject(code, args); Py_XDECREF(result); reportPythonError(); } } --- NEW FILE: pyaction.h --- #if !defined(__PYACTION_H__) #define __PYACTION_H__ #include "../action.h" #include "engine.h" class cActionPythonCode : public cAction { protected: PyObject *code; PyObject *args; public: cActionPythonCode(PyObject *code, PyObject *args); virtual ~cActionPythonCode(); void execute(); }; #endif |
From: Sebastian H. <dar...@us...> - 2004-08-31 19:17:18
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26217/python Modified Files: global.cpp python.pri Log Message: account syncro Index: python.pri =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/python.pri,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** python.pri 23 Aug 2004 22:25:26 -0000 1.2 --- python.pri 31 Aug 2004 19:16:49 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- $$PYTHON_H/gump.h \ $$PYTHON_H/objectcache.h \ + $$PYTHON_H/pyaction.h \ $$PYTHON_H/pypacket.h \ $$PYTHON_H/pyspawnregion.h \ *************** *** 19,23 **** $$PYTHON_CPP/item.cpp \ $$PYTHON_CPP/pyaccount.cpp \ ! $$PYTHON_CPP/pyai.cpp \ $$PYTHON_CPP/pycoord.cpp \ $$PYTHON_CPP/pypacket.cpp \ --- 20,25 ---- $$PYTHON_CPP/item.cpp \ $$PYTHON_CPP/pyaccount.cpp \ ! $$PYTHON_CPP/pyaction.cpp \ ! $$PYTHON_CPP/pyai.cpp \ $$PYTHON_CPP/pycoord.cpp \ $$PYTHON_CPP/pypacket.cpp \ Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -d -r1.151 -r1.152 *** global.cpp 31 Aug 2004 13:06:45 -0000 1.151 --- global.cpp 31 Aug 2004 19:16:49 -0000 1.152 *************** *** 56,59 **** --- 56,60 ---- #include "../basedef.h" + #include "pyaction.h" #include "pypacket.h" #include "regioniterator.h" *************** *** 1444,1448 **** Server::instance()->queueAction( ( enActionType ) type ); ! return PyInt_FromLong( 1 ); } --- 1445,1472 ---- Server::instance()->queueAction( ( enActionType ) type ); ! Py_RETURN_NONE; ! } ! ! /* ! \function wolfpack.queuecode ! \param function A python code object. ! \param arguments A tuple. ! \description This function queues a python code object to be executed in the main thread. ! This funciton is useful if you want to access wolfpack internals from within another ! python thread. Use this function to queue code that should be executed synchronized with the ! main thread. ! */ ! static PyObject* wpQueueCode( PyObject* self, PyObject* args ) ! { ! Q_UNUSED( self ); ! ! PyObject *code, *pargs; ! ! if ( !PyArg_ParseTuple( args, "OO!:wolfpack.queuecode( code, args )", &code, &PyTuple_Type, &pargs ) ) ! return 0; ! ! Server::instance()->queueAction( new cActionPythonCode( code, pargs ) ); ! ! Py_RETURN_NONE; } *************** *** 1805,1808 **** --- 1829,1833 ---- { "tickcount", wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" }, { "queueaction", wpQueueAction, METH_VARARGS, NULL }, + { "queuecode", wpQueueCode, METH_VARARGS, NULL }, { "charcount", wpCharCount, METH_NOARGS, "Returns the number of chars in the world" }, { "itemcount", wpItemCount, METH_NOARGS, "Returns the number of items in the world" }, |
From: Sebastian H. <dar...@us...> - 2004-08-31 19:17:18
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26217 Modified Files: ChangeLog wolf.dsp wolfpack.vcproj Log Message: account syncro Index: wolfpack.vcproj =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** wolfpack.vcproj 31 Aug 2004 17:44:37 -0000 1.46 --- wolfpack.vcproj 31 Aug 2004 19:16:49 -0000 1.47 *************** *** 686,689 **** --- 686,695 ---- </File> <File + RelativePath=".\python\pyaction.cpp"> + </File> + <File + RelativePath=".\python\pyaction.h"> + </File> + <File RelativePath=".\python\pyai.cpp"> </File> Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ChangeLog 31 Aug 2004 13:49:53 -0000 1.17 --- ChangeLog 31 Aug 2004 19:16:48 -0000 1.18 *************** *** 33,36 **** --- 33,38 ---- - Walking is denied if stamina is 0. - Fixed an issue with account names containing foreign characters on save. + - Fixed an issue with walking/running not being sent to other cliens. + - Added wolfpack.queuecode to queue a python function for the next mainloop iteration. Wolfpack 12.9.8 Beta (19. August 2004) Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.270 retrieving revision 1.271 diff -C2 -d -r1.270 -r1.271 *** wolf.dsp 31 Aug 2004 17:44:37 -0000 1.270 --- wolf.dsp 31 Aug 2004 19:16:49 -0000 1.271 *************** *** 484,487 **** --- 484,491 ---- # Begin Source File + SOURCE=.\python\pyaction.h + # End Source File + # Begin Source File + SOURCE=.\pagesystem.h # End Source File *************** *** 705,708 **** --- 709,716 ---- # Begin Source File + SOURCE=.\python\pyaction.cpp + # End Source File + # Begin Source File + SOURCE=.\python\content.h # End Source File |
From: Sebastian H. <dar...@us...> - 2004-08-31 17:44:46
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9360 Modified Files: server.cpp server.h wolf.dsp wolfpack.pro wolfpack.vcproj Added Files: action.cpp action.h Log Message: Action system Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.269 retrieving revision 1.270 diff -C2 -d -r1.269 -r1.270 *** wolf.dsp 4 Aug 2004 23:17:37 -0000 1.269 --- wolf.dsp 31 Aug 2004 17:44:37 -0000 1.270 *************** *** 95,98 **** --- 95,102 ---- # Begin Source File + SOURCE=.\action.cpp + # End Source File + # Begin Source File + SOURCE=.\ai\ai.cpp # End Source File *************** *** 331,334 **** --- 335,342 ---- # Begin Source File + SOURCE=.\action.h + # End Source File + # Begin Source File + SOURCE=.\ai\ai.h # End Source File Index: server.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** server.cpp 15 Aug 2004 02:17:39 -0000 1.17 --- server.cpp 31 Aug 2004 17:44:37 -0000 1.18 *************** *** 44,47 **** --- 44,48 ---- #include "scriptmanager.h" #include "sectors.h" + #include "action.h" #include "skills.h" #include "spawnregions.h" *************** *** 106,110 **** QMutex actionMutex; unsigned int time; ! QValueVector<enActionType> actionQueue; Private() : running( true ), state( STARTUP ), secure( true ), time( 0 ) { --- 107,111 ---- QMutex actionMutex; unsigned int time; ! QValueVector<cAction*> actionQueue; Private() : running( true ), state( STARTUP ), secure( true ), time( 0 ) { *************** *** 112,121 **** }; ! void cServer::queueAction( enActionType type ) { if ( d->state == RUNNING ) { QMutexLocker lock( &d->actionMutex ); ! d->actionQueue.push_back( type ); } } --- 113,149 ---- }; ! void cServer::queueAction( enActionType type ) { ! switch (type) { ! case RELOAD_SCRIPTS: ! queueAction( new cActionReloadScripts ); ! break; ! case RELOAD_PYTHON: ! queueAction( new cActionReloadPython ); ! break; ! case RELOAD_ACCOUNTS: ! queueAction( new cActionReloadAccounts ); ! break; ! case RELOAD_CONFIGURATION: ! queueAction( new cActionReloadConfiguration ); ! break; ! case SAVE_WORLD: ! queueAction( new cActionSaveWorld ); ! break; ! case SAVE_ACCOUNTS: ! queueAction( new cActionSaveAccounts ); ! break; ! default: ! break; ! } ! } ! ! void cServer::queueAction( cAction *action ) { if ( d->state == RUNNING ) { QMutexLocker lock( &d->actionMutex ); ! d->actionQueue.push_back( action ); ! } else { ! delete action; // Delete it right away } } *************** *** 129,203 **** while ( d->actionQueue.begin() != d->actionQueue.end() ) { ! enActionType type = *( d->actionQueue.begin() ); ! d->actionQueue.erase( d->actionQueue.begin() ); ! ! switch ( type ) ! { ! case SAVE_ACCOUNTS: ! try ! { ! Accounts::instance()->save(); ! } ! catch ( wpException e ) ! { ! Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); ! } ! break; ! ! case RELOAD_ACCOUNTS: ! try ! { ! reload( "accounts" ); ! } ! catch ( wpException e ) ! { ! Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); ! } ! break; ! ! case RELOAD_CONFIGURATION: ! try ! { ! reload( "configuration" ); ! } ! catch ( wpException e ) ! { ! Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); ! } ! break; ! ! case RELOAD_SCRIPTS: ! try ! { ! reload( "definitions" ); ! } ! catch ( wpException e ) ! { ! Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); ! } ! break; ! case RELOAD_PYTHON: ! try ! { ! reload( "scripts" ); ! } ! catch ( wpException e ) ! { ! Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); ! } ! break; ! case SAVE_WORLD: ! try ! { ! World::instance()->save(); ! } ! catch ( wpException e ) ! { ! Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); ! } ! break; ! } } d->actionMutex.unlock(); --- 157,170 ---- while ( d->actionQueue.begin() != d->actionQueue.end() ) { ! cAction *action = *(d->actionQueue.begin()); ! d->actionQueue.erase(d->actionQueue.begin()); ! try { ! action->execute(); ! } catch ( wpException e ) { ! Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); ! } ! delete action; } d->actionMutex.unlock(); Index: wolfpack.vcproj =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** wolfpack.vcproj 25 Aug 2004 17:01:29 -0000 1.45 --- wolfpack.vcproj 31 Aug 2004 17:44:37 -0000 1.46 *************** *** 241,244 **** --- 241,250 ---- </File> <File + RelativePath=".\action.cpp"> + </File> + <File + RelativePath=".\action.h"> + </File> + <File RelativePath=".\basechar.cpp"> </File> --- NEW FILE: action.h --- #if !defined(__ACTION_H__) #define __ACTION_H__ class cAction { public: cAction(); virtual ~cAction(); // Execute the action virtual void execute() = 0; }; class cActionReloadScripts : public cAction { public: void execute(); }; class cActionReloadPython : public cAction { public: void execute(); }; class cActionReloadAccounts : public cAction { public: void execute(); }; class cActionReloadConfiguration : public cAction { public: void execute(); }; class cActionSaveWorld : public cAction { public: void execute(); }; class cActionSaveAccounts : public cAction { public: void execute(); }; #endif Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** wolfpack.pro 24 Aug 2004 00:23:21 -0000 1.209 --- wolfpack.pro 31 Aug 2004 17:44:37 -0000 1.210 *************** *** 63,66 **** --- 63,67 ---- HEADERS += \ accounts.h \ + action.h \ basechar.h \ basedef.h \ *************** *** 123,126 **** --- 124,128 ---- SOURCES += \ accounts.cpp \ + action.cpp \ basechar.cpp \ basedef.cpp \ --- NEW FILE: action.cpp --- #include "action.h" #include "accounts.h" #include "server.h" #include "world.h" cAction::cAction() { } cAction::~cAction() { } void cActionReloadScripts::execute() { Server::instance()->reload( "definitions" ); } void cActionReloadPython::execute() { Server::instance()->reload( "scripts" ); } void cActionReloadAccounts::execute() { Server::instance()->reload( "accounts" ); } void cActionReloadConfiguration::execute() { Server::instance()->reload( "configuration" ); } void cActionSaveWorld::execute() { World::instance()->save(); } void cActionSaveAccounts::execute() { Accounts::instance()->save(); } Index: server.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/server.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** server.h 2 Jun 2004 15:04:06 -0000 1.4 --- server.h 31 Aug 2004 17:44:37 -0000 1.5 *************** *** 42,48 **** }; enum enActionType { ! RELOAD_SCRIPTS = 0, RELOAD_PYTHON, RELOAD_ACCOUNTS, --- 42,50 ---- }; + class cAction; + enum enActionType { ! RELOAD_SCRIPTS = 0, RELOAD_PYTHON, RELOAD_ACCOUNTS, *************** *** 148,151 **** --- 150,154 ---- ~cServer(); + void queueAction( cAction *action ); void queueAction( enActionType type ); void setState( enServerState state ); |