RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

MWDrink Bottle

yea we have it. its works. i now need to test on others, that it works on all. other then that. its the int bit. pretty please dont give up.:p

Code:
using System;
namespace Server.Items

{
	[FlipableAttribute( 0x99F, 0x99F )]
	public class DrinkMe : Item
	{
		// int hi = 0; // 
		[Constructable]
		public DrinkMe() : base( 0x99F )
		{
			Name = "Drink Me!";
			this.Weight = 0.1;
		}

		public DrinkMe( Serial serial ) : base( serial )
		{
		}

		public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if (pack != null && pack.ConsumeTotal( typeof( DrinkMe ), 1 ) )
			
					from.SendMessage( "You drink the liquid and feel small enough to fit throught the door!" );
					from.PlaySound( 0x2D6 );
                                        from.Say( "*Hic*" );
											
		}
		

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

---------------EDIT------------------------------

this is what i have tred with the int
Code:
public MWMushroom2( Serial serial ) : base( serial )
		{

                public virtual bool Apply( Mobile from )
                {
                       public override int Bonus{ get{ return 25; } }
                       public override StatType Type{ get{ return StatType.Int; } }

                                       int Bonus( get; )
                                       StatType Type( get; )

		}

		public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if (pack != null && pack.ConsumeTotal( typeof( MWMushroom2 ), 1 ) )
			
					from.SendMessage( "You pick a piece." );
                                        from.SendMessage( "And eat the mushroom and feel bigger!" );
					from.PlaySound( 0x3c );
					
		}

		public override void Serialize( GenericWriter writer )
 
and now this. lol. i must be on the right tracks lol

Code:
public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if (pack != null && pack.ConsumeTotal( typeof( MWMushroom2 ), 1 ) )
			
					from.SendMessage( "You pick a piece." );
                                        from.SendMessage( "And eat the mushroom and feel bigger!" );
					from.PlaySound( 0x3c );
					
		{
                
                public override int Bonus{ get{ return 5; } }
                public override StatType Type{ get{ return StatType.Int; } }

                        int Bonus( get; )
                        StatType Type( get; )

                }
 

daat99

Moderator
Staff member
WonderlandADnc you need to learn how to explain your problems.
I don't want to read your posts 100 times just to figure out what you're asking so I'm not going to try.
Either post a plain and simple (detailed) question or I just going to ignore it myself.
Have fun.
 

Packer898

Knight
*Shoots himself...
Code:
public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if (pack != null && pack.ConsumeTotal( typeof( MWMushroom2 ), 1 ) )
			{
					from.SendMessage( "You pick a piece." );
                                        from.SendMessage( "And eat the mushroom and feel bigger!" );
					from.PlaySound( 0x3c );
			}

Code:
		public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if (pack != null && pack.ConsumeTotal( typeof( DrinkMe ), 1 ) )
			{
					from.SendMessage( "You drink the liquid and feel small enough to fit throught the door!" );
					from.PlaySound( 0x2D6 );
                                        from.Say( "*Hic*" );
			}
Should look like that...

Now that being said you havent added any stat modifications in there. The only thing that code is doing is send the palyer a message and a sound...
 
yes sorry. i dod now that. lol. its funney as i put that in the 1st time. and aded to it. then i was told i could do it the new way. but thanks for pointing that out. with the int, stat. i fort it was

Code:
{
                
                public override int Bonus{ get{ return 5; } }
                public override StatType Type{ get{ return StatType.Int; } }

                        int Bonus( get; )
                        StatType Type( get; )

                }

----------------\EDIT---------------

something like this, in bold

Code:
public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if (pack != null && pack.ConsumeTotal( typeof( DrinkMe ), 1 ) )
			
					from.SendMessage( "You drink the liquid and feel small enough to fit throught the door!" );
					from.PlaySound( 0x2D6 );
                                        from.Say( "*Hic*" );
               [B] {		
              
                public override int Bonus{ get{ return -25; } }
                public override StatType Type{ get{ return StatType.Int; } }

                        int Bonus( get; )
                        StatType Type( get; )
}[/B]
 
oh dont be like that. it is 7.45am lol

this is what i have

Code:
using System;
namespace Server.Items

{
	[FlipableAttribute( 0x99F, 0x99F )]
	public class DrinkMe : Item
	{
                public override int Bonus{ get{ return 5; } }
		public override StatType Type{ get{ return StatType.Int; } }

