wpdev-commits Mailing List for Wolfpack Emu (Page 29)
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: Incanus <inc...@us...> - 2004-09-27 22:37:29
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28010/documentation/webroot Modified Files: ChangeLog.wolfpack Log Message: - Fixed bug #0000330. (carpentry deeds broken) Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** ChangeLog.wolfpack 27 Sep 2004 16:28:31 -0000 1.121 --- ChangeLog.wolfpack 27 Sep 2004 22:36:45 -0000 1.122 *************** *** 17,20 **** --- 17,21 ---- - Fixed bug #0000328. (adddecor command not able to place jungle trees) - Fixed bug #0000331. (archery butte broken) + - Fixed bug #0000330. (carpentry deeds broken) * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-09-27 22:37:04
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28058/python Modified Files: char.cpp Log Message: runebook fixes. Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.197 retrieving revision 1.198 diff -C2 -d -r1.197 -r1.198 *** char.cpp 26 Sep 2004 21:36:24 -0000 1.197 --- char.cpp 27 Sep 2004 22:36:53 -0000 1.198 *************** *** 2009,2015 **** PyObject *target; int range; ! int debug = 0; ! if (!PyArg_ParseTuple(args, "Oi|i:char.canreach(target, range)", &target, &range, &debug)) { return 0; } --- 2009,2015 ---- PyObject *target; int range; ! short model = 0; ! if (!PyArg_ParseTuple(args, "Oi|h:char.canreach(target, range, model)", &target, &range, &model)) { return 0; } *************** *** 2018,2026 **** if (checkWpCoord(target)) { ! if (range == -1) { Py_RETURN_FALSE; } ! targetPos = getWpCoord(target).losMapPoint(); } else if (checkWpItem(target)) { P_ITEM pItem = getWpItem(target); --- 2018,2030 ---- if (checkWpCoord(target)) { ! if (range == 0) { Py_RETURN_FALSE; } ! if (model == -1) { ! targetPos = getWpCoord(target).losMapPoint(); ! } else { ! targetPos = getWpCoord(target).losItemPoint(model); ! } } else if (checkWpItem(target)) { P_ITEM pItem = getWpItem(target); |
From: Incanus <inc...@us...> - 2004-09-27 22:37:02
|
Update of /cvsroot/wpdev/xmlscripts/scripts/deeds In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28010/scripts/deeds Modified Files: carpentry_deed.py Log Message: - Fixed bug #0000330. (carpentry deeds broken) Index: carpentry_deed.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/deeds/carpentry_deed.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** carpentry_deed.py 21 Jul 2004 14:20:42 -0000 1.3 --- carpentry_deed.py 27 Sep 2004 22:36:47 -0000 1.4 *************** *** 48,52 **** return name = target.gettag( 'carpentry_type' ) ! if not deeds.haskey( name ): return tooltip_id = deeds[ name ][ 0 ] --- 48,52 ---- return name = target.gettag( 'carpentry_type' ) ! if not deeds.has_key( name ): return tooltip_id = deeds[ name ][ 0 ] *************** *** 58,74 **** def onUse( char, item ): if not char or not item: ! return # check if this char is in it's own house ! if char.multi == -1: ! # msg ! return 1 ! multi = wolfpack.finditem( char.multi ) if not multi or multi.ownserial != char.serial: ! # msg ! return 1 # send target cursor - char.socket.clilocmessage( 0xF55DA, "", 0x3b2, 3 ) char.socket.attachtarget( "deeds.carpentry_deed.response", [ item ] ) def response( char, args, target ): item = args[0] --- 58,82 ---- def onUse( char, item ): if not char or not item: ! return True ! # check if this char is in it's own house ! if not( char.multi ): ! #You can only build this in a house. ! char.socket.clilocmessage(500275) ! return True ! if not multi or multi.ownserial != char.serial: ! #You must own the house to do this. ! char.socket.clilocmessage(502096) ! return True ! ! #Where would you like to place this decoration? ! char.socket.clilocmessage( 1049780, "", 0x3b2 ) ! # send target cursor char.socket.attachtarget( "deeds.carpentry_deed.response", [ item ] ) + return True + def response( char, args, target ): item = args[0] *************** *** 80,85 **** if not target.pos: return ! if char.distanceto( pos ) > 3: ! char.socket.clilocmessage( 500251, "", 0x3b2, 3 ) return # check if there is sufficient room for the item --- 88,99 ---- if not target.pos: return ! if( target.item ): ! #we don't want to target items in containers ! if( target.item.getoutmostchar() ): ! # msg ! return ! if not( char.canreach( target, 3 ) ): ! #That location is too far away. ! char.socket.clilocmessage( 500251, "", 0x3b2 ) return # check if there is sufficient room for the item *************** *** 93,107 **** # check valid item if not item.hastag( 'carpentry_type' ): ! return 0 name = item.gettag( 'carpentry_type' ) ! if not deeds.haskey( name ): ! return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: ! return 0 num_item = len( items ) if not num_item: ! return 0 # check the spots --- 107,121 ---- # check valid item if not item.hastag( 'carpentry_type' ): ! return False name = item.gettag( 'carpentry_type' ) ! if not deeds.has_key( name ): ! return False dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: ! return False num_item = len( items ) if not num_item: ! return False # check the spots *************** *** 110,116 **** ret2 = 0 if num_item == 1: ! return check_spot( pos ) elif num_item == 2: ! ret0 = check_spot( pos ) if dir == 1: ret1 = check_spot( pos.x, pos.y + 1, pos.map ) --- 124,130 ---- ret2 = 0 if num_item == 1: ! return check_spot( pos.x, pos.y, pos.map ) elif num_item == 2: ! ret0 = check_spot( pos.x, pos.y, pos.map ) if dir == 1: ret1 = check_spot( pos.x, pos.y + 1, pos.map ) *************** *** 119,123 **** return ret0 & ret1 elif num_item == 3: ! ret0 = check_spot( pos ) if dir == 1: ret1 = check_spot( pos.x, pos.y + 1, pos.map ) --- 133,137 ---- return ret0 & ret1 elif num_item == 3: ! ret0 = check_spot( pos.x, pos.y, pos.map ) if dir == 1: ret1 = check_spot( pos.x, pos.y + 1, pos.map ) *************** *** 133,156 **** ret0 = check_spot( x, y, pos.map ) if not ret0: ! return 0 ! return 1 # pentagram elif num_item == 9: ret0 = wolfpack.items( pos.x, pos.y, pos.map, 2 ) if not ret0: ! return 0 ! return 1 # no other case : error ! return 0 ! ! def check_spot( pos ): ! if len( wolfpack.items( pos.x, pos.y, pos.map ) ): ! return 0 ! return 1 def check_spot( x, y, map ): if len( wolfpack.items( x, y, map ) ): ! return 0 ! return 1 def setup_item( item, pos ): --- 147,166 ---- ret0 = check_spot( x, y, pos.map ) if not ret0: ! return False ! return True # pentagram elif num_item == 9: ret0 = wolfpack.items( pos.x, pos.y, pos.map, 2 ) if not ret0: ! return False ! return True # no other case : error ! return False def check_spot( x, y, map ): + #TODO: needs check for z value too if len( wolfpack.items( x, y, map ) ): ! return False ! return True def setup_item( item, pos ): *************** *** 159,163 **** return name = item.gettag( 'carpentry_type' ) ! if not deeds.haskey( name ): return dir = deeds[ name ][ 1 ] --- 169,173 ---- return name = item.gettag( 'carpentry_type' ) ! if not deeds.has_key( name ): return dir = deeds[ name ][ 1 ] *************** *** 166,177 **** return num_item = len( items ) ! if not num_items: return # put items if num_item == 1: ! put_item( items[ 0 ] ) elif num_item == 2: ! put_item( items[ 0 ] ) if dir == 1: x1 = pos.x --- 176,187 ---- return num_item = len( items ) ! if not num_item: return # put items if num_item == 1: ! put_item( items[ 0 ], pos.x, pos.y, pos.z, pos.map ) elif num_item == 2: ! put_item( items[ 0 ], pos.x, pos.y, pos.z, pos.map ) if dir == 1: x1 = pos.x *************** *** 180,197 **** x1 = pos.x + 1 y1 = pos.y ! put_item( items[ 1 ], x1, y1, pos.map ) elif num_item == 3: ! put_item( items[ 1 ], pos.x, pos.y, pos.map ) if dir == 1: ! put_item( items[ 0 ], pos.x, pos.y - 1, pos.map ) ! put_item( items[ 2 ], pos.x, pos.y + 1, pos.map ) else: ! put_item( items[ 0 ], pos.x - 1, pos.y, pos.map ) ! put_item( items[ 2 ], pos.x + 1, pos.y, pos.map ) elif num_item == 4: i = 0 for x in range( pos.x, pos.x + 2 ): for y in range( pos.y, pos.y + 2 ): ! put_item( items[ i ], x, y, pos.map ) i += 1 elif num_item == 9: --- 190,207 ---- x1 = pos.x + 1 y1 = pos.y ! put_item( items[ 1 ], x1, y1, pos.z, pos.map ) elif num_item == 3: ! put_item( items[ 1 ], pos.x, pos.y, pos.z, pos.map ) if dir == 1: ! put_item( items[ 0 ], pos.x, pos.y - 1, pos.z, pos.map ) ! put_item( items[ 2 ], pos.x, pos.y + 1, pos.z, pos.map ) else: ! put_item( items[ 0 ], pos.x - 1, pos.y, pos.z, pos.map ) ! put_item( items[ 2 ], pos.x + 1, pos.y, pos.z, pos.map ) elif num_item == 4: i = 0 for x in range( pos.x, pos.x + 2 ): for y in range( pos.y, pos.y + 2 ): ! put_item( items[ i ], x, y, pos.z, pos.map ) i += 1 elif num_item == 9: *************** *** 199,222 **** for y in range( pos.x - 1, pos.x + 2 ): for x in range( pos.y - 1, pos.y + 2 ): ! put_item( items[ i ], x, y, pos.map ) i += 1 ! def put_item( str, pos ): ! item = wolfpack.additem( str ) ! if not item: ! return 0 ! item.moveto( pos ) ! # locked down ! item.movable = 3 ! item.update() ! return 1 ! ! def put_item( str, x, y, map ): item = wolfpack.additem( str ) if not item: ! return 0 ! item.moveto( x, y, map ) # locked down item.movable = 3 item.update() ! return 1 --- 209,223 ---- for y in range( pos.x - 1, pos.x + 2 ): for x in range( pos.y - 1, pos.y + 2 ): ! put_item( items[ i ], x, y, pos.z, pos.map ) i += 1 ! def put_item( str, x, y, z, map ): item = wolfpack.additem( str ) if not item: ! return False ! item.moveto( x, y, z, map ) # locked down item.movable = 3 + item.decay = 0 item.update() ! return True |
From: Sebastian H. <dar...@us...> - 2004-09-27 22:33:34
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27142/magic Modified Files: __init__.py circle4.py circle5.py circle6.py circle7.py runebook.py spell.py Log Message: fixes for runebooks Index: runebook.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/runebook.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** runebook.py 26 Sep 2004 16:17:27 -0000 1.8 --- runebook.py 27 Sep 2004 22:33:22 -0000 1.9 *************** *** 7,16 **** import wolfpack import magic import magic.spell from wolfpack.gumps import cGump from magic.rune import isrune ! from magic.utilities import fizzle, MODE_BOOK ! import magic.utilities import whrandom import wolfpack.utilities --- 7,18 ---- import wolfpack + from wolfpack import tr import magic import magic.spell from wolfpack.gumps import cGump + import magic from magic.rune import isrune ! import magic.scroll ! from magic.utilities import fizzle, MODE_BOOK, hasSpell import whrandom import wolfpack.utilities *************** *** 37,71 **** def onDropOnItem( book, item ): ! if not isrunebook( book ): ! return False ! if not isrune( item ): ! return False ! if( item.hastag( "marked" ) != 1 ): ! return False ! ! # initialize rune serials to -1 if there's no rune ! # should not occur - will be removed later ! for i in range( 0, 16 ): ! if not book.hastag( "rune %i" % i ): ! book.settag( "rune %i" % i, -1 ) ! ! # rune serials ! runes = [ -1 ] * 16 ! for i in range( 0, 16 ): ! runes[ i ] = int( book.gettag( "rune %i" % i ) ) ! i = 0 ! while( runes[ i ] > -1 and i < 16 ): ! i = i + 1 ! # runebook is full ! if( i > 15 ): ! # can we access the char.socket ? ! # "This runebook is full." ! #char.socket.clilocmessage( 502401 ) ! return False ! book.settag( "rune %i" % i, int( item.serial ) ) ! # insert rune - is runebook a container ? ! if book.type == 1: ! wolfpack.utilities.tocontainer( item, book ) ! item.update() return True --- 39,106 ---- def onDropOnItem( book, item ): ! char = item.container ! ! if isrunebook( book ): ! if isrune(item) and item.hastag('marked'): ! # initialize rune serials to -1 if there's no rune ! # should not occur - will be removed later ! for i in range( 0, 16 ): ! if not book.hastag( "rune %i" % i ): ! book.settag( "rune %i" % i, -1 ) ! ! # rune serials ! runes = [ -1 ] * 16 ! for i in range( 0, 16 ): ! runes[ i ] = int( book.gettag( "rune %i" % i ) ) ! i = 0 ! while( runes[ i ] > -1 and i < 16 ): ! i = i + 1 ! # runebook is full ! if( i > 15 ): ! # can we access the char.socket ? ! # "This runebook is full." ! if char.socket: ! char.socket.clilocmessage( 502401 ) ! char.getbackpack().additem(item) ! item.pos = book.pos ! item.pos.z += 1 ! item.update() ! return True ! ! book.settag( "rune %i" % i, int( item.serial ) ) ! ! # insert rune - is runebook a container ? ! wolfpack.utilities.tocontainer( item, book ) ! item.update() ! return True ! ! # Recall Scrolls for recharging ! elif item.hasscript('magic.scroll'): ! try: ! spellid = magic.scroll.calcSpellId(item) ! ! # Recall Scroll ! if spellid + 1 == 32: ! charges = item.amount ! maxcharges = book.gettag('maxcharges') - book.gettag('charges') ! ! if maxcharges > 0: ! charges = min(charges, maxcharges) ! book.settag('charges', book.gettag('charges') + charges) ! ! if charges >= item.amount: ! item.delete() ! return True ! else: ! item.amount -= charges ! item.update() ! item.resendtooltip() ! except: ! pass ! ! char.getbackpack().additem(item) ! item.pos = book.pos ! item.pos.z += 1 ! item.update() return True *************** *** 156,161 **** # rename button return code = 1000 ! runebook.addButton( 130, 20, 2472, 2473, 1000 ) ! runebook.addText( 158, 22, "Rename Book" ) # next page - top right corner --- 191,196 ---- # rename button return code = 1000 ! #runebook.addButton( 130, 20, 2472, 2473, 1000 ) ! #runebook.addText( 158, 22, "Rename Book" ) # next page - top right corner *************** *** 344,347 **** --- 379,394 ---- char.socket.sysmessage( "runebook script error." ) return False + + if not char.gm: + if char.iscriminal(): + if char.socket: + char.socket.clilocmessage(1005561) + return False + + if char.attacktarget: + if char.socket: + char.socket.clilocmessage(1005564) + return False + location = rune.gettag('location') location = location.split(",") *************** *** 374,379 **** # recall spell to the selected rune def recall1( self, args ): - if( len( args ) < 2 ): - return 1 char = wolfpack.findchar( args[ 0 ] ) rune = wolfpack.finditem( args[ 1 ] ) --- 421,424 ---- *************** *** 381,436 **** if not char: return False - if not rune: - char.socket.sysmessage( "runebook script error." ) - return False - # Check for Recall - if not magic.utilities.hasSpell(char, 32): - return False ! location = rune.gettag( 'location' ) ! location = location.split(",") ! location = wolfpack.coord(int(location[0]), int(location[1]), int(location[2]), int(location[3])) ! ! region = None ! region = wolfpack.region(char.pos.x, char.pos.y, char.pos.map) ! ! if region and region.norecallout: ! char.message(501802) ! fizzle(char) ! return False ! region = None ! region = wolfpack.region(location.x, location.y, location.map) ! ! if not location.validspawnspot(): ! char.message(501942) ! fizzle(char) ! return False ! ! if region and region.norecallin: ! char.message(1019004) ! fizzle(char) ! return False ! ! # cast spell ! if( char.mana < 11 ): ! char.socket.sysmessage( "You lack the mana to recall." ) return False ! # Insert link to Recall Spell! ! char.socket.sysmessage( "not implemented yet" ) ! return True def gate( self, args ): - if( len( args ) < 2 ): - return 1 char = wolfpack.findchar( args[ 0 ] ) rune = wolfpack.finditem( args[ 1 ] ) if not char: ! return 1 if not rune: ! char.socket.sysmessage( "runebook script error." ) ! return 1 ! # Insert link to Gate Travel Spell! ! char.socket.sysmessage( "not implemented yet" ) ! return 1 --- 426,448 ---- if not char: return False ! if not rune: ! char.socket.sysmessage( "Missing recall rune." ) return False ! magic.castSpell( char, 32, MODE_BOOK, args = [], target = rune ) return True def gate( self, args ): char = wolfpack.findchar( args[ 0 ] ) rune = wolfpack.finditem( args[ 1 ] ) + if not char: ! return False ! if not rune: ! char.socket.sysmessage( "Missing recall rune." ) ! return False ! ! magic.castSpell( char, 52, MODE_BOOK, args = [], target = rune ) ! return True Index: spell.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/spell.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** spell.py 27 Sep 2004 14:37:26 -0000 1.28 --- spell.py 27 Sep 2004 22:33:22 -0000 1.29 *************** *** 51,55 **** return else: ! target = None # item --- 51,55 ---- return else: ! target = args[3] # item *************** *** 64,68 **** item = None ! args[0].cast(char, args[1], args[2], args[3], item) # Basic Spell Class --- 64,68 ---- item = None ! args[0].cast(char, args[1], args[2], target, item) # Basic Spell Class *************** *** 179,182 **** --- 179,187 ---- char.log(LOG_MESSAGE, "Casting spell %s from %s.\n" % (self.__class__.__name__, source)) + if target and type(target).__name__ == 'wpitem': + target = target.serial + elif target and type(target).__name__ == 'wpchar': + target = target.serial + char.addtimer(self.calcdelay(char, mode), 'magic.spell.callback', [self, mode, args, target, item], 0, 0, "cast_delay") return 1 *************** *** 431,435 **** # A target has been supplied else: ! char.message('target has been supplied') def target(self, char, mode, targettype, target, args, item): --- 436,441 ---- # A target has been supplied else: ! targetwrapper = TargetWrapper(target) ! magic.target_response(char, [self, mode, args, item], targetwrapper) def target(self, char, mode, targettype, target, args, item): *************** *** 442,445 **** --- 448,469 ---- pass + class TargetWrapper: + def __init__(self, obj): + if type(obj).__name__ == 'wpitem': + self.item = obj + self.char = None + self.pos = obj.pos + self.model = obj.id + elif type(obj).__name__ == 'wpchar': + self.item = None + self.char = obj + self.pos = obj.pos + self.model = 0 + else: + self.item = None + self.char = None + self.pos = obj + self.model = 0 + class CharEffectSpell (Spell): def __init__(self, circle): Index: circle5.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle5.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** circle5.py 10 Sep 2004 16:48:42 -0000 1.23 --- circle5.py 27 Sep 2004 22:33:22 -0000 1.24 *************** *** 20,24 **** return else: ! return Spell.cast(self, char, mode) def target(self, char, mode, targettype, target, args, item): --- 20,24 ---- return else: ! return Spell.cast(self, char, mode, args, target, item) def target(self, char, mode, targettype, target, args, item): *************** *** 329,333 **** char.socket.clilocmessage(1049645) return ! return Spell.cast(self, char, mode) def target(self, char, mode, targettype, target, args, item): --- 329,333 ---- char.socket.clilocmessage(1049645) return ! return Spell.cast(self, char, mode, args, target, item) def target(self, char, mode, targettype, target, args, item): Index: circle6.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle6.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** circle6.py 1 Sep 2004 23:45:59 -0000 1.12 --- circle6.py 27 Sep 2004 22:33:22 -0000 1.13 *************** *** 105,109 **** return ! return Spell.cast(self, char, mode) def target(self, char, mode, targettype, target, args, item): --- 105,109 ---- return ! return Spell.cast(self, char, mode, args, target, item) def target(self, char, mode, targettype, target, args, item): Index: circle7.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle7.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** circle7.py 22 Sep 2004 07:37:46 -0000 1.16 --- circle7.py 27 Sep 2004 22:33:22 -0000 1.17 *************** *** 134,138 **** return ! return Spell.cast(self, char, mode) def target(self, char, mode, targettype, target, args, item): --- 134,138 ---- return ! return Spell.cast(self, char, mode, args, target, item) def target(self, char, mode, targettype, target, args, item): Index: circle4.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle4.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** circle4.py 16 Sep 2004 16:42:28 -0000 1.15 --- circle4.py 27 Sep 2004 22:33:22 -0000 1.16 *************** *** 121,125 **** return ! return Spell.cast(self, char, mode) def target(self, char, mode, targettype, target, args, item): --- 121,125 ---- return ! return Spell.cast(self, char, mode, args, target, item) def target(self, char, mode, targettype, target, args, item): Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/__init__.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** __init__.py 24 Sep 2004 11:07:04 -0000 1.18 --- __init__.py 27 Sep 2004 22:33:22 -0000 1.19 *************** *** 102,106 **** char.socket.clilocmessage(500446) return ! if not char.canreach(target, spell.range): if char.socket: char.socket.clilocmessage(500237) --- 102,106 ---- char.socket.clilocmessage(500446) return ! if not char.canreach(target.char, spell.range): if char.socket: char.socket.clilocmessage(500237) *************** *** 120,124 **** char.socket.clilocmessage(500237) return ! if not char.canreach(target, spell.range): if char.socket: char.socket.clilocmessage(500237) --- 120,124 ---- char.socket.clilocmessage(500237) return ! if not char.canreach(target.item, spell.range): if char.socket: char.socket.clilocmessage(500237) *************** *** 146,150 **** char.socket.clilocmessage(500446) return ! if not char.canreach(target, spell.range): if char.socket: char.socket.clilocmessage(500237) --- 146,150 ---- char.socket.clilocmessage(500446) return ! if not char.canreach(target.pos, spell.range, target.model): if char.socket: char.socket.clilocmessage(500237) |
From: Incanus <inc...@us...> - 2004-09-27 22:26:40
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25474/python Modified Files: item.cpp Log Message: Added item.getoutmostchar and item.getoutmostitem to documentation Index: item.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** item.cpp 19 Sep 2004 22:13:36 -0000 1.133 --- item.cpp 27 Sep 2004 22:26:24 -0000 1.134 *************** *** 1,1457 **** ! /* ! * Wolfpack Emu (WP) ! * UO Server Emulation Program ! * ! * Copyright 2001-2004 by holders identified in AUTHORS.txt ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * [...2893 lines suppressed...] ! if ( a->ob_type != &wpItemType || b->ob_type != &wpItemType ) ! return -1; ! ! P_ITEM pA = getWpItem( a ); ! P_ITEM pB = getWpItem( b ); ! ! return !( pA == pB ); ! } ! ! int PyConvertItem( PyObject* object, P_ITEM* item ) ! { ! if ( object->ob_type != &wpItemType ) ! { ! PyErr_BadArgument(); ! return 0; ! } ! ! *item = ( ( wpItem * ) object )->pItem; ! return 1; ! } |
From: Sebastian H. <dar...@us...> - 2004-09-27 17:42:48
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32567/wolfpack Modified Files: properties.py Log Message: skillboni are now generated and implemented Index: properties.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/properties.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** properties.py 27 Sep 2004 14:37:27 -0000 1.16 --- properties.py 27 Sep 2004 17:42:35 -0000 1.17 *************** *** 458,462 **** DEFENSEBONUS: [1, 15, 1, True], HITBONUS: [1, 15, 1, True], ! CASTSPEEDBONUS: [1, 1, True], LOWERREQS: [10, 100, 10, True], SELFREPAIR: [1, 5, 1, False], --- 458,462 ---- DEFENSEBONUS: [1, 15, 1, True], HITBONUS: [1, 15, 1, True], ! CASTSPEEDBONUS: [1, 1, 1, True], LOWERREQS: [10, 100, 10, True], SELFREPAIR: [1, 5, 1, False], *************** *** 500,503 **** --- 500,510 ---- item.resendtooltip() + # Those are no real properties + SKILLBONUS1 = 1000 + SKILLBONUS2 = 1001 + SKILLBONUS3 = 1002 + SKILLBONUS4 = 1003 + SKILLBONUS5 = 1004 + # List of allowed properties JUWEL_PROPERTIES = { *************** *** 521,533 **** LUCK: [1, 100, 1, False], SPELLDAMAGEBONUS: [1, 12, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], ! #SKILLBONUS1: [1, 15, 1, False], } def applyJuwelRandom(item, props, minintensity, maxintensity, luckchance): properties = JUWEL_PROPERTIES.keys() # Select unique properties --- 528,545 ---- LUCK: [1, 100, 1, False], SPELLDAMAGEBONUS: [1, 12, 1, False], ! SKILLBONUS1: [1, 15, 1, False], ! SKILLBONUS2: [1, 15, 1, False], ! SKILLBONUS3: [1, 15, 1, False], ! SKILLBONUS4: [1, 15, 1, False], ! SKILLBONUS5: [1, 15, 1, False], } def applyJuwelRandom(item, props, minintensity, maxintensity, luckchance): properties = JUWEL_PROPERTIES.keys() + + # Possible bonus skills + skills = [SWORDSMANSHIP, FENCING, MACEFIGHTING, ARCHERY, WRESTLING, PARRYING, TACTICS, ANATOMY, HEALING, MAGERY, MEDITATION, EVALUATINGINTEL, + MAGICRESISTANCE, TAMING, ANIMALLORE, VETERINARY, MUSICIANSHIP, PROVOCATION, ENTICEMENT, PEACEMAKING, CHIVALRY, FOCUS, NECROMANCY, + STEALING, STEALTH, SPIRITSPEAK] # Select unique properties *************** *** 536,539 **** --- 548,562 ---- properties.remove(property) + if property in [SKILLBONUS1, SKILLBONUS2, SKILLBONUS3, SKILLBONUS4, SKILLBONUS5]: + # Apply a random skillbonus + info = JUWEL_PROPERTIES[property] + value = scaleValue(minintensity, maxintensity, info[0], info[1], info[2], luckchance) + + skill = random.choice(skills) + skills.remove(skill) + + item.settag('skillbonus_%u' % (property - 1000), '%u,%u' % (skill, value * 10)) + continue + if not PROPERTIES.has_key(property): continue |
From: Sebastian H. <dar...@us...> - 2004-09-27 17:42:48
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32567 Modified Files: equipment.py Log Message: skillboni are now generated and implemented Index: equipment.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/equipment.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** equipment.py 27 Sep 2004 14:37:26 -0000 1.41 --- equipment.py 27 Sep 2004 17:42:33 -0000 1.42 *************** *** 328,331 **** --- 328,347 ---- if req_str: tooltip.add(1061170, str(req_str)) + + # Skill Boni (1-5) + for i in range(0, 5): + if object.hastag('skillbonus_%u' % i): + try: + (skill, bonus) = object.gettag('skillbonus_%u' % i).split(',') + (skill, bonus) = (int(skill), int(bonus)) + + if bonus == 0 or skill < 0 or skill >= ALLSKILLS: + continue + + # Add a Bonus for the skill + tooltip.add(1060451 + i, "#%u\t%0.01f%%" % (1044060 + skill, bonus / 10.0)) + except: + object.deltag('skillbonus_%u' % i) + continue # *************** *** 434,437 **** --- 450,486 ---- item.deltag('real_intelligence_bonus') + # Skill Boni (1-5) + for i in range(0, 5): + if item.hastag('skillbonus_%u' % i): + try: + (skill, bonus) = item.gettag('skillbonus_%u' % i).split(',') + (skill, bonus) = (int(skill), int(bonus)) + + if bonus == 0 or skill < 0 or skill >= ALLSKILLS: + item.deltag('real_skillbonus_%u' % i) + continue + + # Add a Bonus for the skill + if char.skill[skill] + bonus > char.skillcap[skill]: + bonus = max(0, char.skillcap[skill] - char.skill[skill]) + if char.skill[skill] + bonus < 0: + bonus = - char.skill[skill] + + item.settag('real_skillbonus_%u' % i, '%u,%u' % (skill, bonus)) + char.skill[skill] += bonus + except: + item.deltag('skillbonus_%u' % i) + continue + + # Update the bonus tag for the character + tagname = 'skillbonus_%u' % skill + if char.hastag(tagname): + value = int(char.gettag(tagname)) + bonus + else: + value = bonus + char.settag(tagname, value) + else: + item.deltag('real_skillbonus_%u' % i) + # Bonus Hitpoints bonushitpoints = properties.fromitem(item, BONUSHITPOINTS) *************** *** 510,513 **** --- 559,596 ---- item.deltag('real_intelligence_bonus') + # Skill Boni (1-5) + for i in range(0, 5): + if item.hastag('real_skillbonus_%u' % i): + try: + (skill, bonus) = item.gettag('real_skillbonus_%u' % i).split(',') + (skill, bonus) = (int(skill), int(bonus)) + + if bonus == 0 or skill < 0 or skill >= ALLSKILLS: + item.deltag('real_skillbonus_%u' % i) + continue + + # If the bonus would add over the skill limit, + # make sure it doesnt + if bonus < 0 and char.skill[skill] - bonus > char.skillcap[skill]: + bonus = - (char.skillcap[skill] - char.skill[skill]) + if char.skill[skill] - bonus < 0: + bonus = char.skill[skill] + + item.deltag('real_skillbonus_%u' % i, bonus) + char.skill[skill] -= bonus + + # Update the bonus tag for the character + tagname = 'skillbonus_%u' % skill + if char.hastag(tagname): + value = int(char.gettag(tagname)) - bonus + + if value != 0: + char.settag(tagname, value) + else: + char.deltag(tagname) + except: + item.deltag('real_skillbonus_%u' % i) + continue + # Bonus Hitpoints bonushitpoints = properties.fromitem(item, BONUSHITPOINTS) |
From: Sebastian H. <dar...@us...> - 2004-09-27 17:42:48
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32567/system Modified Files: lootlists.py skillgain.py Log Message: skillboni are now generated and implemented Index: lootlists.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/lootlists.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** lootlists.py 27 Sep 2004 14:37:27 -0000 1.9 --- lootlists.py 27 Sep 2004 17:42:34 -0000 1.10 *************** *** 9,13 **** '26cb', '26c1', 'f60', 'f61', '13b7', '13b8', '13fe', '13ff', '143e', '143f', '1440', '1441', '26ce', '26cf', 'e85', 'e86', '13b9', '13ba', 'ec4', 'ec5', '26c4', '26ba', '13b5', '13b6'] ! DEF_WEAPONS_AXES = ['f49', 'f4a', 'f47', 'f48', 'f4b', 'f4c', '1142', '1143', 'f45', 'f46', '13fa', '13fb', 'f43', 'f44'] DEF_WEAPONS_MACES = ['df0', 'df1', '13b3', '13b4', '13f8', '13f9', '143d', '143c', 'f5c', 'f5d', '143a', '143b', 'e89', 'e8a', '26c6', '26bc', '13f4', '13f5', 'fb4', 'fb5', '13e3', '13e4', '13af', '13b0', '1438', '1439', '1406', '1407'] --- 9,13 ---- '26cb', '26c1', 'f60', 'f61', '13b7', '13b8', '13fe', '13ff', '143e', '143f', '1440', '1441', '26ce', '26cf', 'e85', 'e86', '13b9', '13ba', 'ec4', 'ec5', '26c4', '26ba', '13b5', '13b6'] ! DEF_WEAPONS_AXES = ['f49', 'f4a', 'f47', 'f48', 'f4b', 'f4c', '1143', 'f45', 'f46', '13fa', '13fb', 'f43', 'f44'] DEF_WEAPONS_MACES = ['df0', 'df1', '13b3', '13b4', '13f8', '13f9', '143d', '143c', 'f5c', 'f5d', '143a', '143b', 'e89', 'e8a', '26c6', '26bc', '13f4', '13f5', 'fb4', 'fb5', '13e3', '13e4', '13af', '13b0', '1438', '1439', '1406', '1407'] Index: skillgain.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/skillgain.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** skillgain.py 26 Sep 2004 16:15:06 -0000 1.8 --- skillgain.py 27 Sep 2004 17:42:34 -0000 1.9 *************** *** 107,111 **** cap = char.skillcap[skill] / 10.0 info = SKILLS[skill] ! if lock == 0 and value < cap: # Skills lower than 10.0% will gain 0.1% - 0.5% at once --- 107,111 ---- cap = char.skillcap[skill] / 10.0 info = SKILLS[skill] ! if lock == 0 and value < cap: # Skills lower than 10.0% will gain 0.1% - 0.5% at once *************** *** 121,124 **** --- 121,135 ---- for i in range(0, ALLSKILLS): if i != skill and char.skilllock[i] == 1 and char.skill[i] / 10.0 >= points: + # See if there is a bonus for this skill and reducing further would go below the bonus + try: + if char.hastag('skillbonus_%u' % i): + value = int(char.gettag('skillbonus_%u' % i)) + + # Skip this skill if reducing it wouldn't work + if char.skill[i] - int(points * 10) < value: + continue + except: + pass + char.skill[i] -= int(points * 10) totalskill -= points *************** *** 212,217 **** --- 223,237 ---- totalskills = 0.0 for i in range(0, ALLSKILLS): + # See if there is a modifier for the skill + tagname = 'skillbonus_%u' % i totalskills += skills[i] / 10.0 + if char.hastag(tagname): + try: + value = int(char.gettag(tagname)) + totalskills -= value / 10.0 + except: + pass + # Calculate the GainChance # (RunUO has a nice approach. Doing it similar) |
From: Incanus <inc...@us...> - 2004-09-27 16:28:46
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8919/scripts/magic Modified Files: circle8.py Log Message: Fixed bug #0000331. (archery butte broken) Index: circle8.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle8.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** circle8.py 9 Sep 2004 17:28:11 -0000 1.15 --- circle8.py 27 Sep 2004 16:28:32 -0000 1.16 *************** *** 100,104 **** return ! target.resurrect() target.soundeffect(0x214) --- 100,104 ---- return ! target.resurrect( char ) target.soundeffect(0x214) |
From: Incanus <inc...@us...> - 2004-09-27 16:28:46
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8919/scripts Modified Files: archery_butte.py bandages.py shrine.py Log Message: Fixed bug #0000331. (archery butte broken) Index: shrine.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/shrine.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shrine.py 11 Jul 2004 02:47:25 -0000 1.2 --- shrine.py 27 Sep 2004 16:28:31 -0000 1.3 *************** *** 7,10 **** return False ! player.resurrect() return True --- 7,10 ---- return False ! player.resurrect( item ) return True Index: bandages.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/bandages.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** bandages.py 3 Sep 2004 18:19:58 -0000 1.12 --- bandages.py 27 Sep 2004 16:28:31 -0000 1.13 *************** *** 223,227 **** target.owner.moveto( target.pos ) target.owner.update() ! target.owner.resurrect() # Move all the belongings from the corpse to the character --- 223,227 ---- target.owner.moveto( target.pos ) target.owner.update() ! target.owner.resurrect( char ) # Move all the belongings from the corpse to the character *************** *** 253,257 **** return ! target.resurrect() target.update() --- 253,257 ---- return ! target.resurrect( char ) target.update() Index: archery_butte.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/archery_butte.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** archery_butte.py 2 Sep 2004 18:19:53 -0000 1.11 --- archery_butte.py 27 Sep 2004 16:28:31 -0000 1.12 *************** *** 8,13 **** import wolfpack import random ! from wolfpack.consts import ARCHERY from combat.utilities import weaponskill # failure texts --- 8,15 ---- import wolfpack import random ! from wolfpack.consts import ARCHERY, LAYER_MOUNT, ANIM_ATTACKBOW, \ ! ANIM_ATTACKXBOX from combat.utilities import weaponskill + from random import choice # failure texts *************** *** 39,43 **** if( arrowCount ): if( arrowCount > 1 ): - char.message( arrowCount ) arrow = wolfpack.additem( "f3f" ) arrow.container = char.getbackpack() --- 41,44 ---- *************** *** 47,51 **** if( boltCount ): if( boltCount > 1 ): - char.message( message ) bolt = wolfpack.additem( "1bfb" ) bolt.container = char.getbackpack() --- 48,51 ---- *************** *** 53,57 **** bolt.update() ! char.socket.clilocmessage(500593) # Reset the counters --- 53,58 ---- bolt.update() ! #You gather the arrows and bolts. ! char.socket.clilocmessage(500592) # Reset the counters *************** *** 73,96 **** if( char.distanceto( item ) > 10): ! char.socket.clilocmessage(500603) return True elif( char.distanceto( item ) < 5 ): ! char.socket.clilocmessage(500604) return True # Sanity checks for the line-of-fire if( ( item.id == 0x100b and ( char.pos.x != item.pos.x or char.pos.y <= item.pos.y ) ) or ( item.id == 0x100a and ( char.pos.y != item.pos.y or char.pos.x <= item.pos.x ) ) ): char.socket.clilocmessage(500597) return True ! # TODO: Check line of sight ! # Calculates the direction we'll have to look # to focus the dummy ! direction = char.directionto( item ) ! ! if( char.direction != direction ): ! char.direction = direction ! char.update() # Only Bows or Crossbows (Check ammo-type too) --- 74,106 ---- if( char.distanceto( item ) > 10): ! #You are too far away from the archery butte to get an accurate shot. ! char.socket.clilocmessage(500598) return True elif( char.distanceto( item ) < 5 ): ! #You are too close to the target. ! char.socket.clilocmessage(500599) ! return True ! ! #riding? ! if( char.itemonlayer( LAYER_MOUNT ) ): ! #You can't practice on this while on a mount. ! char.socket.clilocmessage(501829) return True # Sanity checks for the line-of-fire if( ( item.id == 0x100b and ( char.pos.x != item.pos.x or char.pos.y <= item.pos.y ) ) or ( item.id == 0x100a and ( char.pos.y != item.pos.y or char.pos.x <= item.pos.x ) ) ): + #You aren't properly lined up with the archery butte to get an accurate shot. char.socket.clilocmessage(500597) return True ! #Line of Sight Check ! if not( char.canreach( item, 10 ) ): ! #You cannot reach .. ! char.socket.clilocmessage( 500312 ) ! return True ! # Calculates the direction we'll have to look # to focus the dummy ! char.turnto( item ) # Only Bows or Crossbows (Check ammo-type too) *************** *** 98,120 **** if( ( weaponskill(char, char.getweapon()) != ARCHERY ) or ( ammo == -1 ) ): ! char.socket.clilocmessage(500594) return True # If we've already learned all we can > cancel. if( char.skill[ ARCHERY ] >= 300 ): ! char.socket.clilocmessage(501829) return True - # Display the char-action - # (archery shot) - # Soundeffect - char.soundeffect( 0x224 ) - char.action( 0x09 ) - if( ammo == 0xf3f ): ammoname = "arrow" movingeff = 0xf42 if( not char.useresource( 1, ammo ) ): ! char.socket.clilocmessage(500595) return True else: --- 108,127 ---- if( ( weaponskill(char, char.getweapon()) != ARCHERY ) or ( ammo == -1 ) ): ! #You must practice with ranged weapons on this. ! char.socket.clilocmessage(500593) return True # If we've already learned all we can > cancel. if( char.skill[ ARCHERY ] >= 300 ): ! #Your skill cannot improve any further by simply practicing with a dummy. ! char.socket.clilocmessage(501828) return True if( ammo == 0xf3f ): ammoname = "arrow" movingeff = 0xf42 if( not char.useresource( 1, ammo ) ): ! #You do not have any arrows with which to practice. ! char.socket.clilocmessage(500594) return True else: *************** *** 123,132 **** # Use ammo (if 0 was used = no ammo) if( not char.useresource( 1, ammo ) ): ! char.socket.clilocmessage(500596) return True - char.movingeffect( movingeff, item, 1, 1, 1, 0, 1 ) # This increases the users skill --- 130,147 ---- # Use ammo (if 0 was used = no ammo) if( not char.useresource( 1, ammo ) ): ! #You do not have any crossbow bolts with which to practice. ! char.socket.clilocmessage(500595) return True char.movingeffect( movingeff, item, 1, 1, 1, 0, 1 ) + # Display the char-action + # (archery shot) + # Soundeffect + char.soundeffect( random.choice( [0x224, 0x234] ) ) + if( ammo == 0xf3f ): + char.action( ANIM_ATTACKBOW ) + else: + char.action( ANIM_ATTACKXBOX ) # This increases the users skill *************** *** 150,162 **** def ammoType( char ): # Bows & Crossbows are on layer 1 ! item = char.itemonlayer( 1 ) if( item == None ): return -1 - # Bow if( item.id == 0x13B1 or item.id == 0x13B2 ): return 0xf3f # Light Crossbow if( item.id == 0xF4F or item.id == 0xF50 ): --- 165,181 ---- def ammoType( char ): # Bows & Crossbows are on layer 1 ! # Composite Bow and Repeating Crossbow on layer 2 ! item = char.getweapon() if( item == None ): return -1 # Bow if( item.id == 0x13B1 or item.id == 0x13B2 ): return 0xf3f + # Composite Bow + if( item.id == 0x26cc or item.id == 0x26c2 ): + return 0xf3f + # Light Crossbow if( item.id == 0xF4F or item.id == 0xF50 ): *************** *** 167,170 **** --- 186,193 ---- return 0x1bfb + # Repeating Crossbow + if( item.id == 0x26c3 or item.id == 0x26cd ): + return 0x1bfb + # Unknown Weapon return -1 |
From: Incanus <inc...@us...> - 2004-09-27 16:28:46
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8919/scripts/skills Modified Files: healing.py Log Message: Fixed bug #0000331. (archery butte broken) Index: healing.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/healing.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** healing.py 16 Jul 2004 07:09:27 -0000 1.5 --- healing.py 27 Sep 2004 16:28:33 -0000 1.6 *************** *** 149,153 **** if chance >= whrandom.randint( 0, 1000 ): char.socket.clilocmessage( 500965, "", 0x3b2, 3 ) ! healto.resurrect() else: char.socket.clilocmessage( 500966, "", 0x3b2, 3 ) --- 149,153 ---- if chance >= whrandom.randint( 0, 1000 ): char.socket.clilocmessage( 500965, "", 0x3b2, 3 ) ! healto.resurrect( char ) else: char.socket.clilocmessage( 500966, "", 0x3b2, 3 ) |
From: Incanus <inc...@us...> - 2004-09-27 16:28:44
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8919/scripts/commands Modified Files: resurrect.py Log Message: Fixed bug #0000331. (archery butte broken) Index: resurrect.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/resurrect.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** resurrect.py 9 Jul 2004 21:08:36 -0000 1.3 --- resurrect.py 27 Sep 2004 16:28:32 -0000 1.4 *************** *** 32,36 **** char.turnto( target.char ) target.char.soundeffect( 0x215 ) ! target.char.resurrect() char.log( LOG_MESSAGE, "Resurrects character 0x%x.\n" % target.char.serial ) # Restore the character as well, added bonus. --- 32,36 ---- char.turnto( target.char ) target.char.soundeffect( 0x215 ) ! target.char.resurrect( char ) char.log( LOG_MESSAGE, "Resurrects character 0x%x.\n" % target.char.serial ) # Restore the character as well, added bonus. |
From: Incanus <inc...@us...> - 2004-09-27 16:28:44
|
Update of /cvsroot/wpdev/xmlscripts/scripts/contextmenus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8919/scripts/contextmenus Modified Files: healermenu.py Log Message: Fixed bug #0000331. (archery butte broken) Index: healermenu.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/contextmenus/healermenu.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** healermenu.py 12 Aug 2004 00:56:03 -0000 1.1 --- healermenu.py 27 Sep 2004 16:28:32 -0000 1.2 *************** *** 23,27 **** char.socket.clilocmessage( 3002069 ) # Resurrection char.soundeffect( 0x215 ) ! char.resurrect() return True --- 23,27 ---- char.socket.clilocmessage( 3002069 ) # Resurrection char.soundeffect( 0x215 ) ! char.resurrect( healer ) return True |
From: Incanus <inc...@us...> - 2004-09-27 16:28:44
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8919/documentation/webroot Modified Files: ChangeLog.wolfpack Log Message: Fixed bug #0000331. (archery butte broken) Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** ChangeLog.wolfpack 27 Sep 2004 14:37:09 -0000 1.120 --- ChangeLog.wolfpack 27 Sep 2004 16:28:31 -0000 1.121 *************** *** 14,17 **** --- 14,20 ---- - Fixed bug #0000334. (Implemented spell damage bonus) - Random magic item loot. + - Fixed bug #0000329. (fix for the isTree function) + - Fixed bug #0000328. (adddecor command not able to place jungle trees) + - Fixed bug #0000331. (archery butte broken) * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Incanus <inc...@us...> - 2004-09-27 16:24:31
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8116 Modified Files: ChangeLog Log Message: changelog update Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** ChangeLog 27 Sep 2004 15:51:32 -0000 1.82 --- ChangeLog 27 Sep 2004 16:24:20 -0000 1.83 *************** *** 4,7 **** --- 4,8 ---- - Fixed a unix console error - Fixed a npc title loading problem (UTF-8) + - Added an onResurrection event. Wolfpack 12.9.11 Beta (26. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-09-27 15:52:00
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1518 Modified Files: ChangeLog basechar.cpp Log Message: utf-8 conversion problem Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.152 retrieving revision 1.153 diff -C2 -d -r1.152 -r1.153 *** basechar.cpp 26 Sep 2004 21:36:23 -0000 1.152 --- basechar.cpp 27 Sep 2004 15:51:32 -0000 1.153 *************** *** 305,309 **** orgName_ = result[offset++]; ! title_ = result[offset++]; creationDate_ = QDateTime::fromString( result[offset++], Qt::ISODate ); body_ = atoi( result[offset++] ); --- 305,309 ---- orgName_ = result[offset++]; ! title_ = QString::fromUtf8(result[offset++]); creationDate_ = QDateTime::fromString( result[offset++], Qt::ISODate ); body_ = atoi( result[offset++] ); Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** ChangeLog 26 Sep 2004 16:21:30 -0000 1.81 --- ChangeLog 27 Sep 2004 15:51:32 -0000 1.82 *************** *** 2,5 **** --- 2,7 ---- Wolfpack 12.9.12 Beta (CVS) + - Fixed a unix console error + - Fixed a npc title loading problem (UTF-8) Wolfpack 12.9.11 Beta (26. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-09-27 14:37:47
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250/system Modified Files: loot.py lootlists.py Log Message: random magic item loot and additional properties Index: loot.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/loot.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** loot.py 21 Sep 2004 14:01:22 -0000 1.19 --- loot.py 27 Sep 2004 14:37:27 -0000 1.20 *************** *** 3,7 **** from wolfpack.consts import * from system.lootlists import * ! from wolfpack import console, utilities import random --- 3,7 ---- from wolfpack.consts import * from system.lootlists import * ! from wolfpack import console, utilities, properties import random *************** *** 11,14 **** --- 11,17 ---- PACK_AMOUNT = 2 PACK_STACKABLE = 3 + PACK_MAXPROPERTIES = 4 + PACK_MININTENSITY = 5 + PACK_MAXINTENSITY = 6 # Lootpacks *************** *** 27,83 **** 'lootpack_poor': [ [1.0, 'eed', [11, 20], 1], # Gold ! [0.0002, DEF_INSTRUMENTS, 1, 0 ] # Slayer Instruments ! #[0.0002, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [0% -> 90%] 5 max properties ], 'lootpack_meager': [ [1.0, 'eed', [11, 20], 1], # Gold ! [0.001, DEF_INSTRUMENTS, 1, 0 ] # Slayer Instruments ! #[0.01, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 10%] 2 max properties ! #[0.002, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [0% -> 90%] 5 max properties ], 'lootpack_average': [ [1.0, 'eed', [55, 100], 1], # Gold ! [0.004, DEF_INSTRUMENTS, 1, 0 ] # Slayer Instruments ! #[0.05, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 20%] 4 max properties ! #[0.02, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 50%] 3 max properties ! #[0.005, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [0% -> 90%] 5 max properties ], 'lootpack_rich': [ [1.0, 'eed', [160, 250], 1], # Gold ! [0.01, DEF_INSTRUMENTS, 1, 0 ] # Slayer Instruments ! #[0.2, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 40%] 4 max properties ! #[0.1, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 60%] 5 max properties ! #[0.01, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [0% -> 90%] 5 max properties ], 'lootpack_filthy_rich': [ [1.0, 'eed', [202, 400], 1], # Gold ! [0.02, DEF_INSTRUMENTS, 1, 0 ] # Slayer Instruments ! #[0.33, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 50%] 4 max properties ! #[0.33, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 60%] 4 max properties ! #[0.2, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 75%] 5 max properties ! #[0.05, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [0% -> 100%] 5 max properties ], 'lootpack_ultra_rich': [ [1.0, 'eed', [505, 1000], 1], # Gold ! [0.02, DEF_INSTRUMENTS, 1, 0 ] # Slayer Instruments ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [35% -> 100%] 5 max properties ], 'lootpack_super_boss': [ [1.0, 'eed', [505, 1000], 1], # Gold ! [0.02, DEF_INSTRUMENTS, 1, 0 ] # Slayer Instruments ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [35% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [35% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [35% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [35% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [50% -> 100%] 5 max properties ! #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [50% -> 100%] 5 max properties ], # Gold Packs --- 30,86 ---- 'lootpack_poor': [ [1.0, 'eed', [11, 20], 1], # Gold ! [0.0002, DEF_INSTRUMENTS, 1, 0 ], # Slayer Instruments ! [0.0002, 'RANDOM_MAGIC_ITEM', 1, 0 , 5, 0, 90] ], 'lootpack_meager': [ [1.0, 'eed', [11, 20], 1], # Gold ! [0.001, DEF_INSTRUMENTS, 1, 0 ], # Slayer Instruments ! [0.01, 'RANDOM_MAGIC_ITEM', 1, 0, 2, 0, 10 ], # [0% -> 10%] 2 max properties ! [0.002, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 0, 90 ] # [0% -> 90%] 5 max properties ], 'lootpack_average': [ [1.0, 'eed', [55, 100], 1], # Gold ! [0.004, DEF_INSTRUMENTS, 1, 0 ], # Slayer Instruments ! [0.05, 'RANDOM_MAGIC_ITEM', 1, 0, 4, 0, 20 ], # [0% -> 20%] 4 max properties ! [0.02, 'RANDOM_MAGIC_ITEM', 1, 0, 3, 0, 50 ], # [0% -> 50%] 3 max properties ! [0.005, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 0, 90 ] # [0% -> 90%] 5 max properties ], 'lootpack_rich': [ [1.0, 'eed', [160, 250], 1], # Gold ! [0.01, DEF_INSTRUMENTS, 1, 0 ], # Slayer Instruments ! [0.2, 'RANDOM_MAGIC_ITEM', 1, 0, 4, 0, 40 ], # [0% -> 40%] 4 max properties ! [0.1, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 0, 60 ], # [0% -> 60%] 5 max properties ! [0.01, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 0, 90 ] # [0% -> 90%] 5 max properties ], 'lootpack_filthy_rich': [ [1.0, 'eed', [202, 400], 1], # Gold ! [0.02, DEF_INSTRUMENTS, 1, 0 ], # Slayer Instruments ! [0.33, 'RANDOM_MAGIC_ITEM', 1, 0, 4, 0, 50 ], # [0% -> 50%] 4 max properties ! [0.33, 'RANDOM_MAGIC_ITEM', 1, 0, 4, 0, 60 ], # [0% -> 60%] 4 max properties ! [0.2, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 0, 75 ], # [0% -> 75%] 5 max properties ! [0.05, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 0, 100 ] # [0% -> 100%] 5 max properties ], 'lootpack_ultra_rich': [ [1.0, 'eed', [505, 1000], 1], # Gold ! [0.02, DEF_INSTRUMENTS, 1, 0 ], # Slayer Instruments ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 35, 100 ] # [35% -> 100%] 5 max properties ], 'lootpack_super_boss': [ [1.0, 'eed', [505, 1000], 1], # Gold ! [0.02, DEF_INSTRUMENTS, 1, 0 ], # Slayer Instruments ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 25, 100 ], # [25% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 35, 100 ], # [35% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 35, 100 ], # [35% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 35, 100 ], # [35% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 35, 100 ], # [35% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 50, 100 ], # [50% -> 100%] 5 max properties ! [1.0, 'RANDOM_MAGIC_ITEM', 1, 0, 5, 50, 100 ] # [50% -> 100%] 5 max properties ], # Gold Packs *************** *** 466,469 **** --- 469,477 ---- # def createpack(char, killer, corpse, pack): + if killer: + luckChance = properties.luckchance(killer) + else: + luckChance = 0 + # A pack is actually a list of lists for item in pack: *************** *** 473,478 **** --- 481,495 ---- packitem = item[ PACK_ITEM ] + spawn = False if packchance >= random.random(): + spawn = True + + # There is a chance that the item will spawn anyway if the luck check + # succeeds + if not spawn: + spawn = luckChance > random.randint(0, 9999) + + if spawn: if type( packamount ) == str: amount = utilities.rolldice( packamount ) *************** *** 498,503 **** elif type( packitem ) == str: itemid = str( packitem ) ! ! item = wolfpack.additem(itemid) dropitem(item, char, corpse) --- 515,528 ---- elif type( packitem ) == str: itemid = str( packitem ) ! ! if itemid == 'RANDOM_MAGIC_ITEM': ! maxproperties = item[ PACK_MAXPROPERTIES ] ! minintensity = item[ PACK_MININTENSITY ] ! maxintensity = item[ PACK_MAXINTENSITY ] ! item = wolfpack.additem(random.choice(RANDOM_MAGIC_ITEMS)) ! properties.applyRandom(item, maxproperties, minintensity, maxintensity, luckChance) ! else: ! item = wolfpack.additem(itemid) ! dropitem(item, char, corpse) Index: lootlists.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/lootlists.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** lootlists.py 7 Jun 2004 21:53:27 -0000 1.8 --- lootlists.py 27 Sep 2004 14:37:27 -0000 1.9 *************** *** 36,39 **** --- 36,40 ---- DEF_SHIELDS = ['1b72', '1b73', '1bc3', '1b76', '1b77', '1b74', '1b75', '1b7b', '1bc4', '1bc5', '1b78', '1b79', '1b79'] DEF_ORCHEADGEAR = DEF_ORCMASKS + DEF_ORCHELMS + DEF_ARMOR = DEF_LEATHER + DEF_STUDDED + DEF_CHAINMAIL + DEF_RINGMAIL + DEF_BONEMAIL + DEF_PLATEMAIL + DEF_HELMS DEF_ALLARMOR = DEF_HATS + DEF_LEATHER + DEF_STUDDED + DEF_CHAINMAIL + DEF_RINGMAIL + DEF_BONEMAIL + DEF_PLATEMAIL + DEF_DRAGONMAIL + DEF_HELMS + DEF_SHIELDS + DEF_SHIELDS *************** *** 113,114 **** --- 114,118 ---- # + RANDOM_MAGIC_ITEMS = DEF_ARMOR + DEF_ARMOR + DEF_ARMOR + DEF_ARMOR + RANDOM_MAGIC_ITEMS += DEF_SHIELDS + DEF_JEWELERY + RANDOM_MAGIC_ITEMS += DEF_ALLWEAPONS + DEF_ALLWEAPONS + DEF_ALLWEAPONS + DEF_ALLWEAPONS |
From: Sebastian H. <dar...@us...> - 2004-09-27 14:37:47
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250/wolfpack Modified Files: consts.py properties.py Log Message: random magic item loot and additional properties Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** consts.py 27 Sep 2004 09:58:34 -0000 1.83 --- consts.py 27 Sep 2004 14:37:27 -0000 1.84 *************** *** 84,87 **** --- 84,90 ---- LOWERREAGENTCOST = 52 SELFREPAIR = 53 + ENHANCEPOTIONS = 54 + BESTSKILL = 55 + MAGEWEAPON = 56 # Checks for certain item types Index: properties.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/properties.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** properties.py 27 Sep 2004 09:58:34 -0000 1.15 --- properties.py 27 Sep 2004 14:37:27 -0000 1.16 *************** *** 15,23 **** # def getdelay(attacker, weapon): ! speed = fromitem(weapon, SPEED) value = (attacker.stamina + 100) * speed ! # Scale value according to bonus ! # value += bonus * value / 100 if value <= 0: --- 15,26 ---- # def getdelay(attacker, weapon): ! speed = fromitem(weapon, SPEED) ! value = (attacker.stamina + 100) * speed ! bonus = fromchar(attacker, SPEEDBONUS) ! ! # Scale value according to bonus ! value += bonus * value / 100 if value <= 0: *************** *** 79,82 **** --- 82,86 ---- LUCK: ['luck', 0, 1], SELFREPAIR: ['selfrepair', 0, 0], + ENHANCEPOTIONS: ['enhancepotions', 0, True], # Requirements *************** *** 86,89 **** --- 90,95 ---- # Regular Combat Properties + BESTSKILL: ['bestskill', 0, 0], + MAGEWEAPON: ['mageweapon', 0, 0], MINDAMAGE: ['mindamage', 1, 0], MAXDAMAGE: ['maxdamage', 4, 0], *************** *** 494,508 **** item.resendtooltip() # # Apply random properties to the given items. # ! def applyRandom(item, maxprops, minintensity, maxintensity, luck=0 ): ! if luck < 0: ! luck = 0 ! if luck > 1200: ! luck = 1200 ! ! luckchance = LUCKTABLE[luck] ! props = 1 + bonusProps(maxprops, luckchance) --- 500,644 ---- item.resendtooltip() + # List of allowed properties + JUWEL_PROPERTIES = { + # PROPERT KEY, min value, max value, factor, accumulate + RESISTANCE_PHYSICAL: [1, 15, 1, False], + RESISTANCE_FIRE: [1, 15, 1, False], + RESISTANCE_COLD: [1, 15, 1, False], + RESISTANCE_POISON: [1, 15, 1, False], + RESISTANCE_ENERGY: [1, 15, 1, False], + DAMAGEBONUS: [1, 25, 1, False], + DEFENSEBONUS: [1, 15, 1, False], + HITBONUS: [1, 15, 1, False], + BONUSSTRENGTH: [1, 8, 1, False], + BONUSDEXTERITY: [1, 8, 1, False], + BONUSINTELLIGENCE: [1, 8, 1, False], + ENHANCEPOTIONS: [5, 25, 5, False], + CASTSPEEDBONUS: [1, 1, 1, False], + CASTRECOVERYBONUS: [1, 3, 1, False], + LOWERMANACOST: [1, 8, 1, False], + LOWERREAGENTCOST: [1, 20, 1, False], + LUCK: [1, 100, 1, False], + SPELLDAMAGEBONUS: [1, 12, 1, False], + #SKILLBONUS1: [1, 15, 1, False], + #SKILLBONUS1: [1, 15, 1, False], + #SKILLBONUS1: [1, 15, 1, False], + #SKILLBONUS1: [1, 15, 1, False], + #SKILLBONUS1: [1, 15, 1, False], + } + + def applyJuwelRandom(item, props, minintensity, maxintensity, luckchance): + properties = JUWEL_PROPERTIES.keys() + + # Select unique properties + for i in range(0, props): + property = random.choice(properties) + properties.remove(property) + + if not PROPERTIES.has_key(property): + continue + + # Scale the value for the property + info = JUWEL_PROPERTIES[property] + value = scaleValue(minintensity, maxintensity, info[0], info[1], info[2], luckchance) + + # Resistances are cummulative + if info[3]: + value += fromitem(item, property) + + item.settag(PROPERTIES[property][0], value) + + item.resendtooltip() + + # List of allowed properties + WEAPON_PROPERTIES = { + # PROPERT KEY, min value, max value, factor, accumulate + #SPLASH_PHYSICAL: [2, 50, 2, False], + #SPLASH_FIRE: [2, 50, 2, False], + #SPLASH_COLD: [2, 50, 2, False], + #SPLASH_POISON: [2, 50, 2, False], + #SPLASH_ENERGY: [2, 50, 2, False], + + #HIT_MAGICARROW: [2, 50, 2, False], + #HIT_HARM: [2, 50, 2, False], + #HIT_FIREBALL: [2, 50, 2, False], + #HIT_LIGHTNING: [2, 50, 2, False], + + #HIT_DISPEL: [2, 50, 2, False], + #HIT_LEECHHITS: [2, 50, 2, False], + #HIT_LEECHSTAMINA: [2, 50, 2, False], + #HIT_LEECHMANA: [2, 50, 2, False], + #HIT_LOWERATTACK: [2, 50, 2, False], + #HIT_LOWERDEFEND: [2, 50, 2, False], + + BESTSKILL: [1, 1, 1, False], + #MAGEWEAPON: [29, 20, 1, False], + + RESISTANCE_PHYSICAL: [1, 15, 1, True], + RESISTANCE_FIRE: [1, 15, 1, True], + RESISTANCE_COLD: [1, 15, 1, True], + RESISTANCE_POISON: [1, 15, 1, True], + RESISTANCE_ENERGY: [1, 15, 1, True], + DAMAGEBONUS: [1, 25, 1, True], + DEFENSEBONUS: [1, 15, 1, True], + HITBONUS: [1, 15, 1, True], + CASTSPEEDBONUS: [1, 1, 1, False], + LUCK: [1, 100, 1, False], + SPEEDBONUS: [5, 30, 5, False], + SPELLCHANNELING: [1, 1, 1, False], + SPELLDAMAGEBONUS: [1, 12, 1, False], + DURABILITYBONUS: [10, 100, 10, True], + LOWERREQS: [10, 100, 10, True], + } + + def applyWeaponRandom(item, props, minintensity, maxintensity, luckchance): + properties = WEAPON_PROPERTIES.keys() + + # No bestskill property for ranged weapons + if itemcheck(item, ITEM_RANGED): + properties.remove(BESTSKILL) + + # Select unique properties + for i in range(0, props): + property = random.choice(properties) + properties.remove(property) + + if not PROPERTIES.has_key(property): + continue + + # Scale the value for the property + info = WEAPON_PROPERTIES[property] + value = scaleValue(minintensity, maxintensity, info[0], info[1], info[2], luckchance) + + # Some special handling for special boni + if property == DURABILITYBONUS: + bonus = int(ceil(item.maxhealth * (value / 100.0))) + item.maxhealth = max(1, item.maxhealth + bonus) + item.health = item.maxhealth + + # Set cast speed to -1 + elif property == SPELLCHANNELING: + item.settag(PROPERTIES[CASTSPEEDBONUS][0], -1) + + # MageWeapon and BestSkill are exclusive + elif property == BESTSKILL: + if MAGEWEAPON in properties: + properties.remove(MAGEWEAPON) + elif property == MAGEWEAPON: + if BESTSKILL in properties: + properties.remove(BESTSKILL) + + # Resistances are cummulative + if info[3]: + value += fromitem(item, property) + + item.settag(PROPERTIES[property][0], value) + + item.resendtooltip() + # # Apply random properties to the given items. # ! def applyRandom(item, maxprops, minintensity, maxintensity, luckchance=0 ): props = 1 + bonusProps(maxprops, luckchance) *************** *** 519,531 **** applyJuwelRandom(item, props, minintensity, maxintensity, luckchance) ! # List of random armors for magic ! # item generation ! def testarmor(container): ! DEF_ARMOR = DEF_LEATHER + DEF_STUDDED + DEF_CHAINMAIL + DEF_RINGMAIL + DEF_BONEMAIL + DEF_PLATEMAIL + DEF_HELMS + DEF_SHIELDS ! id = random.choice(DEF_ARMOR) ! item = wolfpack.additem(id) ! container.additem(item) ! applyRandom(item, random.randint(1, 5), 50, 100, 0) ! item.update() --- 655,670 ---- applyJuwelRandom(item, props, minintensity, maxintensity, luckchance) ! # ! # Get the luckchance for a char ! # ! def luckchance(char): ! luck = fromchar(char, LUCK) ! if luck < 0: ! luck = 0 + if luck > 1200: + luck = 1200 + + return LUCKTABLE[luck] + \ No newline at end of file |
From: Sebastian H. <dar...@us...> - 2004-09-27 14:37:45
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250 Modified Files: equipment.py Log Message: random magic item loot and additional properties Index: equipment.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/equipment.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** equipment.py 27 Sep 2004 09:58:34 -0000 1.40 --- equipment.py 27 Sep 2004 14:37:26 -0000 1.41 *************** *** 21,24 **** --- 21,41 ---- if object.hastag(tag): tooltip.add(cliloc, str(object.gettag(tag))) + + speedbonus = properties.fromitem(object, SPEEDBONUS) + if speedbonus != 0: + tooltip.add(1060486, str(speedbonus)) + + + hitbonus = properties.fromitem(object, HITBONUS) + if hitbonus != 0: + tooltip.add(1060415, str(hitbonus)) + + defensebonus = properties.fromitem(object, DEFENSEBONUS) + if defensebonus != 0: + tooltip.add(1060408, str(defensebonus)) + + enhancepotions = properties.fromitem(object, ENHANCEPOTIONS) + if enhancepotions != 0: + tooltip.add(1060411, str(enhancepotions)) reflectphysical = properties.fromitem(object, REFLECTPHYSICAL) *************** *** 42,45 **** --- 59,66 ---- tooltip.add(1060483, str(spelldamagebonus)) + luck = properties.fromitem(object, LUCK) + if luck != 0: + tooltip.add(1060436, str(luck)) + bonus = properties.fromitem(object, BONUSSTRENGTH) if bonus != 0: *************** *** 78,83 **** tooltip.add(1060440, str(regenmana)) ! if object.hastag("bestskill"): tooltip.add(1060400, "") if properties.fromitem(object, MAGEARMOR): --- 99,108 ---- tooltip.add(1060440, str(regenmana)) ! if properties.fromitem(object, BESTSKILL): tooltip.add(1060400, "") + + mageweapon = properties.fromitem(object, MAGEWEAPON) + if mageweapon != 0: + tooltip.add(1060438, str(mageweapon)) if properties.fromitem(object, MAGEARMOR): *************** *** 369,393 **** # Bonus Str bonus = properties.fromitem(item, BONUSSTRENGTH) ! value = max(0, char.strength + bonus) ! if value != char.strength: ! char.strength = value ! char.strength2 = max(0, char.strength2 + bonus) changed = True # Bonus Dex bonus = properties.fromitem(item, BONUSDEXTERITY) ! value = max(0, char.dexterity + bonus) ! if value != char.dexterity: ! char.dexterity = value ! char.dexterity2 = max(0, char.dexterity2 + bonus) changed = True # Bonus Int bonus = properties.fromitem(item, BONUSINTELLIGENCE) ! value = max(0, char.intelligence + bonus) ! if value != char.intelligence: ! char.intelligence = value ! char.intelligence2 = max(0, char.intelligence2 + bonus) changed = True # Bonus Hitpoints --- 394,436 ---- # Bonus Str bonus = properties.fromitem(item, BONUSSTRENGTH) ! if char.strength + bonus < 1: ! bonus = 1 - char.strength ! if char.strength + bonus > char.strengthcap: ! bonus = max(0, char.strengthcap - char.strength) ! if bonus != 0: ! char.strength += bonus ! char.strength2 += bonus ! item.settag('real_strength_bonus', bonus) changed = True + else: + item.deltag('real_strength_bonus') # Bonus Dex bonus = properties.fromitem(item, BONUSDEXTERITY) ! if char.dexterity + bonus < 1: ! bonus = 1 - char.dexterity ! if char.dexterity + bonus > char.dexteritycap: ! bonus = max(0, char.dexteritycap - char.dexterity) ! if bonus != 0: ! char.dexterity += bonus ! char.dexterity2 += bonus ! item.settag('real_dexterity_bonus', bonus) changed = True + else: + item.deltag('real_dexterity_bonus') # Bonus Int bonus = properties.fromitem(item, BONUSINTELLIGENCE) ! if char.intelligence + bonus < 1: ! bonus = 1 - char.intelligence ! if char.intelligence + bonus > char.intelligencecap: ! bonus = max(0, char.intelligencecap - char.intelligence) ! if bonus != 0: ! char.intelligence += bonus ! char.intelligence2 += bonus ! item.settag('real_intelligence_bonus', bonus) changed = True + else: + item.deltag('real_intelligence_bonus') # Bonus Hitpoints *************** *** 444,469 **** # Bonus Str ! bonus = properties.fromitem(item, BONUSSTRENGTH) ! value = max(0, char.strength - bonus) ! if value != char.strength: ! char.strength = value ! char.strength2 = max(0, char.strength2 - bonus) changed = True # Bonus Dex ! bonus = properties.fromitem(item, BONUSDEXTERITY) ! value = max(0, char.dexterity - bonus) ! if value != char.dexterity: ! char.dexterity = value ! char.dexterity2 = max(0, char.dexterity2 - bonus) changed = True # Bonus Int ! bonus = properties.fromitem(item, BONUSINTELLIGENCE) ! value = max(0, char.intelligence - bonus) ! if value != char.intelligence: ! char.intelligence = value ! char.intelligence2 = max(0, char.intelligence2 - bonus) changed = True # Bonus Hitpoints --- 487,512 ---- # Bonus Str ! if item.hastag('real_strength_bonus'): ! value = int(item.gettag('real_strength_bonus')) ! char.strength = max(1, char.strength - value) ! char.strength2 -= value changed = True + item.deltag('real_strength_bonus') # Bonus Dex ! if item.hastag('real_dexterity_bonus'): ! value = int(item.gettag('real_dexterity_bonus')) ! char.dexterity = max(1, char.dexterity - value) ! char.dexterity2 -= value changed = True + item.deltag('real_dexterity_bonus') # Bonus Int ! if item.hastag('real_intelligence_bonus'): ! value = int(item.gettag('real_intelligence_bonus')) ! char.intelligence = max(1, char.intelligence - value) ! char.intelligence2 -= value changed = True + item.deltag('real_intelligence_bonus') # Bonus Hitpoints *************** *** 523,527 **** # def onDelete(item): ! char = item.container onUnequip(char, item, item.layer) --- 566,573 ---- # def onDelete(item): ! if not item.container or not item.container.ischar(): ! return ! ! char = item.container onUnequip(char, item, item.layer) |
From: Sebastian H. <dar...@us...> - 2004-09-27 14:37:37
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250/magic Modified Files: spell.py Log Message: random magic item loot and additional properties Index: spell.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/spell.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** spell.py 25 Sep 2004 12:06:59 -0000 1.27 --- spell.py 27 Sep 2004 14:37:26 -0000 1.28 *************** *** 5,11 **** from wolfpack import properties, utilities from magic.utilities import * ! from wolfpack.consts import MAGICRESISTANCE, EVALUATINGINTEL, INSCRIPTION, \ ! MAGERY, ANIM_CASTDIRECTED, SPELLDAMAGEBONUS, LOG_WARNING, SPELLCHANNELING, \ ! BODY_HUMAN import time --- 5,9 ---- from wolfpack import properties, utilities from magic.utilities import * ! from wolfpack.consts import * import time *************** *** 185,188 **** --- 183,196 ---- # + # Scale Mana + # + def scalemana(self, char, mode, mana): + if mode == MODE_SCROLL: + mana = (mana + 1) / 2 + + percent = properties.fromchar(char, LOWERMANACOST) / 100.0 + return max(0, mana - int(percent * float(mana))) + + # # Calculate the time required to cast this spell # *************** *** 306,320 **** if mode == MODE_BOOK: if self.mana != 0: ! char.mana = max(0, char.mana - self.mana) char.updatemana() # Consume Reagents if len(self.reagents) > 0: ! consumeReagents(char.getbackpack(), self.reagents.copy()) # Reduced Skill, Reduced Mana, No Reagents elif mode == MODE_SCROLL: if self.mana != 0: ! char.mana = max(0, char.mana - (self.mana + 1) / 2) char.updatemana() --- 314,333 ---- if mode == MODE_BOOK: if self.mana != 0: ! mana = self.scalemana(char, MODE_BOOK, self.mana) ! char.mana = max(0, char.mana - mana) char.updatemana() # Consume Reagents if len(self.reagents) > 0: ! lowerreagentcost = properties.fromchar(char, LOWERREAGENTCOST) ! ! if lowerreagentcost == 0 or lowerreagentcost > random.randint(0, 99): ! consumeReagents(char.getbackpack(), self.reagents.copy()) # Reduced Skill, Reduced Mana, No Reagents elif mode == MODE_SCROLL: if self.mana != 0: ! mana = self.scalemana(char, MODE_SCROLL, self.mana) ! char.mana = max(0, char.mana - mana) char.updatemana() |
From: Sebastian H. <dar...@us...> - 2004-09-27 14:37:36
|
Update of /cvsroot/wpdev/xmlscripts/scripts/combat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250/combat Modified Files: __init__.py aos.py utilities.py Log Message: random magic item loot and additional properties Index: aos.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/combat/aos.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** aos.py 20 Sep 2004 18:15:24 -0000 1.19 --- aos.py 27 Sep 2004 14:37:25 -0000 1.20 *************** *** 83,87 **** attackerValue = attacker.skill[attackerSkill] / 10 defenderValue = defender.skill[defenderSkill] / 10 ! # Calculate the hit chance bonus = 0 # Get the weapon "accuracy" status --- 83,87 ---- attackerValue = attacker.skill[attackerSkill] / 10 defenderValue = defender.skill[defenderSkill] / 10 ! # Calculate the hit chance bonus = 0 # Get the weapon "accuracy" status Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/combat/__init__.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** __init__.py 29 Aug 2004 16:36:38 -0000 1.14 --- __init__.py 27 Sep 2004 14:37:25 -0000 1.15 *************** *** 88,92 **** packet.setshort(74, properties.fromchar(char, RESISTANCE_POISON)) # Poison Resistance packet.setshort(76, properties.fromchar(char, RESISTANCE_ENERGY)) # Energy Resistance ! packet.setshort(78, 0) # Luck packet.setshort(80, mindamage) # Min. Damage packet.setshort(82, maxdamage) # Max. Damage --- 88,92 ---- packet.setshort(74, properties.fromchar(char, RESISTANCE_POISON)) # Poison Resistance packet.setshort(76, properties.fromchar(char, RESISTANCE_ENERGY)) # Energy Resistance ! packet.setshort(78, properties.fromchar(char, LUCK)) # Luck packet.setshort(80, mindamage) # Min. Damage packet.setshort(82, maxdamage) # Max. Damage Index: utilities.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/combat/utilities.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** utilities.py 30 May 2004 13:22:40 -0000 1.11 --- utilities.py 27 Sep 2004 14:37:25 -0000 1.12 *************** *** 90,94 **** return WRESTLING else: ! if bestskill and weapon.hastag('bestskill'): return getbestskill(char) --- 90,94 ---- return WRESTLING else: ! if bestskill and properties.fromitem(weapon, BESTSKILL): return getbestskill(char) |
From: Sebastian H. <dar...@us...> - 2004-09-27 14:37:22
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/swordsmanship In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18210/items/weaponry/swordsmanship Modified Files: viking_sword.xml Log Message: fixes Index: viking_sword.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/weaponry/swordsmanship/viking_sword.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** viking_sword.xml 5 Sep 2004 21:02:53 -0000 1.13 --- viking_sword.xml 27 Sep 2004 14:37:13 -0000 1.14 *************** *** 30,36 **** </item> ! <item id="13ba" inherit="14b9"> <id>0x13ba</id> ! <baseid>14b9</baseid> <category>Weapons\Swords\Viking Sword (E/W)</category> </item> --- 30,36 ---- </item> ! <item id="13ba" inherit="13b9"> <id>0x13ba</id> ! <baseid>13b9</baseid> <category>Weapons\Swords\Viking Sword (E/W)</category> </item> |
From: Sebastian H. <dar...@us...> - 2004-09-27 14:37:21
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18192/webroot Modified Files: ChangeLog.wolfpack Log Message: random magic item loot Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** ChangeLog.wolfpack 27 Sep 2004 00:30:47 -0000 1.119 --- ChangeLog.wolfpack 27 Sep 2004 14:37:09 -0000 1.120 *************** *** 7,10 **** --- 7,17 ---- - Fixed BONUS* properties. - Fixed other property issues. + - Fixed spellchanneling property for shields. + - Added random property generation for shields and armors. + - Fixed bug #0000336. (Exploitation of stat bonuses) + - Fixed bug #0000333. (Implemented lower mana cost) + - Fixed bug #0000332. (Implemented lower reag cost) + - Fixed bug #0000334. (Implemented spell damage bonus) + - Random magic item loot. * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Richard M. <dr...@us...> - 2004-09-27 14:15:14
|
Update of /cvsroot/wpdev/xmlscripts/definitions/teleports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13458/teleports Modified Files: index.xml Added Files: tokuno.xml Log Message: Tokuno Island Stuff for the new expansion, empty templates. Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/teleports/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.xml 10 Jul 2004 12:47:45 -0000 1.3 --- index.xml 27 Sep 2004 14:14:58 -0000 1.4 *************** *** 13,16 **** --- 13,17 ---- <include file="definitions/teleports/ilshenar.xml"/> <include file="definitions/teleports/malas.xml"/> + <include file="definitions/teleports/tokuno.xml"/> --> </definitions> --- NEW FILE: tokuno.xml --- <!-- ================================================================= | ) (\_ | WOLFPACK 13.0.0 Scripts | (( _/{ "-; | Created by: Dreoth | )).-' {{ ;'` | Revised by: | ( ( ;._ \\ ctr | Last Modification: Created ================================================================= --> <!-- <teleport source="x,y,z,map" destination="x,y,z,map" /> --> <definitions> <region name="tokuno_teleports"> <!-- The World --> <!--<rectangle x1="1" y1="1" x2="2560" y2="2048" map="4" />--> <!-- Teleports --> </region> </definitions> |
From: Richard M. <dr...@us...> - 2004-09-27 14:15:13
|
Update of /cvsroot/wpdev/xmlscripts/definitions/spawnregions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13458/spawnregions Modified Files: index.xml Log Message: Tokuno Island Stuff for the new expansion, empty templates. Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/spawnregions/index.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** index.xml 5 Sep 2004 02:08:22 -0000 1.9 --- index.xml 27 Sep 2004 14:14:57 -0000 1.10 *************** *** 11,19 **** --> <definitions> ! ! <!--<include file="definitions/spawnregions/felucca/index.xml" /> ! <include file="definitions/spawnregions/trammel/index.xml" />--> <include file="definitions/spawnregions/ilshenar/index.xml" /> <include file="definitions/spawnregions/malas/index.xml" /> ! </definitions> --- 11,20 ---- --> <definitions> ! <!-- ! <include file="definitions/spawnregions/felucca/index.xml" /> ! <include file="definitions/spawnregions/trammel/index.xml" /> <include file="definitions/spawnregions/ilshenar/index.xml" /> <include file="definitions/spawnregions/malas/index.xml" /> ! <include file="definitions/spawnregions/tokuno/index.xml" /> ! --> </definitions> |