RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

um a little stuck?

H

hydroxtrem

Guest
um a little stuck?

ok i tried makeing a monster script{harpie} by compareing 3 other scripts to it and working from them and wut not, but when i try to compile i get errors, so can anyone tell me what is wrong with this

[code:1]using System;
using System.Collections;
using Server.Items;
using Server.Targeting;
using Server.Scripts.Misc;
using Server.Scripts.Items.Weapons.SpearsAndForks;

namespace Server.Scripts.Mobiles.Monsters.Melee
{
public class Harpie : AgressiveAI
{
[Contructable]
public Harpie()
{
this.body = 0x2D;
this.name = Harpie();

this.InitStats(Utility.Random(140,100), Utility.Random(80,60), Utility.Random(70,46));

this.Skills[SkillName.Wrestling].Base = Utility.Random(60,40);
this.Skills[SkillName.Tactics].Base = Utility.Random(50,30);

this.Fame = Utility.Random(2000,2000);
this.Karma = Utility.Random(1250,1250);

AddItem( new Gold( 50, 75 ) );

}

public Harpie( Serial serial ) : base( serial )
{
}

public override bool CheckAttack( Mobile m )
{
return m.Player || m.Body.IsHuman || m.Body.IsAnimal;
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );

writer.Write( (int) 0 ); // version
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );

int version = reader.ReadInt();
}

public override double GetValueFrom( Mobile m )
{
return -this.GetDistanceToSqrt( m );
}
}
}[/code:1][/quote]
 

Eagle

Wanderer
anychance you could edit you post adn paste the console errors along with you script ? This would help *me* help you as well as others i assume, so they can see the EXACT error your getting.

( to copy from the console click the littlebitty icon in the very top left of the console window and choose "Edit ---> Select all" , after returning to the console with all the text highlighted press {enter}, the text is now on you windows clipboard and ready to paste in your message ( or notepad ) )

-Eagle Out
 

Eagle

Wanderer
OK heh I got a little bored last night and just went a head and remade your script , there was some { } errors and the harpie was of the wrong IP ( thats like an ogre or something ) anyhow here is your fixed harpie script , just replace yours and [add harpie ingame

[code:1]using System;
using System.Collections;
using Server.Items;
using Server.Targeting;
using Server.Scripts.Misc;
using Server.Scripts.Items.Weapons.Maces;

namespace Server.Scripts.Mobiles.Monsters.Melee
{
public class Harpie : AggressiveAI
{
[Constructable]
public Harpie()
{
this.Body = 0x1E;
this.Name = "Harpie";

this.InitStats(Utility.Random(140,100), Utility.Random(80,60), Utility.Random(70,46));

this.Skills[SkillName.Wrestling].Base = Utility.Random(60,40);
this.Skills[SkillName.Tactics].Base = Utility.Random(50,30);

this.Fame = Utility.Random(2000,2000);
this.Karma = Utility.Random(1250,1250);

AddItem( new Gold( 55, 85 ) );

}

public Harpie( Serial serial ) : base( serial )
{
}

public override bool CheckAttack( Mobile m )
{
return m.Player || m.Body.IsHuman || m.Body.IsAnimal;
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );

writer.Write( (int) 0 ); // version
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );

int version = reader.ReadInt();
}

public override double GetValueFrom( Mobile m )
{
return -this.GetDistanceToSqrt( m );
}
}
}
[/code:1]
 
H

hydroxtrem

Guest
lol well at least i tried that was my first time ever trying a script so i hope i didnt do too bad
 
Top