ProtectFromGroundDamage
how do i add protectfromgrounddamage to an item
for example im trying to make a robe resistant to lava
thanks in advance
for example im trying to make a robe resistant to lava
thanks in advance
void HandleEffects(RealmTime time)
{
if (HasConditionEffect(ConditionEffects.Healing))
{
if (healing > 1)
{
HP = Math.Min(Stats[0] + Boost[0], HP + (int)healing);
healing -= (int)healing;
UpdateCount++;
healCount++;
}
healing += 28 * (time.thisTickTimes / 1000f);
}
if (HasConditionEffect(ConditionEffects.Quiet) &&
MP > 0)
{
MP = 0;
UpdateCount++;
}
if (HasConditionEffect(ConditionEffects.Bleeding) &&
HP > 1)
{
if (bleeding > 1)
{
HP -= (int)bleeding;
bleeding -= (int)bleeding;
UpdateCount++;
}
bleeding += 28 * (time.thisTickTimes / 1000f);
}
if (newbieTime > 0)
{
newbieTime -= time.thisTickTimes;
if (newbieTime < 0)
newbieTime = 0;
}
}
//etc
HP += dmg;
HP=100
UpdateCount++;
if (HP <= 0)
Death("lava");
<Activate effect="LavaImmune">ConditionEffectSelf</Activate>
<LavaImmune/>
bool CheckResurrection()
{
for (int i = 0; i < 4; i++)
{
Item item = Inventory[i];
if (item == null || !item.Resurrects) continue;
HP = Stats[0] + Stats[0];
MP = Stats[1] + Stats[1];
Inventory[i] = null;
psr.SendPacket(new TextPacket()
{
BubbleTime = 0,
Stars = -1,
Name = "",
Text = string.Format("{0}'s {1} breaks and he disappears", Name, item.ObjectId)
});
psr.Reconnect(new ReconnectPacket()
{
Host = "",
Port = 2050,
GameId = World.NEXUS_ID,
Name = "Nexus",
Key = Empty<byte>.Array,
});
resurrecting = true;
return true;
}
return false;
}