Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv13596
Modified Files:
scissors.py wool.py yarn.py
Log Message:
Color passes between wool -> yarn/thread -> cloth -> bandages
Fixes to using the loom.
Cutting up clothes no longer makes bandages, it makes cloth.
Color also passes between cut clothing to the cloth.
Index: scissors.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/scissors.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** scissors.py 8 Feb 2003 13:07:38 -0000 1.5
--- scissors.py 14 Jan 2004 01:30:22 -0000 1.6
***************
*** 23,28 ****
ids_clothes_16 = [ 0x1f03, 0x1f04 ]
ids_clothes_24 = [ 0x1f9f, 0x1fa0 ]
! ids_bolts = [ 0x0f95, 0xf96, 0x0f97, 0xf98, 0x0f99, 0x0f9a, 0x0f9b, 0x0f9c ]
! ids_clothes = [ 0x1765, 0x1766, 0x1767, 0x1768 ]
--- 23,28 ----
ids_clothes_16 = [ 0x1f03, 0x1f04 ]
ids_clothes_24 = [ 0x1f9f, 0x1fa0 ]
! ids_bolts = [ 0xf95, 0xf96, 0xf97, 0xf98, 0xf99, 0xf9a, 0xf9b, 0xf9c ]
! ids_clothes = [ 0x1766, 0x1765, 0x1767, 0x1768 ]
***************
*** 72,77 ****
elif target.item.id in ids_clothes_2:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 2
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 72,78 ----
elif target.item.id in ids_clothes_2:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 2
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 81,86 ****
elif target.item.id in ids_clothes_4:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 4
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 82,88 ----
elif target.item.id in ids_clothes_4:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 4
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 90,95 ****
elif target.item.id in ids_clothes_6:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 6
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 92,98 ----
elif target.item.id in ids_clothes_6:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 6
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 99,104 ****
elif target.item.id in ids_clothes_8:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 8
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 102,108 ----
elif target.item.id in ids_clothes_8:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 8
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 108,113 ****
elif target.item.id in ids_clothes_10:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 10
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 112,118 ----
elif target.item.id in ids_clothes_10:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 10
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 117,122 ****
elif target.item.id in ids_clothes_11:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 11
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 122,128 ----
elif target.item.id in ids_clothes_11:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 11
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 126,131 ****
elif target.item.id in ids_clothes_12:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 12
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 132,138 ----
elif target.item.id in ids_clothes_12:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 12
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 135,140 ****
elif target.item.id in ids_clothes_13:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 13
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 142,148 ----
elif target.item.id in ids_clothes_13:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 13
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 144,149 ****
elif target.item.id in ids_clothes_14:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 14
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 152,158 ----
elif target.item.id in ids_clothes_14:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 14
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 153,158 ****
elif target.item.id in ids_clothes_15:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 15
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 162,168 ----
elif target.item.id in ids_clothes_15:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 15
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 162,167 ****
elif target.item.id in ids_clothes_16:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 16
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 172,178 ----
elif target.item.id in ids_clothes_16:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 16
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 171,176 ****
elif target.item.id in ids_clothes_24:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "ee9" )
item_new.amount = 24
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 182,188 ----
elif target.item.id in ids_clothes_24:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
item_new.amount = 24
+ item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 180,185 ****
elif target.item.id in ids_bolts:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1765" )
! item_new.amount = ( target.item.amount * 5 )
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
--- 192,198 ----
elif target.item.id in ids_bolts:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "1766" )
! item_new.amount = 50
! item_new.color = target.item.color
target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
***************
*** 188,201 ****
elif target.item.id in ids_clothes:
char.soundeffect( 0x248 )
! if ( target.item.amount > 1 ):
! target.item.amount = target.item.amount -1
! item.update()
! else:
! target.item.delete()
!
! item_new = wolfpack.additem( "ee9" )
! item_new.amount = 10
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
item_new.update()
else:
char.socket.clilocmessage( 0x7AAA8, "", 0x3b2, 3, char ) # Scissors can not be used on that to produce anything
--- 201,211 ----
elif target.item.id in ids_clothes:
char.soundeffect( 0x248 )
! item_new = wolfpack.additem( "e21" )
! item_new.amount = target.item.amount
! item_new.color = target.item.color
! target.item.delete()
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
item_new.update()
+
else:
char.socket.clilocmessage( 0x7AAA8, "", 0x3b2, 3, char ) # Scissors can not be used on that to produce anything
Index: wool.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wool.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wool.py 14 Jan 2004 00:15:40 -0000 1.3
--- wool.py 14 Jan 2004 01:30:22 -0000 1.4
***************
*** 47,51 ****
if target.item.id in ids:
!
if ( item.amount > 1 ):
item.amount = item.amount -1
--- 47,51 ----
if target.item.id in ids:
! color = item.color
if ( item.amount > 1 ):
item.amount = item.amount -1
***************
*** 70,74 ****
wheel = wolfpack.finditem( target.item.serial )
processtime = 5000 # 5 Seconds
! wolfpack.addtimer( processtime, "wool.ProcessTimer", [char, wheel] )
elif target.item.id in animids:
--- 70,74 ----
wheel = wolfpack.finditem( target.item.serial )
processtime = 5000 # 5 Seconds
! wolfpack.addtimer( processtime, "wool.ProcessTimer", [char, wheel, color] )
elif target.item.id in animids:
***************
*** 83,90 ****
char = args[0]
wheel = args[1]
! GetYarn( char, wheel )
return OK
! def GetYarn( char, wheel ):
# End the animations.
if wheel.id == animids[0]:
--- 83,91 ----
char = args[0]
wheel = args[1]
! color = args[2]
! GetYarn( char, wheel, color )
return OK
! def GetYarn( char, wheel, color ):
# End the animations.
if wheel.id == animids[0]:
***************
*** 103,106 ****
--- 104,108 ----
item_new = wolfpack.additem( 'e1d' ) # Yarn balls
item_new.amount = 3
+ item_new.color = color
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
item_new.update()
Index: yarn.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/yarn.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** yarn.py 28 Aug 2003 20:51:32 -0000 1.4
--- yarn.py 14 Jan 2004 01:30:22 -0000 1.5
***************
*** 44,47 ****
--- 44,48 ----
if target.item.id in ids:
+ color = item.color
if ( item.amount > 1 ):
item.amount = item.amount -1
***************
*** 49,67 ****
else:
item.delete()
!
! # action
! # soundeffect
! char.action( 0x10 )
! char.soundeffect( 0x48 )
!
if target.item.hastag( 'amount' ):
amount = int( target.item.gettag( 'amount' ) )
-
- if amount < 5:
- target.item.settag( 'amount', amount + 1 )
-
else:
! target.item.settag( 'amount', 0 )
! item_new = wolfpack.additem( "f9a" )
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
item_new.update()
--- 50,78 ----
else:
item.delete()
!
! # Make sure it has a tag, if not, set and default to 0 ammount.
if target.item.hastag( 'amount' ):
amount = int( target.item.gettag( 'amount' ) )
else:
! target.item.settag( 'amount', '0' )
! amount = int( target.item.gettag( 'amount' ) )
!
! amount += 1
!
! if amount < 5:
! if amount == 1:
! char.socket.sysmessage( 'You have just started the bolt of cloth.' )
! elif amount == 2:
! char.socket.sysmessage( 'The bolt of cloth could use quite a bit more.' )
! elif amount == 3:
! char.socket.sysmessage( 'The bolt of cloth could use a bit more.' )
! elif amount == 4:
! char.socket.sysmessage( 'The bolt of cloth is almost finished.' )
! target.item.settag( 'amount', str(amount) )
!
! elif amount == 5:
! target.item.settag( 'amount', '0' )
! item_new = wolfpack.additem( "f9a" ) # Adds a bolt of cloth.
! item_new.color = color
if not wolfpack.utilities.tocontainer( item_new, char.getbackpack() ):
item_new.update()
|