Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 08-24-2003, 03:34 AM   #1 (permalink)
 
Join Date: Apr 2003
Location: Vancouver BC, Canada
Age: 35
Posts: 129
Default I got a question

This is a spawn that is in the serer when you get it and I am not sure what it is for. Is he a joke or does he do somithing I could swaer I saw it picking up items on the gound... lol maybe re name him Trashman......... this is the script

using System;
using Server;

namespace Server.Mobiles
{
public class Wanderer : Mobile
{
private Timer m_Timer;

[Constructable]
public Wanderer()
{
this.Name = "Me";
this.Body = 0x1;
this.AccessLevel = AccessLevel.GameMaster;

m_Timer = new InternalTimer( this );
m_Timer.Start();
}

public Wanderer( Serial serial ) : base( serial )
{
m_Timer = new InternalTimer( this );
m_Timer.Start();
}

public override void OnDelete()
{
m_Timer.Stop();

base.OnDelete();
}

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();
}

private class InternalTimer : Timer
{
private Wanderer m_Owner;
private int m_Count = 0;

public InternalTimer( Wanderer owner ) : base( TimeSpan.FromSeconds( 0.1 ), TimeSpan.FromSeconds( 0.1 ) )
{
m_Owner = owner;
}

protected override void OnTick()
{
if ( (m_Count++ & 0x3) == 0 )
{
m_Owner.Direction = (Direction)(Utility.Random( 8 ) | 0x80);
}

m_Owner.Move( m_Owner.Direction );
}
}
}
}
Maxi - II is offline   Reply With Quote
Old 08-24-2003, 04:44 AM   #2 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

I don't get it...
Phantom is offline   Reply With Quote
Old 08-24-2003, 05:05 AM   #3 (permalink)
Forum Novice
 
Join Date: Dec 2002
Posts: 585
Send a message via ICQ to bleis
Default

its the old wandrere that was used to test speed and other warios things on mobiles,....
bleis is offline   Reply With Quote
Old 08-24-2003, 04:54 PM   #4 (permalink)
 
Join Date: Apr 2003
Location: Vancouver BC, Canada
Age: 35
Posts: 129
Default

ok thanks,,,, is there a way to make him pick up the trash(items that people leave on the ground) lol



You funny peace
Phantom Posted: Sun Aug 24, 2003 7:44 am Post subject:
--------------------------------------------------------------------------------
I don't get it...

I got Phantom stumped..lol
Maxi - II is offline   Reply With Quote
Old 08-24-2003, 04:56 PM   #5 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Well all monsters should really be able to pick up items (at least from corpses, maybe not the ground). It's an OSI feature that I don't think is implmented into RunUO yet.
Cmonkey123 is offline   Reply With Quote
Old 08-24-2003, 05:20 PM   #6 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

Sure monsters loot on RunUO. Watch any Orc.
psz is offline   Reply With Quote
Old 08-24-2003, 05:30 PM   #7 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Whatever, I'm just not very observant
Cmonkey123 is offline   Reply With Quote
Old 08-26-2003, 12:37 AM   #8 (permalink)
 
Join Date: Apr 2003
Location: Vancouver BC, Canada
Age: 35
Posts: 129
Default

but will an orc pick it up off the ground ? and not on a dead body? hmm hmmm? that is the question.

I'll go test it tonight....lol thanks guys
Maxi - II is offline   Reply With Quote
Old 08-26-2003, 09:11 AM   #9 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

The system works just like OSI
Phantom is offline   Reply With Quote
Old 08-26-2003, 03:51 PM   #10 (permalink)
Forum Administrator
 
Join Date: Sep 2002
Age: 25
Posts: 341
Send a message via ICQ to Alkiser Send a message via AIM to Alkiser Send a message via MSN to Alkiser
Default

Looking at the horde minion script, you get this.

[code:1]
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()) );

Map map = this.Map;

if ( map == null )
return;

Container pack = this.Backpack;

if ( pack == null )
return;

ArrayList list = new ArrayList();

IPooledEnumerable eable = map.GetItemsInRange( Location, 2 );

foreach ( Item item in eable )
{
if ( item.Movable && item.Stackable )
list.Add( item );
}

eable.Free();

for ( int i = 0; i < list.Count; ++i )
{
Item item = (Item)list[i];

if ( !pack.CheckHold( this, item, false, true ) )
return;

bool rejected;
LRReason reject;

NextActionTime = DateTime.Now;

Lift( item, item.Amount, out rejected, out reject );

if ( rejected )
continue;

Drop( this, Point3D.Zero );
}
}
[/code:1]

This code will only pick up stackable items. If you want him to pick up all items, remove the check for item.Stackable.
__________________
Alkiser
UO Gamers - Public Relations
alkiser@uogamers.com
Please do not pm me for support. If you are having game issues please page for a staff member in game. Thanks for your continued support of UO Gamers
Alkiser 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