Update of /cvsroot/wpdev/xmlscripts/scripts/magic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14053/magic
Modified Files:
__init__.py spell.py
Log Message:
fixes
Index: spell.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/spell.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** spell.py 15 Oct 2004 17:29:15 -0000 1.30
--- spell.py 16 Oct 2004 14:08:21 -0000 1.31
***************
*** 315,318 ****
--- 315,332 ----
fizzle(char)
return 0
+
+ # Check Skill
+ if self.skill != None:
+ if mode == MODE_BOOK:
+ circle = self.circle
+ else:
+ circle = self.circle - 2
+ minskill = max(0, int((1000 / 7) * circle - 200))
+ maxskill = min(1200, int((1000 / 7) * circle + 200))
+
+ if not char.checkskill(self.skill, minskill, maxskill):
+ char.message(502632)
+ fizzle(char)
+ return 0
# Consume Mana
***************
*** 348,365 ****
pass
- # Check Skill
- if self.skill != None:
- if mode == MODE_BOOK:
- circle = self.circle
- else:
- circle = self.circle - 2
- minskill = max(0, int((1000 / 7) * circle - 200))
- maxskill = min(1200, int((1000 / 7) * circle + 200))
-
- if not char.checkskill(self.skill, minskill, maxskill):
- char.message(502632)
- fizzle(char)
- return 0
-
# Set the next spell delay
self.setspelldelay(char, mode)
--- 362,365 ----
Index: __init__.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/__init__.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** __init__.py 27 Sep 2004 22:33:22 -0000 1.19
--- __init__.py 16 Oct 2004 14:08:21 -0000 1.20
***************
*** 175,178 ****
--- 175,192 ----
def onWalk( char, direction, sequence ):
+ if char.npc or char.gm:
+ return False # No processing for NPCs
+
+ # Disallow movement for players
+ packet = wolfpack.packet(0x21, 8)
+ packet.setbyte(1, sequence)
+ packet.setshort(2, char.pos.x)
+ packet.setshort(4, char.pos.y)
+ packet.setbyte(6, char.direction)
+ packet.setbyte(7, char.pos.z)
+ packet.send(char.socket)
+ char.socket.walksequence = 0
+ return True
+
running = direction & 0x80
direction &= 0x7F
|