		// int hi = 0; // 
		[Constructable]
		public DrinkMe() : base( 0x99F )
		{
			Name = "Drink Me!";
			this.Weight = 0.1;
		}

		public DrinkMe( Serial serial ) : base( serial )
		{
		}

		public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if (pack != null && pack.ConsumeTotal( typeof( DrinkMe ), 1 ) )
			
					from.SendMessage( "You drink the liquid and feel small enough to fit throught the door!" );
					from.PlaySound( 0x2D6 );
                                        from.Say( "*Hic*" );
											
		}		

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

but it says it dont have anything for the new lines to work

so i have to put in

Code:
int Bonus( get; )
StatType Type( get; )

somewhere around
Code:
public override void OnDoubleClick( Mobile from )

im trying but cant think it out.
am i in the right place

thanks again
 

tophyr

Wanderer
Wonderland, I hate to be blunt like this but please learn to program. This is seriously like you asking us to help you write a French novel when you can barely understand "Hello, my name is Jean-Luc."
 
im sorry i was just asking if i was in the right place. its nice to help. lol
but i no what you are saying. and thanks for the link. lol
but if u have been reading the post u would see i have done alot of it.
and help form others. a bit.
 

Packer898

Knight
WonderlandADnc said:
im sorry i was just asking if i was in the right place. its nice to help. lol
but i no what you are saying. and thanks for the link. lol
but if u have been reading the post u would see i have done alot of it.
and help form others. a bit.


You are missing the whole point. So far you have spent 8-10 hours trying to add in code that should have took at the most 5 minutes. That includes looking up the information. But because you refuse to learn the basics this is what happens...
 

Kamron

Knight
Wonderland, do you understand that those properties do not do ANYTHING.
The only reason they work for the other script is because of the parent class that they are attached to. I gave you the information of what to look up in my previous post. Please look at what was highlighted in GREEN and go to that class. That is where the properties are 'used'.
Here is a link to my post
 
yes i did see that lol. i am with u.
i added that lind yesterday, but when i added it. it mde a fish. so am i right into thinking i have to make a BaseDrinkMe.cs file.
 

Packer898

Knight
WonderlandADnc said:
yes i did see that lol. i am with u.
i added that lind yesterday, but when i added it. it mde a fish. so am i right into thinking i have to make a BaseDrinkMe.cs file.

No No No No No No No!!!!!!!!!!!!!!!!!!!!!!!

*Takes deep breath* You do not need to make a base class. For the love of god go back and look at post #25 in this thread. I told you what methods you need to add to this class to make it work! The bottom of the post in
Code:
 tags shows you EXACTLY what methods you need to put here!!!

Read post #25, stop and think about it, then re-read post #25 again. Rinse and repeat until it sinks in. Those two methods are what you need to add in THIS class to make it work.

p.s. I have deceided that I must be a masochist.
 
yes dont please dont be like that.

i no i did read what u put/


Code:
		public virtual bool Apply( Mobile from )

or.......

		public override void OnDoubleClick( Mobile from )

use one of them. i tryed that it didnt work i think i did post about what i tryed. lol
 
like so

public virtual bool Apply( Mobile from )

or.......

public override void OnDoubleClick( Mobile from )

int Bonus( get; )
StatType Type( get; )

but with the in's and out;s
 

Packer898

Knight
Try adding those complete methods to your class and then see if it compiles. You MUST add the whole method just like all other scripts do!

If it gives you errors then post the script in
Code:
 tags and the errors from the console.
 
ok thanks. also lol

anyone see any spelling miss. in my script. lol

Code:
from.SendMessage( "You drink the liquid and feel small enough to fit [B]throught[/B] the door!" );

lol

thanks again. c u later. :) :)
 

Packer898

Knight
Well, to be blunt your posts are so full of grammar errors that we ignore them. I take it english is not your primary language?
 
Top