wpdev-commits Mailing List for Wolfpack Emu (Page 85)
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-07-07 13:08:35
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27240 Modified Files: blades.py Log Message: Fixes for carving and sheering. Also added wolfpack.charbase. Index: blades.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/blades.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** blades.py 2 Jul 2004 13:40:44 -0000 1.4 --- blades.py 7 Jul 2004 13:08:20 -0000 1.5 *************** *** 14,17 **** --- 14,18 ---- from skills.lumberjacking import * import wolfpack.utilities + from wolfpack import settings import whrandom #import weapons.blades *************** *** 26,29 **** --- 27,36 ---- return 1 + def regrow_wool(char, arguments): + if char: + char.baseid = 'sheep_unsheered' + char.id = 207 + char.update() + def response( char, args, target ): item = wolfpack.finditem( args[0] ) *************** *** 60,68 **** # This is for sheering only elif target.char: ! if ( target.char.id == hex2dec(0xcf) ): ! target.char.id = 0xdf ! target.char.carve = "carve_sheep_sheered" target.char.update() ! elif target.char.id == hex2dec(0xdf): char.socket.clilocmessage( 0x7A2E1 ) # This sheep is not yet ready to be shorn. return --- 67,91 ---- # This is for sheering only elif target.char: ! if target.char.baseid == 'sheep_unsheered': ! target.char.id = 223 ! target.char.baseid = 'sheep_sheered' target.char.update() ! ! # Create Wool ! wool = wolfpack.additem("df8") ! wool.amount = 2 ! ! if not wolfpack.utilities.tobackpack(wool, char): ! wool.update() ! ! char.socket.clilocmessage( 0x7A2E4 ) # You place the gathered wool into your backpack. ! ! # Let the wool regrow (minutes) ! delay = settings.getnumber('Game Speed', 'Regrow Wool Minutes', 180, 1) ! delay *= 60000 # Miliseconds per Minute ! target.char.dispel(None, 1, "regrow_wool", []) ! target.char.addtimer(delay, "blades.regrow_wool", [], 1, 0, "regrow_wool") ! return ! elif target.char.id == 'sheep_sheered': char.socket.clilocmessage( 0x7A2E1 ) # This sheep is not yet ready to be shorn. return *************** *** 70,108 **** char.socket.clilocmessage( 0x7A2E2 ) # You can only skin dead creatures. return - - wool = wolfpack.additem( "df8" ) - wool.amount = 2 - - if not wolfpack.utilities.tocontainer( wool, char.getbackpack() ): - wool.update() - char.socket.clilocmessage( 0x7A2E4 ) # You place the gathered wool into your backpack. - return else: model = target.model ! if target.model == 0 or target.model != 0: ! ! if target.model == 0: ! map = wolfpack.map( target.pos.x, target.pos.y, target.pos.map ) ! treeid = map['id'] ! elif target.model != 0: ! treeid = target.model ! if istree(treeid): ! # Axes/Polearms get Logs, Swords get kindling. ! # Also allows a mace's war axe to be use. 0x13af and 0x13b0 ! if item.type == 1002 or item.id == 0x13af or item.id == 0x13b0: ! if not item or not item.container == char: ! char.message( "You must equip this item to use it on this target!" ) ! return ! else: ! skills.lumberjacking.response( [ target, item, char ] ) ! # Swords and Fencing Weapons: Get kindling ! elif item.type == 1001 or item.type == 1005: ! skills.lumberjacking.hack_kindling( char, target.pos ) ! else: ! # You can't use a bladed item on that. ! char.socket.clilocmessage( 500494, "", GRAY ) ! return False # CARVE CORPSE --- 93,121 ---- char.socket.clilocmessage( 0x7A2E2 ) # You can only skin dead creatures. return else: model = target.model ! if target.model == 0: ! map = wolfpack.map( target.pos.x, target.pos.y, target.pos.map ) ! treeid = map['id'] ! elif target.model != 0: ! treeid = target.model ! if istree(treeid): ! # Axes/Polearms get Logs, Swords get kindling. ! # Also allows a mace's war axe to be use. 0x13af and 0x13b0 ! if item.type == 1002 or item.id == 0x13af or item.id == 0x13b0: ! if not item or not item.container == char: ! char.message( "You must equip this item to use it on this target!" ) ! return ! else: ! skills.lumberjacking.response( [ target, item, char ] ) ! # Swords and Fencing Weapons: Get kindling ! elif item.type == 1001 or item.type == 1005: ! skills.lumberjacking.hack_kindling( char, target.pos ) ! else: ! # You can't use a bladed item on that. ! char.socket.clilocmessage( 500494, "", GRAY ) ! return False # CARVE CORPSE *************** *** 122,131 **** # Not carvable or already carved ! if corpse.carve == '': char.socket.clilocmessage( 0x7A305, "", 0x3b2, 3, corpse ) # You see nothing useful to carve.. return # Create all items in the carve list ! carve = wolfpack.list( str(corpse.carve) ) for id in carve: --- 135,151 ---- # Not carvable or already carved ! try: ! charbase = wolfpack.charbase(corpse.charbaseid) ! carve = charbase['carve'] ! except: ! char.socket.clilocmessage( 0x7A305, "", 0x3b2, 3, corpse ) # You see nothing useful to carve.. ! return ! ! if corpse.hastag('carved') or carve == '': char.socket.clilocmessage( 0x7A305, "", 0x3b2, 3, corpse ) # You see nothing useful to carve.. return # Create all items in the carve list ! carve = wolfpack.list(str(carve)) for id in carve: *************** *** 147,155 **** blooditem.moveto( corpse.pos ) blooditem.decay = 1 - blooditem.decaytime = wolfpack.time.servertime() + ( 30 * 1000 ) # Decay after 30 Seconds blooditem.update() char.socket.clilocmessage( 0x7A2F3, "", 0x3b2, 3, corpse ) # You carve away some meat which remains on the corpse ! corpse.carve = '' # CUT FISH --- 167,174 ---- blooditem.moveto( corpse.pos ) blooditem.decay = 1 blooditem.update() char.socket.clilocmessage( 0x7A2F3, "", 0x3b2, 3, corpse ) # You carve away some meat which remains on the corpse ! corpse.settag('carved', 1) # CUT FISH |
From: Sebastian H. <dar...@us...> - 2004-07-07 13:08:13
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27134/webroot Modified Files: ChangeLog.wolfpack Log Message: Corrected documentation of corpse objects. Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ChangeLog.wolfpack 6 Jul 2004 12:54:17 -0000 1.6 --- ChangeLog.wolfpack 7 Jul 2004 13:08:04 -0000 1.7 *************** *** 10,18 **** --- 10,22 ---- - Removed command: removeevent * Definition Changes: + - Fixed Sheep definitions * Python Script Changes: - New Command: taginfo - New Function: wolfpack.findobject(serial) + - New Function: wolfpack.charbase(baseid) - New command: addevent - New command: removeevent + - Fixed carving + - Fixed sheering of sheeps and wool regrowing * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-07-07 13:07:47
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27088 Modified Files: corpse.cpp Log Message: Corrected documentation of corpse objects. Index: corpse.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/corpse.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** corpse.cpp 5 Jul 2004 18:33:20 -0000 1.57 --- corpse.cpp 7 Jul 2004 13:07:38 -0000 1.58 *************** *** 265,297 **** { /* ! \property corpse.bodyid The body if of the dead creature. */ SET_INT_PROPERTY( "bodyid", bodyId_ ) else /* ! \property corpse.hairstyle The id of the hairstyle displayed on the corpse. For no hair use 0. */ SET_INT_PROPERTY( "hairstyle", hairStyle_ ) else /* ! \property corpse.haircolor The color of the hair displayed on the corpse. */ SET_INT_PROPERTY( "haircolor", hairColor_ ) else /* ! \property corpse.beardstyle The id of the beardstyle displayed on the corpse. For no beard use 0. */ SET_INT_PROPERTY( "beardstyle", beardStyle_ ) else /* ! \property corpse.beardcolor The color of the beard displayed on the corpse. */ SET_INT_PROPERTY( "beardcolor", beardColor_ ) /* ! \property corpse.murderer The character who killed this creature. May be None if the character has been deleted or the owner of this corpse accidently died. */ else if (name == "murderer") --- 265,303 ---- { /* ! \property item.bodyid The body if of the dead creature. ! This property only exists for corpses. */ SET_INT_PROPERTY( "bodyid", bodyId_ ) else /* ! \property item.hairstyle The id of the hairstyle displayed on the corpse. For no hair use 0. + This property only exists for corpses. */ SET_INT_PROPERTY( "hairstyle", hairStyle_ ) else /* ! \property item.haircolor The color of the hair displayed on the corpse. ! This property only exists for corpses. */ SET_INT_PROPERTY( "haircolor", hairColor_ ) else /* ! \property item.beardstyle The id of the beardstyle displayed on the corpse. For no beard use 0. + This property only exists for corpses. */ SET_INT_PROPERTY( "beardstyle", beardStyle_ ) else /* ! \property item.beardcolor The color of the beard displayed on the corpse. ! This property only exists for corpses. */ SET_INT_PROPERTY( "beardcolor", beardColor_ ) /* ! \property item.murderer The character who killed this creature. May be None if the character has been deleted or the owner of this corpse accidently died. + This property only exists for corpses. */ else if (name == "murderer") *************** *** 305,310 **** } /* ! \property corpse.murdertime The time when the murder was comitted in seconds since the epoch (UNIX timestamp). */ else --- 311,317 ---- } /* ! \property item.murdertime The time when the murder was comitted in seconds since the epoch (UNIX timestamp). + This property only exists for corpses. */ else *************** *** 312,316 **** /* ! \property corpse.direction The direction this corpse is facing. */ else --- 319,324 ---- /* ! \property item.direction The direction this corpse is facing. ! This property only exists for corpses. */ else *************** *** 318,323 **** /* ! \property corpse.charbaseid The npc definition id of the murdererd creature. This is used to derive the carve section for this corpse. */ else --- 326,332 ---- /* ! \property item.charbaseid The npc definition id of the murdererd creature. This is used to derive the carve section for this corpse. + This property only exists for corpses. */ else |
From: Sebastian H. <dar...@us...> - 2004-07-07 13:05:44
|
Update of /cvsroot/wpdev/xmlscripts/definitions/spawnregions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26726/spawnregions Modified Files: index.xml Log Message: Carve Fix Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/spawnregions/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.xml 29 May 2004 23:48:55 -0000 1.3 --- index.xml 7 Jul 2004 13:05:35 -0000 1.4 *************** *** 11,14 **** --- 11,34 ---- --> <definitions> + <item id="100gold" inherit="eed"> + <amount>100</amount> + </item> + + <spawnregion id="test"> + <maxnpcamount>10</maxnpcamount> + <maxitemamount>10</maxitemamount> + <mintime>2</mintime> + <maxtime>5</maxtime> + <npcs> + <npc>headless</npc> + </npcs> + <items> + <item>100gold</item> + </items> + <npcspercycle>1</npcspercycle> + <itemspercycle>1</itemspercycle> + <rectangle x1="1377" x2="1387" y1="3808" y2="3822" map="1" /> + </spawnregion> + <include file="definitions/spawnregions/felucca/index.xml" /> <include file="definitions/spawnregions/trammel/index.xml" /> |
From: Sebastian H. <dar...@us...> - 2004-07-07 13:05:43
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/animals/land In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26726/npcs/animals/land Modified Files: sheep.xml Log Message: Carve Fix Index: sheep.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/animals/land/sheep.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sheep.xml 6 Jun 2004 01:38:43 -0000 1.8 --- sheep.xml 7 Jul 2004 13:05:34 -0000 1.9 *************** *** 12,16 **** <npc id="sheep_sheered" inherit="animal_base"> <name>sheep</name> ! <id>207</id> <ai>Animal_Domestic</ai> <karma><random list="KARMA_L0" /></karma> --- 12,16 ---- <npc id="sheep_sheered" inherit="animal_base"> <name>sheep</name> ! <id>223</id> <ai>Animal_Domestic</ai> <karma><random list="KARMA_L0" /></karma> *************** *** 43,47 **** <!-- Sheep (unsheered) --> <npc id="sheep_unsheered" inherit="sheep_sheered"> ! <id>223</id> <carve>carve_sheep_unsheered</carve> <category>Animals\Land\Sheep (Unsheered)</category> --- 43,47 ---- <!-- Sheep (unsheered) --> <npc id="sheep_unsheered" inherit="sheep_sheered"> ! <id>207</id> <carve>carve_sheep_unsheered</carve> <category>Animals\Land\Sheep (Unsheered)</category> |
From: Sebastian H. <dar...@us...> - 2004-07-07 13:05:43
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26726 Modified Files: scripts.xml Log Message: Carve Fix Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** scripts.xml 1 Jul 2004 22:31:34 -0000 1.135 --- scripts.xml 7 Jul 2004 13:05:34 -0000 1.136 *************** *** 88,91 **** --- 88,92 ---- <script>commands.effect</script> <script>commands.eval</script> + <script>commands.events</script> <script>commands.export</script> <script>commands.freeze</script> |
From: Sebastian H. <dar...@us...> - 2004-07-07 13:04:59
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26586/python Modified Files: global.cpp Log Message: Carve Fix Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** global.cpp 2 Jul 2004 21:01:19 -0000 1.138 --- global.cpp 7 Jul 2004 13:04:45 -0000 1.139 *************** *** 1690,1697 **** } static PyMethodDef wpGlobal[] = { ! { "getOption", wpGetOption, METH_VARARGS, "Reads a string value from the database." }, ! { "setOption", wpSetOption, METH_VARARGS, "Sets a string value and a key to the database." }, { "callevent", wpCallEvent, METH_VARARGS, "Call an event in a script and return the result." }, { "hasevent", wpHasEvent, METH_VARARGS, "If the given script has the given event. Return true." }, --- 1690,1745 ---- } + /* + \function wolfpack.charbase + \param baseid A string containing the character id. + \return A dictionary with the following keys:<code> + - basesound + - soundmode + - flags + - figurine + - mindamage + - maxdamage + - mintaming + - carve + - lootpacks + - bindmenu + - controlslots + - criticalhealth + </code> + \description Retrieve information about a given character baseid. + */ + static PyObject* wpCharBase(PyObject* self, PyObject* args) { + char *baseid; + if (!PyArg_ParseTuple(args, "s:wolfpack.charbase(baseid)", &baseid)) { + return 0; + } + + cCharBaseDef *basedef = CharBaseDefs::instance()->get(baseid); + + if (!basedef) { + return PyErr_Format(PyExc_RuntimeError, "An error occured while retrieving the character basedefinition %s.", baseid); + } + + PyObject *dict = PyDict_New(); + PyDict_SetItemString(dict, "basesound", PyInt_FromLong(basedef->basesound())); + PyDict_SetItemString(dict, "soundmode", PyInt_FromLong(basedef->soundmode())); + PyDict_SetItemString(dict, "flags", PyInt_FromLong(basedef->flags())); + PyDict_SetItemString(dict, "figurine", PyInt_FromLong(basedef->figurine())); + PyDict_SetItemString(dict, "mindamage", PyInt_FromLong(basedef->minDamage())); + PyDict_SetItemString(dict, "maxdamage", PyInt_FromLong(basedef->maxDamage())); + PyDict_SetItemString(dict, "mintaming", PyInt_FromLong(basedef->minTaming())); + PyDict_SetItemString(dict, "carve", QString2Python(basedef->carve())); + PyDict_SetItemString(dict, "lootpacks", QString2Python(basedef->lootPacks())); + PyDict_SetItemString(dict, "bindmenu", QString2Python(basedef->bindmenu())); + PyDict_SetItemString(dict, "controlslots", PyInt_FromLong(basedef->controlSlots())); + PyDict_SetItemString(dict, "criticalhealth", PyInt_FromLong(basedef->criticalHealth())); + return dict; + } + static PyMethodDef wpGlobal[] = { ! { "charbase", wpCharBase, METH_VARARGS, 0 }, ! { "getoption", wpGetOption, METH_VARARGS, "Reads a string value from the database." }, ! { "setoption", wpSetOption, METH_VARARGS, "Sets a string value and a key to the database." }, { "callevent", wpCallEvent, METH_VARARGS, "Call an event in a script and return the result." }, { "hasevent", wpHasEvent, METH_VARARGS, "If the given script has the given event. Return true." }, |
From: Thiago A C. <thi...@us...> - 2004-07-07 04:21:49
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10096/commands Modified Files: add.py go.py Log Message: regenerate menus when definitions might have been reloaded. Index: add.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/add.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** add.py 19 Jun 2004 07:37:53 -0000 1.6 --- add.py 7 Jul 2004 04:21:37 -0000 1.7 *************** *** 220,223 **** --- 220,227 ---- wolfpack.registercommand('add', add) + def onUnload(): + global generated + generated = 0 + """ \command add Index: go.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/go.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** go.py 19 Jun 2004 07:37:53 -0000 1.7 --- go.py 7 Jul 2004 04:21:37 -0000 1.8 *************** *** 32,35 **** --- 32,37 ---- from system.makemenus import MakeMenu, MakeAction, findmenu + from wolfpack.console import * + generated = 0 *************** *** 257,261 **** # def onLoad(): - generateGoMenu() wolfpack.registercommand('go', go) wolfpack.registercommand('send', send) --- 259,266 ---- # def onLoad(): wolfpack.registercommand('go', go) wolfpack.registercommand('send', send) + + def onUnload(): + global generated + generated = 0 |
From: Thiago A C. <thi...@us...> - 2004-07-07 04:21:05
|
Update of /cvsroot/wpdev/xmlscripts/definitions/locations In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10012 Modified Files: index.xml Log Message: someone commented this out! Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/locations/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.xml 26 May 2004 13:28:08 -0000 1.3 --- index.xml 7 Jul 2004 04:20:56 -0000 1.4 *************** *** 8,16 **** --> <definitions> - <!-- <include file="definitions/locations/felluca.xml"/> <include file="definitions/locations/trammel.xml"/> <include file="definitions/locations/ilshenar.xml"/> <include file="definitions/locations/malas.xml"/> - --> </definitions> --- 8,14 ---- |
From: Thiago A C. <thi...@us...> - 2004-07-07 03:14:41
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32644/system Modified Files: macro_opendoor.py skillgain.py Log Message: typos Index: skillgain.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/skillgain.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** skillgain.py 16 Jun 2004 20:18:43 -0000 1.6 --- skillgain.py 7 Jul 2004 03:14:32 -0000 1.7 *************** *** 216,220 **** # Calculate the GainChance # (RunUO has a nice approach. Doing it similar) ! totalcap = settings.getNumber("General", "SkillCap", 700) gainchance = (totalcap - totalskills) / totalcap # How near are we to our global skill cap gainchance += (cap - value) / cap # How near are we to our skill cap --- 216,220 ---- # Calculate the GainChance # (RunUO has a nice approach. Doing it similar) ! totalcap = settings.getnumber("General", "SkillCap", 700) gainchance = (totalcap - totalskills) / totalcap # How near are we to our global skill cap gainchance += (cap - value) / cap # How near are we to our skill cap Index: macro_opendoor.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/macro_opendoor.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** macro_opendoor.py 1 Jul 2004 22:28:52 -0000 1.1 --- macro_opendoor.py 7 Jul 2004 03:14:32 -0000 1.2 *************** *** 18,22 **** def openDoor( socket, packet ): ! if packet.size != 5 and packet.getShort(3) != 0x5800: return 0 --- 18,22 ---- def openDoor( socket, packet ): ! if packet.size != 5 and packet.getshort(3) != 0x5800: return 0 |
From: Thiago A C. <thi...@us...> - 2004-07-07 00:11:59
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4446/skills Modified Files: tracking.py Log Message: typo fix Index: tracking.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/tracking.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tracking.py 26 May 2004 13:07:25 -0000 1.5 --- tracking.py 7 Jul 2004 00:11:49 -0000 1.6 *************** *** 29,33 **** char.socket.deltag( 'skill_delay' ) ! char.socket.cloclocmessage( 1011350 ) # What do you wish to track? char.socket.closegump( 0x87651592 ) # What to track gump = cGump( x = 20, y = 30, callback="skills.tracking.trackWhatResponse", type=0x87651592 ) --- 29,33 ---- char.socket.deltag( 'skill_delay' ) ! char.socket.cliclocmessage( 1011350 ) # What do you wish to track? char.socket.closegump( 0x87651592 ) # What to track gump = cGump( x = 20, y = 30, callback="skills.tracking.trackWhatResponse", type=0x87651592 ) |
From: Sebastian H. <dar...@us...> - 2004-07-06 13:04:17
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv566 Modified Files: commands.cpp targetrequests.cpp targetrequests.h Log Message: addevent, removeevent moved to scripts fixed an issue for doors Index: targetrequests.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/targetrequests.cpp,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** targetrequests.cpp 2 Jun 2004 15:04:07 -0000 1.98 --- targetrequests.cpp 6 Jul 2004 13:04:07 -0000 1.99 *************** *** 218,256 **** } - bool cAddEventTarget::responsed( cUOSocket* socket, cUORxTarget* target ) - { - cUObject* pObject = 0; - - if ( isCharSerial( target->serial() ) ) - pObject = FindCharBySerial( target->serial() ); - else if ( isItemSerial( target->serial() ) ) - pObject = FindItemBySerial( target->serial() ); - - // We have to have a valid target - if ( !pObject ) - { - socket->sysMessage( tr( "You have to target a character or an item." ) ); - return true; - } - - // Check if we already have the event - if ( pObject->hasEvent( _event ) ) - { - socket->sysMessage( tr( "This object already has the event '%1'" ).arg( _event ) ); - return true; - } - - cPythonScript* script = ScriptManager::instance()->find( _event.latin1() ); - - if ( !script ) - { - socket->sysMessage( tr( "Invalid event: '%1'" ).arg( _event ) ); - return true; - } - - pObject->addEvent( script ); - return true; - } - bool cShowTarget::responsed( cUOSocket* socket, cUORxTarget* target ) { --- 218,221 ---- Index: targetrequests.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/targetrequests.h,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** targetrequests.h 5 Jul 2004 14:03:16 -0000 1.69 --- targetrequests.h 6 Jul 2004 13:04:07 -0000 1.70 *************** *** 417,469 **** }; - class cAddEventTarget : public cTargetRequest - { - private: - QString _event; - public: - cAddEventTarget( const QString& event ) : _event( event ) - { - } - - bool responsed( cUOSocket* socket, cUORxTarget* target ); - }; - - class cRemoveEventTarget : public cTargetRequest - { - private: - QString _event; - public: - cRemoveEventTarget( const QString& event ) : _event( event ) - { - } - - virtual bool responsed( cUOSocket* socket, cUORxTarget* target ) - { - cUObject* pObject = 0; - - if ( isCharSerial( target->serial() ) ) - pObject = FindCharBySerial( target->serial() ); - else if ( isItemSerial( target->serial() ) ) - pObject = FindItemBySerial( target->serial() ); - - // We have to have a valid target - if ( !pObject ) - { - socket->sysMessage( tr( "You have to target a character or an item." ) ); - return true; - } - - // Check if we already have the event - if ( !pObject->hasEvent( _event ) ) - { - socket->sysMessage( tr( "This object doesn't have the event '%1'" ).arg( _event ) ); - return true; - } - - pObject->removeEvent( _event ); - return true; - } - }; - class cMoveTarget : public cTargetRequest { --- 417,420 ---- Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.240 retrieving revision 1.241 diff -C2 -d -r1.240 -r1.241 *** commands.cpp 5 Jul 2004 18:33:19 -0000 1.240 --- commands.cpp 6 Jul 2004 13:04:06 -0000 1.241 *************** *** 867,919 **** /* - \command addevent - \description Attach a script to an object. - \usage - <code>addevent [script]</code> - Script is the id of the script you want to attach. - */ - void commandAddEvent( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( command ); - if ( args.size() < 1 ) - { - socket->sysMessage( "Usage: addevent <identifier>" ); - return; - } - - QString event = args.join( " " ); - - // No such event - if ( !ScriptManager::instance()->find( event.latin1() ) ) - { - socket->sysMessage( tr( "Invalid event: '%1'" ).arg( event ) ); - return; - } - - socket->sysMessage( tr( "Please select a target to add event '%1' to." ).arg( event ) ); - socket->attachTarget( new cAddEventTarget( event ) ); - } - - /* - \command removeevent - \description Remove a script from an object. - \usage - <code>removeevent [script]</code> - Script is the id of the script you want to remove. - */ - void commandRemoveEvent( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( command ); - if ( args.size() < 1 ) - { - socket->sysMessage( "Usage: removeevent <identifier>" ); - return; - } - - QString event = args.join( " " ); - - socket->sysMessage( tr( "Please select a target to remove event '%1' from." ).arg( event ) ); - socket->attachTarget( new cRemoveEventTarget( event ) ); - } - - /* \command move \description Move an object relatively to its current position. --- 867,870 ---- *************** *** 1396,1421 **** stCommand cCommands::commands[] = { ! { "ACCOUNT", commandAccount }, ! { "ADDEVENT", commandAddEvent }, { "ALLMOVE", commandAllMove }, ! { "ALLSHOW", commandAllShow }, ! { "ALLSKILLS", commandAllSkills }, ! { "BROADCAST", commandBroadcast }, ! { "DOORGEN", commandDoorGenerator }, ! { "FIX", commandFix }, ! { "GMTALK", commandGmtalk }, ! { "INVIS", commandInvis }, ! { "KILL", commandKill }, ! { "MOVE", commandMove }, ! { "PAGES", commandPages }, ! { "PAGENOTIFY", commandPageNotify }, ! { "PASSWORD", commandPassword }, ! { "RELOAD", commandReload }, ! { "REMOVE", commandRemove }, ! { "REMOVEEVENT", commandRemoveEvent }, ! { "RESEND", commandResend }, ! { "RESTOCK", commandRestock }, ! { "RESURRECT", commandResurrect }, ! { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, { "SET", commandSet }, --- 1347,1370 ---- stCommand cCommands::commands[] = { ! { "ACCOUNT", commandAccount }, { "ALLMOVE", commandAllMove }, ! { "ALLSHOW", commandAllShow }, ! { "ALLSKILLS", commandAllSkills }, ! { "BROADCAST", commandBroadcast }, ! { "DOORGEN", commandDoorGenerator }, ! { "FIX", commandFix }, ! { "GMTALK", commandGmtalk }, ! { "INVIS", commandInvis }, ! { "KILL", commandKill }, ! { "MOVE", commandMove }, ! { "PAGES", commandPages }, ! { "PAGENOTIFY", commandPageNotify }, ! { "PASSWORD", commandPassword }, ! { "RELOAD", commandReload }, ! { "REMOVE", commandRemove }, ! { "RESEND", commandResend }, ! { "RESTOCK", commandRestock }, ! { "RESURRECT", commandResurrect }, ! { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, { "SET", commandSet }, |
From: Sebastian H. <dar...@us...> - 2004-07-06 12:54:27
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30972/webroot Modified Files: ChangeLog.wolfpack Log Message: addevent, removeevent moved to scripts fixed an issue for doors Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ChangeLog.wolfpack 5 Jul 2004 12:55:55 -0000 1.5 --- ChangeLog.wolfpack 6 Jul 2004 12:54:17 -0000 1.6 *************** *** 6,13 **** --- 6,18 ---- local codepage. - Floating point tags are now saved correctly. + - Removed command: tags + - Removed command: addevent + - Removed command: removeevent * Definition Changes: * Python Script Changes: - New Command: taginfo - New Function: wolfpack.findobject(serial) + - New command: addevent + - New command: removeevent * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-07-06 12:52:24
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30630/commands Added Files: events.py Log Message: addevent, removeevent moved to scripts fixed an issue for doors --- NEW FILE: events.py --- import wolfpack from wolfpack.consts import * def addevent_response(player, arguments, target): event = arguments[0] object = None if target.item: object = target.item elif target.char: if target.char.rank >= player.rank and player != target.char: player.socket.sysmessage("You've burnt your fingers!") return object = target.char else: player.socket.sysmessage('You have to target a character or item.') return player.log(LOG_MESSAGE, "Adds event '%s' to object 0x%x.\n" % (event, object.serial)) object.addevent(event) object.resendtooltip() player.socket.sysmessage('You add the event to your target.') """ \command addevent \description Attach a script to an object. \usage - <code>addevent [script]</code> Script is the id of the script you want to attach. """ def commandAddevent(socket, command, arguments): if len(arguments) == 0: socket.sysmessage('Usage: addevent <identifier>') return event = arguments.strip() try: wolfpack.hasevent(event, EVENT_USE) except: socket.sysmessage('No such event: %s.' % event) return socket.sysmessage("Please select the object you want to add the event '%s' to." % event) socket.attachtarget('commands.events.addevent_response', [event]) def removeevent_response(player, arguments, target): event = arguments[0] object = None if target.item: object = target.item elif target.char: if target.char.rank >= player.rank and player != target.char: player.socket.sysmessage("You've burnt your fingers!") return object = target.char else: player.socket.sysmessage('You have to target a character or item.') return if object.hasevent(event): player.log(LOG_MESSAGE, "Removes event '%s' from object 0x%x.\n" % (event, object.serial)) object.removeevent(event) object.resendtooltip() player.socket.sysmessage('You remove the event from your target.') else: player.socket.sysmessage('Your target does not have the given event.') """ \command removeevent \description Remove a script from an object. \usage - <code>removeevent [script]</code> Script is the id of the script you want to remove. """ def commandRemoveevent(socket, command, arguments): if len(arguments) == 0: socket.sysmessage('Usage: removeevent <identifier>') return event = arguments.strip() try: wolfpack.hasevent(event, EVENT_USE) except: socket.sysmessage('No such event: %s.' % event) return socket.sysmessage("Please select the object you want to remove the event '%s' from." % event) socket.attachtarget('commands.events.removeevent_response', [event]) def onLoad(): wolfpack.registercommand('addevent', commandAddevent) wolfpack.registercommand('removeevent', commandRemoveevent) #wolfpack.registercommand('addevent', commandAddevent) |
From: Sebastian H. <dar...@us...> - 2004-07-06 12:52:24
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30630 Modified Files: door.py Log Message: addevent, removeevent moved to scripts fixed an issue for doors Index: door.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/door.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** door.py 1 Jul 2004 21:43:28 -0000 1.10 --- door.py 6 Jul 2004 12:52:13 -0000 1.11 *************** *** 290,293 **** --- 290,294 ---- """ blocked = 0 + chars = [] for door in doors: if door[1] == item.id: |
From: Sebastian H. <dar...@us...> - 2004-07-05 19:59:46
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24833 Modified Files: npc.cpp Log Message: Compilefix Index: npc.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** npc.cpp 19 Jun 2004 02:06:51 -0000 1.97 --- npc.cpp 5 Jul 2004 19:59:38 -0000 1.98 *************** *** 981,985 **** float cNPC::pathHeuristic( const Coord_cl& source, const Coord_cl& destination ) { ! return ( float ) ( sqrt( pow( source.x - destination.x, 2 ) + pow( source.y - destination.y, 2 ) + pow( ( source.z - destination.z ) / 5.0f, 2 ) ) ); } --- 981,985 ---- float cNPC::pathHeuristic( const Coord_cl& source, const Coord_cl& destination ) { ! return ( float ) ( sqrt( pow( (float)(source.x - destination.x), 2 ) + pow( (float)(source.y - destination.y), 2 ) + pow( ( source.z - destination.z ) / 5.0f, 2 ) ) ); } |
From: Richard M. <dr...@us...> - 2004-07-05 18:33:32
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8653 Modified Files: basechar.cpp basechar.h basedef.h commands.cpp corpse.cpp corpse.h customtags.cpp Log Message: Index: customtags.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/customtags.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** customtags.cpp 5 Jul 2004 12:52:58 -0000 1.49 --- customtags.cpp 5 Jul 2004 18:33:20 -0000 1.50 *************** *** 83,87 **** */ - /*! Constructs an invalid variant. --- 83,86 ---- Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** basechar.cpp 19 Jun 2004 02:06:50 -0000 1.119 --- basechar.cpp 5 Jul 2004 18:33:19 -0000 1.120 *************** *** 1818,1823 **** SET_INT_PROPERTY( "statcap", statCap_ ) /* ! \property char.baseid The name of the definition this character was created from. ! This property is used to link the character to the definitions even after he was created. */ --- 1818,1823 ---- SET_INT_PROPERTY( "statcap", statCap_ ) /* ! \property char.baseid The name of the definition this character was created from. ! This property is used to link the character to the definitions even after he was created. */ *************** *** 2048,2052 **** /* \rproperty char.mintaming This is the minimum taming skill required to tame this creature. ! This has no meaning for player characters. This property is inherited from the definition referenced by the baseid property. --- 2048,2052 ---- /* \rproperty char.mintaming This is the minimum taming skill required to tame this creature. ! This has no meaning for player characters. This property is inherited from the definition referenced by the baseid property. *************** *** 2519,2528 **** if ( scriptChain ) ! { PyObject* args = Py_BuildValue( "(N)", getPyObject() ); result = cPythonScript::callChainedEventHandler( EVENT_SHOWSKILLGUMP, scriptChain, args ); Py_DECREF( args ); } ! return result; } --- 2519,2528 ---- if ( scriptChain ) ! { PyObject* args = Py_BuildValue( "(N)", getPyObject() ); result = cPythonScript::callChainedEventHandler( EVENT_SHOWSKILLGUMP, scriptChain, args ); Py_DECREF( args ); } ! return result; } *************** *** 2794,2798 **** // stores the time and the murderer's name if ( pKiller ) { ! corpse->setMurderer( pKiller->serial() ); } --- 2794,2798 ---- // stores the time and the murderer's name if ( pKiller ) { ! corpse->setMurderer( pKiller->serial() ); } Index: basedef.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basedef.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** basedef.h 2 Jun 2004 15:04:03 -0000 1.9 --- basedef.h 5 Jul 2004 18:33:19 -0000 1.10 *************** *** 61,65 **** void load(); void reset(); ! public: cCharBaseDef( const QCString& id ); ~cCharBaseDef(); --- 61,65 ---- void load(); void reset(); ! public: cCharBaseDef( const QCString& id ); ~cCharBaseDef(); *************** *** 168,172 **** typedef QMap<QCString, cCharBaseDef*> Container; typedef Container::iterator Iterator; ! Container definitions; public: cCharBaseDefs(); --- 168,172 ---- typedef QMap<QCString, cCharBaseDef*> Container; typedef Container::iterator Iterator; ! Container definitions; public: cCharBaseDefs(); Index: basechar.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** basechar.h 19 Jun 2004 02:06:51 -0000 1.72 --- basechar.h 5 Jul 2004 18:33:19 -0000 1.73 *************** *** 75,79 **** enum enLayer { ! TradeWindow = 0, SingleHandedWeapon, DualHandedWeapon, --- 75,79 ---- enum enLayer { ! TradeWindow = 0, SingleHandedWeapon, DualHandedWeapon, *************** *** 84,93 **** Gloves, Ring, ! Neck = 0xA, Hair, Waist, InnerTorso, Bracelet, ! FacialHair = 0x10, MiddleTorso, Earrings, --- 84,93 ---- Gloves, Ring, ! Neck = 0xA, Hair, Waist, InnerTorso, Bracelet, ! FacialHair = 0x10, MiddleTorso, Earrings, *************** *** 108,112 **** enum enBark { ! Bark_Attacking = 0, Bark_Idle, Bark_Hit, --- 108,112 ---- enum enBark { ! Bark_Attacking = 0, Bark_Idle, Bark_Hit, *************** *** 143,149 **** enum TimingEvents { ! EventCombat = 0x01, ! EventLight = 0x02, ! EventTime = 0x04, }; --- 143,149 ---- enum TimingEvents { ! EventCombat = 0x01, ! EventLight = 0x02, ! EventTime = 0x04, }; *************** *** 173,177 **** enum FightStatus { ! FightDenied = 0x00, FightStarted, FightContinued --- 173,177 ---- enum FightStatus { ! FightDenied = 0x00, FightStarted, FightContinued *************** *** 706,710 **** // current hitpoints of the char. // cOldChar::hp_ ! short hitpoints_; // Intelligence of the char. --- 706,710 ---- // current hitpoints of the char. // cOldChar::hp_ ! ushort hitpoints_; // Intelligence of the char. Index: corpse.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/corpse.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** corpse.cpp 2 Jul 2004 06:01:16 -0000 1.56 --- corpse.cpp 5 Jul 2004 18:33:20 -0000 1.57 *************** *** 295,299 **** character has been deleted or the owner of this corpse accidently died. */ ! else if (name == "murderer") { P_CHAR pChar = value.toChar(); --- 295,299 ---- character has been deleted or the owner of this corpse accidently died. */ ! else if (name == "murderer") { P_CHAR pChar = value.toChar(); *************** *** 303,309 **** murderer_ = INVALID_SERIAL; } ! } /* ! \property corpse.murdertime The time when the murder was comitted in seconds since the epoch (UNIX timestamp). */ --- 303,309 ---- murderer_ = INVALID_SERIAL; } ! } /* ! \property corpse.murdertime The time when the murder was comitted in seconds since the epoch (UNIX timestamp). */ Index: corpse.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/corpse.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** corpse.h 2 Jun 2004 15:04:04 -0000 1.23 --- corpse.h 5 Jul 2004 18:33:20 -0000 1.24 *************** *** 34,38 **** #include <qstring.h> - // System Includes #include <map> --- 34,37 ---- *************** *** 55,59 **** unsigned char direction_; // Direction the corpse is facing. uint murdertime_; // When the people has been killed ! SERIAL murderer_; // Who was the murderer QCString charbaseid_; --- 54,58 ---- unsigned char direction_; // Direction the corpse is facing. uint murdertime_; // When the people has been killed ! SERIAL murderer_; // Who was the murderer QCString charbaseid_; *************** *** 89,93 **** SERIAL murderer() const; unsigned int murderTime() const; ! void addEquipment( UINT8 layer, SERIAL serial ); SERIAL getEquipment( UINT8 layer ); --- 88,92 ---- SERIAL murderer() const; unsigned int murderTime() const; ! void addEquipment( UINT8 layer, SERIAL serial ); SERIAL getEquipment( UINT8 layer ); *************** *** 191,195 **** } ! inline const QCString &cCorpse::charBaseid() const { return charbaseid_; --- 190,194 ---- } ! inline const QCString &cCorpse::charBaseid() const { return charbaseid_; Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.239 retrieving revision 1.240 diff -C2 -d -r1.239 -r1.240 *** commands.cpp 5 Jul 2004 14:03:15 -0000 1.239 --- commands.cpp 5 Jul 2004 18:33:19 -0000 1.240 *************** *** 26,30 **** */ - #include "accounts.h" #include "skills.h" --- 26,29 ---- *************** *** 1397,1430 **** stCommand cCommands::commands[] = { ! { "ACCOUNT", commandAccount }, ! { "ADDEVENT", commandAddEvent }, { "ALLMOVE", commandAllMove }, ! { "ALLSHOW", commandAllShow }, ! { "ALLSKILLS", commandAllSkills }, ! { "BROADCAST", commandBroadcast }, ! { "DOORGEN", commandDoorGenerator }, ! { "FIX", commandFix }, ! { "GMTALK", commandGmtalk }, ! { "INVIS", commandInvis }, ! { "KILL", commandKill }, ! { "MOVE", commandMove }, ! { "PAGES", commandPages }, ! { "PAGENOTIFY", commandPageNotify }, ! { "PASSWORD", commandPassword }, ! { "RELOAD", commandReload }, ! { "REMOVE", commandRemove }, ! { "REMOVEEVENT", commandRemoveEvent }, ! { "RESEND", commandResend }, ! { "RESTOCK", commandRestock }, ! { "RESURRECT", commandResurrect }, ! { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, ! { "SET", commandSet }, ! { "SHOW", commandShow }, ! { "SHUTDOWN", commandShutDown }, ! { "STAFF", commandStaff }, ! { "SPAWNREGION", commandSpawnRegion }, { "TELE", commandTele }, ! { "WHO", commandWho }, { NULL, NULL } }; --- 1396,1429 ---- stCommand cCommands::commands[] = { ! { "ACCOUNT", commandAccount }, ! { "ADDEVENT", commandAddEvent }, { "ALLMOVE", commandAllMove }, ! { "ALLSHOW", commandAllShow }, ! { "ALLSKILLS", commandAllSkills }, ! { "BROADCAST", commandBroadcast }, ! { "DOORGEN", commandDoorGenerator }, ! { "FIX", commandFix }, ! { "GMTALK", commandGmtalk }, ! { "INVIS", commandInvis }, ! { "KILL", commandKill }, ! { "MOVE", commandMove }, ! { "PAGES", commandPages }, ! { "PAGENOTIFY", commandPageNotify }, ! { "PASSWORD", commandPassword }, ! { "RELOAD", commandReload }, ! { "REMOVE", commandRemove }, ! { "REMOVEEVENT", commandRemoveEvent }, ! { "RESEND", commandResend }, ! { "RESTOCK", commandRestock }, ! { "RESURRECT", commandResurrect }, ! { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, ! { "SET", commandSet }, ! { "SHOW", commandShow }, ! { "SHUTDOWN", commandShutDown }, ! { "STAFF", commandStaff }, ! { "SPAWNREGION", commandSpawnRegion }, { "TELE", commandTele }, ! { "WHO", commandWho }, { NULL, NULL } }; |
From: Richard M. <dr...@us...> - 2004-07-05 18:23:22
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6216 Modified Files: defines.h definitions.cpp guilds.cpp items.cpp items.h log.h Log Message: Whitespace cleanup... I actually fixed a few warnings Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.421 retrieving revision 1.422 diff -C2 -d -r1.421 -r1.422 *** items.cpp 2 Jul 2004 06:01:16 -0000 1.421 --- items.cpp 5 Jul 2004 18:23:06 -0000 1.422 *************** *** 1503,1507 **** } - void cItem::addItem( cItem* pItem, bool randomPos, bool handleWeight, bool noRemove ) { --- 1503,1506 ---- *************** *** 1992,2000 **** */ else ! GET_PROPERTY( "lightsource", lightsource() ) /* \rproperty item.decaydelay The decay delay for this item in miliseconds. ! This is 0 if the item won't decay. */ else --- 1991,1999 ---- */ else ! GET_PROPERTY( "lightsource", lightsource() ) /* \rproperty item.decaydelay The decay delay for this item in miliseconds. ! This is 0 if the item won't decay. */ else Index: defines.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/defines.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** defines.h 2 Jul 2004 06:01:16 -0000 1.55 --- defines.h 5 Jul 2004 18:23:06 -0000 1.56 *************** *** 29,33 **** #define __DEFINES_H__ - //o---------------------------------------------------------------------------o // FIXMEs / TODOs / NOTE macros --- 29,32 ---- *************** *** 73,77 **** enum eSkills { ! ALCHEMY = 0, ANATOMY, ANIMALLORE, --- 72,76 ---- enum eSkills { ! ALCHEMY = 0, ANATOMY, ANIMALLORE, Index: items.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.h,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -d -r1.203 -r1.204 *** items.h 3 Jun 2004 19:45:28 -0000 1.203 --- items.h 5 Jul 2004 18:23:12 -0000 1.204 *************** *** 45,49 **** /* ! This class represents an item definition and it's static properties. */ --- 45,49 ---- /* ! This class represents an item definition and it's static properties. */ *************** *** 66,70 **** void load(); void reset(); ! public: cItemBaseDef( const QCString& id ); ~cItemBaseDef(); --- 66,70 ---- void load(); void reset(); ! public: cItemBaseDef( const QCString& id ); ~cItemBaseDef(); *************** *** 207,211 **** { return priv_ & 0x20; ! } // Is the weapon twohanded ? bool secured() const { --- 207,211 ---- { return priv_ & 0x20; ! } // Is the weapon twohanded ? bool secured() const { *************** *** 215,219 **** { return priv_ & 0x10; ! } // Does this armor allow meditation? SI16 hp() const { --- 215,219 ---- { return priv_ & 0x10; ! } // Does this armor allow meditation? SI16 hp() const { *************** *** 290,294 **** } ! inline unsigned char lightsource() { return basedef_ ? basedef_->lightsource() : 0; --- 290,294 ---- } ! inline unsigned char lightsource() { return basedef_ ? basedef_->lightsource() : 0; Index: guilds.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/guilds.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** guilds.cpp 2 Jul 2004 13:35:36 -0000 1.15 --- guilds.cpp 5 Jul 2004 18:23:06 -0000 1.16 *************** *** 365,369 **** { PyObject_HEAD_INIT( NULL ) ! 0, "guild", sizeof( wpGuildType ), 0, wpDealloc, 0, ( getattrfunc ) wpGuild_getAttr, ( setattrfunc ) wpGuild_setAttr, wpGuild_compare, }; --- 365,369 ---- { PyObject_HEAD_INIT( NULL ) ! 0, "guild", sizeof( wpGuildType ), 0, wpDealloc, 0, ( getattrfunc ) wpGuild_getAttr, ( setattrfunc ) wpGuild_setAttr, wpGuild_compare, }; *************** *** 732,736 **** } /* ! \property guild.serial This is the unique integer id for this guild. It can be used to retrieve a guild object by using the wolfpack.findguild function. */ --- 732,736 ---- } /* ! \property guild.serial This is the unique integer id for this guild. It can be used to retrieve a guild object by using the wolfpack.findguild function. */ Index: definitions.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/definitions.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** definitions.cpp 19 Jun 2004 07:37:53 -0000 1.9 --- definitions.cpp 5 Jul 2004 18:23:06 -0000 1.10 *************** *** 66,74 **** stCategory categories[] = { ! { "item", WPDT_ITEM }, ! { "script", WPDT_SCRIPT }, { "npc", WPDT_NPC }, ! { "list", WPDT_LIST }, ! { "menu", WPDT_MENU }, { "spell", WPDT_SPELL }, { "acl", WPDT_PRIVLEVEL }, --- 66,74 ---- stCategory categories[] = { ! { "item", WPDT_ITEM }, ! { "script", WPDT_SCRIPT }, { "npc", WPDT_NPC }, ! { "list", WPDT_LIST }, ! { "menu", WPDT_MENU }, { "spell", WPDT_SPELL }, { "acl", WPDT_PRIVLEVEL }, *************** *** 76,92 **** { "region", WPDT_REGION }, { "multi", WPDT_MULTI }, ! { "text", WPDT_TEXT }, { "startitems", WPDT_STARTITEMS }, { "location", WPDT_LOCATION }, ! { "skill", WPDT_SKILL }, { "action", WPDT_ACTION }, { "make", WPDT_MAKESECTION }, ! { "makeitem", WPDT_MAKEITEM }, { "useitem", WPDT_USEITEM }, ! { "skillcheck", WPDT_SKILLCHECK }, ! { "define", WPDT_DEFINE }, ! { "resource", WPDT_RESOURCE }, ! { "contextmenu", WPDT_CONTEXTMENU }, ! { "ai", WPDT_AI }, { 0, WPDT_COUNT }, }; --- 76,93 ---- { "region", WPDT_REGION }, { "multi", WPDT_MULTI }, ! { "text", WPDT_TEXT }, { "startitems", WPDT_STARTITEMS }, { "location", WPDT_LOCATION }, ! { "skill", WPDT_SKILL }, { "action", WPDT_ACTION }, { "make", WPDT_MAKESECTION }, ! { "makeitem", WPDT_MAKEITEM }, { "useitem", WPDT_USEITEM }, ! { "skillcheck", WPDT_SKILLCHECK }, ! { "define", WPDT_DEFINE }, ! { "resource", WPDT_RESOURCE }, ! { "contextmenu", WPDT_CONTEXTMENU }, ! { "ai", WPDT_AI }, ! { 0, WPDT_COUNT }, }; *************** *** 730,738 **** PyObject_HEAD_INIT( NULL ) 0, ! "element", ! sizeof( wpElementType ), ! 0, ! wpDealloc, ! 0, ( getattrfunc ) wpElement_getAttr }; --- 731,739 ---- PyObject_HEAD_INIT( NULL ) 0, ! "element", ! sizeof( wpElementType ), ! 0, ! wpDealloc, ! 0, ( getattrfunc ) wpElement_getAttr }; Index: log.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/log.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** log.h 2 Jun 2004 15:04:06 -0000 1.9 --- log.h 5 Jul 2004 18:23:12 -0000 1.10 *************** *** 41,52 **** enum eLogLevel { ! LOG_MESSAGE = 0x01, ! LOG_ERROR = 0x02, ! LOG_PYTHON = 0x04, ! LOG_WARNING = 0x08, ! LOG_NOTICE = 0x10, ! LOG_TRACE = 0x20, ! LOG_DEBUG = 0x40, ! LOG_ALL = 0xFF }; --- 41,52 ---- enum eLogLevel { ! LOG_MESSAGE = 0x01, ! LOG_ERROR = 0x02, ! LOG_PYTHON = 0x04, ! LOG_WARNING = 0x08, ! LOG_NOTICE = 0x10, ! LOG_TRACE = 0x20, ! LOG_DEBUG = 0x40, ! LOG_ALL = 0xFF }; |
From: Sebastian H. <dar...@us...> - 2004-07-05 14:03:25
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23605 Modified Files: commands.cpp gumps.cpp gumps.h targetrequests.h Log Message: Removed outdated .tags command. Index: targetrequests.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/targetrequests.h,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** targetrequests.h 2 Jul 2004 06:01:18 -0000 1.68 --- targetrequests.h 5 Jul 2004 14:03:16 -0000 1.69 *************** *** 417,453 **** }; - class cTagsInfoTarget : public cTargetRequest - { - public: - cTagsInfoTarget() - { - } - - virtual bool responsed( cUOSocket* socket, cUORxTarget* target ) - { - if ( isCharSerial( target->serial() ) ) - { - P_CHAR pChar = FindCharBySerial( target->serial() ); - if ( pChar ) - { - cTagsInfoGump* pGump = new cTagsInfoGump( pChar ); - socket->send( pGump ); - } - return true; - } - else if ( isItemSerial( target->serial() ) ) - { - P_ITEM pItem = FindItemBySerial( target->serial() ); - if ( pItem ) - { - cTagsInfoGump* pGump = new cTagsInfoGump( pItem ); - socket->send( pGump ); - } - return true; - } - return false; - } - }; - class cAddEventTarget : public cTargetRequest { --- 417,420 ---- Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.238 retrieving revision 1.239 diff -C2 -d -r1.238 -r1.239 *** commands.cpp 15 Jun 2004 02:44:43 -0000 1.238 --- commands.cpp 5 Jul 2004 14:03:15 -0000 1.239 *************** *** 749,835 **** /* - \command tags - \description Manage the tags for an object. - \usage - <code>tags set [key] [value]</code> - - <code>tags set [key] [value] string</code> - - <code>tags set [key] [value] value</code> - Key denotes the name of the tag you want to set, remove or view. - Value is the value of the new tag. If you specify 'value' as the last - parameter, the tag will be evaluated and set as an integer. - The set subcommand will attach a new tag or change an existing tag. - The get subcommand will show the value of a tag attached to the object. - The remove subcommand will remove a tag from the object. - The info subcommand will show a dialog with all attached tags. - - \notes The remove subcommand also accepts <i>all</i> as the key which will - remove all attached tags from the object. - */ - void commandTags( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( command ); - // Tags set <key> <value> (as string/value) - // Tags get <key> - // Tags remove <key> or all - // Tags info - - if ( args.count() == 0 ) - { - socket->sysMessage( tr( "Usage: tags <set|get|remove|info>" ) ); - return; - } - - QString subCommand = args[0].lower(); - - // set - if ( subCommand == "set" ) - { - if ( args.count() < 3 ) - { - socket->sysMessage( tr( "Usage: tags set <key> <value> (as value/string)" ) ); - } - else - { - UINT8 type = 0; // 0 - string, 1 - value - if ( args.count() == 5 ) - { - if ( args[4].lower() == "value" ) - type = 1; - } - socket->sysMessage( tr( "Please select a target" ) ); - socket->attachTarget( new cSetTagTarget( args[1], args[2], type ) ); - } - } - if ( subCommand == "get" ) - { - if ( args.count() < 2 ) - { - socket->sysMessage( tr( "Usage tags get <key>" ) ); - } - else - { - socket->sysMessage( tr( "Please select a target" ) ); - socket->attachTarget( new cGetTagTarget( args[1] ) ); - } - } - if ( subCommand == "remove" ) - { - if ( args.count() < 2 ) - { - socket->sysMessage( tr( "Usage tags remove <key>" ) ); - } - else - { - socket->sysMessage( tr( "Please select a target" ) ); - socket->attachTarget( new cRemoveTagTarget( args[1] ) ); - } - } - if ( subCommand == "info" ) - { - socket->sysMessage( tr( "Please select a target" ) ); - socket->attachTarget( new cTagsInfoTarget() ); - } - } - - /* \command who \description Manage connected clients. --- 749,752 ---- *************** *** 1480,1483 **** stCommand cCommands::commands[] = { ! { "ACCOUNT", commandAccount }, { "ADDEVENT", commandAddEvent }, { "ALLMOVE", commandAllMove }, { "ALLSHOW", commandAllShow }, { "ALLSKILLS", commandAllSkills }, { "BROADCAST", commandBroadcast }, { "DOORGEN", commandDoorGenerator }, { "FIX", commandFix }, { "GMTALK", commandGmtalk }, { "INVIS", commandInvis }, { "KILL", commandKill }, { "MOVE", commandMove }, { "PAGES", commandPages }, { "PAGENOTIFY", commandPageNotify }, { "PASSWORD", commandPassword }, { "RELOAD", commandReload }, { "REMOVE", commandRemove }, { "REMOVEEVENT", commandRemoveEvent }, { "RESEND", commandResend }, { "RESTOCK", commandRestock }, { "RESURRECT", commandResurrect }, { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, { "SET", commandSet }, { "SHOW", commandShow }, { "SHUTDOWN", commandShutDown }, { "STAFF", commandStaff }, { "SPAWNREGION", commandSpawnRegion }, { "TAGS", commandTags }, { "TELE", commandTele }, { "WHO", commandWho }, { NULL, NULL } }; --- 1397,1430 ---- stCommand cCommands::commands[] = { ! { "ACCOUNT", commandAccount }, ! { "ADDEVENT", commandAddEvent }, ! { "ALLMOVE", commandAllMove }, ! { "ALLSHOW", commandAllShow }, ! { "ALLSKILLS", commandAllSkills }, ! { "BROADCAST", commandBroadcast }, ! { "DOORGEN", commandDoorGenerator }, ! { "FIX", commandFix }, ! { "GMTALK", commandGmtalk }, ! { "INVIS", commandInvis }, ! { "KILL", commandKill }, ! { "MOVE", commandMove }, ! { "PAGES", commandPages }, ! { "PAGENOTIFY", commandPageNotify }, ! { "PASSWORD", commandPassword }, ! { "RELOAD", commandReload }, ! { "REMOVE", commandRemove }, ! { "REMOVEEVENT", commandRemoveEvent }, ! { "RESEND", commandResend }, ! { "RESTOCK", commandRestock }, ! { "RESURRECT", commandResurrect }, ! { "SAVE", commandSave }, ! { "SERVERTIME", commandServerTime }, ! { "SET", commandSet }, ! { "SHOW", commandShow }, ! { "SHUTDOWN", commandShutDown }, ! { "STAFF", commandStaff }, ! { "SPAWNREGION", commandSpawnRegion }, ! { "TELE", commandTele }, ! { "WHO", commandWho }, ! { NULL, NULL } }; Index: gumps.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** gumps.cpp 15 Jun 2004 02:44:43 -0000 1.165 --- gumps.cpp 5 Jul 2004 14:03:16 -0000 1.166 *************** *** 192,262 **** } - cTagsInfoGump::cTagsInfoGump( const cUObject* object ) : object_( const_cast<cUObject*>( object ) ) - { - if ( object ) - { - QStringList allkeys = object->getTags(); - - UINT32 page_ = 0; - UINT32 numkeys = allkeys.size(); - UINT32 pages = ( ( UINT32 ) ceil( ( double ) numkeys / 10.0f ) ); - - startPage(); - // Basic .INFO Header - addResizeGump( 0, 40, 0xA28, 450, 420 ); //Background - addGump( 105, 18, 0x58B ); // Fancy top-bar - addGump( 182, 0, 0x589 ); // "Button" like gump - addTilePic( 202, 23, 0x14eb ); // Type of info menu - addText( 190, 90, tr( "Tags Info" ), 0x530 ); - - // OK button - addButton( 50, 410, 0xF9, 0xF8, 0 ); // Only Exit possible - - for ( page_ = 1; page_ <= pages; page_++ ) - { - startPage( page_ ); - - UINT32 i; - UINT32 right = page_ * 19 - 1; - UINT32 left = page_ * 19 - 19; - if ( numkeys <= right ) - right = numkeys - 1; - - QStringList keys = QStringList(); - QStringList::const_iterator it = allkeys.at( left ); - while ( it != allkeys.at( right + 1 ) ) - { - keys.push_back( ( *it ) ); - it++; - } - UINT32 thiskeys = keys.size(); - - for ( i = 0; i < thiskeys; i++ ) - { - addText( 50, 120 + i * 20, tr( "Tag \"%1\": %2" ).arg( keys[i] ).arg( object->getTag( keys[i] ).toString() ), 0x834 ); - } - - addText( 310, 410, tr( "Page %1 of %2" ).arg( page_ ).arg( pages ), 0x834 ); - if ( page_ > 1 ) // previous page - addPageButton( 270, 410, 0x0FC, 0x0FC, page_ - 1 ); - - if ( page_ < pages ) // next page - addPageButton( 290, 410, 0x0FA, 0x0FA, page_ + 1 ); - } - } - } - - void cTagsInfoGump::handleResponse( cUOSocket* socket, const gumpChoice_st& choice ) - { - if ( choice.button == 0 ) - return; - - if ( object_ ) - { - cTagsInfoGump* pGump = new cTagsInfoGump( object_ ); - socket->send( pGump ); - } - } - cWhoMenuGump::cWhoMenuGump( UINT32 page ) { --- 192,195 ---- Index: gumps.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/gumps.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** gumps.h 2 Jun 2004 15:04:05 -0000 1.40 --- gumps.h 5 Jul 2004 14:03:16 -0000 1.41 *************** *** 252,266 **** }; - class cTagsInfoGump : public cGump - { - protected: - cUObject* object_; - - public: - cTagsInfoGump( const cUObject* object_ ); - - virtual void handleResponse( cUOSocket* socket, const gumpChoice_st& choice ); - }; - class cWhoMenuGump : public cGump { --- 252,255 ---- |
From: Sebastian H. <dar...@us...> - 2004-07-05 12:56:04
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10542/webroot Modified Files: ChangeLog.wolfpack Log Message: Taginfo command and wolfpack.findobject function Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog.wolfpack 5 Jul 2004 12:55:16 -0000 1.4 --- ChangeLog.wolfpack 5 Jul 2004 12:55:55 -0000 1.5 *************** *** 9,12 **** --- 9,13 ---- * Python Script Changes: - New Command: taginfo + - New Function: wolfpack.findobject(serial) * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-07-05 12:55:45
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10481/commands Modified Files: skillinfo.py tags.py Log Message: Taginfo command and wolfpack.findobject function Index: tags.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/tags.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tags.py 26 May 2004 13:07:21 -0000 1.2 --- tags.py 5 Jul 2004 12:55:35 -0000 1.3 *************** *** 24,30 **** --- 24,175 ---- """ + """ + \command taginfo + \description This command shows a menu with all tags assigned to the + targetted object. + \usage - <code>taginfo</code> + """ + import wolfpack from wolfpack.utilities import hex2dec + from wolfpack.gumps import cGump + from wolfpack.consts import * + def taginfo_callback(player, tagnames, response): + if response.button != 1: + return + + object = wolfpack.findobject(tagnames[0]) + if not object: + return + tagnames = tagnames[1:] + + switches = response.switches + for i in range(0, len(tagnames)): + # Should the tag be deleted? + if i * 2 + 1 in switches: + oldvalue = object.gettag(tagnames[i]) + player.log(LOG_MESSAGE, u"Deleting tag '%s' from object 0x%x. Was: '%s' (%s).\n" % \ + (tagnames[i], object.serial, unicode(oldvalue), type(oldvalue).__name__)) + object.deltag(tagnames[i]) + continue + + if response.text.has_key(i * 2 + 0) and response.text.has_key(i * 2 + 1): + # Get value and name of the tag + name = response.text[i * 2] + value = response.text[i * 2 + 1] + + # Should the value be interpreted as a number? + if i * 2 in switches: + if '.' in value or ',' in value: + try: + value = float(value) + except: + player.socket.sysmessage("Invalid floating point value for tag '%s': '%s'." % (name, value)) + continue # Skip to next tag + else: + try: + value = int(value) + except: + player.socket.sysmessage("Invalid integer value for tag '%s': '%s'." % (name, value)) + continue # Skip to next tag + + try: + name = str(name) + except: + player.socket.sysmessage("Invalid tagname: '%s'." % name) + continue # Skip to next tag + + # Set the new tag value for the player + oldvalue = object.gettag(tagnames[i]) + change = (name != tagnames[i]) or (type(oldvalue) != type(value)) or (oldvalue != value) + + if change: + player.log(LOG_MESSAGE, u"Settings tag '%s' on object 0x%x to '%s' (%s).\n" % (unicode(name), object.serial, unicode(value), type(value).__name__)) + object.deltag(tagnames[i]) + object.settag(name, value) + + def taginfo_response(player, arguments, target): + if target.char: + object = target.char + elif target.item: + object = target.item + else: + player.socket.sysmessage('You have to target an item or a character.') + return + + tags = object.tags + + dialog = wolfpack.gumps.cGump() + dialog.setCallback("commands.tags.taginfo_callback") + dialog.setArgs([object.serial] + tags) + + dialog.startPage(0) + dialog.addResizeGump(35, 12, 9260, 460, 504) + dialog.addGump(1, 12, 10421, 0) + dialog.addGump(30, -1, 10420, 0) + dialog.addResizeGump(66, 40, 9200, 405, 65) + dialog.addText(108, 52, "Wolfpack Taginfo Command", 2100) + dialog.addTiledGump(90, 11, 164, 17, 10250, 0) + dialog.addGump(474, 12, 10431, 0) + dialog.addGump(439, -1, 10430, 0) + dialog.addGump(14, 200, 10422, 0) + dialog.addGump(468, 200, 10432, 0) + dialog.addGump(249, 11, 10254, 0) + dialog.addGump(74, 45, 10464, 0) + dialog.addGump(435, 45, 10464, 0) + dialog.addGump(461, 408, 10412, 0) + dialog.addGump(-15, 408, 10402, 0) + dialog.addTiledGump(281, 11, 158, 17, 10250, 0) + dialog.addGump(265, 11, 10252, 0) + dialog.addButton(60, 476, 247, 248, 1) + dialog.addButton(136, 476, 242, 241, 0) + + # This is a group + count = (len(tags) + 3) / 4 + + for i in range(0, count): + page = i + 1 + dialog.startPage(page) + + if page > 1: + dialog.addText(88, 445, "Previous Page", 2100) + dialog.addPageButton(59, 444, 9909, 9911, page - 1) + + if page < count: + dialog.addText(376, 445, "Next Page", 2100) + dialog.addPageButton(448, 445, 9903, 9905, page + 1) + + for j in range(0, 4): + tagid = i * 4 + j + if tagid >= len(tags): + continue + + tag = tags[tagid] + value = object.gettag(tag) + yoffset = j * 80 + dialog.addResizeGump(65, 109 + yoffset, 9200, 405, 68) + dialog.addText(78, 117 + yoffset, "Name", 2100) + dialog.addText(78, 146 + yoffset, "Value", 2100) + dialog.addResizeGump(123, 144 + yoffset, 9300, 250, 26) + dialog.addInputField(129, 147 + yoffset, 240, 20, 2100, tagid * 2 + 1, unicode(value)) + dialog.addResizeGump(123, 115 + yoffset, 9300, 250, 26) + dialog.addInputField(128, 118 + yoffset, 240, 20, 2100, tagid * 2 + 0, tag) + + dialog.addCheckbox(380, 118 + yoffset, 208, 209, tagid * 2 + 1, 0) + dialog.addText(405, 118 + yoffset, "Delete", 2100) + + dialog.addCheckbox(380, 147 + yoffset, 208, 209, tagid * 2 + 0, type(value) == float or type(value) == int) + dialog.addText(405, 147 + yoffset, "Number", 2100) + + dialog.send(player) + + # + # Tag info + # + def commandTaginfo(socket, command, arguments): + socket.sysmessage("Select an object you want to use this command on.") + socket.attachtarget("commands.tags.taginfo_response", []) + # # Target response *************** *** 38,47 **** return ! target.char.settag(name, value) ! target.char.resendtooltip() player.socket.sysmessage('You modify the tag of the character.') elif target.item: ! target.item.settag(name, value) ! target.item.resendtooltip() player.socket.sysmessage('You modify the tag of the item.') --- 183,209 ---- return ! if not target.char.hastag(name): ! change = 1 ! else: ! oldvalue = target.char.gettag(name) ! change = (type(oldvalue) != type(value)) or (oldvalue != value) ! ! if change: ! player.log(LOG_MESSAGE, u"Settings tag '%s' on object 0x%x to '%s' (%s).\n" % (unicode(name), target.char.serial, unicode(value), type(value).__name__)) ! target.char.settag(name, value) ! target.char.resendtooltip() player.socket.sysmessage('You modify the tag of the character.') elif target.item: ! if not target.item.hastag(name): ! change = 1 ! else: ! oldvalue = target.item.gettag(name) ! change = (type(oldvalue) != type(value)) or (oldvalue != value) ! ! if change: ! player.log(LOG_MESSAGE, u"Settings tag '%s' on object 0x%x to '%s' (%s).\n" % (unicode(name), target.item.serial, unicode(value), type(value).__name__)) ! target.item.settag(name, value) ! target.item.resendtooltip() ! player.socket.sysmessage('You modify the tag of the item.') *************** *** 72,76 **** socket.sysmessage('You specified an invalid floating point value.') return ! elif argtype != 'string': socket.sysmessage('Usage: settag name (int|string|float) value...') return --- 234,240 ---- socket.sysmessage('You specified an invalid floating point value.') return ! elif argtype == 'string': ! value = unicode(value) ! else: socket.sysmessage('Usage: settag name (int|string|float) value...') return *************** *** 92,95 **** --- 256,262 ---- player.socket.sysmessage("This character has no tag named '%s'." % name) else: + oldvalue = target.char.gettag(name) + player.log(LOG_MESSAGE, u"Deleting tag '%s' from object 0x%x. Was: '%s' (%s).\n" % \ + (name, target.char.serial, unicode(oldvalue), type(oldvalue).__name__)) target.char.deltag(name) target.char.resendtooltip() *************** *** 99,102 **** --- 266,272 ---- player.socket.sysmessage("This item has no tag named '%s'." % name) else: + oldvalue = target.item.gettag(name) + player.log(LOG_MESSAGE, u"Deleting tag '%s' from object 0x%x. Was: '%s' (%s).\n" % \ + (name, target.item.serial, unicode(oldvalue), type(oldvalue).__name__)) target.item.deltag(name) target.item.resendtooltip() *************** *** 171,172 **** --- 341,343 ---- wolfpack.registercommand('gettag', commandGettag) wolfpack.registercommand('deltag', commandDeltag) + wolfpack.registercommand('taginfo', commandTaginfo) \ No newline at end of file Index: skillinfo.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/skillinfo.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** skillinfo.py 2 Jul 2004 13:40:45 -0000 1.3 --- skillinfo.py 5 Jul 2004 12:55:35 -0000 1.4 *************** *** 16,47 **** # def response(player, arguments, response): ! if response.button == 0: ! return ! target = wolfpack.findchar(arguments[0]) ! if not target: ! return ! # Iterate trough all skills and see what changed ! for skill in range(0, ALLSKILLS): ! try: ! newvalue = int(floor(float(response.text[0x1000 | skill]) * 10)) ! newcap = int(floor(float(response.text[0x2000 | skill]) * 10)) ! except: ! player.socket.sysmessage('You have entered invalid values for %s.' % SKILLNAMES[skill]) ! return ! oldvalue = target.skill[skill] ! oldcap = target.skillcap[skill] ! if oldvalue != newvalue or oldcap != newcap: ! message = "Changed %s for character 0x%x to value %u [%d] and cap %u [%d].\n" ! message = message % (SKILLNAMES[skill], target.serial, newvalue, newvalue - oldvalue, newcap, newcap - oldcap) ! player.log(LOG_MESSAGE, message) ! player.socket.sysmessage(message) ! target.skill[skill] = newvalue ! target.skillcap[skill] = newcap # --- 16,47 ---- # def response(player, arguments, response): ! if response.button == 0: ! return ! target = wolfpack.findchar(arguments[0]) ! if not target: ! return ! # Iterate trough all skills and see what changed ! for skill in range(0, ALLSKILLS): ! try: ! newvalue = int(floor(float(response.text[0x1000 | skill]) * 10)) ! newcap = int(floor(float(response.text[0x2000 | skill]) * 10)) ! except: ! player.socket.sysmessage('You have entered invalid values for %s.' % SKILLNAMES[skill]) ! return ! oldvalue = target.skill[skill] ! oldcap = target.skillcap[skill] ! if oldvalue != newvalue or oldcap != newcap: ! message = "Changed %s for character 0x%x to value %u [%d] and cap %u [%d].\n" ! message = message % (SKILLNAMES[skill], target.serial, newvalue, newvalue - oldvalue, newcap, newcap - oldcap) ! player.log(LOG_MESSAGE, message) ! player.socket.sysmessage(message) ! target.skill[skill] = newvalue ! target.skillcap[skill] = newcap # *************** *** 49,118 **** # def callback(player, arguments, target): ! if not target.char: ! return ! dialog = wolfpack.gumps.cGump() ! dialog.setCallback("commands.skillinfo.response") ! dialog.setArgs([target.char.serial]) ! dialog.startPage(0) ! dialog.addResizeGump(35, 12, 9260, 460, 504) ! dialog.addGump(1, 12, 10421, 0) ! dialog.addGump(30, -1, 10420, 0) ! dialog.addResizeGump(66, 40, 9200, 405, 65) ! dialog.addText(108, 52, "Wolfpack Skillinfo Command", 2100) ! dialog.addTiledGump(90, 11, 164, 17, 10250, 0) ! dialog.addGump(474, 12, 10431, 0) ! dialog.addGump(439, -1, 10430, 0) ! dialog.addGump(14, 200, 10422, 0) ! dialog.addGump(468, 200, 10432, 0) ! dialog.addGump(249, 11, 10254, 0) ! dialog.addGump(74, 45, 10464, 0) ! dialog.addGump(435, 45, 10464, 0) ! dialog.addGump(461, 408, 10412, 0) ! dialog.addGump(-15, 408, 10402, 0) ! dialog.addTiledGump(281, 11, 158, 17, 10250, 0) ! dialog.addGump(265, 11, 10252, 0) ! dialog.addButton(60, 476, 247, 248, 1) ! dialog.addButton(136, 476, 242, 241, 0) ! pages = int(ceil(ALLSKILLS / 5.0)) ! for page in range(1, pages + 1): ! dialog.startPage(page) ! if page > 1: ! dialog.addPageButton(60, 444, 9909, 9911, page - 1) ! dialog.addText(88, 444, "Previous Page", 2100) ! if page < pages: ! dialog.addPageButton(448, 444, 9903, 9905, page + 1) ! dialog.addText(376, 448, "Next Page", 2100) ! yoffset = 0 ! for i in range(0, 5): ! skill = (page - 1) * 5 + i ! if skill >= ALLSKILLS: ! break ! skillname = SKILLNAMES[skill] ! skillname = skillname[0].upper() + skillname[1:] ! dialog.addResizeGump(65, 109 + yoffset, 9200, 405, 62) ! dialog.addText(76, 115 + yoffset, "Skill: %s (%u)" % (skillname, skill), 2100) ! dialog.addResizeGump(123, 135 + yoffset, 9300, 63, 26) ! dialog.addText(76, 137 + yoffset, "Value:", 2100) ! dialog.addText(187, 138 + yoffset, "%", 2100) ! dialog.addInputField(128, 138 + yoffset, 50, 20, 2100, 0x1000 | skill, "%0.01f" % (target.char.skill[skill] / 10.0)) ! dialog.addText(232, 138 + yoffset, "Cap:", 2100) ! dialog.addText(329, 139 + yoffset, "%", 2100) ! dialog.addResizeGump(264, 135 + yoffset, 9300, 63, 26) ! dialog.addInputField(268, 139 + yoffset, 53, 20, 2100, 0x2000 | skill, "%0.01f" % (target.char.skillcap[skill] / 10.0)) ! yoffset += 65 ! dialog.send(player) # --- 49,119 ---- # def callback(player, arguments, target): ! if not target.char: ! return ! dialog = wolfpack.gumps.cGump() ! dialog.setCallback("commands.skillinfo.response") ! dialog.setArgs([target.char.serial]) ! dialog.startPage(0) ! dialog.addResizeGump(35, 12, 9260, 460, 504) ! dialog.addGump(1, 12, 10421, 0) ! dialog.addGump(30, -1, 10420, 0) ! dialog.addResizeGump(66, 40, 9200, 405, 65) ! dialog.addText(108, 52, "Wolfpack Skillinfo Command", 2100) ! dialog.addTiledGump(90, 11, 164, 17, 10250, 0) ! dialog.addGump(474, 12, 10431, 0) ! dialog.addGump(439, -1, 10430, 0) ! dialog.addGump(14, 200, 10422, 0) ! dialog.addGump(468, 200, 10432, 0) ! dialog.addGump(249, 11, 10254, 0) ! dialog.addGump(74, 45, 10464, 0) ! dialog.addGump(435, 45, 10464, 0) ! dialog.addGump(461, 408, 10412, 0) ! dialog.addGump(-15, 408, 10402, 0) ! dialog.addTiledGump(281, 11, 158, 17, 10250, 0) ! dialog.addGump(265, 11, 10252, 0) ! dialog.addButton(60, 476, 247, 248, 1) ! dialog.addButton(136, 476, 242, 241, 0) ! # 80 pixel diameter ! pages = int(ceil(ALLSKILLS / 5.0)) ! for page in range(1, pages + 1): ! dialog.startPage(page) ! if page > 1: ! dialog.addPageButton(60, 444, 9909, 9911, page - 1) ! dialog.addText(88, 444, "Previous Page", 2100) ! if page < pages: ! dialog.addPageButton(448, 444, 9903, 9905, page + 1) ! dialog.addText(376, 448, "Next Page", 2100) ! yoffset = 0 ! for i in range(0, 5): ! skill = (page - 1) * 5 + i ! if skill >= ALLSKILLS: ! break ! skillname = SKILLNAMES[skill] ! skillname = skillname[0].upper() + skillname[1:] ! dialog.addResizeGump(65, 109 + yoffset, 9200, 405, 62) ! dialog.addText(76, 115 + yoffset, "Skill: %s (%u)" % (skillname, skill), 2100) ! dialog.addResizeGump(123, 135 + yoffset, 9300, 63, 26) ! dialog.addText(76, 137 + yoffset, "Value:", 2100) ! dialog.addText(187, 138 + yoffset, "%", 2100) ! dialog.addInputField(128, 138 + yoffset, 50, 20, 2100, 0x1000 | skill, "%0.01f" % (target.char.skill[skill] / 10.0)) ! dialog.addText(232, 138 + yoffset, "Cap:", 2100) ! dialog.addText(329, 139 + yoffset, "%", 2100) ! dialog.addResizeGump(264, 135 + yoffset, 9300, 63, 26) ! dialog.addInputField(268, 139 + yoffset, 53, 20, 2100, 0x2000 | skill, "%0.01f" % (target.char.skillcap[skill] / 10.0)) ! yoffset += 65 ! dialog.send(player) # *************** *** 120,125 **** # def edit(socket, command, arguments): ! socket.sysmessage('Please select a character whose skills you want to view.') ! socket.attachtarget('commands.skillinfo.callback', []) # --- 121,126 ---- # def edit(socket, command, arguments): ! socket.sysmessage('Please select a character whose skills you want to view.') ! socket.attachtarget('commands.skillinfo.callback', []) # *************** *** 127,129 **** # def onLoad(): ! wolfpack.registercommand('skillinfo', edit) --- 128,130 ---- # def onLoad(): ! wolfpack.registercommand('skillinfo', edit) |
From: Sebastian H. <dar...@us...> - 2004-07-05 12:55:44
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10481/wolfpack Modified Files: __init__.py Log Message: Taginfo command and wolfpack.findobject function Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/__init__.py,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** __init__.py 3 Jul 2004 00:39:59 -0000 1.57 --- __init__.py 5 Jul 2004 12:55:35 -0000 1.58 *************** *** 65,66 **** --- 65,81 ---- #getoption = _wolfpack.getoption #setoption = _wolfpack.setoption + + """ + \function wolfpack.findobject + \param serial The serial number of the object. + \return An <object id="item">item</object>, <object id="char">char</object>, or None object. + \description This function tries to find an item or character with the given serial and + returns an object if either is found. Otherwise it returns None. + """ + def findobject(serial): + if serial == -1 or serial == 0: + return None + elif serial >= 0x40000000: + return finditem(serial) + else: + return findchar(serial) |
From: Sebastian H. <dar...@us...> - 2004-07-05 12:55:25
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10435/webroot Modified Files: ChangeLog.wolfpack Log Message: fixes for python gumps and tags Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog.wolfpack 4 Jul 2004 19:29:21 -0000 1.3 --- ChangeLog.wolfpack 5 Jul 2004 12:55:16 -0000 1.4 *************** *** 3,8 **** --- 3,12 ---- Wolfpack 12.9.8 Beta (CVS) * Core Changes: + - Gump Responses are now passed on as Unicode rather than in the + local codepage. + - Floating point tags are now saved correctly. * Definition Changes: * Python Script Changes: + - New Command: taginfo * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-07-05 12:53:08
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9978/python Modified Files: gump.h Log Message: fixes for python gumps and tags Index: gump.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/gump.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** gump.h 29 Jun 2004 22:22:59 -0000 1.19 --- gump.h 5 Jul 2004 12:52:58 -0000 1.20 *************** *** 67,74 **** for ( ; iter != textentries.end(); ++iter ) { ! if ( !iter->second.isEmpty() ) ! PyDict_SetItem( dict, PyInt_FromLong( iter->first ), PyString_FromString( iter->second.latin1() ) ); ! else ! PyDict_SetItem( dict, PyInt_FromLong( iter->first ), PyString_FromString( "" ) ); } --- 67,71 ---- for ( ; iter != textentries.end(); ++iter ) { ! PyDict_SetItem(dict, PyInt_FromLong(iter->first), QString2Python(iter->second)); } |
From: Sebastian H. <dar...@us...> - 2004-07-05 12:53:07
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9978 Modified Files: customtags.cpp Log Message: fixes for python gumps and tags Index: customtags.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/customtags.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** customtags.cpp 19 Jun 2004 02:06:51 -0000 1.48 --- customtags.cpp 5 Jul 2004 12:52:58 -0000 1.49 *************** *** 274,281 **** } ! static const int ntypes = 7; static const char* const type_map[ntypes] = { ! 0, "String", "Int", "Double", "BaseChar", "Item", "Coord" }; --- 274,281 ---- } ! static const int ntypes = 8; static const char* const type_map[ntypes] = { ! 0, "String", "Int", "Long", "Double", "BaseChar", "Item", "Coord" }; |