|
||
|
|
#1 (permalink) |
|
Forum Newbie
Join Date: Aug 2004
Age: 43
Posts: 29
|
My first Original, not re-hashed from someone else, script!! I know it's a simple little device but people on our shard been getting horse crap on their shoes left behind by stinky horses, well our staff was overwhelmed with shoe cleaning pages so I created this little doo-dad. I found it had some interesting challenges for me while doing yet what is probably a simple task. But I learned how to get an item to recognize an item in a certain spot on a player using the layers, how to send basic go/no go messages, and how to get something to consume on use. Flame as you like, you won't take from me the fact that even though it may be a pointless script in other's eyes, I learned from it and our player base expressed interest in such an item, so I'm damn proud of it for being my first script. Well, the first one I did that wasn't just a hashed over version of someone else's stuff.
Code:
//Origianl Script by Samuel of Lost Worlds, Admin//
// Scripted on 9/7/04//
using System;
using Server;
namespace Server.Items
{
public class ShoeShine : Item
{
[Constructable]
public ShoeShine() : base( 0xE7A )
{
Weight = 1.0;
Name = "a shoe cleaning kit";
}
public ShoeShine( 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();
}
public override void OnDoubleClick( Mobile from )
{
if ( IsChildOf( from.Backpack ) )
{
Item feet = from.FindItemOnLayer( Layer.Shoes );
if (feet == null)
from.SendMessage( "you are not wearing shoes needing cleaning!" );
else
{
feet.Hue = 0;
feet.Name = null;
from.SendMessage( "Your shoes have been cleaned." );
from.SendMessage( "The cleaner was a bit harsh, you may need to re-dye them." );
from.PlaySound( 995 );
Consume();
}
}
else
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack to use.
}
}
}
}
![]() |
|
|
|
|
|
#3 (permalink) |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
not bad.
Though the players on my shard consider the horse crap covered shoes a rare item (they even brag about having them) so I'll likely not need this, but its still a good idea.
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|
|
#10 (permalink) |
|
Guest
Posts: n/a
|
No jokes now!
Code:
using System;
using Server;
using Server.Mobiles;
namespace Server.Items
{
public class pileofpoop : Item
{
[Constructable]
public pileofpoop() : base( 0xF3B )
{
Name = "Pile of Poop";
Movable = false;
}
public override bool OnMoveOver( Mobile from )
{
Effects.PlaySound( from.Location, from.Map, 1064);
from.SendMessage( "You steped in some Poop! I suggest finding a shoe shine kit!" );
return true;
}
public pileofpoop( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 2 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
|
|
|
|
#11 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
check it out
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|
|
|
#12 (permalink) |
|
Hax Your Face.
Join Date: Jun 2004
Age: 21
Posts: 820
|
I haven't looked at the script you posted for the horse, Samuel... But...
If that happens to be the same one posted in the Subscriber Script Submissions forum by Arkryal, I'd suggest you get their permission first before publicly posting it. If that's not the same, then oh well. Certainly a.. unique idea. :P |
|
|
|
|
|
#13 (permalink) | |
|
Forum Newbie
Join Date: Aug 2004
Age: 43
Posts: 29
|
Sorry new to the forums yet, it was promptly removed
Quote:
|
|
|
|
|
|
|
#14 (permalink) |
|
Sam, np. Be sure to ask me if there is a script in our shard that you wish to submit to make sure it isnt one that I got from a private source. Thanks Sam. Love ya's.
![]()
__________________
Live life to it's fullest, as you never know when a dragon might take a bite out of your arse!. |
|
|
|
|
|
|
#15 (permalink) |
|
Join Date: Nov 2003
Location: Holland
Posts: 138
|
Greetings all,
I tried to find it with search but nowhere to be found. If somebody would be so kind to send it to me in a personal message, that would be great !!!! Thanks in advance and have a great day ![]() |
|
|
|
|
|
#16 (permalink) | ||
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
"Subscriber Script Submissions forum by Arkryal" You need to subscribe to use that script. ------------------ Quote:
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
||
|
|
|
|
|
#17 (permalink) |
|
Forum Newbie
Join Date: Aug 2004
Age: 43
Posts: 29
|
I also made a "Shout Stain Remover" because you can toss flaming horse poop from the sloppy house and it stains your shirt, and I also made a race removing stone, and I made a trainer that you can beat on quite a while with her own special braclet of health she spawns with and it's blessed so players can't loot it from her even if they do manage to kill her, oh and I made a stone that when you click it you get 250 bandages, and last but not least I made a toll stone that you can set the x,y,z and price in the script and when players double click it they are teleported to the spot. Sorry not smart enough yet to make the toll stone so you can change price and destination in game. I also made a stone that players can get a bag of lockpicks from and in order for it to work you have to have both the lockpick stone and lockpick bag.
|
|
|
|
|
|
#18 (permalink) |
|
Forum Newbie
Join Date: Aug 2004
Age: 43
Posts: 29
|
The trainer's bracelet is seperate but you need it for it to spawn on her and I imagine if you don't have it her script will error. I didn't zip these because I didn't want people to be stuck with all just to get one I know that annoys me when I want just one script and I have to DL a whole bunch all zipped together. This way people can pick and choose. So if you can you one of these great, if they're junk fine but I just wanna toss em out there in case someone else finds them useful.
The HMS Samuel Convington is a huge ship add on I made it's not movable though, yet ![]() |
|
|
|
|
|
#20 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
I added some in game editable properties: map, location and toll cost. This way, you wont need a new script for each toll location or cost or whatever... it allows multiple toll stones to multiple places I did this because I plan to use it, but didnt see your post (quoted) til after I edited it, in light of that info, feel free to use it as a learning tool for other in game editable properties Code:
/* Toll Stone Version 2.0 Version 1.0 - by: Admin Samuel @ www.RunUO.com Version 2.0 - by: KillerBeeZ @ www.CTlinx.com Changes: 1.0 basic stone (great idea) 2.0 added properties for map, location and toll cost All editable from in game by GM or higher You MUST set each stone as you create it. 2.0 allows for multiple locations, maps and toll costs, but it has no default value. Although I added a check for this, it will not function without being set. If this check was not in place, a player (or admin) that clicks a non set stone will end up in a place from which the only escape is by another GM bringing the character to them... the dreaded "Null" map! Worry not, this shouldn't happen... ever */ using System; using Server.Items; namespace Server.Items { public class TollStone : Item { private Point3D m_PointDest; private Map m_MapDest; private int m_TollCost; [CommandProperty( AccessLevel.GameMaster )] public Point3D PointDest { get { return m_PointDest; } set { m_PointDest = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public Map MapDest { get { return m_MapDest; } set { m_MapDest = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int TollCost { get { return m_TollCost; } set { m_TollCost = value; InvalidateProperties(); } } public override void GetProperties( ObjectPropertyList list ) { base.GetProperties( list ); list.Add( 1060660, "Toll Cost: \t{0}", m_TollCost ); } [Constructable] public TollStone() : this( new Point3D( 0, 0, 0 ), null, false ) { } [Constructable] public TollStone( Point3D pointDest, Map mapDest ) : this( pointDest, mapDest, false ) { } [Constructable] public TollStone( Point3D pointDest, Map mapDest, bool creatures ) : base( 0xED4 ) { Movable = false; Hue = 0x480; Name = "a toll stone"; m_PointDest = pointDest; m_MapDest = mapDest; m_TollCost = 500; } public override void OnDoubleClick( Mobile from ) { if ( from.InRange( this.GetWorldLocation(), 1 ) ) { if (m_MapDest == null) { from.SendMessage("This stone is not set, please report this to the Staff"); } else if (from.Backpack.ConsumeTotal(typeof(Gold), TollCost)) { from.Location = PointDest; from.Map = MapDest; } else { from.SendMessage("You lack the funds to pay the toll."); } } else { from.SendMessage("You must be close enough to touch the stone."); } } public TollStone( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); writer.Write( m_PointDest ); writer.Write( m_MapDest ); writer.Write( m_TollCost ); } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); m_PointDest = reader.ReadPoint3D(); m_MapDest = reader.ReadMap(); m_TollCost = reader.ReadInt(); } } }
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|
|
|
#21 (permalink) |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
I was really intrigued which this idea. I'd like to thank you for sharing it with us. The shoe cleaning kit and the shout were really good ideas. I recently made a pooping horse and edited it to use the shoe/kit, but was unable to figure out how to code the shirt/robe to stain and use the Shout. I submitted the horse recently and was wondering if any might know how to do this?
|
|
|
|
|
|
#22 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
that part is fairly easy... however, if you would like the stain remover to remove the stain AND give the original color back, you will have to script something to store the shirt data, or edit base clothing I plan to look into this
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|
|
|
#23 (permalink) |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Well, my horse does stain and rename the shoes successfully when walking on the poop. But I wanted the shirt/robe to stain when the poop is thrown at someone.
This is what I add to the part when it is walked on: public override bool OnMoveOver( Mobile from ) { Item feet = from.FindItemOnLayer( Layer.Shoes ); feet.Hue = 1161; feet.Name = "Shoes Covered In Crap"; Effects.PlaySound( from.Location, from.Map, 1064); from.SendMessage( "You steped in some Shit! I suggest finding a shoe shine kit!" ); return true; } But have no idea how to do it to the part of the scxript where it is thrown: protected override void OnTarget( Mobile from, object target ) { if( target == from ) from.SendLocalizedMessage( 1005576 ); else if( target is Mobile) { Mobile m = (Mobile)target; from.PlaySound( 0x145 ); from.Animate( 9, 1, 1, true, false, 0 ); from.SendMessage( "You throw the shitball and hit the target!" ); // You throw the shitball and hit the target! m.SendMessage( "You have just been hit by a shitball!" ); // You have just been hit by a shitball! Effects.SendMovingEffect( from, m, 0x36E4, 7, 0, false, true, 0x44, 0 ); m_Shit.m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds( 5.0 ) ; } else { from.SendLocalizedMessage( 1005577 ); } } |
|
|
|
|
|
#24 (permalink) | |
|
God of Pandora
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
|
Quote:
do it the same way... Code:
Mobile m = (Mobile)target;
Item Shirt = m.FindItemOnLayer( Layer.Shirt );
from.Criminal = true;
if (Shirt != null)
{
Shirt.Hue = 1161;
Shirt.Name = "a crap covered shirt";
}
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
|
|
|
|
|