|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Nov 2004
Posts: 149
|
I want to know if there is a command or series of comands that allows me to add a certain item to players who are logged on to the shard playing. Sort of like a reward for players that are playing the shard. I don't want the item to be added to players that are not loged in.
Thanks |
|
|
|
|
|
#2 (permalink) | |
|
Account Terminated
|
Quote:
|
|
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
|
Make an onlogon event. That way they get it when they login.
Something like this so they do not get it every login. Code:
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Accounting;
namespace Server.Misc
{
public class XmasGift
{
public static void Initialize()
{
EventSink.Login += new LoginEventHandler( OnLogin );
}
public static void OnLogin( LoginEventArgs e )
{
Mobile from = e.Mobile;
if ( ((Account)from.Account).GetTag("XmasGift2004")== "true" )
{
}
else if ( DateTime.Now.Month == 12 && DateTime.Now.Day == 25 )
{
from.AddToBackpack( new GiftBox1() );
((Account)from.Account).SetTag( "XmasGift2003", "true" );
from.SendMessage( "Happy Holidays from the staff of IRON MAIDEN. You have recieved a present in your backpack. :)" );
}
}
}
}
This was just an example.
__________________
I'm waiting in my cold cell when the bell begins to chime Reflecting on my past life and it doesn't have much time. |
|
|
|
|
|
#5 (permalink) |
|
Forum Novice
Join Date: Nov 2004
Posts: 149
|
Phantom, that is the correct command, but when i use it, I added items to all the players wether or not they are loged in at the time of the command. I want to add items only to players that are logged in the world.
Is there a command for that? |
|
|
|
|
|
#6 (permalink) |
|
UO Gamers: Demise Administrator
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
|
Sure, modify it to NOT add to players who are in Internal map.
__________________
psz Demise' Creator (Retired) The RunUO.com Forum Moderator Team Former Official RunUO Scripter (Retired) Websites: My 360 Blog My Gaming Site(Old Link) My Gaming Site(New Link) |
|
|
|
|
|
#7 (permalink) | |
|
Account Terminated
|
Quote:
You asked for a command to add an item to your players pack, so I gave it to you. There is of course the online command and many other ways you could do it, global is far from the best solution. |
|
|
|
|
|
|
#8 (permalink) | |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Quote:
I'm not really a whiz at building those gm commands like psz and Asayre8 but it can be done, combine Phantoms command with psz's suggestion. I'll figure it out next time I log into the shard.
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|