Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 10-24-2003, 03:13 AM   #26 (permalink)
Twisted Intel
 
silverwolfe's Avatar
 
Join Date: Feb 2003
Location: Fort Smith, AR
Age: 39
Posts: 1,081
Send a message via ICQ to silverwolfe Send a message via MSN to silverwolfe
Default

it will compile, it will pick your trash, beyond that it is untested.
__________________
Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference. - Robert Frost

Yes I am a damn Trammie! - Silver Wolfe

If You do not have anything good to say, say nothing at all. - Unknown
_______________________________
Quote:
Originally Posted by WarAngel
I would have to agree that Rhexis is very pretty. I will personally never disagree with her in a thread.
silverwolfe is offline   Reply With Quote
Old 10-24-2003, 03:15 AM   #27 (permalink)
Forum Novice
 
Billabong's Avatar
 
Join Date: Jun 2003
Location: Florida
Age: 22
Posts: 118
Send a message via ICQ to Billabong
Default

o hey did u get my PM about my script?
Billabong is offline   Reply With Quote
Old 10-24-2003, 03:18 AM   #28 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Originally Posted by silverwolfe
final note i will not post this in script submissions and therefore am not obligated to support it. use it at your own risk!
i too am going to not support this (just wanted to see if i coould get it working)
Tru is offline   Reply With Quote
Old 10-24-2003, 03:27 AM   #29 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

I like this idea too but I wanted a more friendly look to it and with a bit more control over what it deletes. So here's some mods I made, getting rid of some useless code and adding an exemption list so, if for example you spawn reagents on your shard you don't want this guy deleting them every 5 seconds. Skills and looks are based on the brigand.

[code:1]using System;
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;

namespace Server.Mobiles
{
[CorpseName( "a trash collector corpse" )]
public class TrashCollector : BaseCreature
{
[Constructable]
public TrashCollector() : base( AIType.AI_Animal, FightMode.Agressor, 10, 1, 0.2, 0.4 )
{
SpeechHue = Utility.RandomDyedHue();
Title = "the trash collector";
Hue = Utility.RandomSkinHue();

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 Boots( Utility.RandomNeutralHue() ) );
AddItem( new FancyShirt());
AddItem( new Bandana());

switch ( Utility.Random( 7 ))
{
case 0: AddItem( new Longsword() ); break;
case 1: AddItem( new Cutlass() ); break;
case 2: AddItem( new Broadsword() ); break;
case 3: AddItem( new Axe() ); break;
case 4: AddItem( new Club() ); break;
case 5: AddItem( new Dagger() ); break;
case 6: AddItem( new Spear() ); break;
}

Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) );
hair.Hue = Utility.RandomNondyedHue();
hair.Layer = Layer.Hair;
hair.Movable = false;
AddItem( hair );

PackGold( 25, 75 );
}

private DateTime m_NextPickup;

public override void OnThink()
{
base.OnThink();

if ( DateTime.Now < m_NextPickup )
return;

m_NextPickup = DateTime.Now + TimeSpan.FromSeconds( 2.5 + (2.5 * Utility.RandomDouble()) );

ArrayList Trash = new ArrayList();
foreach ( Item item in this.GetItemsInRange( 2 ) )
{
if ( item.Movable )
Trash.Add(item);
}
Type[] exemptlist = new Type[]{ typeof(MandrakeRoot), typeof(Ginseng), typeof(AxeOfTheHeavens)}; //Short example list
bool TrashIt = true;
for (int i = 0; i < Trash.Count; i++)
{
for (int j = 0; j < exemptlist.Length; j++)
{
if ( (Trash[i]).GetType() == exemptlist[j] )
TrashIt = false;
}
if (TrashIt)
((Item)Trash[i]).Delete();
TrashIt = true;
}
}

public TrashCollector( 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();
}
}
}[/code:1]
UOT is offline   Reply With Quote
Old 10-24-2003, 03:27 AM   #30 (permalink)
Forum Novice
 
Billabong's Avatar
 
Join Date: Jun 2003
Location: Florida
Age: 22
Posts: 118
Send a message via ICQ to Billabong
Default

lol well shit then i dunno how to add it i tried everything
Billabong is offline   Reply With Quote
Old 10-24-2003, 03:31 AM   #31 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

If you're using the one I just posted, copy it to a .cs file and place it anywhere in your scripts folder. Restart the server and then you can either add them manually[code:1][Add TrashCollector [/code:1]or add TrashCollector to a spawner.
UOT is offline   Reply With Quote
Old 10-24-2003, 03:35 AM   #32 (permalink)
Forum Novice
 
Billabong's Avatar
 
Join Date: Jun 2003
Location: Florida
Age: 22
Posts: 118
Send a message via ICQ to Billabong
Default

