Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Healing/Bandages scripts
Author Message
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #1
Healing/Bandages scripts
Hi, I downloaded a script pack from this website, just to use it as a base for my own server. But the healing system I don't like it, because you can heal yourself without any delay, which is kind of annoying and unbalanced xd.

So my question is, where can I usually find the bandages script so I can make changes?. I know that it's a script pack, but where should the bandage script be by default?. Thanks.

PS: A healing system script is wellcome, I want an instant healing script but with 7 seconds delay to heal again, that's how I want to make it on my server.
(This post was last modified: 01-27-2017 11:37 PM by Snaigel.)
01-27-2017 11:34 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #2
RE: Healing/Bandages scripts
Uh, what script pack?

The basic default official script pack does not have a healing script. It uses a very old built-in healing engine. You'll be able to find the bandage and the Healing skill but neither will contain info you can edit to change heal time.

Other script packs often have a script to override and customize healing, but I'd need to know what pack you are using since they are organized in different ways.

If you are using default I do have a healing script you might like, not my own but iirc it does have an option for self-healing to be slower and better balance overall.

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
01-28-2017 05:43 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #3
RE: Healing/Bandages scripts
Hi, thanks for the answer.

EDIT:
I've found the script , so I could change or remove it, I would like to see first the script that you have. Thanks again.
(This post was last modified: 01-28-2017 06:31 PM by Snaigel.)
01-28-2017 03:24 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #4
RE: Healing/Bandages scripts
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

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
01-29-2017 06:26 AM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #5
RE: Healing/Bandages scripts

.scp  sphere_skill_healing.scp (Size: 21.04 KB / Downloads: 17)
.scp  sphere_skill_veterinary.scp (Size: 4.26 KB / Downloads: 8)
here ^_^ this is the original version of what i currently use but can't remember the script pack has been taken from...obviously you have to customize them based on your needs.
-delay actually depends from dex (customizable)
-delay is different if you heal yourself or other people (customizable)
-if poly you can choose to use veterinary in change of healing (like before)
-healing formulas
-etc etc
01-30-2017 05:39 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like zottolo's post
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #6
RE: Healing/Bandages scripts
That's the SCP version and I am using a variant of that. That's why I couldn't remember the author. Smile

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
01-30-2017 06:42 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #7
RE: Healing/Bandages scripts
Hi!! I use this thread of mine so I don't open a new one.

I'm using this healing script that heals you instant, but I want to add a delay of some seconds to be healed again, someone can help me?

Quote:[defname def_bandage]
AllowReadyBandage 1 // Allow players to 'ready' bandages?
BloodyBandageAtFail 1 // Bloody bandages at failure or success?
BandageDelay 0 // Delay for healing/curing.
EnableFail 1 // Enable/disable failing.
CurePoison 1 // Can poison be cured with a bandage?
HealCriminal 1 // Healing criminals is a crime?
HealInterrupt 0 // Healing interruption.
MessageColor 0790 // Color of the sysmessages.
SkillCancel 0 // Cancel used skill(s) when bandage is applied?
TargMaxDistance 3 // Maximum distance from target.
UseFromGround 0 // Can bandages be used from the ground?


[defname def_bandage_resurrect]
EnableResurrect 1 // Allow resurrection?
FirstSkillAmount 800 // First skill amount required for resurrection.
FirstSkillResurrect healing // First skill check for resurrection.
ResurrectConsume 10 // Amount of bandages consumed at resurrection.
ResurrectDelay 6 // Delay for resurrection.
SecondSkillAmount 1000 // Second skill amount required for resurrection.
SecondSkillResurrect anatomy // Second skill check for resurrection.

[typedef T_BANDAGE]
on=@DClick
if (!<def0.AllowReadyBandage>)
if (<src.findid(i_memory_healer>).uid>)
src.sysmessage @<def0.MessageColor> You are unable to perform another action.
return 1
endif
endif
if (!<def0.UseFromGround>)
if (<topobj.uid> == <src.uid>)
src.sysmessage @<def0.MessageColor> These must be used from your pack only.
endif
endif
else
target @<def0.MessageColor> Where do you want to apply the bandages?
return 1

