Taming error - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Taming error (/Thread-Taming-error) |
Taming error - Kapa - 11-16-2014 06:15 PM 21:13:ERROR:(sphere_skills.scp,780)Undefined symbol 'id' By the way the animal still attack tamer so i think this doesnt work anyway. [SKILL 35] DEFNAME=Skill_Taming KEY=Taming TITLE=Animal Tamer PROMPT_MSG=Tame which animal? DELAY=2.0 STAT_STR=30 STAT_INT=40 STAT_DEX=60 BONUS_STR=30 BONUS_DEX=10 BONUS_INT=60 BONUS_STATS=20 ADV_RATE=0.1,0.1,0.1 ON=@Fail SRC.SYSMESSAGE You fail to tame the creature. ON=@Abort SRC.SYSMESSAGE You give up trying to tame the creature. ON=@Success if (<act.attacker.id <uid>>>=0) // line 780 act.attacker.delete <uid> endif RE: Taming error - XuN - 11-16-2014 07:19 PM Previously Attacker.x was returning error if the character has no attackers, it's been fixed some builds ago... so I guess you have an outdated one? Anyway, to prevent this you can use a safecheck there: Code: ON=@Success RE: Taming error - Coruja - 11-17-2014 01:38 AM or try using (<act.attacker.id <uid>> != -1) because attacker.xxx functions will return -1 instead 0 when there's no attacker RE: Taming error - Runcuks - 11-17-2014 07:10 PM try act.memoryfindtype.memory_fight.remove act.memoryfindtype.memory_aggreived.remove RE: Taming error - Kapa - 11-24-2014 07:58 AM 21:56:ERROR:(shrink_fix.scp,7)Undefined keyword 'act.memoryfindtype.memory_fight.remove' 21:56:ERROR:(shrink_fix.scp,8)Undefined keyword 'act.memoryfindtype.memory_aggreived.remove' How to stop an animal from atacking you after unshrink? [typedef t_figurine] ON=@DClick //ref1=<more2> //if (<ref2.ischar> && <ref2.IsMyPet> && (<ref2.flags>&statf_war)) //ref2.flags &=~statf_war //endif if (<act.attacker.id <uid>> != -1) // line 780 act.attacker.delete <uid> endif 22:02:ERROR:(shrink_fix.scp,7)Can't resolve <act.attacker.id 040018e8d> 22:02:ERROR:(shrink_fix.scp,8)Undefined keyword 'act.attacker.delete' is there a flag for peacemaking? and is it possible to add this flag to the animal after unshrinking it? RE: Taming error - XuN - 11-25-2014 04:44 AM Code: if (<act.attacker.id <uid>> != -1) // line 780 RE: Taming error - Kapa - 11-25-2014 05:41 AM I did try that @Success trigger of Taming skill but it didnt work. Please help me to sort this script out i just want an animal to stop attacking a player after unshrink [typedef t_figurine] ON=@DClick ref1=<more2> //if (<ref2.ischar> && <ref2.IsMyPet> && (<ref2.flags>&statf_war)) //ref2.flags &=~statf_war //endif if (<act.attacker.id <ref1>> != -1) // line 780 act.attacker.delete <ref1> endif [EOF] 19:37:ERROR:(shrink_fix.scp,7)Can't resolve <act.attacker.id 0175db> 19:37:ERROR:(shrink_fix.scp,8)Undefined keyword 'act.attacker.delete' RE: Taming error - XuN - 11-25-2014 11:29 PM My fault, didn't change everything: Code: ON=@DClick This should work, it first checks if the ref1 (the pet) has attackers, if so it checks if who DClicks the figurine is the owner of the pet (you can remove this line to make it to apply that to any player unshrinking the pet) and then it performs the check about attacker.id. RE: Taming error - Kapa - 11-26-2014 11:20 PM dont you anyway become the owner of the pet when you do unshrink? it doesnt work :/ pet still remembers the attacker 13:24:ERROR:(shrink_fix.scp,9)Undefined symbol 'id' 13:24:ERROR:(shrink_fix.scp,10)Undefined keyword 'ref1.attacker.delete' RE: Taming error - darksun84 - 11-27-2014 12:46 AM This works fine for me Code: //Put this in the Animal Taming Skill |