wpdev-commits Mailing List for Wolfpack Emu (Page 77)
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-16 21:01:16
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2037 Modified Files: world.cpp world.h Log Message: New wolfpack functions: playercount, npccount, accounts.count Index: world.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** world.h 10 Jun 2004 00:27:12 -0000 1.14 --- world.h 16 Jul 2004 21:01:07 -0000 1.15 *************** *** 74,77 **** --- 74,78 ---- unsigned int lastTooltip; SERIAL _lastCharSerial, _lastItemSerial; + unsigned int _playerCount, _npcCount; public: *************** *** 123,126 **** --- 124,135 ---- } + unsigned int npcCount() const { + return _npcCount; + } + + unsigned int playerCount() const { + return _playerCount; + } + unsigned int getUnusedTooltip() { Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** world.cpp 2 Jul 2004 06:27:32 -0000 1.103 --- world.cpp 16 Jul 2004 21:01:07 -0000 1.104 *************** *** 337,340 **** --- 337,342 ---- p = new cWorldPrivate; + _npcCount = 0; + _playerCount = 0; _charCount = 0; _itemCount = 0; *************** *** 948,951 **** --- 950,959 ---- if ( serial > _lastCharSerial ) _lastCharSerial = serial; + + if (pChar->objectType() == enPlayer) { + ++_playerCount; + } else if (pChar->objectType() == enNPC) { + ++_npcCount; + } } else *************** *** 995,998 **** --- 1003,1013 ---- } + P_CHAR pChar = it->second; + if (pChar->objectType() == enPlayer) { + --_playerCount; + } else if (pChar->objectType() == enNPC) { + --_npcCount; + } + p->chars.erase( it ); _charCount--; |
From: Sebastian H. <dar...@us...> - 2004-07-16 21:01:15
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2037/python Modified Files: global.cpp Log Message: New wolfpack functions: playercount, npccount, accounts.count Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** global.cpp 9 Jul 2004 10:55:57 -0000 1.140 --- global.cpp 16 Jul 2004 21:01:06 -0000 1.141 *************** *** 1384,1387 **** --- 1384,1411 ---- /* + \function wolfpack.npccount + \return An integer value. + \description This function returns the number of registered NPCs in the world. + */ + static PyObject* wpNpcCount( PyObject* self, PyObject* args ) + { + Q_UNUSED( self ); + Q_UNUSED( args ); + return PyLong_FromLong( World::instance()->npcCount() ); + } + + /* + \function wolfpack.playercount + \return An integer value. + \description This function returns the number of registered player characters in the world. + */ + static PyObject* wpPlayerCount( PyObject* self, PyObject* args ) + { + Q_UNUSED( self ); + Q_UNUSED( args ); + return PyLong_FromLong( World::instance()->playerCount() ); + } + + /* \function wolfpack.itemcount \return An integer value. *************** *** 1745,1748 **** --- 1769,1774 ---- static PyMethodDef wpGlobal[] = { + { "npccount", wpNpcCount, METH_VARARGS, 0 }, + { "playercount", wpPlayerCount, METH_VARARGS, 0 }, { "charbase", wpCharBase, METH_VARARGS, 0 }, { "getoption", wpGetOption, METH_VARARGS, "Reads a string value from the database." }, *************** *** 1852,1855 **** --- 1878,1890 ---- /* + \function wolfpack.accounts.count + \return An integer value. + \description This function returns the number of accounts on the server. + */ + static PyObject *wpAccountsCount( PyObject *self, PyObject *args ) { + return PyInt_FromLong(Accounts::instance()->count()); + } + + /* \function wolfpack.accounts.find \param name A string containing the account name. *************** *** 2033,2036 **** --- 2068,2072 ---- static PyMethodDef wpAccounts[] = { + { "count", wpAccountsCount, METH_VARARGS, "" }, { "find", wpAccountsFind, METH_VARARGS, "Finds an account object." }, { "list", wpAccountsList, METH_NOARGS, "Gets a list of Account names." }, |
From: Sebastian H. <dar...@us...> - 2004-07-16 21:00:44
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1933/webroot Modified Files: ChangeLog.wolfpack Log Message: New wolfpack functions: playercount, npccount, accounts.count Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ChangeLog.wolfpack 15 Jul 2004 21:18:26 -0000 1.23 --- ChangeLog.wolfpack 16 Jul 2004 21:00:36 -0000 1.24 *************** *** 58,61 **** --- 58,64 ---- This overrides the core region change messages. - Updates to the food script. + - New function: wolfpack.playercount() + - New function: wolfpack.npccount() + - New function: wolfpack.accounts.count() - Export command updates. Checks for doors and corpses. |
From: Ki H. P. <kh...@us...> - 2004-07-16 19:28:53
|
Update of /cvsroot/wpdev/xmlscripts/definitions/menus/crafting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17981/definitions/menus/crafting Modified Files: index.xml Log Message: inscription menu now moved into python script Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/menus/crafting/index.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.xml 13 May 2004 07:03:17 -0000 1.2 --- index.xml 16 Jul 2004 19:28:14 -0000 1.3 *************** *** 16,20 **** <include file="definitions/menus/crafting/carpentry.xml"/> <include file="definitions/menus/crafting/cartography.xml"/> - <include file="definitions/menus/crafting/inscription.xml" /> <include file="definitions/menus/crafting/tailoring.xml" /> <include file="definitions/menus/crafting/tinkering.xml" /> --- 16,19 ---- |
From: Ki H. P. <kh...@us...> - 2004-07-16 19:28:39
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17981/scripts/system Modified Files: craftmenu.py Log Message: inscription menu now moved into python script Index: craftmenu.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/craftmenu.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** craftmenu.py 4 Jul 2004 12:44:05 -0000 1.1 --- craftmenu.py 16 Jul 2004 19:28:31 -0000 1.2 *************** *** 113,119 **** self.definition = str(definition) self.amount = amount - self.otherhtml = '' - self.materialshtml = '' - self.skillshtml = '' self.hasdetails = 1 --- 113,116 ---- *************** *** 204,209 **** # Scrollable Material List ! # FIXME : Client-side Localized Msg ID ! gump.addHtmlGump(170, 217, 345, 76, whitehtml % self.materialshtml, 0, self.materialshtml.count('<br>') > 4) gump.send(player) --- 201,210 ---- # Scrollable Material List ! k = 0 ! for material in self.materials: ! (baseid, amount, clilocid) = material ! gump.addXmfHtmlGump(170, 217 + k*20, 345, 18, clilocid, color=0x7FFF) ! gump.addText(430, 217 + k*20, '%d' % amount, 0x480) ! k += 1 gump.send(player) *************** *** 368,407 **** # - # Generate the HTML used on the skills field on the details gump - # - #def getskillshtml(self, player, arguments): - # skillshtml = '' - # for (skill, values) in self.skills.items(): - #skillshtml += '%s: %.1f%%<br>' % (skillnames[skill].capitalize(), max(0, values[0] / 10.0)) - # skillshtml += ': %.1f%%<br>' % (max(0, values[0] / 10.0)) - # return skillshtml - - # - # Generates the HTML used on the materials field of the details gump - # - def getmaterialshtml(self, player, arguments): - materialshtml = '' - if self.submaterial1 > 0: - materials = self.parent.submaterials1 - material = self.parent.getsubmaterial1used(player, arguments) - materialshtml += "%s: %u<br>" % (materials[material][0], self.submaterial1) - - if self.submaterial2 > 0: - materials = self.parent.submaterials2 - material = self.parent.getsubmaterial2used(player, arguments) - materialshtml += "%s: %u<br>" % (materials[material][0], self.submaterial2) - - for material in self.materials: - materialshtml += "%s: %u<br>" % (material[2], material[1]) - - return materialshtml - - # # Generate the list of skills and materials required # to make this item and then process it normally. # def details(self, player, arguments): - self.materialshtml = self.getmaterialshtml(player, arguments) - #self.skillshtml = self.getskillshtml(player, arguments) CraftItemAction2.details(self, player, arguments) --- 369,376 ---- |
From: Ki H. P. <kh...@us...> - 2004-07-16 19:28:39
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17981/scripts/skills Modified Files: inscription.py Log Message: inscription menu now moved into python script Index: inscription.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/inscription.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** inscription.py 9 Jul 2004 10:30:26 -0000 1.6 --- inscription.py 16 Jul 2004 19:28:14 -0000 1.7 *************** *** 14,19 **** from math import floor,ceil ! # reagents itemdef:cliloc_id reagents = { 'f7a':0, 'f7b':1, 'f84':2, 'f85':3, 'f86':4, 'f88':5, 'f8c':6, 'f8d':7 } def checktool(char, item, wearout=0): --- 14,97 ---- from math import floor,ceil ! # reagents itemdef:noreags_msg_id ( reagents name cliloc id = 1044353 + id ) reagents = { 'f7a':0, 'f7b':1, 'f84':2, 'f85':3, 'f86':4, 'f88':5, 'f8c':6, 'f8d':7 } + # mana[circle - 1] required to make a spell croll + req_manas = [4, 6, 9, 11, 14, 20, 40, 50] + # min / max skills for each circle spell scroll / runebook / BOD + req_skills = [[0, 250], [0, 392], [35, 535], [178, 678], [321, 821], [464, 964], [607, 1107], [750, 1250], [450, 1250], [650, 1250]] + # spell circle menu ids + circle_ids = [1015163, 1015171, 1015177, 1015185, 1015193, 1015202, 1015210, 1015219] + # spell scroll cliloc ids : 1027981 - 1028044 + # spell scroll itemid + # if reactive armor : itemid = 1f2d + # elif spell_num < weaken : itemid = 1f2f + spell_num + # else : itemid = 1f2d + spell_num + # empty scroll cliloc id : 1044377 + # empty recall rune cliloc id : 104447 + # reagents required to make a spell scroll (reactive armor first) + spell_regs = [['f84', 'f8d', 'f8c'],\ + ['f7b', 'f88'],\ + ['f84', 'f85', 'f86'],\ + ['f88', 'f85'],\ + ['f84', 'f85', 'f8d'],\ + ['f8c'],\ + ['f8d', 'f8c'],\ + ['f84', 'f88'],\ + ['f7b', 'f86'],\ + ['f88', 'f86'],\ + ['f84', 'f85'],\ + ['f88', 'f8d'],\ + ['f84', 'f8d', 'f8c'],\ + ['f7b', 'f8c'],\ + ['f84', 'f85', 'f8c'],\ + ['f86', 'f88'],\ + ['f86', 'f84'],\ + ['f7a'],\ + ['f7b', 'f84', 'f8c'],\ + ['f88'],\ + ['f7b', 'f86'],\ + ['f7b', 'f86'],\ + ['f7b', 'f8c'],\ + ['f7b', 'f84'],\ + ['f84', 'f85', 'f86'],\ + ['f84', 'f85', 'f86', 'f8c'],\ + ['f84', 'f88', 'f8c'],\ + ['f7a', 'f8d', 'f8c'],\ + ['f84', 'f85', 'f86', 'f8d'],\ + ['f86', 'f8c'],\ + ['f7a', 'f86', 'f8d'],\ + ['f7a', 'f7b', 'f86'],\ + ['f7a', 'f86', 'f88'],\ + ['f7a', 'f84', 'f8d', 'f8c'],\ + ['f7b', 'f84', 'f88'],\ + ['f84', 'f86', 'f8d'],\ + ['f7a', 'f86', 'f88', 'f8c'],\ + ['f84', 'f86', 'f8d'],\ + ['f7a', 'f88', 'f8d'],\ + ['f7b', 'f86', 'f8d'],\ + ['f84', 'f86', 'f8c'],\ + ['f7a', 'f88'],\ + ['f7b', 'f86'],\ + ['f7b', 'f88'],\ + ['f7a', 'f7b', 'f86'],\ + ['f84', 'f86', 'f88', 'f8c'],\ + ['f7a', 'f85', 'f8d'],\ + ['f7b', 'f8c'],\ + ['f7a', 'f7b', 'f86', 'f8c'],\ + ['f7a', 'f86', 'f8d', 'f8c'],\ + ['f8d', 'f8c'],\ + ['f7a', 'f86', 'f8c'],\ + ['f7a', 'f7b', 'f86', 'f8d'],\ + ['f7a', 'f84', 'f86', 'f8c'],\ + ['f7b', 'f86', 'f8d', 'f8c'],\ + ['f7b', 'f86', 'f8d'],\ + ['f7b', 'f85', 'f86', 'f8c'],\ + ['f7a', 'f7b', 'f86', 'f88'],\ + ['f7b', 'f84', 'f85'],\ + ['f7b', 'f86', 'f8d'],\ + ['f7b', 'f86', 'f8d', 'f8c'],\ + ['f7b', 'f86', 'f8d'],\ + ['f7b', 'f86', 'f8d', 'f8c'],\ + ['f7b', 'f86', 'f8d']] def checktool(char, item, wearout=0): *************** *** 62,97 **** self.gumptype = 0xce123456 ! def loadMenu( id, parent = None ): ! definition = wolfpack.getdefinition(WPDT_MENU, id) ! if not definition: ! if parent: ! console.log(LOG_ERROR, "Unknown submenu %s in menu %s.\n" % (id, parent.id)) ! else: ! console.log(LOG_ERROR, "Unknown menu: %s.\n" % id) ! return ! # use 'clilocid' title for OSI style ! # or use 'title' for custom craft menu ! title = '' ! titleid = 0 ! if definition.hasattribute('title'): ! title = definition.getattribute('title') ! elif definition.hasattribute('clilocid'): ! titleid = int(definition.getattribute('clilocid', '0')) ! menu = InscriptionMenu(id, parent, titleid, title) ! for i in range(0, definition.childcount): ! child = definition.getchild(i) ! if child.name == 'menu': ! loadMenu(child.getattribute('id'), menu) ! elif child.name == 'action': ! actionclilocid = 0 ! actionname = '' ! if child.hasattribute('clilocid'): ! actionclilocid = int(child.getattribute('clilocid')) ! elif child.hasattribute('title'): ! actionname = child.getattribute('title') ! else: ! console.log(LOG_ERROR, "Action without title or cliloc id in menu %s.\n" % id) ! pass ! itemdef = child.getattribute('itemid') item2 = wolfpack.getdefinition(WPDT_ITEM, itemdef) if item2: --- 140,160 ---- self.gumptype = 0xce123456 ! def generateMenu( id, parent = None ): ! titleid = 1015162 ! menu0 = InscriptionMenu(id, parent, titleid) ! # add spell scrolls ! # loop circles ! for i in range(0, 8): ! menu = InscriptionMenu(id + str(i), menu0, circle_ids[i]) ! # loop spells ! for j in range(0, 8): ! spell_num = i * 8 + j ! # if reactive armor spell ! if spell_num == 6: ! spell_num = 0 ! elif spell_num < 6: ! spell_num += 1 ! # spell < weaken ! itemdef = str(hex(int(0x1f2d) + spell_num)).replace('0x', '') item2 = wolfpack.getdefinition(WPDT_ITEM, itemdef) if item2: *************** *** 99,125 **** if itemchild: itemid = int(itemchild.value) ! action = InsItemAction(menu, itemid, itemdef, actionclilocid, actionname) ! for j in range(0, child.childcount): ! subchild = child.getchild(j) ! if subchild.name == 'mana': ! action.mana = int(subchild.getattribute('amount', '0')) ! elif subchild.name == 'spell': ! action.spell = int(subchild.getattribute('id', '0')) ! elif subchild.name == 'scroll': ! ids = subchild.getattribute('id').split(';') ! amount = int(subchild.getattribute('amount', '1')) ! action.materials.append([ids, amount, 'scroll']) ! elif subchild.name == 'reagents': ! ids = subchild.getattribute('id').split(';') ! amount = int(subchild.getattribute('amount', '1')) ! name = subchild.getattribute('name') ! action.materials.append([ids, amount, name]) ! elif subchild.name in skillnamesids: ! skill = skillnamesids[subchild.name] ! minimum = int(subchild.getattribute('min', '0')) ! maximum = int(subchild.getattribute('max', '1200')) ! action.skills[skill] = [minimum, maximum] ! # menu.sort() class InsItemAction(CraftItemAction): --- 162,197 ---- if itemchild: itemid = int(itemchild.value) ! actionid = 1027981 + spell_num ! action = InsItemAction(menu, itemid, itemdef, actionid) ! # required mana ! action.mana = req_manas[i] ! # empty scroll ! action.materials.append([['ef3','e34'], 1, 1044377]) ! # required reagents ! regs = spell_regs[spell_num] ! for k in range(0, len(regs)): ! action.materials.append([[regs[k]], 1, reagents[regs[k]] + 1044353]) ! # skill ! action.skills[INSCRIPTION] = req_skills[i] ! # Others ! menu = InscriptionMenu(id + '8', menu0, 1044294) ! # runebook ! itemdef = '22c5' ! item2 = wolfpack.getdefinition(WPDT_ITEM, itemdef) ! itemchild = item2.findchild('id') ! itemid = int(itemchild.value) ! actionid = 1041267 ! action = InsItemAction(menu, itemid, itemdef, actionid) ! # recall scroll ! action.materials.append([['1f4c'], 1, 1044445]) ! # gate travel scroll ! action.materials.append([['1f60'], 1, 1044446]) ! # 8 runes ! action.materials.append([['1f14'], 8, 1044447]) ! # bulk order book : TODO : not yet defined in xml ! #actionid = 1028793 ! #action = InsItemAction(menu, itemid, itemdef, actionid) ! #action.materials.append([['ef3','e34'], 10, 1044377]) class InsItemAction(CraftItemAction): *************** *** 146,154 **** if 'ef3' in baseids or 'e34' in baseids: msg_id = 1044378 - 1044361 ! elif reagents.haskey(baseids[0]): msg_id = reagents[baseids[0]] - player.socket.clilocmessage(1044361 + msg_id) # recall rune #elif '1f14' in baseids or '1f15' in baseids or '1f16' in baseids or '1f17' in baseids: return False return True --- 218,228 ---- if 'ef3' in baseids or 'e34' in baseids: msg_id = 1044378 - 1044361 ! elif reagents.has_key(baseids[0]): msg_id = reagents[baseids[0]] # recall rune #elif '1f14' in baseids or '1f15' in baseids or '1f16' in baseids or '1f17' in baseids: + else: + msg_id = -108 + player.socket.clilocmessage(1044361 + msg_id) return False return True *************** *** 201,212 **** self.parent.send(player, args) return success ! # runebook / bulk order deed else: ! self.noticeid = 0 ! self.noticestr = 'Not implemented yet' ! self.parent.send(player, args) ! return False def onLoad(): ! loadMenu( 'INSCRIPTION' ) skills.register( INSCRIPTION, inscription ) --- 275,309 ---- self.parent.send(player, args) return success ! # runebook / bulk order book else: ! # runebook ! if self.titleid == 1041267: ! if not self.checkmaterial(player, args): ! self.noticeid = 1044253 ! self.noticestr = '' ! self.parent.send(player, args) ! return False ! self.consumematerial(player, args, 0) ! success = self.checkskills( player, args, 1) ! if success: ! item = wolfpack.additem(self.definition) ! if not item: ! console.log(LOG_ERROR, "Unknown item definition used in action %u of menu %s.\n" % (self.parent.subactions.index(self), self.parent.id)) ! else: ! item.decay = 1 ! item.magic = 1 ! if not tobackpack(item, player): ! item.update() ! self.parent.send(player, args) ! return success ! else: ! ! self.noticeid = 0 ! self.noticestr = 'Not implemented yet' ! player.socket.sysmessage(self.noticestr) ! self.parent.send(player, args) ! return False def onLoad(): ! generateMenu( 'INSCRIPTION' ) skills.register( INSCRIPTION, inscription ) |
From: Richard M. <dr...@us...> - 2004-07-16 10:47:21
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15509/webroot Modified Files: FAQ.html Added Files: faq.css Log Message: Moved the CSS to a file, makes editing FAQ.html easier. --- NEW FILE: faq.css --- body { background-color: #ffffff; font-family: "Trebuchet MS", Arial, Helvetica; font-size: 12px; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; color: #000000; text-align: left; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; text-decoration: none; } a:link, a:visited { color: #0000FF; text-decoration: none; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } img { border: 0px; border-color: none; } div { text-decoration: none; font-style: none; font-weight: normal; } div.header { width: 100%; background-color: #004b2c; height: 87px; text-align: left; } div.header2 { background-color: #999999; width: 100%; height: 3px; text-align: left; } div.navbar { width: 783px; text-align: left; height: 60px; } table.navigation { border: none; margin: 0px; padding: 0px; text-align: left; width: 783px; height: 60px; vertical-align: top; } td.navigation1, td.navigation2, td.navigation3 { color: #000000; text-align: left; vertical-align: top; } td.navigation1 { height: 20px; width: 783px; vertical-align: top; } td.navigation2 { height: 19px; width: 634px; } td.navigation3 { height: 19px; width: 149px; text-align: center; } div.toc, div.faq { text-align: left; margin-left: 1em; font-size: 16px; font-weight: bold; } div.faq { margin-bottom: 3em; } hr { border-color: #e3f3a8; border-style: thin inset; width: 750px; margin-left: 1em; margin-top: 0.75em; margin-bottom: 0.75em; float: left; } ul.toc { list-style-type: decimal-leading-zero; font-weight: normal; } ul.faq { font-weight: normal; list-style-type: decimal-leading-zero; } a.question { text-decoration: underline; color: #002F1B; font-weight: bold; } div.answer { margin-left: 1em; margin-bottom: 1em; margin-top: 0.5em; color: #000000; text-decoration: normal; } div.bash { margin-left: 1em; margin-bottom: 0.25em; margin-top: 0.25em; font-size: 10pt; font-family: Fixed, Arial; } div.smalltext { font-family: "Trebuchet MS", Arial, Helvetica; font-size: 10px; color: #999999; text-align: center; } Index: FAQ.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/FAQ.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FAQ.html 16 Jul 2004 10:37:16 -0000 1.6 --- FAQ.html 16 Jul 2004 10:46:57 -0000 1.7 *************** *** 6,144 **** <base href="./" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> ! <style type="text/css"> ! <!-- ! body { ! background-color: #ffffff; ! font-family: "Trebuchet MS", Arial, Helvetica; ! font-size: 12px; ! font-style: normal; ! font-weight: normal; ! font-variant: normal; ! text-transform: none; ! color: #000000; ! text-align: left; ! margin-left: 0px; ! margin-top: 0px; ! margin-right: 0px; ! margin-bottom: 0px; ! text-decoration: none; ! } ! a:link, a:visited { ! color: #0000FF; ! text-decoration: none; ! } ! a:hover { ! text-decoration: underline; ! } ! a:active { ! text-decoration: none; ! } ! img { ! border: 0px; ! border-color: none; ! } ! div { ! text-decoration: none; ! font-style: none; ! font-weight: normal; ! } ! div.header { ! width: 100%; ! background-color: #004b2c; ! height: 87px; ! text-align: left; ! } ! div.header2 { ! background-color: #999999; ! width: 100%; ! height: 3px; ! text-align: left; ! } ! div.navbar { ! width: 783px; ! text-align: left; ! height: 60px; ! } ! table.navigation { ! border: none; ! margin: 0px; ! padding: 0px; ! text-align: left; ! width: 783px; ! height: 60px; ! vertical-align: top; ! } ! td.navigation1, td.navigation2, td.navigation3 { ! color: #000000; ! text-align: left; ! vertical-align: top; ! } ! td.navigation1 { ! height: 20px; ! width: 783px; ! vertical-align: top; ! } ! td.navigation2 { ! height: 19px; ! width: 634px; ! } ! td.navigation3 { ! height: 19px; ! width: 149px; ! text-align: center; ! } ! div.toc, div.faq { ! text-align: left; ! margin-left: 1em; ! font-size: 16px; ! font-weight: bold; ! } ! div.faq { ! margin-bottom: 3em; ! } ! hr { ! border-color: #e3f3a8; ! border-style: thin inset; ! width: 750px; ! margin-left: 1em; ! margin-top: 0.75em; ! margin-bottom: 0.75em; ! float: left; ! } ! ul.toc { ! list-style-type: decimal-leading-zero; ! font-weight: normal; ! } ! ul.faq { ! font-weight: normal; ! list-style-type: decimal-leading-zero; ! } ! a.question { ! text-decoration: underline; ! color: #002F1B; ! font-weight: bold; ! } ! div.answer { ! margin-left: 1em; ! margin-bottom: 1em; ! margin-top: 0.5em; ! color: #000000; ! text-decoration: normal; ! } ! div.bash { ! margin-left: 1em; ! margin-bottom: 0.25em; ! margin-top: 0.25em; ! font-size: 10pt; ! font-family: Fixed, Arial; ! } ! div.smalltext { ! font-family: "Trebuchet MS", Arial, Helvetica; ! font-size: 10px; ! color: #999999; ! text-align: center; ! } ! --> ! </style> </head> <body> --- 6,10 ---- <base href="./" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> ! <link href="./faq.css" rel="stylesheet" type="text/css" /> </head> <body> |
From: Richard M. <dr...@us...> - 2004-07-16 10:37:31
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14454/webroot Modified Files: FAQ.html Log Message: Congrats, this made it to the FAQ... :/ Index: FAQ.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/FAQ.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FAQ.html 15 Jul 2004 01:50:50 -0000 1.5 --- FAQ.html 16 Jul 2004 10:37:16 -0000 1.6 *************** *** 177,180 **** --- 177,181 ---- <li><a href="#17">How can I route to my server behind a router?</a></li> <li><a href="#18">When will _______ bug or problem be fixed?</a></li> + <li><a href="#19">Why is _______ feature is not working the same as on Sphere?</a></li> </ul> </div> *************** *** 522,527 **** <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> ! <!-- Answer 18 --> ! <li><a name="17" class="question">When will _______ bug or problem be fixed?</a><br /> <div class="answer"> The simple answer to this is, when they get fixed.<br /><br /> --- 523,528 ---- <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> ! <!-- Answer 18 --> ! <li><a name="18" class="question">When will _______ bug or problem be fixed?</a><br /> <div class="answer"> The simple answer to this is, when they get fixed.<br /><br /> *************** *** 533,536 **** --- 534,547 ---- eventually get around to it. </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> + </li> + <!-- Answer 19 --> + <li><a name="19" class="question">Why is _______ feature is not working the same as on Sphere?</a><br /> + <div class="answer"> + Wolfpack is <span style="font-weight:bold;">NOT</span> Sphere.<br /><br /> + Wolfpack's scripts are designed to function similar to how an official UO shard would function.<br /><br /> + If you want the scripts to function similar to those of Sphere, feel free to modify your shard's scripts to make them do so.<br /> + Please do not ask the developers or file bug reports about this! + </div> <a href="#top" style="font-size:9pt;">Return To Questions</a><br /> <a href="index.html" style="font-size:9pt;">Return To Overview</a><br /><br /> |
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134/skills Modified Files: __init__.py alchemy.py anatomy.py animallore.py animaltaming.py armslore.py begging.py detectinghidden.py evaluatingintel.py fishing.py healing.py hiding.py itemid.py lumberjacking.py mining.py musicianship.py peacemaking.py poisoning.py spiritspeak.py stealth.py tasteid.py tracking.py Log Message: More import cleanups... Removed wolfpack.currentime() and moved it to wolfpack.time.currenttime() / wolfpack.time.servertime() It seems to belong here more than it would in wolfpack.currenttime() Scripts updated to support this. Index: anatomy.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/anatomy.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** anatomy.py 9 Jul 2004 10:30:26 -0000 1.13 --- anatomy.py 16 Jul 2004 07:09:27 -0000 1.14 *************** *** 6,13 **** ################################################################# - from wolfpack.consts import * import wolfpack import skills ! from wolfpack.time import * from math import floor --- 6,13 ---- ################################################################# import wolfpack + import wolfpack.time import skills ! from wolfpack.consts import ANATOMY from math import floor *************** *** 23,28 **** if socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < socket.gettag( 'skill_delay' ): socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 23,27 ---- if socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < socket.gettag( 'skill_delay' ): socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 37,43 **** def response( char, args, target ): - socket = char.socket - # Check for a valid target if not target.char: --- 36,40 ---- *************** *** 62,67 **** return ! cur_time = servertime() ! char.socket.settag( 'skill_delay', cur_time + ANATOMY_DELAY ) # Make a skillcheck and display the fail or success message above the targets head --- 59,63 ---- return ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + ANATOMY_DELAY ) ) # Make a skillcheck and display the fail or success message above the targets head Index: tracking.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/tracking.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tracking.py 15 Jul 2004 00:31:14 -0000 1.7 --- tracking.py 16 Jul 2004 07:09:27 -0000 1.8 *************** *** 6,15 **** ################################################################# - from wolfpack.consts import * - from wolfpack.utilities import * - from wolfpack.time import * - from wolfpack.gumps import * import wolfpack import skills STEALTH_DELAY = 5000 --- 6,15 ---- ################################################################# import wolfpack + import wolfpack.time import skills + from wolfpack.consts import TRACKING + from wolfpack.gumps import cGump + STEALTH_DELAY = 5000 *************** *** 22,27 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 --- 22,26 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 *************** *** 56,61 **** gump.send( char ) ! cur_time = servertime() ! char.socket.settag( 'skill_delay', ( cur_time + STEALTH_DELAY ) ) return 1 --- 55,59 ---- gump.send( char ) ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + STEALTH_DELAY ) ) return 1 Index: tasteid.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/tasteid.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tasteid.py 26 May 2004 13:07:25 -0000 1.8 --- tasteid.py 16 Jul 2004 07:09:27 -0000 1.9 *************** *** 8,13 **** from wolfpack.consts import * from wolfpack.utilities import * - from wolfpack.time import * import wolfpack import skills --- 8,13 ---- from wolfpack.consts import * from wolfpack.utilities import * import wolfpack + import wolfpack.time import skills *************** *** 18,22 **** if socket.hastag('skill_delay'): ! if servertime() < socket.gettag('skill_delay'): socket.clilocmessage(500118) return 1 --- 18,22 ---- if socket.hastag('skill_delay'): ! if wolfpack.time.currenttime() < socket.gettag('skill_delay'): socket.clilocmessage(500118) return 1 *************** *** 31,35 **** socket = char.socket ! socket.settag('skill_delay', servertime() + TASTEID_DELAY) if target.item: --- 31,35 ---- socket = char.socket ! socket.settag('skill_delay', int( wolfpack.time.currenttime() + TASTEID_DELAY ) ) if target.item: Index: hiding.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/hiding.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** hiding.py 9 Jul 2004 10:30:26 -0000 1.10 --- hiding.py 16 Jul 2004 07:09:27 -0000 1.11 *************** *** 8,13 **** from wolfpack.consts import * from wolfpack.utilities import * - from wolfpack.time import * import wolfpack import skills --- 8,13 ---- from wolfpack.consts import * from wolfpack.utilities import * import wolfpack + import wolfpack.time import skills *************** *** 19,24 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 19,23 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 36,41 **** char.socket.clilocmessage( 501237, "", 0x3b2, 4, char ) ! cur_time = servertime() ! char.socket.settag( 'skill_delay', cur_time + HIDING_DELAY ) return True --- 35,39 ---- char.socket.clilocmessage( 501237, "", 0x3b2, 4, char ) ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + HIDING_DELAY ) ) return True Index: musicianship.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/musicianship.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** musicianship.py 26 May 2004 13:07:25 -0000 1.5 --- musicianship.py 16 Jul 2004 07:09:27 -0000 1.6 *************** *** 8,12 **** from wolfpack.consts import * import wolfpack ! from wolfpack.time import * import wolfpack.utilities --- 8,12 ---- from wolfpack.consts import * import wolfpack ! import wolfpack.time import wolfpack.utilities *************** *** 30,47 **** # first introduction of GGS success = 0 - cur_time = servertime() if not char.socket.hastag( 'musicianship_gain_time' ): success = char.checkskill( MUSICIANSHIP, 0, 1000 ) if success: ! char.socket.settag( 'musicianship_gain_time', cur_time ) else: success = 0 last_gain = char.socket.gettag( 'musicianship_gain_time' ) ! if cur_time - last_gain >= MUSICIANSHIP_GAIN_DELAY: success = char.checkskill( MUSICIANSHIP, 0, 1000 ) if not success: char.skill[ MUSICIANSHIP ] += 1 success = 1 ! char.socket.settag( 'musicianship_gain_time', cur_time ) # item wear out - will be added --- 30,46 ---- # first introduction of GGS success = 0 if not char.socket.hastag( 'musicianship_gain_time' ): success = char.checkskill( MUSICIANSHIP, 0, 1000 ) if success: ! char.socket.settag( 'musicianship_gain_time', wolfpack.time.currenttime() ) else: success = 0 last_gain = char.socket.gettag( 'musicianship_gain_time' ) ! if wolfpack.time.currenttime() - last_gain >= MUSICIANSHIP_GAIN_DELAY: success = char.checkskill( MUSICIANSHIP, 0, 1000 ) if not success: char.skill[ MUSICIANSHIP ] += 1 success = 1 ! char.socket.settag( 'musicianship_gain_time', wolfpack.time.currenttime() ) # item wear out - will be added *************** *** 58,63 **** # the 'last used' item will be used # set last use item for musicianship ! cur_time = servertime() ! item.settag( 'last_musicianship_use', cur_time ) char.socket.settag( 'instrument', item.serial ) if success: --- 57,61 ---- # the 'last used' item will be used # set last use item for musicianship ! item.settag( 'last_musicianship_use', wolfpack.time.currenttime() ) char.socket.settag( 'instrument', item.serial ) if success: Index: armslore.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/armslore.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** armslore.py 9 Jul 2004 10:30:26 -0000 1.12 --- armslore.py 16 Jul 2004 07:09:27 -0000 1.13 *************** *** 8,14 **** from wolfpack.consts import * from wolfpack.utilities import * - from wolfpack.time import * from wolfpack.properties import * import wolfpack import skills from wolfpack import weaponinfo --- 8,14 ---- from wolfpack.consts import * from wolfpack.utilities import * from wolfpack.properties import * import wolfpack + import wolfpack.time import skills from wolfpack import weaponinfo *************** *** 23,28 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 23,27 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 51,56 **** if isweapon( item ) or isarmor( item ) or isshield( item ): ! cur_time = servertime() ! char.socket.settag( 'skill_delay', cur_time + ARMSLORE_DELAY ) if not char.checkskill( ARMSLORE, 0, 1000 ): char.socket.clilocmessage( 0x7A281, "", 0x3b2, 3 ) --- 50,54 ---- if isweapon( item ) or isarmor( item ) or isshield( item ): ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + ARMSLORE_DELAY ) ) if not char.checkskill( ARMSLORE, 0, 1000 ): char.socket.clilocmessage( 0x7A281, "", 0x3b2, 3 ) *************** *** 58,62 **** char.socket.clilocmessage( 0x103319, "", 0x3b2, 3 ) ! condi = 10 * item.health / item.maxhealth if condi < 0: condi = 0 --- 56,60 ---- char.socket.clilocmessage( 0x103319, "", 0x3b2, 3 ) ! condi = ( 10 * ( item.health / item.maxhealth ) ) if condi < 0: condi = 0 Index: begging.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/begging.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** begging.py 9 Jul 2004 10:30:26 -0000 1.13 --- begging.py 16 Jul 2004 07:09:27 -0000 1.14 *************** *** 8,13 **** from wolfpack.consts import * from wolfpack.utilities import * - from wolfpack.time import * import wolfpack import skills --- 8,13 ---- from wolfpack.consts import * from wolfpack.utilities import * import wolfpack + import wolfpack.time import skills *************** *** 19,23 **** # 5. If your karma gets too low, there is a chance the NPC will refuse to give you any gold at all. Where "low" means negative karma. All karma my GM Beggar had was the little he could acquire from wrestling rats in town. ! GOLD_COIN = "0xeed" GOLD_COIN1 = "eed" BEGGING_RANGE = 3 --- 19,23 ---- # 5. If your karma gets too low, there is a chance the NPC will refuse to give you any gold at all. Where "low" means negative karma. All karma my GM Beggar had was the little he could acquire from wrestling rats in town. ! GOLD_COIN = "eed" GOLD_COIN1 = "eed" BEGGING_RANGE = 3 *************** *** 30,35 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 30,34 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 66,70 **** # town cryer : I feel sorry for thee... Thou dost not look trustworthy... no gold for thee today! : 500405 + 500406 ! gold = npc.countresource( hex2dec(GOLD_COIN) ) if not gold or gold < 10: # Thou dost not look trustworthy... no gold for thee today! --- 65,69 ---- # town cryer : I feel sorry for thee... Thou dost not look trustworthy... no gold for thee today! : 500405 + 500406 ! gold = npc.countresource( wolfpack.utilities.hex2dec( 0xeed ) ) if not gold or gold < 10: # Thou dost not look trustworthy... no gold for thee today! *************** *** 73,78 **** success = char.checkskill( BEGGING, 0, 1200 ) ! cur_time = servertime() ! char.socket.settag( 'skill_delay', cur_time + BEGGING_DELAY ) # npc who has more than 100gp will give you 10gp --- 72,76 ---- success = char.checkskill( BEGGING, 0, 1200 ) ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + BEGGING_DELAY ) ) # npc who has more than 100gp will give you 10gp Index: alchemy.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/alchemy.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** alchemy.py 9 Jul 2004 10:30:25 -0000 1.5 --- alchemy.py 16 Jul 2004 07:09:27 -0000 1.6 *************** *** 1,11 **** from wolfpack import console ! from wolfpack.consts import * from wolfpack import properties - import math - import wolfpack from system.makemenus import CraftItemAction, MakeMenu, findmenu from wolfpack.utilities import hex2dec, tobackpack, createlockandkey ! import random # --- 1,12 ---- + import wolfpack + import math + import random from wolfpack import console ! from wolfpack.consts import ALCHEMY, LOG_ERROR, WPDT_MENU, WPDT_ITEM, skillnamesids from wolfpack import properties from system.makemenus import CraftItemAction, MakeMenu, findmenu from wolfpack.utilities import hex2dec, tobackpack, createlockandkey ! # *************** *** 74,78 **** if lostmaterials: bottle = wolfpack.additem('f0e') ! if not tobackpack(bottle, player): bottle.update() --- 75,79 ---- if lostmaterials: bottle = wolfpack.additem('f0e') ! if not wolfpack.utilities.tobackpack(bottle, player): bottle.update() Index: fishing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/fishing.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** fishing.py 9 Jul 2004 10:30:26 -0000 1.7 --- fishing.py 16 Jul 2004 07:09:27 -0000 1.8 *************** *** 39,43 **** # Are we already fishing? ! if socket.hastag( 'is_fishing' ) and socket.gettag( 'is_fishing' ) > wolfpack.time.servertime(): socket.clilocmessage( 0x7A4EC, "", 0x3b2, 3 ) # You are already fishing. return True --- 39,43 ---- # Are we already fishing? ! if socket.hastag( 'is_fishing' ) and socket.gettag( 'is_fishing' ) > wolfpack.time.currenttime(): socket.clilocmessage( 0x7A4EC, "", 0x3b2, 3 ) # You are already fishing. return True *************** *** 130,134 **** mapZ = mapTile[ "z" ] if not blockedspot and pos.z < mapZ: ! if pos.z > mapZ - FISHING_BLOCK_RANGE: blockedspot = 1 --- 130,134 ---- mapZ = mapTile[ "z" ] if not blockedspot and pos.z < mapZ: ! if pos.z > ( mapZ - FISHING_BLOCK_RANGE ): blockedspot = 1 *************** *** 147,151 **** # You broke your fishing pole. ! socket.settag( 'is_fishing', wolfpack.time.servertime() + 5000 ) # Times out after 5000ms char.addtimer( 2500, "skills.fishing.effecttimer", [ pos, deepwater ] ) char.addtimer( 5000, "skills.fishing.itemtimer", [ pos, deepwater ] ) --- 147,151 ---- # You broke your fishing pole. ! socket.settag( 'is_fishing', int( wolfpack.time.currenttime() + 5000 ) ) # Times out after 5000ms char.addtimer( 2500, "skills.fishing.effecttimer", [ pos, deepwater ] ) char.addtimer( 5000, "skills.fishing.itemtimer", [ pos, deepwater ] ) *************** *** 170,175 **** itemname = None possibleitems = [] ! maxvalue = 0 # We calculate a random value from 0 to this value and ! # then check the array above for matching items # Fill items and name with real values --- 170,176 ---- itemname = None possibleitems = [] ! maxvalue = 0 ! # We calculate a random value from 0 to this value and ! # then check the array above for matching items # Fill items and name with real values Index: stealth.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/stealth.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** stealth.py 26 May 2004 13:07:25 -0000 1.6 --- stealth.py 16 Jul 2004 07:09:27 -0000 1.7 *************** *** 8,13 **** from wolfpack.consts import * from wolfpack.utilities import * - from wolfpack.time import * import wolfpack import skills from math import ceil --- 8,13 ---- from wolfpack.consts import * from wolfpack.utilities import * import wolfpack + import wolfpack.time import skills from math import ceil *************** *** 19,24 **** def stealth( char, skill ): if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 --- 19,23 ---- def stealth( char, skill ): if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 *************** *** 51,56 **** char.update() ! cur_time = servertime() ! char.socket.settag( 'skill_delay', ( cur_time + STEALTH_DELAY ) ) return 1 --- 50,54 ---- char.update() ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + STEALTH_DELAY ) ) return 1 Index: detectinghidden.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/detectinghidden.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** detectinghidden.py 9 Jul 2004 10:30:26 -0000 1.7 --- detectinghidden.py 16 Jul 2004 07:09:27 -0000 1.8 *************** *** 8,13 **** from wolfpack.consts import * from wolfpack.utilities import * - from wolfpack.time import * import wolfpack import skills --- 8,13 ---- from wolfpack.consts import * from wolfpack.utilities import * import wolfpack + import wolfpack.time import skills *************** *** 30,35 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 30,34 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 61,66 **** return ! cur_time = servertime() ! char.socket.settag( 'skill_delay', cur_time + DETECTHIDDEN_DELAY ) success = char.checkskill( DETECTINGHIDDEN, 0, 1000 ) --- 60,64 ---- return ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + DETECTHIDDEN_DELAY ) ) success = char.checkskill( DETECTINGHIDDEN, 0, 1000 ) *************** *** 130,132 **** def onLoad(): ! skills.register( DETECTINGHIDDEN, detectinghidden ) \ No newline at end of file --- 128,130 ---- def onLoad(): ! skills.register( DETECTINGHIDDEN, detectinghidden ) Index: healing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/healing.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** healing.py 9 Jul 2004 10:30:26 -0000 1.4 --- healing.py 16 Jul 2004 07:09:27 -0000 1.5 *************** *** 100,105 **** # res chance : 25% at 80/80 skill, max 75% at 100/100 chance = 250 + ( healing - RES_HEALING ) + ( anatomy - RES_ANATOMY ) ! start_time = wolfpack.time.servertime() ! end_time = start_time + RES_DELAY char.addtimer( CHECK_DELAY, "skills.healing.delay_check", [ resto.serial, chance, start_time, end_time, 0 ] ) --- 100,104 ---- # res chance : 25% at 80/80 skill, max 75% at 100/100 chance = 250 + ( healing - RES_HEALING ) + ( anatomy - RES_ANATOMY ) ! end_time = wolfpack.time.currenttime() + RES_DELAY char.addtimer( CHECK_DELAY, "skills.healing.delay_check", [ resto.serial, chance, start_time, end_time, 0 ] ) *************** *** 107,115 **** # 80% at skill 60/60, 100% over skill 80/80 chance = min( 800 + ( healing - CURE_HEALING ) / 2 + ( anatomy - CURE_ANATOMY ) / 2, 1000 ) - start_time = wolfpack.time.servertime() if char == cureto: ! end_time = start_time + 8400 + 60 * ( 120 - char.dexterity ) else: ! end_time = start_time + CURE_OTHER_DELAY char.addtimer( CHECK_DELAY, "skills.healing.delay_check", [ cureto.serial, chance, start_time, end_time, 1 ] ) --- 106,113 ---- # 80% at skill 60/60, 100% over skill 80/80 chance = min( 800 + ( healing - CURE_HEALING ) / 2 + ( anatomy - CURE_ANATOMY ) / 2, 1000 ) if char == cureto: ! end_time = wolfpack.time.currenttime() + 8400 + 60 * ( 120 - char.dexterity ) else: ! end_time = wolfpack.time.currenttime() + CURE_OTHER_DELAY char.addtimer( CHECK_DELAY, "skills.healing.delay_check", [ cureto.serial, chance, start_time, end_time, 1 ] ) *************** *** 142,151 **** end_time = args[ 3 ] heal_type = args[ 4 ] - current_time = wolfpack.time.servertime() # useup one bandage char.useresource( 1, 0x0e21 ) ! if current_time >= end_time: # resurrect if heal_type == 0: --- 140,148 ---- end_time = args[ 3 ] heal_type = args[ 4 ] # useup one bandage char.useresource( 1, 0x0e21 ) ! if wolfpack.time.currenttime() >= end_time: # resurrect if heal_type == 0: *************** *** 187,191 **** # go loop delay = CHECK_DELAY ! if ( current_time + CHECK_DELAY ) > end_time: delay = end_time - current_time char.addtimer( delay, "skills.healing.delay_check", [ healto.serial, chance, start_time, end_time, heal_type ] ) --- 184,188 ---- # go loop delay = CHECK_DELAY ! if ( wolfpack.time.currenttime() + CHECK_DELAY ) > end_time: delay = end_time - current_time char.addtimer( delay, "skills.healing.delay_check", [ healto.serial, chance, start_time, end_time, heal_type ] ) Index: spiritspeak.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/spiritspeak.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** spiritspeak.py 26 May 2004 13:07:25 -0000 1.8 --- spiritspeak.py 16 Jul 2004 07:09:27 -0000 1.9 *************** *** 7,12 **** from wolfpack.consts import * - from wolfpack.time import * import wolfpack from math import floor import random --- 7,12 ---- from wolfpack.consts import * import wolfpack + import wolfpack.time from math import floor import random *************** *** 23,28 **** if socket.hastag('skill_delay'): ! cur_time = servertime() ! if cur_time < socket.gettag( 'skill_delay' ): socket.clilocmessage(500118) return 1 --- 23,27 ---- if socket.hastag('skill_delay'): ! if wolfpack.time.currenttime() < socket.gettag( 'skill_delay' ): socket.clilocmessage(500118) return 1 *************** *** 46,53 **** socket = char.socket socket.deltag('spiritspeaking') ! socket.settag('skill_delay', servertime() + SPSPEAK_DELAY) # Check for skill usage success ! if not char.checkskill(SPIRITSPEAK, 0, 1000): char.socket.clilocmessage(502443) return --- 45,52 ---- socket = char.socket socket.deltag('spiritspeaking') ! socket.settag('skill_delay', int( wolfpack.time.currenttime() + SPSPEAK_DELAY ) ) # Check for skill usage success ! if not char.checkskill( SPIRITSPEAK, 0, 1000 ): char.socket.clilocmessage(502443) return *************** *** 59,63 **** corpses = [] for item in items: ! if item.id == 0x2006 and not item.hastag('drained'): corpses.append(item) --- 58,62 ---- corpses = [] for item in items: ! if item.baseid == '2006' and not item.hastag('drained'): corpses.append(item) Index: lumberjacking.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/lumberjacking.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** lumberjacking.py 9 Jul 2004 10:30:26 -0000 1.14 --- lumberjacking.py 16 Jul 2004 07:09:27 -0000 1.15 *************** *** 1,8 **** import wolfpack import whrandom import skills from wolfpack.consts import * - from wolfpack.time import * from wolfpack.utilities import * from random import randint --- 1,8 ---- import wolfpack + import wolfpack.time import whrandom import skills from wolfpack.consts import * from wolfpack.utilities import * from random import randint *************** *** 22,26 **** woodtable = \ { ! 'plainwood': [ 0, 10, 0x0 ] } yewtree = [ 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797 ] --- 22,26 ---- woodtable = \ { ! 'plainwood': [ 0, 10, 0x0 ] } yewtree = [ 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797 ] *************** *** 36,40 **** return False ! if socket.hastag('is_lumberjacking') and ( socket.gettag( 'is_lumberjacking' ) > servertime() ): socket.clilocmessage( 500119, "", GRAY ) return False --- 36,40 ---- return False ! if socket.hastag('is_lumberjacking') and ( socket.gettag( 'is_lumberjacking' ) > wolfpack.time.currenttime() ): socket.clilocmessage( 500119, "", GRAY ) return False *************** *** 80,84 **** resname = veingem.gettag( 'resname' ) ! socket.settag( 'is_lumberjacking', int( servertime() + nextchopdelay ) ) hack_logs( char, target, tool, veingem ) --- 80,84 ---- resname = veingem.gettag( 'resname' ) ! socket.settag( 'is_lumberjacking', int( wolfpack.time.currenttime() + nextchopdelay ) ) hack_logs( char, target, tool, veingem ) Index: evaluatingintel.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/evaluatingintel.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** evaluatingintel.py 9 Jul 2004 10:30:26 -0000 1.10 --- evaluatingintel.py 16 Jul 2004 07:09:27 -0000 1.11 *************** *** 10,14 **** from math import floor import skills ! from wolfpack.time import currenttime EVALINTDELAY = 1000 --- 10,14 ---- from math import floor import skills ! import wolfpack.time EVALINTDELAY = 1000 *************** *** 20,25 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = currenttime() ! if cur_time < char.socket.gettag( 'skill_delay' ): socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 20,24 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 50,55 **** return False ! cur_time = servertime() ! char.socket.settag( 'skill_delay', cur_time + EVALINTDELAY ) if not char.checkskill( EVALUATINGINTEL, 0, 1000 ): --- 49,53 ---- return False ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + EVALINTDELAY ) ) if not char.checkskill( EVALUATINGINTEL, 0, 1000 ): Index: peacemaking.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/peacemaking.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** peacemaking.py 26 May 2004 13:07:25 -0000 1.8 --- peacemaking.py 16 Jul 2004 07:09:27 -0000 1.9 *************** *** 9,13 **** from wolfpack.consts import * from wolfpack.utilities import * ! from wolfpack.time import * import skills --- 9,13 ---- from wolfpack.consts import * from wolfpack.utilities import * ! import wolfpack.time import skills *************** *** 19,24 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 --- 19,23 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 *************** *** 71,76 **** char.socket.deltag( 'peacemaking_instrument' ) ! cur_time = servertime() ! char.socket.settag( 'skill_delay', ( cur_time + PEACE_DELAY ) ) # if target him/her self : standard (regional) mode --- 70,74 ---- char.socket.deltag( 'peacemaking_instrument' ) ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + PEACE_DELAY ) ) # if target him/her self : standard (regional) mode Index: poisoning.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/poisoning.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** poisoning.py 20 Jun 2004 20:34:28 -0000 1.2 --- poisoning.py 16 Jul 2004 07:09:27 -0000 1.3 *************** *** 7,14 **** from wolfpack.consts import * - from wolfpack.time import * from wolfpack.utilities import tobackpack import skills import wolfpack import random from system import poison --- 7,14 ---- from wolfpack.consts import * from wolfpack.utilities import tobackpack import skills import wolfpack + import wolfpack.time import random from system import poison *************** *** 159,163 **** if item.hastag( 'poisoning_char' ): item.deltag( 'poisoning_char' ) ! def onLoad(): skills.register( POISONING, poisoning ) --- 159,163 ---- if item.hastag( 'poisoning_char' ): item.deltag( 'poisoning_char' ) ! def onLoad(): skills.register( POISONING, poisoning ) Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/__init__.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** __init__.py 2 Jul 2004 13:40:46 -0000 1.15 --- __init__.py 16 Jul 2004 07:09:27 -0000 1.16 *************** *** 1,8 **** - import time import wolfpack import random import wolfpack.settings from wolfpack.consts import * - from random import randrange STRGAIN = 0 --- 1,6 ---- *************** *** 113,117 **** if object.hastag( tagname ): count = object.gettag( tagname ) ! object.settag( tagname, str( int( count + 1 ) ) ) if count <= ANTIMACROALLOWANCE: return True --- 111,115 ---- if object.hastag( tagname ): count = object.gettag( tagname ) ! object.settag( tagname, int( count + 1 ) ) if count <= ANTIMACROALLOWANCE: return True Index: mining.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/mining.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** mining.py 15 Jul 2004 22:08:02 -0000 1.32 --- mining.py 16 Jul 2004 07:09:27 -0000 1.33 *************** *** 46,50 **** def mining( char, pos, tool ): wolfpack.addtimer( 1300, "skills.mining.domining", [ char, SOUND_MINING, tool, pos ] ) ! char.socket.settag( 'is_mining', ( servertime() + miningdelay ) ) char.turnto( pos ) char.action( ANIM_ATTACK3 ) --- 46,50 ---- 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 ) char.action( ANIM_ATTACK3 ) *************** *** 201,209 **** # Remaining Tool Uses if not tool.hastag('remaining_uses'): ! tool.settag('remaining_uses', tool.health) else: remaining_uses = int(tool.gettag('remaining_uses')) if remaining_uses > 1: ! tool.settag('remaining_uses', remaining_uses - 1) tool.resendtooltip() else: --- 201,209 ---- # Remaining Tool Uses if not tool.hastag('remaining_uses'): ! tool.settag('remaining_uses', tool.health ) else: remaining_uses = int(tool.gettag('remaining_uses')) if remaining_uses > 1: ! tool.settag('remaining_uses', remaining_uses - 1 ) tool.resendtooltip() else: *************** *** 255,259 **** 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])) vein.deltag('resource_empty') return True --- 255,259 ---- 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] ) ) vein.deltag('resource_empty') return True Index: animaltaming.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/animaltaming.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** animaltaming.py 9 Jul 2004 10:30:26 -0000 1.15 --- animaltaming.py 16 Jul 2004 07:09:27 -0000 1.16 *************** *** 6,14 **** ################################################################# ! from wolfpack.consts import * ! from wolfpack.time import * import skills import wolfpack import whrandom # max number an animal can be tamed --- 6,15 ---- ################################################################# ! ! import wolfpack.time import skills import wolfpack import whrandom + from wolfpack.consts import * # max number an animal can be tamed *************** *** 28,33 **** def animaltaming( char, skill ): if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 29,33 ---- def animaltaming( char, skill ): if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 121,126 **** socket.clilocmessage( 1010598, "", 0x3b2, 3, totame ) ! cur_time = servertime() ! char.socket.settag('skill_delay', cur_time + TAMING_DELAY) # set timer --- 121,125 ---- socket.clilocmessage( 1010598, "", 0x3b2, 3, totame ) ! char.socket.settag('skill_delay', wolfpack.time.currenttime() + TAMING_DELAY) # set timer Index: itemid.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/itemid.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** itemid.py 26 May 2004 13:07:25 -0000 1.11 --- itemid.py 16 Jul 2004 07:09:27 -0000 1.12 *************** *** 18,22 **** if socket.hastag('skill_delay'): ! if servertime() < socket.gettag('skill_delay'): socket.clilocmessage(500118) return 1 --- 18,22 ---- if socket.hastag('skill_delay'): ! if wolfpack.time.currenttime() < socket.gettag('skill_delay'): socket.clilocmessage(500118) return 1 *************** *** 31,35 **** socket = char.socket ! socket.settag('skill_delay', servertime() + ITEMID_DELAY) # Identify an item and send the buy and sellprice. --- 31,35 ---- socket = char.socket ! socket.settag('skill_delay', int( wolfpack.time.currenttime() + ITEMID_DELAY ) ) # Identify an item and send the buy and sellprice. Index: animallore.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/animallore.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** animallore.py 9 Jul 2004 10:30:26 -0000 1.18 --- animallore.py 16 Jul 2004 07:09:27 -0000 1.19 *************** *** 6,14 **** ################################################################# ! from wolfpack.consts import * import wolfpack ! from wolfpack.time import * ! from wolfpack.gumps import cGump import skills ANIMALLORE_DELAY = 1000 --- 6,16 ---- ################################################################# ! import wolfpack ! import wolfpack.time import skills + from wolfpack.gumps import cGump + from wolfpack.consts import ANIMALLORE, MAGERY, TACTICS, ANATOMY, \ + EVALUATINGINTEL, POISONING, MAGICRESISTANCE, WRESTLING ANIMALLORE_DELAY = 1000 *************** *** 19,24 **** if char.socket.hastag( 'skill_delay' ): ! cur_time = servertime() ! if cur_time < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True --- 21,25 ---- if char.socket.hastag( 'skill_delay' ): ! if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return True *************** *** 80,84 **** loreGump.addPageButton( 317, 358, 0x15E3, 0x15E7, 1 ) ! loreGump.addHtmlGump( 147, 108, 210, 18, "<div align=center><i>%s</i></div>" %target.char.name, 0, 0 ) loreGump.addGump( 128,152, 2086 ) --- 81,85 ---- loreGump.addPageButton( 317, 358, 0x15E3, 0x15E7, 1 ) ! loreGump.addHtmlGump( 147, 108, 210, 18, "<div align=center><i>%s</i></div>" % target.char.name, 0, 0 ) loreGump.addGump( 128,152, 2086 ) *************** *** 86,105 **** loreGump.addXmfHtmlGump( 153, 168, 160, 18, 0x1003EA, 0, 0, 16000229 ) # Hits ! loreGump.addHtmlGump( 280, 168, 75, 18, "<div align=right>%i/%i</div>" %( target.char.health, target.char.strength ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 186, 160, 18, 0x1003EB, 0, 0, 16000229 ) # Stamina ! loreGump.addHtmlGump( 280, 186, 75, 18, "<div align=right>%i/%i</div>" %( target.char.stamina, target.char.dexterity ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 204, 160, 18, 0x1003EC, 0, 0, 16000229 ) # Mana ! loreGump.addHtmlGump( 280, 204, 75, 18, "<div align=right>%i/%i</div>" %( target.char.mana, target.char.intelligence ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 222, 160, 18, 0xFB0EF, 0, 0, 16000229 ) # Strength ! loreGump.addHtmlGump( 320, 222, 35, 18, "<div align=right>%i</div>" %target.char.strength, 0, 0 ) loreGump.addXmfHtmlGump( 153, 240, 160, 18, 0x2DC731, 0, 0, 16000229 ) # Dexterity ! loreGump.addHtmlGump( 320, 240, 35, 18, "<div align=right>%i</div>" %target.char.dexterity, 0, 0 ) loreGump.addXmfHtmlGump( 153, 258, 160, 18, 0x2DC730, 0, 0, 16000229 ) # Intelligence ! loreGump.addHtmlGump( 320, 258, 35, 18, "<div align=right>%i</div>" %target.char.intelligence, 0, 0 ) loreGump.addGump( 128, 278, 2086 ) --- 87,106 ---- loreGump.addXmfHtmlGump( 153, 168, 160, 18, 0x1003EA, 0, 0, 16000229 ) # Hits ! loreGump.addHtmlGump( 280, 168, 75, 18, "<div align=right>%i/%i</div>" % ( target.char.health, target.char.strength ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 186, 160, 18, 0x1003EB, 0, 0, 16000229 ) # Stamina ! loreGump.addHtmlGump( 280, 186, 75, 18, "<div align=right>%i/%i</div>" % ( target.char.stamina, target.char.dexterity ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 204, 160, 18, 0x1003EC, 0, 0, 16000229 ) # Mana ! loreGump.addHtmlGump( 280, 204, 75, 18, "<div align=right>%i/%i</div>" % ( target.char.mana, target.char.intelligence ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 222, 160, 18, 0xFB0EF, 0, 0, 16000229 ) # Strength ! loreGump.addHtmlGump( 320, 222, 35, 18, "<div align=right>%i</div>" % target.char.strength, 0, 0 ) loreGump.addXmfHtmlGump( 153, 240, 160, 18, 0x2DC731, 0, 0, 16000229 ) # Dexterity ! loreGump.addHtmlGump( 320, 240, 35, 18, "<div align=right>%i</div>" % target.char.dexterity, 0, 0 ) loreGump.addXmfHtmlGump( 153, 258, 160, 18, 0x2DC730, 0, 0, 16000229 ) # Intelligence ! loreGump.addHtmlGump( 320, 258, 35, 18, "<div align=right>%i</div>" % target.char.intelligence, 0, 0 ) loreGump.addGump( 128, 278, 2086 ) *************** *** 122,126 **** loreGump.addPageButton( 317, 358, 0x15E3, 0x15E7, 1 ) ! loreGump.addHtmlGump( 147, 108, 210, 18, "<div align=center><i>%s</i></center>" %target.char.name, 0, 0 ) loreGump.addGump( 128,152, 2086 ) --- 123,127 ---- loreGump.addPageButton( 317, 358, 0x15E3, 0x15E7, 1 ) ! loreGump.addHtmlGump( 147, 108, 210, 18, "<div align=center><i>%s</i></center>" % target.char.name, 0, 0 ) loreGump.addGump( 128,152, 2086 ) *************** *** 142,146 **** if char.poison > 0: ! loreGump.addHtmlGump( 280, 240, 75, 18, "<div align=right>%.1f</div>" %( target.char.skill[ POISONGING ] / 10.0 ), 0, 0 ) else: loreGump.addHtmlGump( 280, 240, 75, 18, "<div align=right>--</div>", 0, 0 ) --- 143,147 ---- if char.poison > 0: ! loreGump.addHtmlGump( 280, 240, 75, 18, "<div align=right>%.1f</div>" %( target.char.skill[ POISONING ] / 10.0 ), 0, 0 ) else: loreGump.addHtmlGump( 280, 240, 75, 18, "<div align=right>--</div>", 0, 0 ) *************** *** 150,160 **** loreGump.addXmfHtmlGump( 153, 276, 160, 18, 0xFEE75, 0, 0, 16000229 ) # Magery ! loreGump.addHtmlGump( 280, 276, 75, 18, "<div align=right>%.1f</div>" %( target.char.skill[ MAGERY ] / 10.0 ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 294, 160, 18, 0xFEE6C, 0, 0, 16000229 ) # Evaluating Intelligence ! loreGump.addHtmlGump( 280, 294, 75, 18, "<div align=right>%.1f</div>" %( target.char.skill[ EVALUATINGINTEL ] / 10.0 ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 312, 160, 18, 0xFEE8A, 0, 0, 16000229 ) # Meditation ! loreGump.addHtmlGump( 280, 312, 75, 18, "<div align=right>%.1f</div>" %( target.char.skill[ MEDITATION ] / 10.0 ), 0, 0 ) #page 3 --- 151,161 ---- loreGump.addXmfHtmlGump( 153, 276, 160, 18, 0xFEE75, 0, 0, 16000229 ) # Magery ! loreGump.addHtmlGump( 280, 276, 75, 18, "<div align=right>%.1f</div>" % ( target.char.skill[ MAGERY ] / 10.0 ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 294, 160, 18, 0xFEE6C, 0, 0, 16000229 ) # Evaluating Intelligence ! loreGump.addHtmlGump( 280, 294, 75, 18, "<div align=right>%.1f</div>" % ( target.char.skill[ EVALUATINGINTEL ] / 10.0 ), 0, 0 ) loreGump.addXmfHtmlGump( 153, 312, 160, 18, 0xFEE8A, 0, 0, 16000229 ) # Meditation ! loreGump.addHtmlGump( 280, 312, 75, 18, "<div align=right>%.1f</div>" % ( target.char.skill[ MEDITATION ] / 10.0 ), 0, 0 ) #page 3 *************** *** 170,174 **** loreGump.addPageButton( 317, 358, 0x15E3, 0x15E7, 2 ) ! loreGump.addHtmlGump( 147, 108, 210, 18, "<div align=center><i>%s</i></center>" %target.char.name, 0, 0 ) #loreGump.addGump( 128, 152, 2086 ) --- 171,175 ---- loreGump.addPageButton( 317, 358, 0x15E3, 0x15E7, 2 ) ! loreGump.addHtmlGump( 147, 108, 210, 18, "<div align=center><i>%s</i></center>" % target.char.name, 0, 0 ) #loreGump.addGump( 128, 152, 2086 ) *************** *** 218,223 **** loreGump.send( char ) ! cur_time = servertime() ! char.socket.settag( 'skill_delay', cur_time + ANIMALLORE_DELAY ) def onLoad(): --- 219,223 ---- loreGump.send( char ) ! char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + ANIMALLORE_DELAY ) ) def onLoad(): |
From: Richard M. <dr...@us...> - 2004-07-16 07:09:37
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134/system Modified Files: mysql_backup_db.py mysql_optimize_db.py Log Message: More import cleanups... Removed wolfpack.currentime() and moved it to wolfpack.time.currenttime() / wolfpack.time.servertime() It seems to belong here more than it would in wolfpack.currenttime() Scripts updated to support this. Index: mysql_optimize_db.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/mysql_optimize_db.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mysql_optimize_db.py 15 Jul 2004 01:04:23 -0000 1.7 --- mysql_optimize_db.py 16 Jul 2004 07:09:28 -0000 1.8 *************** *** 43,47 **** def onLoad(): if accountsdriver in supporteddrivers or worlddriver in supporteddrivers: ! wolfpack.addtimer( time, "system.mysql_optimize_db.timer", [ wolfpack.currenttime() ] ) wolfpack.registercommand( "optimizedb", cmdoptimizedb ) return --- 43,47 ---- def onLoad(): if accountsdriver in supporteddrivers or worlddriver in supporteddrivers: ! wolfpack.addtimer( time, "system.mysql_optimize_db.timer", [ wolfpack.time.currenttime() ] ) wolfpack.registercommand( "optimizedb", cmdoptimizedb ) return *************** *** 58,62 **** def timer( timer, args ): ! if args[0] + time <= wolfpack.currenttime(): if accountsdriver in supporteddrivers or worlddriver in supporteddrivers: # Optimize and restart timer --- 58,62 ---- def timer( timer, args ): ! if int( args[0] + time ) <= wolfpack.time.currenttime(): if accountsdriver in supporteddrivers or worlddriver in supporteddrivers: # Optimize and restart timer Index: mysql_backup_db.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/mysql_backup_db.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mysql_backup_db.py 15 Jul 2004 01:04:23 -0000 1.5 --- mysql_backup_db.py 16 Jul 2004 07:09:28 -0000 1.6 *************** *** 49,53 **** if enabled and backup_path: if accountsdriver == 'mysql' or worlddriver == 'mysql': ! wolfpack.addtimer( time, "system.mysql_backup_db.timer", [ wolfpack.currenttime() ] ) wolfpack.registercommand( "backupdb", cmdbackupdb ) return True --- 49,53 ---- if enabled and backup_path: if accountsdriver == 'mysql' or worlddriver == 'mysql': ! wolfpack.addtimer( time, "system.mysql_backup_db.timer", [ wolfpack.time.currenttime() ] ) wolfpack.registercommand( "backupdb", cmdbackupdb ) return True *************** *** 68,72 **** def timer( timer, args ): ! if enabled and backup_path and ( (args[0] + time) <= wolfpack.currenttime() ): if accountsdriver == 'mysql' or worlddriver == 'mysql': # Optimize and restart timer --- 68,72 ---- def timer( timer, args ): ! if enabled and backup_path and ( int( args[0] + time ) <= wolfpack.time.currenttime() ): if accountsdriver == 'mysql' or worlddriver == 'mysql': # Optimize and restart timer |
From: Richard M. <dr...@us...> - 2004-07-16 07:09:37
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134/wolfpack Modified Files: __init__.py consts.py Log Message: More import cleanups... Removed wolfpack.currentime() and moved it to wolfpack.time.currenttime() / wolfpack.time.servertime() It seems to belong here more than it would in wolfpack.currenttime() Scripts updated to support this. Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/__init__.py,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** __init__.py 7 Jul 2004 13:08:20 -0000 1.59 --- __init__.py 16 Jul 2004 07:09:28 -0000 1.60 *************** *** 22,26 **** queueaction = _wolfpack.queueaction registerpackethook = _wolfpack.registerpackethook - currenttime = _wolfpack.currenttime charcount = _wolfpack.charcount itemcount = _wolfpack.itemcount --- 22,25 ---- *************** *** 71,75 **** \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. """ --- 70,74 ---- \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. """ Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** consts.py 11 Jul 2004 21:07:13 -0000 1.72 --- consts.py 16 Jul 2004 07:09:28 -0000 1.73 *************** *** 305,339 **** # Layer Names LAYERNAMES = { ! LAYER_RIGHTHAND: 'Right hand', ! LAYER_LEFTHAND: 'Shield hand', ! LAYER_SHOES: 'Shoes', ! LAYER_PANTS: 'Pants', ! LAYER_SHIRT: 'Inner Torso', ! LAYER_HELM: 'Head', ! LAYER_GLOVES: 'Hands', ! LAYER_RING: 'Ring Finger', ! LAYER_UNUSED1: 'Unused', ! LAYER_NECK: 'Neck', ! LAYER_HAIR: 'Hair', ! LAYER_WAIST: 'Waist', ! LAYER_CHEST: 'Middle Torso', ! LAYER_BRACELET: 'Wrist', ! LAYER_UNUSED2: 'Unused 2', ! LAYER_BEARD: 'Beard', ! LAYER_TORSO: 'Outer Torso', ! LAYER_EARRINGS: 'Earrings', ! LAYER_ARMS: 'Arms', ! LAYER_CLOAK: 'Cloak', ! LAYER_BACKPACK: 'Backpack', ! LAYER_ROBE: 'Robe', ! LAYER_SKIRT: 'Skirt', ! LAYER_LEGS: 'Legs', ! LAYER_MOUNT: 'Mount', ! LAYER_NPCRESTOCK: 'NPC Restock', ! LAYER_NPCNORESTOCK: 'NPC No Restock', ! LAYER_NPCSELL: 'NPC Sell', ! LAYER_BANKBOX: 'Bankbox', ! LAYER_DRAGGING: 'Dragging', ! LAYER_TRADING: 'Trading' } --- 305,339 ---- # Layer Names LAYERNAMES = { ! LAYER_RIGHTHAND: 'Right hand', ! LAYER_LEFTHAND: 'Shield hand', ! LAYER_SHOES: 'Shoes', ! LAYER_PANTS: 'Pants', ! LAYER_SHIRT: 'Inner Torso', ! LAYER_HELM: 'Head', ! LAYER_GLOVES: 'Hands', ! LAYER_RING: 'Ring Finger', ! LAYER_UNUSED1: 'Unused', ! LAYER_NECK: 'Neck', ! LAYER_HAIR: 'Hair', ! LAYER_WAIST: 'Waist', ! LAYER_CHEST: 'Middle Torso', ! LAYER_BRACELET: 'Wrist', ! LAYER_UNUSED2: 'Unused 2', ! LAYER_BEARD: 'Beard', ! LAYER_TORSO: 'Outer Torso', ! LAYER_EARRINGS: 'Earrings', ! LAYER_ARMS: 'Arms', ! LAYER_CLOAK: 'Cloak', ! LAYER_BACKPACK: 'Backpack', ! LAYER_ROBE: 'Robe', ! LAYER_SKIRT: 'Skirt', ! LAYER_LEGS: 'Legs', ! LAYER_MOUNT: 'Mount', ! LAYER_NPCRESTOCK: 'NPC Restock', ! LAYER_NPCNORESTOCK: 'NPC No Restock', ! LAYER_NPCSELL: 'NPC Sell', ! LAYER_BANKBOX: 'Bankbox', ! LAYER_DRAGGING: 'Dragging', ! LAYER_TRADING: 'Trading' } |
From: Richard M. <dr...@us...> - 2004-07-16 07:09:36
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134/magic Modified Files: circle8.py necromancy.py necrospells.py nightsight.py paralyzefield.py Log Message: More import cleanups... Removed wolfpack.currentime() and moved it to wolfpack.time.currenttime() / wolfpack.time.servertime() It seems to belong here more than it would in wolfpack.currenttime() Scripts updated to support this. Index: nightsight.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/nightsight.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nightsight.py 26 May 2004 13:07:23 -0000 1.2 --- nightsight.py 16 Jul 2004 07:09:27 -0000 1.3 *************** *** 1,4 **** ! from wolfpack import time # --- 1,4 ---- ! import wolfpack # Index: paralyzefield.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/paralyzefield.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** paralyzefield.py 26 May 2004 13:07:23 -0000 1.2 --- paralyzefield.py 16 Jul 2004 07:09:27 -0000 1.3 *************** *** 1,5 **** import wolfpack ! from wolfpack.consts import * # --- 1,5 ---- import wolfpack ! from wolfpack.consts import MAGICRESISTANCE # Index: necromancy.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/necromancy.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** necromancy.py 26 May 2004 13:07:23 -0000 1.3 --- necromancy.py 16 Jul 2004 07:09:27 -0000 1.4 *************** *** 13,19 **** class NecroSpell(Spell): ! def __init__(self): ! Spell.__init__(self, 0) ! self.skill = NECROMANCY ! self.damageskill = SPIRITSPEAK ! self.mana = 0 --- 13,19 ---- class NecroSpell(Spell): ! def __init__(self): ! Spell.__init__(self, 0) ! self.skill = NECROMANCY ! self.damageskill = SPIRITSPEAK ! self.mana = 0 Index: circle8.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle8.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** circle8.py 8 Jun 2004 20:05:19 -0000 1.8 --- circle8.py 16 Jul 2004 07:09:27 -0000 1.9 *************** *** 74,78 **** ev = wolfpack.addnpc('summoned_energy_vortex', target) ! ev.summontime = wolfpack.time.servertime() + 120000 ev.summoned = 1 ev.soundeffect(0x212) --- 74,78 ---- ev = wolfpack.addnpc('summoned_energy_vortex', target) ! ev.summontime = wolfpack.time.currenttime() + 120000 ev.summoned = 1 ev.soundeffect(0x212) *************** *** 125,129 **** creature.addevent('speech.pets') creature.owner = char ! creature.summontime = wolfpack.time.servertime() + 120000 creature.summoned = 1 creature.soundeffect(0x217) --- 125,129 ---- creature.addevent('speech.pets') creature.owner = char ! creature.summontime = wolfpack.time.currenttime() + 120000 creature.summoned = 1 creature.soundeffect(0x217) Index: necrospells.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/necrospells.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** necrospells.py 11 May 2004 15:18:55 -0000 1.2 --- necrospells.py 16 Jul 2004 07:09:27 -0000 1.3 *************** *** 48,52 **** #animate.controlslots = 1 #animate.owner = char ! #animate.summontime = wolfpack.time.servertime() + 120000 #animate.summoned = 1 #item.remove() \ No newline at end of file --- 48,52 ---- #animate.controlslots = 1 #animate.owner = char ! #animate.summontime = wolfpack.time.currenttime() + 120000 #animate.summoned = 1 #item.remove() \ No newline at end of file |
From: Richard M. <dr...@us...> - 2004-07-16 07:09:35
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134/commands Modified Files: wipe.py Log Message: More import cleanups... Removed wolfpack.currentime() and moved it to wolfpack.time.currenttime() / wolfpack.time.servertime() It seems to belong here more than it would in wolfpack.currenttime() Scripts updated to support this. Index: wipe.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/wipe.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wipe.py 11 Apr 2004 02:22:57 -0000 1.2 --- wipe.py 16 Jul 2004 07:09:27 -0000 1.3 *************** *** 32,38 **** import string import wolfpack.gumps ! from wolfpack.gumps import * from wolfpack.utilities import * - from wolfpack import * def getBoundingBox( socket, callback ) : --- 32,37 ---- import string import wolfpack.gumps ! from wolfpack.gumps import cGump from wolfpack.utilities import * def getBoundingBox( socket, callback ) : |
From: Richard M. <dr...@us...> - 2004-07-16 07:09:35
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134 Modified Files: environment.py ore.py pickaxe.py potionkeg.py potions.py Log Message: More import cleanups... Removed wolfpack.currentime() and moved it to wolfpack.time.currenttime() / wolfpack.time.servertime() It seems to belong here more than it would in wolfpack.currenttime() Scripts updated to support this. Index: environment.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/environment.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** environment.py 9 Jul 2004 21:47:45 -0000 1.13 --- environment.py 16 Jul 2004 07:09:21 -0000 1.14 *************** *** 3,7 **** import wolfpack ! import time import random from wolfpack.consts import COTTONPLANTS_REGROW, ANIM_ATTACK5, TINKERING, \ --- 3,7 ---- import wolfpack ! import wolfpack.time import random from wolfpack.consts import COTTONPLANTS_REGROW, ANIM_ATTACK5, TINKERING, \ *************** *** 13,22 **** def cotton( char, item ): - currenttime = int( time.time() ) if item.hastag( 'lastpick' ): lastpick = item.gettag( 'lastpick' ) ! if lastpick + COTTONPLANTS_REGROW > currenttime: char.message( "You can't pick cotton here yet." ) return 1 --- 13,21 ---- def cotton( char, item ): if item.hastag( 'lastpick' ): lastpick = item.gettag( 'lastpick' ) ! if lastpick + COTTONPLANTS_REGROW > wolfpack.time.currenttime(): char.message( "You can't pick cotton here yet." ) return 1 *************** *** 33,37 **** # Set a timer for the cotton plant ! item.settag( 'lastpick', currenttime ) return 1 --- 32,36 ---- # Set a timer for the cotton plant ! item.settag( 'lastpick', wolfpack.time.currenttime() ) return 1 Index: ore.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/ore.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ore.py 15 Jul 2004 20:08:30 -0000 1.21 --- ore.py 16 Jul 2004 07:09:22 -0000 1.22 *************** *** 9,13 **** from wolfpack.consts import GRAY, MINING, SOUND_HAMMER_1 from skills import mining - from wolfpack.time import * from random import randrange, randint from system.lootlists import DEF_ORES # Gets BaseIDs --- 9,12 ---- Index: potions.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/potions.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** potions.py 13 Jul 2004 06:35:36 -0000 1.41 --- potions.py 16 Jul 2004 07:09:26 -0000 1.42 *************** *** 1,7 **** import wolfpack from random import randint, random - from wolfpack import time from wolfpack.utilities import hex2dec, throwobject, energydamage, checkLoS - import math from system import poison from wolfpack.consts import RED, ALCHEMY, STRENGTH_TIME, ANIM_FIDGET3, \ --- 1,8 ---- + import wolfpack + import wolfpack.time + import math from random import randint, random from wolfpack.utilities import hex2dec, throwobject, energydamage, checkLoS from system import poison from wolfpack.consts import RED, ALCHEMY, STRENGTH_TIME, ANIM_FIDGET3, \ *************** *** 410,422 **** if not char.hastag( "heal_pot_timer" ): ! char.settag( "heal_pot_timer", (time.servertime() + HEAL_POT_DELAY) ) # Compare elapsed = int( char.gettag( "heal_pot_timer" ) ) ! if elapsed > time.servertime(): socket.clilocmessage( 500235, '', GRAY ) # You must wait 10 seconds before using another healing potion. return False else: ! char.settag( "heal_pot_timer", (time.servertime() + HEAL_POT_DELAY) ) amount = 0 --- 411,423 ---- if not char.hastag( "heal_pot_timer" ): ! char.settag( "heal_pot_timer", (wolfpack.time.currenttime() + HEAL_POT_DELAY) ) # Compare elapsed = int( char.gettag( "heal_pot_timer" ) ) ! if elapsed > wolfpack.time.currenttime(): socket.clilocmessage( 500235, '', GRAY ) # You must wait 10 seconds before using another healing potion. return False else: ! char.settag( "heal_pot_timer", (wolfpack.time.currenttime() + HEAL_POT_DELAY) ) amount = 0 *************** *** 506,518 **** if not char.hastag( "dex_pot_timer" ): ! char.settag( "dex_pot_timer", (time.servertime() + AGILITY_TIME) ) # Compare elapsed = int( char.gettag( "dex_pot_timer" ) ) ! if elapsed > time.servertime(): socket.clilocmessage(502173) # You are already under a similar effect. return False else: ! char.settag( 'dex_pot_timer', (time.servertime() + AGILITY_TIME) ) if char.dexterity + bonus < 1: --- 507,519 ---- if not char.hastag( "dex_pot_timer" ): ! char.settag( "dex_pot_timer", (wolfpack.time.currenttime() + AGILITY_TIME) ) # Compare elapsed = int( char.gettag( "dex_pot_timer" ) ) ! if elapsed > wolfpack.time.currenttime(): socket.clilocmessage(502173) # You are already under a similar effect. return False else: ! char.settag( 'dex_pot_timer', (wolfpack.time.currenttime() + AGILITY_TIME) ) if char.dexterity + bonus < 1: *************** *** 553,565 **** if not char.hastag( "str_pot_timer" ): ! char.settag( "str_pot_timer", (time.servertime() + STRENGTH_TIME) ) # Compare elapsed = int( char.gettag( "str_pot_timer" ) ) ! if elapsed > time.servertime(): socket.clilocmessage(502173) # You are already under a similar effect return False else: ! char.settag( 'str_pot_timer', (time.servertime() + STRENGTH_TIME) ) if char.strength + bonus < 1: --- 554,566 ---- if not char.hastag( "str_pot_timer" ): ! char.settag( "str_pot_timer", (wolfpack.time.currenttime() + STRENGTH_TIME) ) # Compare elapsed = int( char.gettag( "str_pot_timer" ) ) ! if elapsed > wolfpack.time.currenttime(): socket.clilocmessage(502173) # You are already under a similar effect return False else: ! char.settag( 'str_pot_timer', (wolfpack.time.currenttime() + STRENGTH_TIME) ) if char.strength + bonus < 1: Index: pickaxe.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/pickaxe.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pickaxe.py 9 Jul 2004 21:47:45 -0000 1.4 --- pickaxe.py 16 Jul 2004 07:09:26 -0000 1.5 *************** *** 7,20 **** import wolfpack import skills import whrandom import wolfpack.utilities from wolfpack.consts import GRAY, LAYER_MOUNT - from wolfpack.time import * - def onUse( char, tool ): #Already digging ? ! if char.socket.hastag( 'is_mining' ) and ( char.socket.gettag( 'is_mining' ) > servertime() ): # You are already digging. char.socket.clilocmessage( 503029, "", GRAY ) --- 7,19 ---- import wolfpack + import wolfpack.time import skills import whrandom import wolfpack.utilities from wolfpack.consts import GRAY, LAYER_MOUNT def onUse( char, tool ): #Already digging ? ! if char.socket.hastag( 'is_mining' ) and ( char.socket.gettag( 'is_mining' ) > wolfpack.time.currenttime() ): # You are already digging. char.socket.clilocmessage( 503029, "", GRAY ) Index: potionkeg.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/potionkeg.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** potionkeg.py 12 Jul 2004 21:06:29 -0000 1.9 --- potionkeg.py 16 Jul 2004 07:09:26 -0000 1.10 *************** *** 1,5 **** import wolfpack - import wolfpack.time import wolfpack.utilities # Imports the potion table. --- 1,4 ---- |
From: Richard M. <dr...@us...> - 2004-07-16 07:09:35
|
Update of /cvsroot/wpdev/xmlscripts/scripts/combat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134/combat Modified Files: __init__.py Log Message: More import cleanups... Removed wolfpack.currentime() and moved it to wolfpack.time.currenttime() / wolfpack.time.servertime() It seems to belong here more than it would in wolfpack.currenttime() Scripts updated to support this. Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/combat/__init__.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** __init__.py 16 Jun 2004 20:18:43 -0000 1.12 --- __init__.py 16 Jul 2004 07:09:26 -0000 1.13 *************** *** 1,4 **** --- 1,5 ---- import wolfpack + import wolfpack.time from wolfpack.consts import * import combat.aos *************** *** 44,48 **** if weapon and (weapon.type == 1007 or weapon.type == 1006): # We have to be standing for >= 1000 ms, otherwise try again later ! if attacker.lastmovement + 1000 > wolfpack.currenttime(): attacker.nextswing = attacker.lastmovement + 1000 return --- 45,49 ---- if weapon and (weapon.type == 1007 or weapon.type == 1006): # We have to be standing for >= 1000 ms, otherwise try again later ! if attacker.lastmovement + 1000 > wolfpack.time.currenttime(): attacker.nextswing = attacker.lastmovement + 1000 return |
From: Richard M. <dr...@us...> - 2004-07-15 22:08:12
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3311/skills Modified Files: mining.py Log Message: Bah, I feel like I've been rushed a lot Index: mining.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/mining.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** mining.py 9 Jul 2004 10:30:26 -0000 1.31 --- mining.py 15 Jul 2004 22:08:02 -0000 1.32 *************** *** 7,14 **** import wolfpack import skills import random ! from wolfpack.consts import * ! from wolfpack.time import * from wolfpack import console from wolfpack.utilities import ismountainorcave, tobackpack --- 7,15 ---- import wolfpack + import wolfpack.time import skills import random ! from wolfpack.consts import MINING, GRAY, MINING_REFILLTIME, MINING_ORE, \ ! MINING_MAX_DISTANCE, ANIM_ATTACK3, SOUND_MINING from wolfpack import console from wolfpack.utilities import ismountainorcave, tobackpack |
From: Richard M. <dr...@us...> - 2004-07-15 22:08:11
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3311/commands Modified Files: kill.py Log Message: Bah, I feel like I've been rushed a lot Index: kill.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/kill.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kill.py 9 Jul 2004 21:08:36 -0000 1.2 --- kill.py 15 Jul 2004 22:07:51 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- def dokill( char, args, target ): + socket = char.socket if target.char and not target.char.dead: if target.char.invulnerable: |
From: Richard M. <dr...@us...> - 2004-07-15 21:18:34
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26434/webroot Modified Files: ChangeLog.wolfpack Log Message: wheeee.... Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ChangeLog.wolfpack 15 Jul 2004 01:50:50 -0000 1.22 --- ChangeLog.wolfpack 15 Jul 2004 21:18:26 -0000 1.23 *************** *** 32,35 **** --- 32,36 ---- - Moved windows from walls. New file: windows.xml - Changed direction to lightvalue in light objects. + - Cleanups to prevent add menu crashes/hangs. * Python Script Changes: - New Command: taginfo *************** *** 70,73 **** --- 71,76 ---- - Fixed renaming runes - Made runebooks function again. + Gate/Recall still not functional, charges work however. + - Fixed a bug with melting ore. * Misc. Changes: - New Features: |
From: Richard M. <dr...@us...> - 2004-07-15 21:18:23
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/buildings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26363/buildings Modified Files: dungeon.xml windows.xml Log Message: Updates Index: dungeon.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/buildings/dungeon.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dungeon.xml 2 Jun 2004 15:02:18 -0000 1.9 --- dungeon.xml 15 Jul 2004 21:18:11 -0000 1.10 *************** *** 2688,2692 **** <id>0x1D13</id> <nodecay /> ! <category>Dungeon\Coffins\Body in Wooden Coffin 1 (W/E) 1</category> </item> --- 2688,2692 ---- <id>0x1D13</id> <nodecay /> ! <category>Dungeon\Coffins\Wooden\Body\Body in Wooden Coffin 1 (W/E) 1</category> </item> [...2321 lines suppressed...] --- 3762,3766 ---- <id>0x1C5E</id> <nodecay /> ! <category>Dungeon\Coffins\Wooden\Wooden Coffin 3 Lid (N/S) 3</category> </item> *************** *** 3768,3772 **** <id>0x1C5F</id> <nodecay /> ! <category>Dungeon\Coffins\Wooden Coffin 3 Lid (N/S) 4</category> </item> --- 3768,3772 ---- <id>0x1C5F</id> <nodecay /> ! <category>Dungeon\Coffins\Wooden\Wooden Coffin 3 Lid (N/S) 4</category> </item> Index: windows.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/buildings/windows.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** windows.xml 11 Jul 2004 21:05:35 -0000 1.1 --- windows.xml 15 Jul 2004 21:18:13 -0000 1.2 *************** *** 28,32 **** <category>Buildings\Walls\Stone Wall 1\Window 1</category> <nodecay/> ! <lightsource>2</lightsource> </item> --- 28,32 ---- <category>Buildings\Walls\Stone Wall 1\Window 1</category> <nodecay/> ! <lightsource>0</lightsource> </item> |
From: Richard M. <dr...@us...> - 2004-07-15 20:31:26
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16946/magic Modified Files: runebook.py Log Message: Runebook fixes Index: runebook.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/runebook.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** runebook.py 15 Jul 2004 01:50:41 -0000 1.4 --- runebook.py 15 Jul 2004 20:31:14 -0000 1.5 *************** *** 281,285 **** # recall to the rune char.say( "Kal Ort Por", 5 ) ! wolfpack.addtimer( 2000, "magic.runebook.recall0", [ char.serial, runes[ runenum ], runebook.serial, charges ] ) # set default button : 101 - 116 elif( button > 100 and button < 117 ): --- 281,285 ---- # recall to the rune char.say( "Kal Ort Por", 5 ) ! wolfpack.addtimer( 2000, "magic.runebook.recall0", [ char.serial, runes[ runenum ], item.serial, charges ] ) # set default button : 101 - 116 elif( button > 100 and button < 117 ): *************** *** 359,365 **** # cast spell if( char.mana < 11 ): ! char.socket.sysmessage( ) return 1 ! char.soundeffect( 0x1fd ) char.socket.sysmessage( "not implemented yet." ) return 1 --- 359,365 ---- # cast spell if( char.mana < 11 ): ! char.socket.sysmessage( "You lack the mana to recall." ) return 1 ! # Insert link to Recall Spell! char.socket.sysmessage( "not implemented yet." ) return 1 *************** *** 375,379 **** char.socket.sysmessage( "runebook script error." ) return 1 char.socket.sysmessage( "not implemented yet" ) return 1 - --- 375,379 ---- char.socket.sysmessage( "runebook script error." ) return 1 + # Insert link to Gate Travel Spell! char.socket.sysmessage( "not implemented yet" ) return 1 |
From: Richard M. <dr...@us...> - 2004-07-15 20:08:46
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13974/commands Modified Files: account.py Log Message: Lots of fixes to the account command Forge BaseID's are now checked. Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** account.py 15 Jul 2004 18:44:24 -0000 1.9 --- account.py 15 Jul 2004 20:08:30 -0000 1.10 *************** *** 51,60 **** from wolfpack.consts import LOG_MESSAGE - usage0 = "Account Command Usage:" - usage1 = "- account create username password" - usage2 = "- account remove username" - usage3 = "- account set username key value" - usage4 = "- account show username key" - # Loads the command def onLoad(): --- 51,54 ---- *************** *** 67,75 **** args = args.strip() if len(args) == 0: ! socket.sysmessage( usage0 ) ! socket.sysmessage( usage1 ) ! socket.sysmessage( usage2 ) ! socket.sysmessage( usage3 ) ! socket.sysmessage( usage4 ) return False elif len( args ) > 0: --- 61,65 ---- args = args.strip() if len(args) == 0: ! usageerror( socket ) return False elif len( args ) > 0: *************** *** 78,111 **** # Error Check if len( args ) >= 5: ! useageerror( socket ) return False ! # One Argument ! if len( args ) == 1: ! action = args[0] ! action = action.lower() ! # Reload Accounts ! if action == 'reload': ! char.log( LOG_MESSAGE, "Reloaded accounts.\n" % char.serial ) ! wolfpack.accounts.reload() ! return True ! # Save Accounts ! elif action == 'save': ! char.log( LOG_MESSAGE, "Saved accounts.\n" % char.serial ) ! wolfpack.accounts.save() ! return True ! else: ! useageerror( socket ) ! return False ! # Two Arguments ! elif len( args ) == 2: ! ( action, username ) = args action = action.lower() username = username.lower() ! # Remove Accounts ! if action == 'remove': ! accountRemove( socket, username ) return True else: ! useageerror( socket ) return False # Three Arguments --- 68,89 ---- # Error Check if len( args ) >= 5: ! usageerror( socket ) return False ! # Four Arguments ! elif len( args ) == 4: ! ( action, username, key, value ) = args action = action.lower() username = username.lower() ! key = key.lower() ! # Error Checking ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: ! usageerror( socket ) ! return False ! # Set Accounts ! elif action.lower() == 'set': ! accountSet( socket, username, key, value ) return True else: ! usageerror( socket ) return False # Three Arguments *************** *** 114,122 **** action = action.lower() username = username.lower() if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: ! useageerror( socket ) return False # Create Accounts ! if action == 'create': accountCreate( socket, username, key ) return True --- 92,101 ---- action = action.lower() username = username.lower() + # Error Checking if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: ! usageerror( socket ) return False # Create Accounts ! elif action == 'create': accountCreate( socket, username, key ) return True *************** *** 126,158 **** return True else: ! useageerror( socket ) return False ! # Four Arguments ! elif len( args ) == 4: ! ( action, username, key, value ) = args action = action.lower() username = username.lower() ! key = key.lower() ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: ! useageerror( socket ) return False ! # Set Accounts ! if action.lower() == 'set': ! accountSet( socket, username, key, value ) return True else: ! useageerror( socket ) return False # Error else: ! useageerror( socket ) return False def usageerror( socket ): ! socket.sysmessage( usage0 ) ! socket.sysmessage( usage1 ) ! socket.sysmessage( usage2 ) ! socket.sysmessage( usage3 ) ! socket.sysmessage( usage4 ) return --- 105,159 ---- return True else: ! usageerror( socket ) return False ! # Two Arguments ! elif len( args ) == 2: ! ( action, username ) = args action = action.lower() username = username.lower() ! # Error Checking ! if len( action ) == 0 or len( username ) == 0: ! usageerror( socket ) return False ! # Remove Accounts ! elif action == 'remove': ! accountRemove( socket, username ) return True else: ! usageerror( socket ) ! return False ! # One Argument ! elif len( args ) == 1: ! action = args[0] ! action = action.lower() ! # Error Checking ! if len( action ) == 0: ! usageerror( socket ) ! return False ! # Reload Accounts ! elif action == 'reload': ! char.log( LOG_MESSAGE, "Reloaded accounts.\n") ! wolfpack.accounts.reload() ! return True ! # Save Accounts ! elif action == 'save': ! char.log( LOG_MESSAGE, "Saved accounts.\n") ! wolfpack.accounts.save() ! return True ! else: ! usageerror( socket ) return False # Error else: ! usageerror( socket ) return False + # Echo usage def usageerror( socket ): ! socket.sysmessage( "Account Command Usage:" ) ! socket.sysmessage( "- account create username password" ) ! socket.sysmessage( "- account set username key value" ) ! socket.sysmessage( "- account set username key value" ) ! socket.sysmessage( "- account show username key" ) return *************** *** 177,183 **** return False else: account.delete() ! socket.sysmessage( "Success: Account %s removed!" % account.name ) ! char.log( LOG_MESSAGE, "Removed account: %s\n" % account.name ) return True # Failure --- 178,185 ---- return False else: + oldname = str( account.name ) account.delete() ! socket.sysmessage( "Success: Account %s removed!" % oldname ) ! char.log( LOG_MESSAGE, "Removed account: %s\n" % oldname ) return True # Failure *************** *** 188,191 **** --- 190,195 ---- # Creates a new account def accountCreate( socket, username, password ): + account = None + characcount = None char = socket.player characcount = wolfpack.accounts.find( char.account.name ) *************** *** 214,218 **** newaccount.acl = 'player' socket.sysmessage( "You created the account successfully!" ) ! char.log( LOG_MESSAGE, "Created account: %s\n" % account.name ) return True # Failure --- 218,222 ---- newaccount.acl = 'player' socket.sysmessage( "You created the account successfully!" ) ! char.log( LOG_MESSAGE, "Created account: %s\n" % newaccount.name ) return True # Failure *************** *** 223,229 **** --- 227,237 ---- # Shows account properties def accountShow( socket, username, key ): + account = None + characcount = None char = socket.player characcount = wolfpack.accounts.find( char.account.name ) account = wolfpack.accounts.find( username ) + if not account: + return False # Usernames are limited to 16 characters in length if len( username ) > 16 or len( username ) == 0: *************** *** 286,292 **** --- 294,308 ---- # Sets account properties def accountSet( socket, username, key, value ): + account = None + characcount = None char = socket.player characcount = wolfpack.accounts.find( char.account.name ) account = wolfpack.accounts.find( username ) + if not account: + socket.sysmessage( "Error: No such account exists." ) + return False + if len( value ) == 0: + socket.sysmessage( "Error: No value was given." ) + return False # Usernames are limited to 16 characters in length if len( username ) > 16 or len( username ) == 0: *************** *** 297,363 **** return False # Find the account ! else: ! if account: ! if account.rank >= characcount.rank and account.name != characcount.name: ! socket.sysmessage( "Error: Your account rank does not permit this!" ) ! return False ! else: ! # ACL ! if key == 'acl': ! if value in wolfpack.accounts.acls(): ! oldvalue = account.acl ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, oldvalue ) ) ! account.acl = value ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.acl ) ) ! char.log( LOG_MESSAGE, "Modified %s.acl ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) ! return True ! else: ! socket.sysmessage( "Error: %s is not a valid account.acl!" % value ) return False ! # Flags ! elif key == 'flags': ! oldvalue = account.flags ! socket.sysmessage( "Previous: %s.flags = %s" % ( account.name, account.flags ) ) ! account.flags = hex2dec(value) ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.flags ) ) ! char.log( LOG_MESSAGE, "Modified %s.flags ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) return True - # MultiGems - elif key == 'multigems': - if value.lower() == "true" or value.lower() == "false" or value == 1 or value == 0: - oldvalue = account.multigems - socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, account.multigems ) ) - account.multigems = value - socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.multigems ) ) - char.log( LOG_MESSAGE, "Modified %s.multigems ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) - return True - else: - socket.sysmessage( "Error: The account.multigems property must be boolean!" ) - return False - # Password - elif key == 'password': - if len( key ) > 16 or len( key ) == 0: - if len( key ) > 16: - socket.sysmessage( "Error: Password exceeds the 16 character limit!" ) - if len( key ) == 0: - socket.sysmessage( "Error: Password is NULL!" ) - return False - else: - oldvalue = account.password - account.password = key - socket.sysmessage( "Changed: %s.password" % ( account.name, account.password ) ) - char.log( LOG_MESSAGE, "Modified %s.password.\n" % ( char.serial, account.name ) ) - return True - # READ ONLY VALUES - elif key == 'name' or key == 'lastlogin' or key == 'inuse' or key == 'characters' or key == 'rank': - char.log( LOG_MESSAGE, "Attempted modification of read-only value %s.%s.\n" % ( char.serial, account.name, key ) ) - socket.sysmessage( "Error: The account.%s property is read only!" % key ) - return False - # Unknown else: ! socket.sysmessage( "Error: Unknown account property given!" ) return False ! # Failure to find the account ! else: ! socket.sysmessage( "Error: Account %s could not be located!" % username ) ! return True --- 313,389 ---- return False # Find the account ! elif account: ! if account.rank >= characcount.rank and account.name != characcount.name: ! socket.sysmessage( "Error: Your account rank does not permit this!" ) ! return False ! else: ! # ACL ! if key == 'acl': ! acl_list = None ! acl_list = wolfpack.accounts.acls() ! if not acl_list or len( acl_list ) == 0: ! socket.sysmessage( "Error: No ACLs are defined!" ) ! return False ! if not value in acl_list: ! socket.sysmessage( "Error: %s is not a valid account.acl!" % value ) ! return False ! else: ! oldvalue = None ! oldvalue = str( account.acl ) ! if not oldvalue: ! socket.sysmessage( "Warning: This account previously had no ACL!" ) ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, oldvalue ) ) ! account.acl = str( value ) ! if str( account.acl ) != str( value ): ! socket.sysmessage( "Error: Failure to set new account ACL!" ) return False ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.acl ) ) ! char.log( LOG_MESSAGE, "Modified %s.acl ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) ! return True ! # Flags ! elif key == 'flags': ! oldvalue = account.flags ! socket.sysmessage( "Previous: %s.flags = %s" % ( account.name, account.flags ) ) ! account.flags = hex2dec(value) ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.flags ) ) ! char.log( LOG_MESSAGE, "Modified %s.flags ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) ! return True ! # MultiGems ! elif key == 'multigems': ! if value.lower() == "true" or value.lower() == "false" or value == 1 or value == 0: ! oldvalue = account.multigems ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, account.multigems ) ) ! account.multigems = value ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.multigems ) ) ! char.log( LOG_MESSAGE, "Modified %s.multigems ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) return True else: ! socket.sysmessage( "Error: The account.multigems property must be boolean!" ) return False ! # Password ! elif key == 'password': ! if len( key ) > 16 or len( key ) == 0: ! if len( key ) > 16: ! socket.sysmessage( "Error: Password exceeds the 16 character limit!" ) ! if len( key ) == 0: ! socket.sysmessage( "Error: Password is NULL!" ) ! return False ! else: ! oldvalue = account.password ! account.password = key ! socket.sysmessage( "Changed: %s.password" % ( account.name, account.password ) ) ! char.log( LOG_MESSAGE, "Modified %s.password.\n" % ( char.serial, account.name ) ) ! return True ! # READ ONLY VALUES ! elif key == 'name' or key == 'lastlogin' or key == 'inuse' or key == 'characters' or key == 'rank': ! char.log( LOG_MESSAGE, "Attempted modification of read-only value %s.%s.\n" % ( char.serial, account.name, key ) ) ! socket.sysmessage( "Error: The account.%s property is read only!" % key ) ! return False ! # Unknown ! else: ! socket.sysmessage( "Error: Unknown account property given!" ) ! return False ! # Failure to find the account ! else: ! socket.sysmessage( "Error: Account %s could not be located!" % username ) ! return True |
From: Richard M. <dr...@us...> - 2004-07-15 20:08:46
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13974 Modified Files: ore.py Log Message: Lots of fixes to the account command Forge BaseID's are now checked. Index: ore.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/ore.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ore.py 9 Jul 2004 21:47:45 -0000 1.20 --- ore.py 15 Jul 2004 20:08:30 -0000 1.21 *************** *** 13,23 **** from system.lootlists import DEF_ORES # Gets BaseIDs ! forgeids = [ 0xfb1, 0x197a, 0x197b, 0x197c, 0x197d, 0x197e, 0x197f, 0x1980, ! 0x1981, 0x1982, 0x1983, 0x1984, 0x1985, 0x1986, 0x1987, 0x1988, ! 0x1989, 0x198a, 0x198b, 0x198c, 0x198d, 0x198e, 0x198f, 0x1990, ! 0x1991, 0x1992, 0x1993, 0x1994, 0x1995, 0x1996, 0x1997, 0x1998, ! 0x1999, 0x199a, 0x199b, 0x199c, 0x199d, 0x199e, 0x199f, 0x19a0, ! 0x19a1, 0x19a2, 0x19a3, 0x19a4, 0x19a5, 0x19a6, 0x19a7, 0x19a8, ! 0x19a9 ] def onShowTooltip(player, object, tooltip): --- 13,22 ---- from system.lootlists import DEF_ORES # Gets BaseIDs ! FORGEIDS = [ 'fb1', '197a', '197b', '197c', '197d', '197e', '197f', '1980', \ ! '1981', '1982', '1983', '1984', '1985', '1986', '1987', '1988', '1989', \ ! '198a', '198b', '198c', '198d', '198e', '198f', '1990', '1991', '1992', \ ! '1993', '1994', '1995', '1996', '1997', '1998', '1999', '199a', '199b', \ ! '199c', '199d', '199e', '199f', '19a0', '19a1', '19a2', '19a3', '19a4', \ ! '19a5', '19a6', '19a7', '19a8', '19a9' ] def onShowTooltip(player, object, tooltip): *************** *** 81,85 **** # We go onto creating ingots here. ! if target.item.baseid in forgeids: if item.baseid in DEF_ORES: if char.pos.distance( target.pos ) > 3: --- 80,84 ---- # We go onto creating ingots here. ! if target.item.baseid in FORGEIDS: if item.baseid in DEF_ORES: if char.pos.distance( target.pos ) > 3: |
From: Richard M. <dr...@us...> - 2004-07-15 18:44:44
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29896 Modified Files: account.py Log Message: Fixes Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** account.py 9 Jul 2004 21:08:36 -0000 1.8 --- account.py 15 Jul 2004 18:44:24 -0000 1.9 *************** *** 75,152 **** elif len( args ) > 0: # Command with arguments ! try: ! args = args.split( ' ' ) ! # Error Check ! if len( args ) >= 5: return False ! # One Argument ! if len( args ) == 1: ! action = args[0] ! action = action.lower() ! # Reload Accounts ! if action == 'reload': ! char.log( LOG_MESSAGE, "Reloaded accounts.\n" % char.serial ) ! wolfpack.accounts.reload() ! return True ! # Save Accounts ! elif action == 'save': ! char.log( LOG_MESSAGE, "Saved accounts.\n" % char.serial ) ! wolfpack.accounts.save() ! return True ! else: ! return False ! # Two Arguments ! elif len( args ) == 2: ! ( action, username ) = args ! action = action.lower() ! username = username.lower() ! # Remove Accounts ! if action == 'remove': ! accountRemove( socket, username ) ! return True ! else: ! return False ! # Three Arguments ! elif len( args ) == 3: ! ( action, username, key ) = args ! action = action.lower() ! username = username.lower() ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: ! return False ! # Create Accounts ! if action == 'create': ! accountCreate( socket, username, key ) ! return True ! # Show Accounts ! elif action == 'show': ! accountShow( socket, username, key ) ! return True ! else: ! return False ! # Four Arguments ! elif len( args ) == 4: ! ( action, username, key, value ) = args ! action = action.lower() ! username = username.lower() ! key = key.lower() ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: ! return False ! # Set Accounts ! if action.lower() == 'set': ! accountSet( socket, username, key, value ) ! return True ! else: ! return False ! # Error else: return False ! except: ! socket.sysmessage( usage0 ) ! socket.sysmessage( usage1 ) ! socket.sysmessage( usage2 ) ! socket.sysmessage( usage3 ) ! socket.sysmessage( usage4 ) return False # Removes an account def accountRemove( socket, username ): --- 75,160 ---- elif len( args ) > 0: # Command with arguments ! args = args.split( ' ' ) ! # Error Check ! if len( args ) >= 5: ! useageerror( socket ) ! return False ! # One Argument ! if len( args ) == 1: ! action = args[0] ! action = action.lower() ! # Reload Accounts ! if action == 'reload': ! char.log( LOG_MESSAGE, "Reloaded accounts.\n" % char.serial ) ! wolfpack.accounts.reload() ! return True ! # Save Accounts ! elif action == 'save': ! char.log( LOG_MESSAGE, "Saved accounts.\n" % char.serial ) ! wolfpack.accounts.save() ! return True ! else: ! useageerror( socket ) return False ! # Two Arguments ! elif len( args ) == 2: ! ( action, username ) = args ! action = action.lower() ! username = username.lower() ! # Remove Accounts ! if action == 'remove': ! accountRemove( socket, username ) ! return True else: + useageerror( socket ) return False ! # Three Arguments ! elif len( args ) == 3: ! ( action, username, key ) = args ! action = action.lower() ! username = username.lower() ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: ! useageerror( socket ) ! return False ! # Create Accounts ! if action == 'create': ! accountCreate( socket, username, key ) ! return True ! # Show Accounts ! elif action == 'show': ! accountShow( socket, username, key ) ! return True ! else: ! useageerror( socket ) ! return False ! # Four Arguments ! elif len( args ) == 4: ! ( action, username, key, value ) = args ! action = action.lower() ! username = username.lower() ! key = key.lower() ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: ! useageerror( socket ) ! return False ! # Set Accounts ! if action.lower() == 'set': ! accountSet( socket, username, key, value ) ! return True ! else: ! useageerror( socket ) ! return False ! # Error ! else: ! useageerror( socket ) return False + def usageerror( socket ): + socket.sysmessage( usage0 ) + socket.sysmessage( usage1 ) + socket.sysmessage( usage2 ) + socket.sysmessage( usage3 ) + socket.sysmessage( usage4 ) + return + # Removes an account def accountRemove( socket, username ): *************** *** 299,306 **** if value in wolfpack.accounts.acls(): oldvalue = account.acl ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, account.acl ) ) ! account.acl == value socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.acl ) ) ! char.log( LOG_MESSAGE, "Modified %s.acl ( %s :: %s ).\n" % ( account.name, oldvale, value ) ) return True else: --- 307,314 ---- if value in wolfpack.accounts.acls(): oldvalue = account.acl ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, oldvalue ) ) ! account.acl = value socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.acl ) ) ! char.log( LOG_MESSAGE, "Modified %s.acl ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) return True else: *************** *** 318,325 **** elif key == 'multigems': if value.lower() == "true" or value.lower() == "false" or value == 1 or value == 0: ! oldvalue = value ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, account.acl ) ) ! account.multigems == value ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.acl ) ) char.log( LOG_MESSAGE, "Modified %s.multigems ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) return True --- 326,333 ---- elif key == 'multigems': if value.lower() == "true" or value.lower() == "false" or value == 1 or value == 0: ! oldvalue = account.multigems ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, account.multigems ) ) ! account.multigems = value ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.multigems ) ) char.log( LOG_MESSAGE, "Modified %s.multigems ( %s :: %s ).\n" % ( account.name, oldvalue, value ) ) return True *************** *** 336,340 **** return False else: ! oldvalue = key account.password = key socket.sysmessage( "Changed: %s.password" % ( account.name, account.password ) ) --- 344,348 ---- return False else: ! oldvalue = account.password account.password = key socket.sysmessage( "Changed: %s.password" % ( account.name, account.password ) ) |
From: Correa <thi...@us...> - 2004-07-15 02:23:59
|
Update of /cvsroot/wpdev/wolfpack/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32276 Modified Files: console_unix.cpp Log Message: warning fix Index: console_unix.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/unix/console_unix.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** console_unix.cpp 2 Jun 2004 15:04:11 -0000 1.10 --- console_unix.cpp 15 Jul 2004 02:23:50 -0000 1.11 *************** *** 188,191 **** --- 188,192 ---- void cConsole::setConsoleTitle( const QString& data ) { + Q_UNUSED(data); } *************** *** 231,235 **** QString temp = progress; progress = QString::null; ! for ( int i = 0; i < temp.length() + 4; ++i ) { fprintf( stdout, "\b" ); --- 232,236 ---- QString temp = progress; progress = QString::null; ! for ( uint i = 0; i < temp.length() + 4; ++i ) { fprintf( stdout, "\b" ); *************** *** 268,274 **** --- 269,281 ---- void cConsole::setAttributes( bool bold, bool italic, bool, unsigned char r, unsigned char g, unsigned char b, unsigned char, enFontType ) { + Q_UNUSED(bold); + Q_UNUSED(italic); + Q_UNUSED(r); + Q_UNUSED(g); + Q_UNUSED(b); } void cConsole::notifyServerState( enServerState newstate ) { + Q_UNUSED(newstate); } |
From: Correa <thi...@us...> - 2004-07-15 02:23:27
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32143/wolfpack/python Modified Files: engine.cpp Log Message: no message Index: engine.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/engine.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** engine.cpp 19 Jun 2004 02:06:51 -0000 1.31 --- engine.cpp 15 Jul 2004 02:23:19 -0000 1.32 *************** *** 152,156 **** --- 152,158 ---- { PyObject* sysModule = PyImport_ImportModule( "sys" ); + PyObject* modules = PyObject_GetAttrString( sysModule, "modules" ); + Py_DECREF( sysModule ); // This is a dictionary, so iterate trough it and reload all contained modules *************** *** 158,162 **** for ( INT32 i = 0; i < PyList_Size( mList ); ++i ) ! PyImport_ReloadModule( PyList_GetItem( mList, i ) ); } --- 160,170 ---- for ( INT32 i = 0; i < PyList_Size( mList ); ++i ) ! { ! PyObject* m = PyImport_ReloadModule( PyList_GetItem( mList, i ) ); ! Py_XDECREF( m ); ! } ! Py_DECREF( mList ); ! Py_DECREF( modules ); ! } |