Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 07-03-2006, 06:24 AM   #1 (permalink)
Forum Novice
 
Makaar's Avatar
 
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 600
Smile SIXish Questions

I have a small jumble of questions...anyone that can answer any of them I will be in debt to! Thanks!

QUESTIONS:


1. Should I try and get spawn editor2 to work? What does everyone recommend for a spawn program? IE: What's the best?
2. How do I edit the loot/stats on the monsters? I couldn't find the scripts lines that had the information on it. And is there a plugin/editor that affects loot easier?
3. How do I create new enemies with different hues?
4. How do I lock down items on the actual server so they don't delete themselves when the server restarts? Like for instance I want to fill all of the crates/chests/containers in the towns with items that respawn after a while, but couldn't figure out how without downloading another script that changes stuff I have. I'm new to all of this so please bare with me! You only have to tell me once!

ALSO, if someone could explain the options when you do properties of a spawn stone...that would help extrordinarily!!
Thanks again to everyone for being so kind.

Last edited by Makaar; 07-03-2006 at 06:50 AM.
Makaar is offline   Reply With Quote
Old 07-03-2006, 09:25 AM   #2 (permalink)
Forum Newbie
 
Join Date: Jan 2006
Posts: 33
Default Editing a script

Should I try and get spawn editor2 to work? What does everyone recommend for a spawn program? IE: What's the best? XMLSpawner is a GREAT spawner. Check out http://www.xmlspawnerfan.com to download. Also, there is a great scripting community there that is willing to help you with your problems.
__________
How do I edit the loot/stats on the monsters? Okay, changing the loot and stats of monsters. For this, we will use our Earth Elemental. Go to RunUO/Scripts/Mobiles/Monsters/Elemental/Melee. Open up your EarthElemental.cs. It should look like this:

Code:
using System;
using System.Collections;
using Server.Items;
using Server.Targeting;

namespace Server.Mobiles
{
	[CorpseName( "an earth elemental corpse" )]
	public class EarthElemental : BaseCreature
	{
		public override double DispelDifficulty{ get{ return 117.5; } }
		public override double DispelFocus{ get{ return 45.0; } }

		[Constructable]
		public EarthElemental() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "an earth elemental";
			Body = 14;
			BaseSoundID = 268;

			SetStr( 126, 155 );
			SetDex( 66, 85 );
			SetInt( 71, 92 );

			SetHits( 76, 93 );

			SetDamage( 9, 16 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 30, 35 );
			SetResistance( ResistanceType.Fire, 10, 20 );
			SetResistance( ResistanceType.Cold, 10, 20 );
			SetResistance( ResistanceType.Poison, 15, 25 );
			SetResistance( ResistanceType.Energy, 15, 25 );

			SetSkill( SkillName.MagicResist, 50.1, 95.0 );
			SetSkill( SkillName.Tactics, 60.1, 100.0 );
			SetSkill( SkillName.Wrestling, 60.1, 100.0 );

			Fame = 3500;
			Karma = -3500;

			VirtualArmor = 34;
			ControlSlots = 2;

			PackItem( new FertileDirt() );
			PackItem( new IronOre( 3 ) ); // TODO: Five small iron ore
			PackItem( new MandrakeRoot() );
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average, 2 );
			AddLoot( LootPack.Gems );
		}

		public override int TreasureMapLevel{ get{ return 1; } }

		public EarthElemental( 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();
		}
	}
}
First, we will work on the loot. Here is the Loot section of the script:

Code:
		PackItem( new FertileDirt() );
			PackItem( new IronOre( 3 ) ); // TODO: Five small iron ore
			PackItem( new MandrakeRoot() );
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average, 2 );
			AddLoot( LootPack.Gems );
		}
Let me explain.

PackItem is what the mobile will ALWAYS drop when killed.
AddLoot is what the monster has a CHANCE of dropping.
LootPack.Average, 2 is how high of a GOLD DROP the monster will drop.
The 2 means how many portions of the gold it will drop, basically like adding two Average drops.

If you want to edit how much GOLD/LOOT it drops, you could do it a few ways.

