I cannot find the original source at this time. If there was a header with install and credit info it got lost. I think the instructions and credits were on the forum post which I believe was lost in one of the forum transitions.
If anyone knows where this came from, please let me know because I have forgotten.
Code:
//THIS EVENT (e_event_resurrection) IS OPTIONAL. IT WILL ENABLE THE RESURRECTION DIALOG FOR ALL RESURRECTIONS
[EVENTS e_event_resurrection]
ON=@SpellEffect
If <Argn>==59
If <Restest i_new_resurrection>
If !<Findid.i_new_resurrection.Morez>
New_Resurrect
Return 1
Endif
Else
New_Resurrect
Return 1
Endif
Endif
[DEFNAME Healing]
//General Defs
//////////////////////(Begin) DEFS FOR BOTH HEALING & VET (Begin)///////////////////////////
//Turn on/off new healing & veterinary (1=on, 0=off)
HealSys_UseHealSys = 1
//Healing item used for each brain type (0 = healing not permitted)
//Note: Please only use the two items provided here or zero for each brain
HealSys_Brain_0 = i_new_bandageheal //Players
HealSys_Brain_1 = i_new_bandagevet //Animal
HealSys_Brain_2 = i_new_bandageheal //Human
HealSys_Brain_3 = i_new_bandageheal //Healer
HealSys_Brain_4 = i_new_bandageheal //Guard
HealSys_Brain_5 = i_new_bandageheal //Banker
HealSys_Brain_6 = i_new_bandageheal //Vendor
HealSys_Brain_7 = i_new_bandageheal //Beggar
HealSys_Brain_8 = i_new_bandageheal //Animal Trainer
HealSys_Brain_9 = i_new_bandageheal //Thief
HealSys_Brain_10 = i_new_bandageheal //Monster
HealSys_Brain_11 = i_new_bandageheal //Berserk
HealSys_Brain_12 = 0 //Undead
HealSys_Brain_13 = i_new_bandagevet //Dragon
HealSys_Brain_14 = i_new_bandageheal //Vendor Offduty
//Healing uses your form's brain? (i.e. if you polymorphed into a bear, you would heal with veterinary) (1 = yes, 0 = no)
HealSys_HealBaseOnForm = 0
//////////////////////(End) DEFS FOR BOTH HEALING & VET (End)///////////////////////////
//Is Healing Red Players a crime (murderers)?
HealSys_RedCrime = 1
//Is Healing Gray Players a crime (criminals)?
HealSys_GrayCrime = 1
//Is Healing Orange Players a crime (enemy guild/faction)?
HealSys_OrangeCrime = 1
//Is Healing Red Monsters a crime (evil)?
HealSys_RedMonsterCrime = 0
//Is Healing Gray Monsters a crime (neutral)?
HealSys_GrayMonsterCrime = 0
//Player must stay within this amount of tiles to heal a target
//Start: Max distance when targetting someone to heal
//During: Max distance to stay within while healing
//End: Distance you must be within when the heal ends
HealSys_HealDistStart = 2
HealSys_HealDistDuring = 4
HealSys_HealDistEnd = 3
//If the player is poisoned can the bandages heal as well as cure? (1 = yes, 0 = no)
//This overrides the poison system def for this.
HealSys_CureStillHeals = 0
//Base percent chance to heal
HealSys_HealChance_Base = 33
//Amount to divide healing and anatomy by before applying the result to the heal chance
//The results of each are added together to form the additional percentage
HealSys_HealChanceDivide_Anat = 60
HealSys_HealChanceDivide_Heal = 15
//Healing Defs (Time to Heal)
//The maximum time it can take to heal yourself in seconds.
HealSys_Self_BaseTime = 11
//This is what to divide dexterity by before subtracting the result from the base time.
HealSys_Self_DexDivide = 20
//Same as above, but for healing others.
HealSys_Other_BaseTime = 4
HealSys_Other_DexDivide = 60
//Healing Defs (Amount to Heal)
//Formula for min & max healed is (Anatomy/<AnatDivide> + Healing/<HealDivide> + <Base>)
//Below values are OSI defaults.
HealSys_Min_Base = 3
HealSys_Min_AnatDivide = 60
HealSys_Min_HealDivide = 60
HealSys_Max_Base = 10
HealSys_Max_AnatDivide = 60
HealSys_Max_HealDivide = 30
//Healing Defs (Interruption)
//The percent of healing lost when you are interrupted
HealSys_HealLoss = 35
//The amount of damage a monster/player must deal to interrupt healing (This is checked before armor)
HealSys_InterruptMonster = 26
HealSys_InterruptPlayer = 19
//Healing Defs (Curing & Resurrecting)
//Minimum Anatomy and Healing needed to cure
//These override the poison system defs for this.
HealSys_Cure_MinAnat = 610
HealSys_Cure_MinHeal = 610
//Chance to cure is only used for default poison. The new poison system uses its own formula.
//Percent chance to cure at the minimum skill
//Base percent chance to cure
HealSys_CureChance_Base = 33
//Amount to divide additional healing and anatomy by before applying the result to the cure chance
//The results of each are added together to form the additional percentage
HealSys_CureChanceDivide_Anat = 12
HealSys_CureChanceDivide_Heal = 11
//Minimum Anatomy and Healing needed to resurrect
HealSys_Res_MinAnat = 810
HealSys_Res_MinHeal = 810
//Additional time it takes to resurrect a target in seconds
HealSys_ResDelay = 5
//Percent chance to resurrect at the minimum skill
HealSys_ResChance_Base = 25
//Amount to divide additional healing and anatomy by before applying the result to the resurrection chance
//The results of each are added together to form the additional percentage
HealSys_ResChanceDivide_Anat = 15
HealSys_ResChanceDivide_Heal = 15
//Clilocs
HealCliloc_ToWhoApply = 500948
HealCliloc_CannotUseOnThat = 500970
HealCliloc_CannotHealThat = 500951
HealCliloc_TooFarAway = 500446
HealCliloc_BeingNotDamaged = 500955
HealCliloc_YouBeginApply = 500956
HealCliloc_AttemptingToHeal = 1008078 //uses an argument (Name of healer)
HealCliloc_DidNotStayClose = 500963
HealCliloc_YouFinishApply = 500969
HealCliloc_YouHaveBeenHealedFor = 1060203 //uses an argument (amount healed)
HealCliloc_YouApplyBut = 500968
HealCliloc_HealWhatLittle = 500967
HealCliloc_BeenCured = 1010059
HealCliloc_CuredTarget = 1010058
HealCliloc_FailCureTarget = 1010650
HealCliloc_AbleToRes = 500965
HealCliloc_UnableToRes = 500966
HealCliloc_FingersSlip = 503251
[DEFNAME Veterinary]
//General Defs
//Is Healing your pet always legal regardless of its status?
VetSys_PetAlwaysLegal = 1
//Is Healing Red Creatures a crime (murderers/evil)?
VetSys_RedCrime = 0
//Is Healing Criminal Creatures a crime (criminals)?
VetSys_GrayCrime = 0
//Is Healing Orange Creatures a crime (enemy guild/faction)?
VetSys_OrangeCrime = 0
//Is Healing Neutral Creatures a crime (neutral)?
VetSys_NeutralCrime = 0
//Player must stay within this amount of tiles to heal a target
//Start: Max distance when targetting someone to heal
//During: Max distance to stay within while healing
//End: Distance you be be within when the heal ends
VetSys_HealDistStart = 3
VetSys_HealDistDuring = 4
VetSys_HealDistEnd = 3
//If the animal is poisoned can the bandages heal as well as cure? (1 = yes, 0 = no)
//This overrides the poison system def for this.
VetSys_CureStillHeals = 0
//Base percent chance to heal
VetSys_HealChance_Base = 33
//Amount to divide veterinary and animal lore by before applying the result to the heal chance
//The results of each are added together to form the additional percentage
VetSys_HealChanceDivide_Vet = 60
VetSys_HealChanceDivide_AnLo = 15
//Healing Defs (Time to Heal)
//The maximum time it can take to heal yourself in seconds.
//(Healing yourself with vet is unlikely, but I kept it in just in case)
VetSys_Self_BaseTime = 11
//This is what to divide dexterity by before subtracting the result from the base time.
VetSys_Self_DexDivide = 20
//Same as above, but for healing others.
//As per OSI standard, the settings here set the heal time as 2 seconds with no alterations from dex
VetSys_Other_BaseTime = 2
VetSys_Other_DexDivide = 30000
//Healing Defs (Amount to Heal)
//Formula for min & max healed is (Animal Lore/<AnLoDivide> + Veterinary/<VetDivide> + <Base>)
VetSys_Min_Base = 3
VetSys_Min_AnLoDivide = 60
VetSys_Min_VetDivide = 60
VetSys_Max_Base = 10
VetSys_Max_AnLoDivide = 60
VetSys_Max_VetDivide = 30
//This is the amount to divide the pets max health with before adding it to the amount healed
//OSI default for this is 100
VetSys_Max_VetHealthDivide = 100
//Healing Defs (Interruption)
//The percent of healing lost when you are interrupted
VetSys_HealLoss = 35
//The amount of damage a monster/player must deal to interrupt healing (This is checked before armor)
VetSys_InterruptMonster = 19
VetSys_InterruptPlayer = 19
//Healing Defs (Curing)
//NOTE: I have not added support for resurrecting bonded pets (since there aren't any by default). I will do this if I also script a taming system.
//Minimum Animal Lore and Veterinary needed to cure
//These override the poison system defs for this.
VetSys_Cure_MinAnLo = 600
VetSys_Cure_MinVet = 600
//Chance to cure is only used for default poison. The new poison system uses its own formula.
//Percent chance to cure at the minimum skill
//Base percent chance to cure
VetSys_CureChance_Base = 33
//Amount to divide additional veterinary and animal lore by before applying the result to the cure chance
//The results of each are added together to form the additional percentage
VetSys_CureChanceDivide_AnLo = 12
VetSys_CureChanceDivide_Vet = 11
[Function GetBandageItem]
If <Def0.HealSys_HealBaseOnForm>
Serv.NewNpc = <Body>
New.P = 1,1
Local.Brain = <New.Npc>
New.Remove
Return <Def0.HealSys_Brain_<dLocal.Brain>>
Endif
Return <Def0.HealSys_Brain_<Npc>>
[TYPEDEF t_bandage]
ON=@Dclick
If <Def0.HealSys_UseHealSys>
Src.Sysmessage @,,2 <Def0.HealCliloc_ToWhoApply>
Target
Return 1
Endif
ON=@Targon_Char
If <Def0.HealSys_UseHealSys>
Ref1 = <Src.Targ.Uid>
Src.Consume i_new_bandageheal
Src.Consume i_new_bandagevet
Local.HealItem=<Ref1.GetBandageItem>
If <Serv.Itemdef.<Local.HealItem>>
Serv.Newitem = <Local.HealItem>
New.Link = <Ref1.Uid>
Src.Equip <New.Uid>
If <Src.Restest <Local.HealItem>>
Consume
Endif
Else
Src.Sysmessage @,,2 <Def0.HealCliloc_CannotHealThat>
Endif
Return 1
Endif
ON=@Targon_Item
If <Def0.HealSys_UseHealSys>
If <Src.Distance <Src.Targ.Uid>> > <Def0.HealSys_HealDistStart>
Src.Sysmessage @,,2 <Def0.HealCliloc_TooFarAway>
Else
Src.Sysmessage @,,2 <Def0.HealCliloc_CannotUseOnThat>
Endif
Return 1
Endif
[ITEMDEF i_new_bandageheal]
ID=i_memory
TYPE=t_eq_script
NAME=Bandage Memory
ON=@Equip
If <Src.Distance <Link.Uid>> > <Def0.HealSys_HealDistStart>
Src.Sysmessage @,,2 <Def0.HealCliloc_TooFarAway>
Remove
Return 1
Endif
If <Link.Hits> >= <Link.MaxHits>
If ((!<Link.Restest i_memory_poison_new>) && (!<Link.Restest i_rune_poison>))
Src.Sysmessage @,,2 <Def0.HealCliloc_BeingNotDamaged>
Remove
Return 1
Endif
Endif
Src.Sysmessage @,,2 <Def0.HealCliloc_YouBeginApply>
Local.Flag = <Link.NotoGetFlag>
If <Link.IsPlayer>
If ((<Local.Flag>==6) && (<Def0.HealSys_RedCrime>))
Src.Criminal
Elif ((<Local.Flag>==4) && (<Def0.HealSys_GrayCrime>))
Src.Criminal
Elif ((<Local.Flag>==5) && (<Def0.HealSys_OrangeCrime>))
Src.Criminal
Endif
Elif <Link.IsChar>
If ((<Local.Flag>==6) && (<Def0.HealSys_RedMonsterCrime>))
Src.Criminal
Elif ((<Local.Flag>==3) && (<Def0.HealSys_GrayMonsterCrime>))
Src.Criminal
Endif
Endif
If <Link.Uid>!=<Src.Uid>
Link.Sysmessage @,,2 <Def0.HealCliloc_AttemptingToHeal>
Endif
//Add Event
Src.Events +e_healing_bandage
//Set Healing Time
If <Link.Uid> == <Src.Uid>
More = <Def0.HealSys_Self_BaseTime> +- (<Src.Dex> / <Def0.HealSys_Self_DexDivide>)
Else
More = <Def0.HealSys_Other_BaseTime> +- (<Src.Dex> / <Def0.HealSys_Other_DexDivide>)
If <Link.Flags>==<Link.Flags>|02
More += <Def0.HealSys_ResDelay>
Endif
Endif
//Set Healing Amount
Local.MinHeal = <Eval ((<Src.Anatomy>/<Def0.HealSys_Min_AnatDivide>) + (<Src.Healing>/<Def0.HealSys_Min_HealDivide>) + <Def0.HealSys_Min_Base>)>
Local.MaxHeal = <Eval ((<Src.Anatomy>/<Def0.HealSys_Max_AnatDivide>) + (<Src.Healing>/<Def0.HealSys_Max_HealDivide>) + <Def0.HealSys_Max_Base>)>
More2 = <Eval {<dLocal.MinHeal> <dLocal.MaxHeal>}>
Timer = 1
On=@UnEquip
Src.Events -e_healing_bandage
On=@Timer
If ((!<Link.IsChar>) || (!<Cont.IsChar>))
Remove
Return 1
Endif
If <Cont.Flags>==<Cont.Flags>|02
Remove
Return 1
Endif
More -= 1
If <More> > 0
If <Cont.Distance <Link.Uid>> > <Def0.HealSys_HealDistDuring>
Cont.Sysmessage @,,2 <Def0.HealCliloc_DidNotStayClose>
Remove
Return 1
Endif
//Attempt to gain skills while healing
If Rand(5)==0
Cont.Skillgain Healing,50
Cont.Skillgain Anatomy,50
Endif
Timer = 1
Return 1
Else
If <Cont.Distance <Link.Uid>> > <Def0.HealSys_HealDistEnd>
Cont.Sysmessage @,,2 <Def0.HealCliloc_DidNotStayClose>
Remove
Return 1
Endif
Local.HealChance = <Eval <Def0.HealSys_HealChance_Base> + (<Cont.Healing>/<Def0.HealSys_HealChanceDivide_Heal>) + (<Cont.Anatomy>/<Def0.HealSys_HealChanceDivide_Anat>)>
Link.Sound 87
If Rand(100) < <Local.HealChance>
//Success
Cont.Sysmessage @,,2 <Def0.HealCliloc_YouFinishApply>
If <Link.Flags>==<Link.Flags>|02
//Target is Dead, try to resurrect
If ((<Cont.Anatomy> >= <Def0.HealSys_Res_MinAnat>) && (<Cont.Healing> >= <Def0.HealSys_Res_MinHeal>))
Local.ResChance = <Eval <Def0.HealSys_ResChance_Base> + ((<Cont.Healing>+-<Def0.HealSys_Res_MinHeal>)/<Def0.HealSys_ResChanceDivide_Heal>) + ((<Cont.Anatomy>+-<Def0.HealSys_Res_MinAnat>)/<Def0.HealSys_ResChanceDivide_Anat>)>
Endif
If Rand(100) < <Local.ResChance>
//Success
Cont.Sysmessage @,,2 <Def0.HealCliloc_AbleToRes>
Cont.Skillgain Healing,50
Cont.Skillgain Healing,50
Cont.Skillgain Anatomy,50
Link.New_Resurrect
Else
//Fail
Cont.Sysmessage @,,2 <Def0.HealCliloc_UnableToRes>
If <Local.ResChance>
Cont.Skillgain Healing,50
Cont.Skillgain Anatomy,50
Endif
Endif
Else
Cont.Skillgain Healing,50
Cont.Skillgain Anatomy,50
//Default curing
If <Link.Restest i_rune_poison>
Local.Poisoned = 1
If ((<Cont.Anatomy> >= <Def0.HealSys_Cure_MinAnat>) && (<Cont.Healing> >= <Def0.HealSys_Cure_MinHeal>))
Local.CureChance = <Eval <Def0.HealSys_CureChance_Base> + ((<Cont.Healing>+-<Def0.HealSys_Cure_MinHeal>)/<Def0.HealSys_CureChanceDivide_Heal>) + ((<Cont.Anatomy>+-<Def0.HealSys_Cure_MinAnat>)/<Def0.HealSys_CureChanceDivide_Anat>)>
Endif
If Rand(100) < <Local.CureChance>
//Success
Cont.Sysmessage @,,2 <Def0.HealCliloc_CuredTarget>
Link.Sysmessage @,,2 <Def0.HealCliloc_BeenCured>
Link.Consume i_rune_poison
Else
//Fail
Cont.Sysmessage @,,2 <Def0.HealCliloc_FailCureTarget>
Endif
Endif
//Poison System curing
If <Link.Restest i_memory_poison_new>
Local.Poisoned = 1
If ((<Cont.Anatomy> < <Def0.HealSys_Cure_MinAnat>) || (<Cont.Healing> < <Def0.HealSys_Cure_MinHeal>))
Cont.Sysmessage @,,2 <Def0.HealCliloc_FailCureTarget>
Else
Local.Skill = <Cont.Healing>
If <Def0.PoisonSys_HealUseAnatomy>
Local.Skill += <Cont.Anatomy>
Else
Local.Skill *= 2
Endif
Local.Cured = <Link.Findid.i_memory_poison_new.Trigger @Cure,<Def0.TAT_AS_ARGN>,<Local.Skill> / 2>
If <Local.Cured>
Cont.Sysmessage @,,2 <Def0.HealCliloc_CuredTarget>
Else
Cont.Sysmessage @,,2 <Def0.HealCliloc_FailCureTarget>
Endif
Endif
Endif
If ((<Def0.HealSys_CureStillHeals>) || (!<Local.Poisoned>))
If <Link.Hits> < <Link.Maxhits>
Link.Hits += <More2>
If <Link.Hits> > <Link.Maxhits>
Link.Hits = <Link.Maxhits>
Endif
Link.Sysmessage @,,2 <Def0.HealCliloc_YouHaveBeenHealedFor>,<dMore2>
Else
Cont.Sysmessage @,,2 <Def0.HealCliloc_HealWhatLittle>
Endif
Endif
Endif
Else
//Fail
If <Cont.Healing> < 200
Cont.Skillgain Healing,50
Cont.Skillgain Anatomy,50
Endif
Cont.Sysmessage @,,2 <Def0.HealCliloc_YouApplyBut>
Endif
Remove
Return 1
Endif
[Events e_healing_bandage]
ON=@GetHit
If <Restest i_new_bandageheal>
Sysmessage @,,2 <Def0.HealCliloc_FingersSlip>
If <Src.Npc>
If <Argn1> >= <Def0.HealSys_InterruptMonster>
Findid.i_new_bandageheal.More2 -= (<Findid.i_new_bandageheal.More2>*<Def0.HealSys_HealLoss>)/100
Endif
Else
If <Argn1> >= <Def0.HealSys_InterruptPlayer>
Findid.i_new_bandageheal.More2 -= (<Findid.i_new_bandageheal.More2>*<Def0.HealSys_HealLoss>)/100
Endif
Endif
Else
Events -e_healing_bandage
Endif
[ITEMDEF i_new_bandagevet]
ID=i_memory
TYPE=t_eq_script
NAME=Bandage Memory
ON=@Equip
If <Src.Distance <Link.Uid>> > <Def0.VetSys_HealDistStart>
Src.Sysmessage @,,2 <Def0.HealCliloc_TooFarAway>
Remove
Return 1
Endif
If <Link.Hits> >= <Link.MaxHits>
If ((!<Link.Restest i_memory_poison_new>) && (!<Link.Restest i_rune_poison>))
Src.Sysmessage @,,2 <Def0.HealCliloc_BeingNotDamaged>
Remove
Return 1
Endif
Endif
Src.Sysmessage @,,2 <Def0.HealCliloc_YouBeginApply>
Local.Flag = <Link.NotoGetFlag>
If <Link.IsChar>
If ((<Link.Owner>!=<Src.Uid>) || (!<Def0.VetSys_PetAlwaysLegal>))
If ((<Local.Flag>==6) && (<Def0.VetSys_RedCrime>))
Src.Criminal
Elif ((<Local.Flag>==4) && (<Def0.VetSys_GrayCrime>))
Src.Criminal
Elif ((<Local.Flag>==5) && (<Def0.VetSys_OrangeCrime>))
Src.Criminal
Elif ((<Local.Flag>==3) && (<Def0.VetSys_NeutralCrime>))
Src.Criminal
Endif
Endif
Endif
If <Link.Uid>!=<Src.Uid>
Link.Sysmessage @,,2 <Def0.HealCliloc_AttemptingToHeal>
Endif
//Add Event
Src.Events +e_Vet_bandage
//Set Healing Time
If <Link.Uid> == <Src.Uid>
More = <Def0.VetSys_Self_BaseTime> +- (<Src.Dex> / <Def0.VetSys_Self_DexDivide>)
Else
More = <Def0.VetSys_Other_BaseTime> +- (<Src.Dex> / <Def0.VetSys_Other_DexDivide>)
If <Link.Flags>==<Link.Flags>|02
More += <Def0.VetSys_ResDelay>
Endif
Endif
//Set Healing Amount
Local.MinHeal = <Eval ((<Src.AnimalLore>/<Def0.VetSys_Min_AnLoDivide>) + (<Src.Veterinary>/<Def0.VetSys_Min_VetDivide>) + <Def0.VetSys_Min_Base>)>
Local.MaxHeal = <Eval ((<Src.AnimalLore>/<Def0.VetSys_Max_AnLoDivide>) + (<Src.Veterinary>/<Def0.VetSys_Max_VetDivide>) + <Def0.VetSys_Max_Base>)>
Local.PetHeal = <Eval <Link.Maxhits> / <Def0.VetSys_Max_VetHealthDivide>>
More2 = <Eval {<dLocal.MinHeal> <dLocal.MaxHeal>}>
More2 += <Local.PetHeal>
Timer = 1
On=@UnEquip
Src.Events -e_Vet_bandage
On=@Timer
If ((!<Link.IsChar>) || (!<Cont.IsChar>))
Remove
Return 1
Endif
If <Cont.Flags>==<Cont.Flags>|02
Remove
Return 1
Endif
More -= 1
If <More> > 0
If <Cont.Distance <Link.Uid>> > <Def0.VetSys_HealDistDuring>
Cont.Sysmessage @,,2 <Def0.HealCliloc_DidNotStayClose>
Remove
Return 1
Endif
//Attempt to gain skills while healing
If Rand(7)==0
Cont.Skillgain Veterinary,50
Cont.Skillgain AnimalLore,50
Endif
Timer = 1
Return 1
Else
If <Cont.Distance <Link.Uid>> > <Def0.VetSys_HealDistEnd>
Cont.Sysmessage @,,2 <Def0.HealCliloc_DidNotStayClose>
Remove
Return 1
Endif
Local.HealChance = <Eval <Def0.VetSys_HealChance_Base> + (<Cont.Veterinary>/<Def0.VetSys_HealChanceDivide_Vet>) + (<Cont.AnimalLore>/<Def0.VetSys_HealChanceDivide_AnLo>)>
Link.Sound 87
If Rand(100) < <Local.HealChance>
//Success
Cont.Sysmessage @,,2 <Def0.HealCliloc_YouFinishApply>
If <Link.Flags>==<Link.Flags>|02
Return 1 //Stops Healing. There is currently no resurrection for veterinary
////Target is Dead, try to resurrect
//If ((<Cont.AnimalLore> >= <Def0.VetSys_Res_MinAnLo>) && (<Cont.Veterinary> >= <Def0.VetSys_Res_MinVet>))
//Serv.Log Res Success Chance is <dDef0.VetSys_ResChance_Base> + ((<Cont.Veterinary>+-<dDef0.VetSys_Res_MinVet>)/<dDef0.VetSys_ResChanceDivide_Vet>) + ((<Cont.AnimalLore>+-<dDef0.VetSys_Res_MinAnLo>)/<dDef0.VetSys_ResChanceDivide_AnLo>)
//Local.ResChance = <Eval <Def0.VetSys_ResChance_Base> + ((<Cont.Veterinary>+-<Def0.VetSys_Res_MinVet>)/<Def0.VetSys_ResChanceDivide_Vet>) + ((<Cont.AnimalLore>+-<Def0.VetSys_Res_MinAnLo>)/<Def0.VetSys_ResChanceDivide_AnLo>)>
//Serv.Log :: = <dLocal.ResChance>%
//Endif
//If Rand(100) < <Local.ResChance>
////Success
//Cont.Sysmessage @,,2 <Def0.HealCliloc_AbleToRes>
//Link.ResDialog
//Else
////Fail
//Cont.Sysmessage @,,2 <Def0.HealCliloc_UnableToRes>
//Endif
Else
Cont.Skillgain Veterinary,50
Cont.Skillgain AnimalLore,50
//Default curing
If <Link.Restest i_rune_poison>
Local.Poisoned = 1
If ((<Cont.AnimalLore> >= <Def0.VetSys_Cure_MinAnLo>) && (<Cont.Veterinary> >= <Def0.VetSys_Cure_MinVet>))
Local.CureChance = <Eval <Def0.VetSys_CureChance_Base> + ((<Cont.Veterinary>+-<Def0.VetSys_Cure_MinVet>)/<Def0.VetSys_CureChanceDivide_Vet>) + ((<Cont.AnimalLore>+-<Def0.VetSys_Cure_MinAnLo>)/<Def0.VetSys_CureChanceDivide_AnLo>)>
Endif
If Rand(100) < <Local.CureChance>
//Success
Cont.Sysmessage @,,2 <Def0.HealCliloc_CuredTarget>
Link.Sysmessage @,,2 <Def0.HealCliloc_BeenCured>
Link.Consume i_rune_poison
Else
//Fail
Cont.Sysmessage @,,2 <Def0.HealCliloc_FailCureTarget>
Endif
Endif
//Poison System curing
If <Link.Restest i_memory_poison_new>
Local.Poisoned = 1
If ((<Cont.AnimalLore> < <Def0.VetSys_Cure_MinAnLo>) || (<Cont.Veterinary> < <Def0.VetSys_Cure_MinVet>))
Cont.Sysmessage @,,2 <Def0.HealCliloc_FailCureTarget>
Else
Local.Skill = <Cont.Veterinary>
If <Def0.PoisonSys_HealUseAnimalLore>
Local.Skill += <Cont.AnimalLore>
Else
Local.Skill *= 2
Endif
Local.Cured = <Link.Findid.i_memory_poison_new.Trigger @Cure,<Def0.TAT_AS_ARGN>,<Local.Skill> / 2>
If <Local.Cured>
Cont.Sysmessage @,,2 <Def0.HealCliloc_CuredTarget>
Else
Cont.Sysmessage @,,2 <Def0.HealCliloc_FailCureTarget>
Endif
Endif
Endif
If ((<Def0.VetSys_CureStillHeals>) || (!<Local.Poisoned>))
If <Link.Hits> < <Link.Maxhits>
Link.Hits += <More2>
If <Link.Hits> > <Link.Maxhits>
Link.Hits = <Link.Maxhits>
Endif
Link.Sysmessage @,,2 <Def0.HealCliloc_YouHaveBeenHealedFor>,<dMore2>
Else
Cont.Sysmessage @,,2 <Def0.HealCliloc_HealWhatLittle>
Endif
Endif
Endif
Else
//Fail
If <Cont.Veterinary> < 250
Cont.Skillgain Veterinary,50
Cont.Skillgain AnimalLore,50
Endif
Cont.Sysmessage @,,2 <Def0.HealCliloc_YouApplyBut>
Endif
Remove
Return 1
Endif
[Events e_Vet_bandage]
ON=@GetHit
If <Restest i_new_bandagevet>
Sysmessage @,,2 <Def0.HealCliloc_FingersSlip>
If <Src.Npc>
If <Argn1> >= <Def0.VetSys_InterruptMonster>
Findid.i_new_bandagevet.More2 -= (<Findid.i_new_bandagevet.More2>*<Def0.VetSys_HealLoss>)/100
Endif
Else
If <Argn1> >= <Def0.VetSys_InterruptPlayer>
Findid.i_new_bandagevet.More2 -= (<Findid.i_new_bandagevet.More2>*<Def0.VetSys_HealLoss>)/100
Endif
Endif
Else
Events -e_Vet_bandage
Endif
[Function New_Resurrect]
If <IsPlayer>
If <Flags>==<Flags>|02
If !<Restest i_new_resurrection>
Serv.Newitem = i_new_resurrection
Equip <New.Uid>
Else
Findid.i_new_resurrection.More=30
Endif
Endif
Endif
[DIALOG d_newresurrect_dialog]
40, 20
PAGE 0
resizepic 0 0 2600 400 350
dhtmlgump 10 22 380 30 0 0 <Def0.Center>Resurrection<Def0.Centere>
dhtmlgump 50 55 300 140 1 1 It is possible for you to be resurrected here by this healer. Do you wish to try? <Def0.BR>CONTINUE - You chose to try to come back to life now.<Def0.BR>CANCEL - You prefer to remain a ghost for now.
button 65 227 4005 4006 1 0 1
dtext 99 229 0 CONTINUE
button 200 227 4005 4006 1 0 0
dtext 234 229 0 CANCEL
[DIALOG d_newresurrect_dialog BUTTON]
ON=0
If <Restest i_new_resurrection>
If !<Findid.i_new_resurrection.More2>
Consume i_new_resurrection
Endif
Endif
ON=1
If <Restest i_new_resurrection>
Findid.i_new_resurrection.Morez = 1
Resurrect
Consume i_new_resurrection
Sound snd_spell_resurrection
Effect 3,i_fx_heal_effect,20,25,0
Endif
[Itemdef i_new_resurrection]
ID=i_memory
TYPE=t_eq_script
NAME=Resurrection Memory
ON=@Equip
Src.Sound snd_spell_resurrection
Src.Effect 3,i_fx_heal_effect,20,25,0
Src.DialogClose d_newresurrect_dialog
Src.Dialog d_newresurrect_dialog
More = 30
Timer = 3
Src.Flags = <Src.Flags>|04
ON=@UnEquip
More2=1
Src.DialogClose d_newresurrect_dialog
Src.Flags = <Src.Flags>&~04
ON=@Timer
More -= 1
If <Cont.Flags>==<Cont.Flags>&~02
Remove
Return 1
Endif
If <More><=0
Remove
Return 1
Endif
Cont.DialogClose d_newresurrect_dialog
Cont.Dialog d_newresurrect_dialog
Cont.Flags = <Cont.Flags>|04
Timer = 3
Return 1