Morgion

Member
Morgion submitted a new resource:

Health Orb - Diablo III style healing

This simple script will add Diablo 3 style health orbs.
When player moves over them, it will heal all players and controlled pets within 4 tiles radius, for 20 (+enhance bonus potions) percent of their maximum hit points or remove poison when target is poisoned.

Installation:
Just drop it somewhere to Scripts folder.
To trigger it, add line
HealthOrb.Drop(harmedMobileHere);
in PlayerMobile or BaseCreature or specific monster script to OnDamage(...), OnBeforeDeath() etc.

Read more about this resource...
 
This is an example of how to add it to a specific mob script, for example Rat.cs
C#:
public override void OnDamage(int amount, Mobile from, bool willKill)
{
    base.OnDamage(amount, from, willKill);

    if (Utility.RandomDouble() > .25)
        HealthOrb.Drop(this);
}
 
interested in finding out if it would be easy to use the onetime timer system instead of having each orb use its own individual timer?
 
Corrected to fire only on the 30 sec delay and not repeat after, my bad!
 

Attachments

  • HealthOrb.cs
    6 KB · Views: 23
C#:
C:\ServUO\Scripts\Custom\Custom Items\HealthOrb.cs(15,30): error CS0246: The type or namespace name 'SelfDeletingItem' could not be found (are you missing a using directive or an assembly reference?) [C:\ServUO\Scripts\Scripts.csproj]
C:\ServUO\Scripts\Custom\Custom Items\HealthOrb.cs(56,30): error CS0115: 'HealthOrb.HandlesOnMovement': no suitable method found to override [C:\ServUO\Scripts\Scripts.csproj]
C:\ServUO\Scripts\Custom\Custom Items\HealthOrb.cs(58,30): error CS0115: 'HealthOrb.OnMovement(Mobile, Point3D)': no suitable method found to override [C:\ServUO\Scripts\Scripts.csproj]
C:\ServUO\Scripts\Custom\Custom Items\HealthOrb.cs(66,30): error CS0115: 'HealthOrb.OnDoubleClick(Mobile)': no suitable method found to override [C:\ServUO\Scripts\Scripts.csproj]
C:\ServUO\Scripts\Custom\Custom Items\HealthOrb.cs(127,30): error CS0115: 'HealthOrb.OnDelete()': no suitable method found to override [C:\ServUO\Scripts\Scripts.csproj]
C:\ServUO\Scripts\Custom\Custom Items\HealthOrb.cs(138,30): error CS0115: 'HealthOrb.Serialize(GenericWriter)': no suitable method found to override [C:\ServUO\Scripts\Scripts.csproj]
C:\ServUO\Scripts\Custom\Custom Items\HealthOrb.cs(144,30): error CS0115: 'HealthOrb.Deserialize(GenericReader)': no suitable method found to override [C:\ServUO\Scripts\Scripts.csproj]
 
Just wanted to chime in on this, I fixed the missing SelfDeletingItem. Left everything else in-tact, this is the OneTime version but you can always just pull the SelfDeletingItem out of this for use.
 

Attachments

  • HealthOrb.cs
    6.9 KB · Views: 8

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back