i did exactly what u said its in its own .cs file and its in my customs and im trying to [add TrashCollector
doesnt seem to work not even on a spawner?
i get no errors at all just wont add i have to be doing somthing wrong?
maybe it shouldnt go in my customs maybe in mobils?
Billabong is offline   Reply With Quote
Old 10-24-2003, 03:38 AM   #33 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

If you're saving thru notepad make sure you save it as all files and not .txt (in file type). Or it will save it as name.cs.txt and with the default windows setting you won't see the .txt extension.
UOT is offline   Reply With Quote
Old 10-24-2003, 03:40 AM   #34 (permalink)
Forum Novice
 
Billabong's Avatar
 
Join Date: Jun 2003
Location: Florida
Age: 22
Posts: 118
Send a message via ICQ to Billabong
Default

LOL ok ok now i feel dumber then hell but thnx ill try it
Billabong is offline   Reply With Quote
Old 10-24-2003, 12:27 PM   #35 (permalink)
 
Join Date: Oct 2003
Posts: 329
Send a message via ICQ to neimen
Default

woohoo, i was gonna attempt to do this over the weekend and was afraid with my limited skills i wouldnt' be able to...

thanks guys

billabong,
make sure that what is written for the class in the code is what you're trying to add.. the name of the cs file isnt' necessarily what you type to add it, it's the class name within the code itself
__________________
What I like, you may not; What you like, I may not; everything has it's place
neimen is offline   Reply With Quote
Old 10-24-2003, 06:59 PM   #36 (permalink)
 
Join Date: Oct 2003
Posts: 32
Default

Wow, you guys rox. I never would have been able to get this to work by myself. I've been wanting to try this for some time thats why I posted it here to see if you genius's could figure it out. Thanks )
killerklown is offline   Reply With Quote
Old 10-25-2003, 01:59 AM   #37 (permalink)
 
Join Date: Jun 2003
Posts: 277
Send a message via Yahoo to Caesar
Default umm

i got a small problem i think this was one of the greatest idea ever and will save us from lag....so thanx for coming up wif it...however i got a small problem players on my shard keep killing them and i dnt know were in the script i have 2 change 2 make them immortal or more like a banker were it cannot be attacked???how i do that?
Caesar is offline   Reply With Quote
Old 10-25-2003, 02:06 AM   #38 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

[code:1]Blessed = true;[/code:1]
right under the name
Tru is offline   Reply With Quote
Old 10-26-2003, 03:52 AM   #39 (permalink)
 
Join Date: Jun 2003
Posts: 277
Send a message via Yahoo to Caesar
Default thanx

thanku damn i love this script its da coolest idea ever!!!!
Caesar is offline   Reply With Quote
Old 02-08-2004, 12:38 AM   #40 (permalink)
 
Join Date: Jan 2004
Posts: 753
Send a message via ICQ to Crack177 Send a message via AIM to Crack177 Send a message via Yahoo to Crack177
Default

I know this post is probably old, but I was wandering how u make it to where they can't pick up items that are movable true?
Crack177 is offline   Reply With Quote
Old 02-08-2004, 12:46 AM   #41 (permalink)
Master of the Internet
 
Quantos's Avatar
 
Join Date: Apr 2003
Location: Edmonton, AB
Age: 41
Posts: 6,867
Send a message via ICQ to Quantos Send a message via AIM to Quantos Send a message via MSN to Quantos Send a message via Yahoo to Quantos
Default

If you do that then why bother with the script at all?

It's sure not going to pick up stuff that is not movable.
__________________
Paranoia is what happens when you finally have all of the facts.
Quantos is offline   Reply With Quote
Old 02-08-2004, 01:42 AM   #42 (permalink)
 
Join Date: Jan 2004
Posts: 753
Send a message via ICQ to Crack177 Send a message via AIM to Crack177 Send a message via Yahoo to Crack177
Default

Well I am talking about like spawners. Cuz I have most of my fighting in brit and that is where I want to add the trash collector and the spawner.
Crack177 is offline   Reply With Quote
Old 02-08-2004, 01:46 AM   #43 (permalink)
Master of the Internet
 
Quantos's Avatar
 
Join Date: Apr 2003
Location: Edmonton, AB
Age: 41
Posts: 6,867
Send a message via ICQ to Quantos Send a message via AIM to Quantos Send a message via MSN to Quantos Send a message via Yahoo to Quantos
Default

You don't really want an NPC that can delete your spawners.
__________________
Paranoia is what happens when you finally have all of the facts.
Quantos is offline   Reply With Quote
Old 02-08-2004, 01:51 AM   #44 (permalink)
 
Join Date: Jan 2004
Posts: 753
Send a message via ICQ to Crack177 Send a message via AIM to Crack177 Send a message via Yahoo to Crack177
Default

It does not delete my spawners. It deletes the items the spawner spawns. Like I want to spawn a itemrepair deed in the same general location as my trash collector.
Crack177 is offline   Reply With Quote
Old 02-08-2004, 01:54 AM   #45 (permalink)
Master of the Internet
 
Quantos's Avatar
 
Join Date: Apr 2003
Location: Edmonton, AB
Age: 41
Posts: 6,867
Send a message via ICQ to Quantos Send a message via AIM to Quantos Send a message via MSN to Quantos Send a message via Yahoo to Quantos
Default

Then you should have said that.

What you would need to do is look at how they made it so that he won't pick up reagents. You will need to add exceptions for each item that he's not supposed to pick up.
__________________
Paranoia is what happens when you finally have all of the facts.
Quantos is offline   Reply With Quote
Old 02-08-2004, 01:55 AM   #46 (permalink)
 
Join Date: Jan 2004
Posts: 753
Send a message via ICQ to Crack177 Send a message via AIM to Crack177 Send a message via Yahoo to Crack177
Default

Ok I will do that. thx.
Crack177 is offline   Reply With Quote
Old 07-11-2004, 05:11 PM   #47 (permalink)
 
Join Date: Oct 2003
Location: Colorado
Age: 29
Posts: 808
Default

any chance someone could repost this?

the pasted script has crap in it from the forums such as where quotes are supposed to be, I can change those myself but i dont know what this {if ( item.Movable && item.Stackable )}is suppose to be etc.
__________________
[list][*]Visit Spherical Solaris Website![*]Spherical Solaris Shard[/list:u]
SphericalSolaris 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