on=@Targon_Char
if (<src.targ.distance> <= <def0.TargMaxDistance>)
if (<def0.AllowReadyBandage>)
if (<src.findid(i_memory_healer).uid>)
src.findid(i_memory_healer).remove
endif
endif
if (<src.targ.flags> & statf_dead)
if (<def0.EnableResurrect>)
if (<src.<def0.FirstSkillResurrect>> >= <def0.FirstSkillAmount>)
if (<src.<def0.SecondSkillResurrect>> >= <def0.SecondSkillAmount>)
if (<src.rescount i_bandage> >= <def0.ResurrectConsume>)
src.consume <def0.ResurrectConsume> i_bandage
serv.newitem = i_memory_healer
new.cont = <src.uid>
new.link = <src.targ.uid>
new.more = 1
new.timer = <def0.ResurrectDelay>
if (!<new.timer>)
new.trigger = @Timer
endif
if (<def0.HealInterrupt>)
src.events +e_heal_interrupt
endif
endif
else
src.sysmessage You the lack the skill(s) to do this.
endif
endif
endif
else
if (<src.targ.hits> < <src.targ.maxhits>)
if (<src.targ.uid> == <src.uid>)
src.sysmessage @<def0.MessageColor> You heal yourself.
else
src.sysmessage @<def0.MessageColor> You heal succesfully.
endif
if (<def0.SkillCancel>)
src.action = -1
endif
src.consume 1 i_bandage
src.sound = 058
serv.newitem = i_memory_healer
new.cont = <src.uid>
new.link = <src.targ.uid>
new.timer = <def0.BandageDelay>
if (!<new.timer>)
new.trigger = @Timer
endif
if (<def0.HealInterrupt>)
src.events +e_heal_interrupt
endif
else
src.sysmessage @<def0.MessageColor> Doesn't need heal.
endif
endif
else
src.sysmessage @<def0.MessageColor> Too far away.
endif
return 1


[itemdef i_memory_healer]
id = i_memory
name = Healing Memory Object
weight = 0
type = t_eq_script

on=@Create
attr = attr_invis|attr_decay

on=@Timer
if (<distance <link>> <= <def0.TargMaxDistance>)
if (<cont.tag0.failrate> > 3)
cont.tag0.failrate = 0
else
f_fail_healing
if (<def0.BloodyBandageAtFail>)
serv.newitem = i_bandage_bloody
new.cont = <cont>
endif
endif
doswitch <more>
begin
if (!<qval <link.flags> & statf_dead ? 1:0>) // Workaround for logical NOT issue.
f_heal
endif
end
begin
if (<link.flags> & statf_dead)
cont.hits -= 50
link.resurrect
endif
end
enddo
if (<def0.HealCriminal>)
if (<link.kills> > <serv.murdermincount>) || (<link.flags> & statf_criminal)
cont.criminal = 1
endif
endif
f_gain_healing
else
cont.sysmessage @<def0.MessageColor> Too far away.
endif
if (<def0.HealInterrupt>)
cont.events -e_heal_interrupt
endif
remove
return 1


[function f_heal]
if (<link.flags> & statf_poisoned)
if (<def0.CurePoison>)
link.findid(i_rune_poison).remove
endif
else
local.heal_val = <eval (<cont.healing> @ 2) / rand(20000,30000)>
link.hits += <local.heal_val>
if (<link.hits> > <link.maxhits>)
link.hits = <link.maxhits>
endif
endif
if (!<def0.BloodyBandageAtFail>)
serv.newitem = i_bandage_bloody
new.cont = <cont>
endif


[function f_fail_healing]
if (<def0.EnableFail>)
local.failchance = <eval rand(1,1100)>
if (<local.failchance> > <cont.healing>)
doswitch <cont.findid(i_memory_healer).more>
cont.sysmessage @<def0.MessageColor> You apply the bandages, but couldn't help.
cont.sysmessage @<def0.MessageColor> You fail to resurrect.
enddo
cont.tag0.failrate += 1
cont.findid(i_memory_healer).remove
endif
endif


[function f_gain_healing]
if (<cont.healing> < 1000)
cont.tag0.gainchance += 80
if (<cont.tag0.gainchance> > <cont.healing>)
cont.healing += 0.1
cont.tag0.gainchance = 0
endif
endif


[events e_heal_interrupt]
on=@GetHit
sysmessage @<def0.MessageColor> You stop applying the bandages.
findid(i_memory_healer).remove
events -e_heal_interrupt
return 0

[EOF]
[/quote]
12-17-2019 03:30 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)