|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Lurker
Join Date: Apr 2008
Posts: 7
|
Hey everybody. Just got started here a little while ago and somehow managed to get my Shard off the ground. Right now I'm just playing with a few friends and they had some interesting ideas that I could use help with. I have zero ability to script and I have been trying to learn as I go, I also have searched everything out to the best of my ability. Try not to flame me too bad, but feel free to inform me of plausibility
1. Create a 'control' spell. I was thinking about trying to make a general spell that could be used to control a specific monster. For instance making a Necromancy spell that lets you capture undead, or a Magery spell that lets you capture elementals. Just a general spell you could add to any of the spell sets and set a specific monster or monster type that it could control. This would be good if it could scale with the monsters power. For example a skeleton would be much easier to attempt control over a lich. I have looked around and I haven't seen anything I myself could do to make this spell. 2. Creating a Leadership skill. This follows off of the first question pretty much. I was thinking how interesting it would be to control large groups of monsters or NPC's, than I realized it should at least be balanced. I figured a leadership skill would be a good way to do that, this way as your skill increased you would be allowed more followers. For instance with the skill at 0 it would be the normal cap of followers but at say 50 you could have 100 followers. It seems like a relatively simple connection, however I am not to sure how the skill itself would progress. Probably through just controlling new stuff. 3. A simple area copy mechanism. I was creating a brigand camp when I realized how much faster it would be to just place tents. From what I have seen Pandora's Box 2 doesn't offer any solution like this. I couldn't find anything in which I could figure out how to use to help me with this. 4. Trouble with monster creation. I have been trying to put together a few monsters for a little while now with no success. So far I have been using the framework of a brigand to try to accomplish this. I keep getting 'Method name expected' error. I can post the script if anyone can help me out. 5. Opposing groups. Now I know from searching that there is the ability to add the opposing groups script, however I'm not quite sure how to do it correctly nor am I sure how to create your own custom groups. My friends wanted to see some different opposing bandit gangs. 6. Setting TOD. Alright now I know this is a simple one but, I would like to set monsters to spawn at a certain time of day and than despawn afterwords. For instance, zombies in the graveyards at night. However, I want it to be in sync with the game, but I don't know the UO time schedule. Sorry, I realize this is a lot of stuff but mostly its just interest related. I would really appreciate any help at all. |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,370
|
3. A simple area copy mechanism.
I was creating a brigand camp when I realized how much faster it would be to just place tents. From what I have seen Pandora's Box 2 doesn't offer any solution like this. I couldn't find anything in which I could figure out how to use to help me with this. Go to Orbsydia and get UOArchitect. Perfect for just this thing. You can even copy town buildings to paste elsewhere with it. 4. Trouble with monster creation. I have been trying to put together a few monsters for a little while now with no success. So far I have been using the framework of a brigand to try to accomplish this. I keep getting 'Method name expected' error. I can post the script if anyone can help me out. Go ahead and post the script. Also, download some of the monster scripts in the submissions thread and look at those to see how they're put together. 5. Opposing groups. Now I know from searching that there is the ability to add the opposing groups script, however I'm not quite sure how to do it correctly nor am I sure how to create your own custom groups. My friends wanted to see some different opposing bandit gangs. That would be in the OppositionGroup which is found at Scripts/Engines/AI/Creature/OppositionGroup.cs. Look in there to see how those are done. You will of course need to set the group(s) up in that script, but this will give you an idea on how to possibly set up one or 2 of your own. And to see how its setup in a monster script, just look at the Terathans and/or Ophidians scripts. Hope this helps a little bit.
__________________
May you have the strength of eagles' wings, the faith and courage to fly to new heights, and the wisdom of the universe to carry you there. Last edited by Hammerhand; 04-27-2008 at 07:17 PM. |
|
|
|
|
|
#3 (permalink) | |||
|
Lurker
Join Date: Apr 2008
Posts: 7
|
Quote:
![]() Quote:
Code:
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;
namespace Server.Mobiles
{
public class Automaton : BaseCreature
{
public override bool ClickTitle{ get{ return false; } }
[Constructable]
public Automaton() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
SpeechHue = Utility.RandomDyedHue();
Title = "Automaton";
Hue = 1744();
if ( this.Female = Utility.RandomBool() )
{
Body = 0x191;
Name = NameList.RandomName( "female" );
AddItem( new Skirt( Utility.RandomNeutralHue() ) );
}
else
{
Body = 0x190;
Name = NameList.RandomName( "male" );
AddItem( new ShortPants( Utility.RandomNeutralHue() ) );
}
SetStr( 86, 100 );
SetDex( 81, 95 );
SetInt( 61, 75 );
SetDamage( 10, 23 );
SetSkill( SkillName.Fencing, 66.0, 97.5 );
SetSkill( SkillName.Macing, 65.0, 87.5 );
SetSkill( SkillName.MagicResist, 25.0, 47.5 );
SetSkill( SkillName.Swords, 65.0, 87.5 );
SetSkill( SkillName.Tactics, 65.0, 87.5 );
SetSkill( SkillName.Wrestling, 15.0, 37.5 );
Fame = 1000;
Karma = -1000;
AddItem( new PlateChest( Utility.RandomNeutralHue() ) );
AddItem( new PlateLegs( Utility.RandomNeutralHue() ) );
AddItem( new PlateArms( Utility.RandomNeutralHue() ) );
AddItem( new PlateGorget( Utility.RandomNeutralHue() ) );
AddItem( new PlateHelm( Hue = 1744() ) );
switch ( Utility.Random( 7 ))
{
case 0: AddItem( new Pike() ); break;
case 1: AddItem( new VikingSword() ); break;
case 2: AddItem( new Broadsword() ); break;
}
Utility.AssignRandomHair( this );
}
public override void GenerateLoot()
{
AddLoot( LootPack.Average );
}
public override bool AlwaysMurderer{ get{ return false; } }
public Automaton( Serial serial ) : base( serial )
{
}
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();
}
}
}
Quote:
![]() Last edited by mrdc01; 04-27-2008 at 08:14 PM. |
|||
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,370
|
On your automaton, line 19 should look like this.
Code:
Hue = 1744; Code:
AddItem(new PlateHelm(1174)); Also, Orbsydia is now up again if you still need the usage info for UOAR.
__________________
May you have the strength of eagles' wings, the faith and courage to fly to new heights, and the wisdom of the universe to carry you there. |
|
|
|
|
|
#5 (permalink) |
|
Lurker
Join Date: Apr 2008
Posts: 7
|
Alright, well I got the script working for the most part. I tried what you said for coloring the armor but it didn't work correctly. Here is the script in its present working form. Can't seem to figure this out.
![]() Code:
using System;
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;
namespace Server.Mobiles
{
public class Automaton : BaseCreature
{
public override bool ClickTitle{ get{ return false; } }
[Constructable]
public Automaton() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
SpeechHue = Utility.RandomDyedHue();
Title = "Automaton";
Hue = 1744;
Body = 0x190;
SetStr( 110 );
SetDex( 100 );
SetInt( 70 );
SetDamage( 10, 23 );
SetSkill( SkillName.Fencing, 97.5 );
SetSkill( SkillName.Macing, 87.5 );
SetSkill( SkillName.MagicResist, 47.5 );
SetSkill( SkillName.Swords, 87.5 );
SetSkill( SkillName.Tactics, 87.5 );
SetSkill( SkillName.Wrestling, 37.5 );
Fame = 0;
Karma = 0;
AddItem( new PlateHelm());
AddItem( new PlateGorget());
AddItem( new PlateChest());
AddItem( new PlateArms());
AddItem( new PlateLegs());
AddItem( new PlateGloves());
AddItem( new Spear());
Utility.AssignRandomHair( this );
}
public override void GenerateLoot()
{
AddLoot( LootPack.Average );
}
public override bool AlwaysMurderer{ get{ return false; } }
public Automaton( Serial serial ) : base( serial )
{
}
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();
}
}
}
|
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,370
|
I made an armor set (just copied plate armor) for the automaton. This will allow you to change the stats & hues of each piece to whatever you want. They are all set to movable = false currently. This means they wont appear on the corpse. If you want them available, either remove that setting in each script, or set a random drop of them in the automaton script. I named each piece as well. AutomatonHead, Arms, Chest etc etc. Automaton script is set up for them as well. Hope this is more to your liking.
![]() If you have any questions, let us know.
__________________
May you have the strength of eagles' wings, the faith and courage to fly to new heights, and the wisdom of the universe to carry you there. |
|
|
|
|
|
#7 (permalink) |
|
Forum Expert
|
there is an easier way to create these modified items for equip.. for instance, if you wanted a PlateHelm, but you wanted some properties to be changed, you'd do this:
Code:
//Create an instance of the item PlateHelm helm = new PlateHelm(); //Set the new Hue helm.Hue = 0x55; //Set movable false for no drop to corpse, true for drop helm.Movable = false; //You can set a wide range of properties by doing this //anything that is accessible in the [Props Gump Ingame //can be set here, like this: helm.HitsBonus = 100; helm.Attributes.Luck = 50; //Etc Etc... //Then we add the item to the NPC like so: AddItem( helm );
__________________
![]() WWW.RPK-UO.COM - The WoW-UO Cross-Over Shard |
|
|
|
|
|
#8 (permalink) |
|
Lurker
Join Date: Apr 2008
Posts: 7
|
Wow, thanks a lot you guys. Everything appears to be working alright. I also got the opposition groups thing sorted out, that was relatively straightforward. Ill just fiddle with the spells and skills until I figure out the first two. Thanks a lot for the help, I really didn't know where to start.
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|