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 11-24-2005, 05:29 AM   #1 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 21
Posts: 94
Default Reg Stone

Code:
using System;
using Server.Items;

namespace Server.Items
{
	public class RegStone : Item
	{
		[Constructable]
		public RegStone() : base( 0xED4 )
		{
			Movable = false;
			Hue = 0x2D1;
			Name = "a reagent stone";
		}

		public override void OnDoubleClick( Mobile from )
		{
			BagOfReagents regBag = new BagOfReagents( 50 );

			if ( !from.AddToBackpack( regBag ) )
				regBag.Delete();
		}

		public RegStone( 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();
		}
	}
}
how do i make reagent stone teake cash for regs?
Nataq is offline   Reply With Quote
Old 11-24-2005, 06:39 AM   #2 (permalink)
Forum Expert
 
Tannis's Avatar
 
Join Date: Feb 2004
Age: 27
Posts: 2,047
Default

In the OnDoubleClick, make it remove X amount of gold from their packs. If they don't have X amount of gold, make it send a message saying they don't have enough gold.
Tannis is offline   Reply With Quote
Old 11-24-2005, 07:04 AM   #3 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 21
Posts: 94
Default

how? ;p
Nataq is offline   Reply With Quote
Old 11-24-2005, 07:14 AM   #4 (permalink)
Forum Expert
 
Tannis's Avatar
 
Join Date: Feb 2004
Age: 27
Posts: 2,047
Default

This is an example of an artifact stone from my shard.
Code:
               //Zyronic---125kTokens
		   Item[] Token = from.Backpack.FindItemsByType( typeof( Token ) );
		   if ( from.Backpack.ConsumeTotal( typeof( Token ), 125000 ) )
		   {
         	   ZyronicClaw ZyronicClaw = new ZyronicClaw();
		   from.AddToBackpack( ZyronicClaw );
               from.SendMessage( "125k tokens have been removed from your pack." );
		   }
		   else
		   {
		   from.SendMessage( "You do not have enough reward tokens for that." );
		   }
		   break;
What this is saying is that when the player clicks on the button for Zyronic Claw, it's going to look in their backpack for Tokens. If there are tokens, it's going to try to consume (take) 125,000 tokens from them, and add the Zyronic Claw to their backpack. If the 125,000 tokens aren't found, then it's going to tell them that they don't have enough tokens for that. That's not exactly how you're going to have to do it, but I bet it gets you started
Tannis is offline   Reply With Quote
Old 11-24-2005, 08:05 AM   #5 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 21
Posts: 94
Default

i must replace "token" with "gold" ?
Nataq is offline   Reply With Quote
Old 11-24-2005, 09:23 AM   #6 (permalink)
GM Hider
 
sordican's Avatar
 
Join Date: Oct 2003
Age: 29
Posts: 187
Default

You could also use Raelis' Vendor Stones
Setting start locations of the non-AOS/SE classes.

These allow you to put any item up for sale and choose which currency you want on the fly. You can even sell arties for apples for that matter.

I believe this stone will do exactly what you're trying to do.
sordican 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