readme.txt said:add the following piece of code to PlayerMobile.cs:
//ADDED for Orange Petals
public bool Petals;
public override bool CheckPoisonImmunity( Mobile from, Poison poison )
{
if (Petals)
return (poison.Level < 3);
return base.CheckPoisonImmunity( from, poison );
}
public override void OnPoisonImmunity(Mobile from, Poison poison)
{
if (Petals)
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053092, this.NetState); // * You feel yourself resisting the effects of the poison *
return;
}
base.OnPoisonImmunity( from,poison );
}
public override void OnPoisoned(Mobile from, Poison poison, Poison oldPoison)
{
if (Petals && (poison != oldPoison))
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053093, this.NetState); // * The strength of the poison overcomes your resistance! *
return;
}
base.OnPoisoned( from, poison, oldPoison);
}
// End added Orange Petals
For those unsure where to add it just copy it and paste it at line 51. For those with modified
versions of PlayerMobile just add it anywhere within the PlayerMobile class like right after this:
public class PlayerMobile : Mobile
{
FishermensGuild,
BardsGuild,
BlacksmithsGuild
}
//ADDED for Orange Petals
public bool Petals;
public override bool CheckPoisonImmunity( Mobile from, Poison poison )
{
if (Petals)
return (poison.Level < 3);
return base.CheckPoisonImmunity( from, poison );
}
public override void OnPoisonImmunity(Mobile from, Poison poison)
{
if (Petals)
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053092, this.NetState); // * You feel yourself resisting the effects of the poison *
return;
}
base.OnPoisonImmunity( from,poison );
}
public override void OnPoisoned(Mobile from, Poison poison, Poison oldPoison)
{
if (Petals && (poison != oldPoison))
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053093, this.NetState); // * The strength of the poison overcomes your resistance! *
return;
}
base.OnPoisoned( from, poison, oldPoison);
}
// End added Orange Petals
public class PlayerMobile : Mobile
{
private class CountAndTimeStamp
{
private int m_Count;
private DateTime m_Stamp;
public CountAndTimeStamp()
Scripts: Compiling C# scripts...failed (4 errors, 0 warnings)
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 51, column 10) Expected
class, delegate, enum, interface, or struct
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 53, column 19) Expected
class, delegate, enum, interface, or struct
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 60, column 19) Expected
class, delegate, enum, interface, or struct
- Error: Scripts\Mobiles\PlayerMobile.cs: CS1518: (line 70, column 19) Expected
class, delegate, enum, interface, or struct
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
public class PlayerMobile : Mobile
{
//ADDED for Orange Petals
public bool Petals;
public override bool CheckPoisonImmunity( Mobile from, Poison poison )
{
if (Petals)
return (poison.Level < 3);
return base.CheckPoisonImmunity( from, poison );
}
public override void OnPoisonImmunity(Mobile from, Poison poison)
{
if (Petals)
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053092, this.NetState); // * You feel yourself resisting the effects of the poison *
return;
}
base.OnPoisonImmunity( from,poison );
}
public override void OnPoisoned(Mobile from, Poison poison, Poison oldPoison)
{
if (Petals && (poison != oldPoison))
{
this.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1053093, this.NetState); // * The strength of the poison overcomes your resistance! *
return;
}
base.OnPoisoned( from, poison, oldPoison);
}
// End added Orange Petals
private class CountAndTimeStamp
ArteGordon said:looks like its probably in the right place.