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
|