[wpdev-commits] xmlscripts/scripts/speech pets.py,1.16,1.17
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-09 17:28:22
|
Update of /cvsroot/wpdev/xmlscripts/scripts/speech In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28149/speech Modified Files: pets.py Log Message: Bugfixes. Index: pets.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/speech/pets.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pets.py 31 Aug 2004 00:55:25 -0000 1.16 --- pets.py 9 Sep 2004 17:28:12 -0000 1.17 *************** *** 25,29 **** for follower in char.followers: come(char, follower, 0) ! elif pet and pet.owner == char and pet.distanceto(char) < 18: stopfight(pet) pet.guarding = None --- 25,29 ---- for follower in char.followers: come(char, follower, 0) ! elif pet and (pet.owner == char or char.gm) and pet.distanceto(char) < 18: stopfight(pet) pet.guarding = None *************** *** 35,39 **** for follower in char.followers: stop(char, follower, 0) ! elif pet and pet.owner == char and pet.distanceto(char) < 18: stopfight(pet) pet.guarding = None --- 35,39 ---- for follower in char.followers: stop(char, follower, 0) ! elif pet and (pet.owner == char or char.gm) and pet.distanceto(char) < 18: stopfight(pet) pet.guarding = None *************** *** 45,49 **** for follower in char.followers: follow_me(char, follower, 0) ! if pet and pet.owner == char and pet.distanceto(char) < 18: stopfight(pet) pet.follow(char) --- 45,49 ---- for follower in char.followers: follow_me(char, follower, 0) ! if pet and (pet.owner == char or char.gm) and pet.distanceto(char) < 18: stopfight(pet) pet.follow(char) *************** *** 57,61 **** else: pet = wolfpack.findchar(pet) ! if pet and pet.owner == char and pet.distanceto(char) < 18: stopfight(pet) pet.guarding = None --- 57,61 ---- else: pet = wolfpack.findchar(pet) ! if pet and (pet.owner == char or char.gm) and pet.distanceto(char) < 18: stopfight(pet) pet.guarding = None *************** *** 81,85 **** char.socket.sysmessage('Your pet refuses to kill itself.') return ! if pet and pet.owner == char and pet.distanceto(char) < 18: startfight(pet, target.char) pet.fight(target.char) --- 81,85 ---- char.socket.sysmessage('Your pet refuses to kill itself.') return ! if pet and (pet.owner == char or char.gm) and pet.distanceto(char) < 18: startfight(pet, target.char) pet.fight(target.char) *************** *** 104,116 **** pet = wolfpack.findchar(arguments[0]) ! if not pet: ! return ! ! if len(target.char.followers) + pet.controlslots > 5: ! char.socket.sysmessage('Your target already controls too many pets.') ! return ! ! if pet.owner == char: pet.owner = target.char pet.sound(SND_ATTACK) char.socket.sysmessage('You transfer your pet to %s.' % target.char.name) --- 104,117 ---- pet = wolfpack.findchar(arguments[0]) ! if pet and (pet.owner == char or char.gm): ! if len(target.char.followers) + pet.controlslots > target.char.maxcontrolslots: ! char.socket.sysmessage('Your target already controls too many pets.') ! return ! pet.owner = target.char + # Tame during transfer if gm + if char.gm and not pet.tamed: + pet.tamed = True + pet.resendtooltip() pet.sound(SND_ATTACK) char.socket.sysmessage('You transfer your pet to %s.' % target.char.name) *************** *** 133,137 **** for follower in char.followers: go_target(char, [follower.serial, 0], target) ! elif pet and pet.owner == char and pet.distanceto(char) < 18: #char.socket.sysmessage('Pet following:' + str(target.char.serial)) pet.guarding = None --- 134,138 ---- for follower in char.followers: go_target(char, [follower.serial, 0], target) ! elif pet and (pet.owner == char or char.gm) and pet.distanceto(char) < 18: #char.socket.sysmessage('Pet following:' + str(target.char.serial)) pet.guarding = None *************** *** 154,162 **** pet.owner = None if pet.tamed: ! pet.tamed = 0 pet.sound(SND_ATTACK) - pet.removescript('speech.pets') - def onSpeech(pet, char, text, keywords): if not char.socket: --- 155,162 ---- pet.owner = None if pet.tamed: ! pet.tamed = False ! pet.removescript('speech.pets') # Remove this script if it was added dynamically pet.sound(SND_ATTACK) def onSpeech(pet, char, text, keywords): if not char.socket: |