A good way is to take out AddLoot( LootPack.Average, 2 ); and replace it with an AddItem( new Gold(#) ); where the # would be an actual number, like, for example, 2000.

You can also change the AddLoot( LootPack.Average, 2 ); to something higher, or lower. For this example, well make it higher

AddLoot( LootPack.Average, 2 ); will become AddLoot( LootPack.FilthyRich, 1 );

_________

To change the STATS of the monster we want to look in this area:

Code:
                        SetStr( 126, 155 );
			SetDex( 66, 85 );
			SetInt( 71, 92 );

			SetHits( 76, 93 );

			SetDamage( 9, 16 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 30, 35 );
			SetResistance( ResistanceType.Fire, 10, 20 );
			SetResistance( ResistanceType.Cold, 10, 20 );
			SetResistance( ResistanceType.Poison, 15, 25 );
			SetResistance( ResistanceType.Energy, 15, 25 );

			SetSkill( SkillName.MagicResist, 50.1, 95.0 );
			SetSkill( SkillName.Tactics, 60.1, 100.0 );
			SetSkill( SkillName.Wrestling, 60.1, 100.0 );
Let me explain on this also.

SetResistance(ResistanceType.Physical, 30, 35 ); is telling the server to SET the RESISTANCE of PHYSICAL to 30 - 35.

SetSkill( SkillName.MagicResist, 50.1, 95.0); is telling the server to SET the SKILL of MAGIC RESISTANCE to 50.1 - 95.0

SetStr( 126, 155); is telling the server to SET the STAT of STRENGTH to 126 - 155. This can set the stat to 126, 139, 145, etc.. This is the same for any other stat. The stats wont go below the smaller number or above the bigger.

SetHits( 76, 93 ); is telling the server to SET the HITPOINTS of the mobile to 76 - 93. The hits will can be 76, 87, 93, etc.. The hits wont go over 93 or below 76

SetDamage( 9, 16 ); is telling the server to SET the DAMAGE the mobile does to 9 - 16.

SetDamageType( ResistanceType.Physical, 100 ); is telling the server to SET the DAMAGE TYPE of the mobile to PHYSICAL, 100% pure.

It is possible to add more than one DamageType. Ill show you.

Instead of being 100% physical damage, the monster could to 90% physical and 10% fire. Observe.

Code:
SetDamageType( ResistanceType.Physical, 90 );
SetDamageType( ResistanceType.Fire, 10 );
You can set this up any way that you want.

Is there a plugin/editor that affects loot easier? This is not really what people call scripting, but what I have here is basically a few script creators. They will make Mobiles, Items, Weapons, Armor, even books. Check it out. I will attach them. They are basically Generators that you plug stuff into and they will poop out a script. Works well. Easy way out of scripting.

_______


How do I create new enemies with different hues?


Basically all you have to do is add this:

Code:
Hue = ####;
Add it under here.

Code:
Name = "an earth elemental";
Body = 14;
BaseSoundID = 268;
Hue = 1154;
I also recommend you download InsideUO. I have it attached. It will list all Hue #s (off by 1 or 2 I think) among other things. VERY helpful for the scripter.
_________

How do I lock down items on the actual server so they don't delete themselves when the server restarts? Basically all you have to do is choose desired object and say --- [set movable false or [set frozen true. Also, if you are planning on making decorations, like buildings, etc., I recommend you get AddonGen.cs. I have attached it.

____________

In my next post I will explain the basic spawner.

Hope this helps.

YOU WILL NEED WINRAR TO DOWNLOAD AND UNPACK THESE FILES. THE FILES I HAVE ATTACHED ARE OF THE MAKERS WORK. I DID NOT MANIPULATE THEM IN ANY WAY.
Attached Files
File Type: rar ScriptCreator 3.25.rar (20 Bytes, 5 views)
File Type: rar Zotos Code Generator.rar (235.5 KB, 6 views)
File Type: rar InsideUO.rar (311.2 KB, 6 views)
File Type: cs AddonGenerator.cs (13.2 KB, 3 views)
__________________
•• Its not the tool....its the fool behind the tool ••

(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Last edited by Silence115; 07-03-2006 at 09:53 AM.
Silence115 is offline   Reply With Quote
Old 07-03-2006, 09:49 AM   #3 (permalink)
Forum Newbie
 
Join Date: Jan 2006
Posts: 33
Default Inside a Spawner

Okay, here I will explain how to use a basic spawner.

When you get in-game as a Staff member, type [add spawner.
2-Click the spawner. You will see a gump come up. It will say Creatures List, Okay, Cancel, Bring to Home, and Total Respawn.

Basically the Creatures List is what you type in to add a creature. For this tutorial, we will spawn a rat.

Click on the first line of the Creatures List and type Rat. This will tell the spawner that we want to spawn a rat. Click the Arrow to the left of what you just typed, then re-open the spawner by 2-clicking.

You will see a number to the right of Rat. It will most likely say 0. This means no mobile of the sort is spawned yet.

If we click Total Respawn, we will see our Rat appear. Clicking Bring To Home will bring it back to the spawner.

Now lets close that gump and [props the spawner.

We will see various entries in the [props gump. For the spawner options, we want to focus on the top of the first page, that first little section.

Count -- By clicking the little arrow next to Count, we can set how many of the desired mobile we want to spawn. Lets set this number to 3 and Total Respawn. Remember, we get to Total Respawn through 2-clicking the spawner. This will respawn everything from the spawner.

Group -- By setting this, you can decide how many mobiles to spawn in one spawning group.

Home Range -- If we change this, we can decide how the mobiles will spawn. For default, it is set to 4. If we change this to another number, we can manipulate how the mobiles spawn. This will let them spawn in any direction, # of tiles away.

Max Delay -- This determines the Maximum time it will take to spawn something. The spawn rate will almost never be over this time.

Min Delay -- This determines the Minimum time it will take to spawn something. The spawn rate will almost never be under this time.

Next Spawn -- This determines when the next spawn from the spawner will be. It is possible to change this.

Running -- This tells us if the spawner is active or not. Running is set to false, the spawner will not be on. If we run our cursor over the spawner, we can see whether or not it is active.

Team -- This determines what team the mobile is on. If we have 2 teams, Team 1 and Team 2, they will fight each other. Pretty neat stuff. Terethan's and Ophidian's are set up to fight. Our default will always be 0.

____

This is a basic spawner tutorial. With other custom spawners, like XML Spawner and Mega Spawner, you can set them up to have many different options.

I reccommend you get Pandoras Box for spawning and Adding stuff. Its really helpful. You can even figure out Hues etc.

I hope this helped you.
__________________
•• Its not the tool....its the fool behind the tool ••

(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Silence115 is offline   Reply With Quote
Old 07-03-2006, 10:35 AM   #4 (permalink)
Forum Novice
 
Makaar's Avatar
 
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 600
Default ....Wow

Usually I get an adequately long answer, but this is WAY more than I expected!! You went above and beyond the call of help!

Thank you x 100, I actually copied and pasted it into a word doc for future use for my friends and I.

I actually just realized the mushrooms in Deceit were gone... ?

Was going to open them back up!
Makaar is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5