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!

Need help with scripts

Z

Zaine

Guest
Need help with scripts

OK i got some new scripts of some monsters. I made a new txt file and copied the info fomr the website into the txt file (it was for a lich) so I name the file Lich.cs and it is in my scripts/monsters/magical folder now when I try to add it it says it cant find it. i got etins and stuff too but they dont work either.
 

Phantom

Knight
In order to help you we really need to see what you have. It could be any number of things. I would guess nothing that stops it from doing a compile on your scripts..
 
Z

Zaine

Guest
ok I will give an example of what I am doing for a liche script:

1) make a txt folder in the scripts/mobiles/monsters/magical, name liche.cs

2) copy the lich script off the script boards, paste in the txt file

3) start up my shard

4) "[add liche" no such item found

5) "[add liche.cs no such item found

6) God**** mother******* peice of **** GRRRRRRR

i need help
 

Delta

Wanderer
in the lich script in the forum it says

[code:1]
public class Lich: BaseAggressive
{
[Constructable]
public Lich()
[/code:1]

so that would be [add lich
 

Phantom

Knight
Zaine,

I am sorry I even tried to help you. I meant post the code. You really know how to piss people off don't you? Please don't be a smart ass again...
 
Z

Zaine

Guest
/* A Lich
Based off of spookys script EvilMage
Version: 1.0
WizardNJ
*/

using System;
using System.Collections;
using Server.Items;
using Server.Scripts.Items;
using Server.Scripts.Items.Scrolls;
using Server.Targeting;
using Server.Scripts.Misc;
using Server.Spells;
using Server.Spells.Fourth;
using Server.Spells.Fifth;
using Server.Spells.Sixth;
using Server.Spells.Seventh;

namespace Server.Scripts.Mobiles.Monsters.Magical
{
[CorpseName( "an Lich Corpse" )]
public class Lich: BaseAggressive
{
[Constructable]
public Lich()
{

Body = 0x018;

this.Name =( "a Lich" );
this.InitStats(171,126,279); //Set Lich Stats Str Dex Int
this.Skills[SkillName.Wrestling].Base = Utility.Random(10,15);
this.Skills[SkillName.Anatomy].Base = Utility.Random(40,45);
this.Skills[SkillName.MagicResist].Base = Utility.Random(80,99);
this.Skills[SkillName.Magery].Base = Utility.Random(75,82);
this.Skills[SkillName.EvalInt].Base = 100;
this.Skills[SkillName.Meditation].Base = Utility.Random(82,95);
this.Skills[SkillName.Tactics].Base = Utility.Random(70,90);
this.Fame = Utility.Random(5000,9000);
this.Karma = Utility.Random(-5000,-9000);

bool strCriminal = true;
this.Criminal = strCriminal;

Container pack = new Backpack();
pack.DropItem( new Gold( 200, 300 ) );
pack.DropItem( new Server.Scripts.Items.Weapons.Swords.Katana() );
pack.DropItem( new SOS(1) ); // Well wanted it to be a Treasure map but there is none Yet!

Container bag = new Bag();
bag.DropItem( new BlackPearl( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Bloodmoss( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Garlic( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Ginseng( Utility.Random( 1, 10 ) ) );
bag.DropItem( new MandrakeRoot( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Nightshade( Utility.Random( 1, 10 ) ) );
bag.DropItem( new SulfurousAsh( Utility.Random( 1, 10 ) ) );
bag.DropItem( new SpidersSilk( Utility.Random( 1, 10 ) ) );
pack.DropItem( bag );

Container bag1 = new Bag();
for ( int i = 0; i < Utility.Random( 1, 2 ); ++i )
{
switch ( Utility.Random ( 8 ) )
{
case 0: bag1.DropItem( new ClumsyScroll() ); break;
case 1: bag1.DropItem( new CreateFoodScroll() ); break;
case 2: bag1.DropItem( new FeeblemindScroll() ); break;
case 3: bag1.DropItem( new HealScroll() ); break;
case 4: bag1.DropItem( new MagicArrowScroll() ); break;
case 5: bag1.DropItem( new NightSightScroll() ); break;
case 6: bag1.DropItem( new ReactiveArmorScroll() ); break;
case 7: bag1.DropItem( new WeakenScroll() ); break;
}

}

pack.DropItem( bag1 );

for ( int i = 0; i < Utility.Random(0,2); ++i)
{
pack.DropItem( new RecallRune() );
}

pack.Movable = false;
pack.Newbied = true;

AddItem( pack );
}

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

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

writer.Write( (int) 0 );
}

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

int version = reader.ReadInt();
}

public override double GetValueFrom( Mobile m )
{
return -this.GetDistanceToSqrt( m );
}
}
}
 

Phantom

Knight
I used that code, and I was able to add it fine.


Scripts\Mobiles\Monsters\Magical <-- Thats the path

[code:1]using System;
using System.Collections;
using Server.Items;
using Server.Scripts.Items;
using Server.Scripts.Items.Scrolls;
using Server.Targeting;
using Server.Scripts.Misc;
using Server.Spells;
using Server.Spells.Fourth;
using Server.Spells.Fifth;
using Server.Spells.Sixth;
using Server.Spells.Seventh;

namespace Server.Scripts.Mobiles.Monsters.Magical
{

[CorpseName( "an Lich Corpse" )]

public class Lich: BaseAggressive
{
[Constructable] public Lich()
{

this.Body = 0x018;
this.Name =( "a Lich" );
this.InitStats(171,126,279);
this.Skills[SkillName.Wrestling].Base = Utility.Random(10,15);
this.Skills[SkillName.Anatomy].Base = Utility.Random(40,45);
this.Skills[SkillName.MagicResist].Base = Utility.Random(80,99);
this.Skills[SkillName.Magery].Base = Utility.Random(75,82);
this.Skills[SkillName.EvalInt].Base = 100;
this.Skills[SkillName.Meditation].Base = Utility.Random(82,95);
this.Skills[SkillName.Tactics].Base = Utility.Random(70,90);
this.Fame = Utility.Random(5000,9000);
this.Karma = Utility.Random(-5000,-9000);

bool strCriminal = true;
this.Criminal = strCriminal;

Container pack = new Backpack();
pack.DropItem( new Gold( 200, 300 ) );
pack.DropItem( new Server.Scripts.Items.Weapons.Swords.Katana() );
pack.DropItem( new SOS(1) ); // Well wanted it to be a Treasure map but there is none Yet!

Container bag = new Bag();
bag.DropItem( new BlackPearl( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Bloodmoss( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Garlic( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Ginseng( Utility.Random( 1, 10 ) ) );
bag.DropItem( new MandrakeRoot( Utility.Random( 1, 10 ) ) );
bag.DropItem( new Nightshade( Utility.Random( 1, 10 ) ) );
bag.DropItem( new SulfurousAsh( Utility.Random( 1, 10 ) ) );
bag.DropItem( new SpidersSilk( Utility.Random( 1, 10 ) ) );
pack.DropItem( bag );

Container bag1 = new Bag();
for ( int i = 0; i < Utility.Random( 1, 2 ); ++i )
{
switch ( Utility.Random ( 8 ) )
{
case 0: bag1.DropItem( new ClumsyScroll() ); break;
case 1: bag1.DropItem( new CreateFoodScroll() ); break;
case 2: bag1.DropItem( new FeeblemindScroll() ); break;
case 3: bag1.DropItem( new HealScroll() ); break;
case 4: bag1.DropItem( new MagicArrowScroll() ); break;
case 5: bag1.DropItem( new NightSightScroll() ); break;
case 6: bag1.DropItem( new ReactiveArmorScroll() ); break;
case 7: bag1.DropItem( new WeakenScroll() ); break;
}

}

pack.DropItem( bag1 );

for ( int i = 0; i < Utility.Random(0,2); ++i)
{
pack.DropItem( new RecallRune() );
}

pack.Movable = false;
pack.Newbied = true;

AddItem( pack );
}

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

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

writer.Write( (int) 0 );
}

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]
 
Top