|
||
|
|
#1 (permalink) |
|
Summary:
A stone that you double click and it sets murder counts to Zero . Description: Second script i made from scratch . PLEASE give me input . Works for all Runuo Beta's Have fun with it ~Admin TwiZ GaN Abmans AOS/PvP - Abandon OsI Installation: Drop into scripts/custom . Have fun |
|
|
|
|
|
|
#3 (permalink) | |
|
Konoko <3 t3h catgirls!
|
Quote:
It now checks to see if the player has kills, and also demands payment of 1000gp Code:
using System;
using Server.Network;
namespace Server.Items
{
public class MurderStone : Item
{
[Constructable]
public MurderStone() : base( 0xED4 )
{
Movable = false;
Hue = 0x489;
Name = "a Murder stone";
}
public MurderStone( 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();
}
public override void OnDoubleClick( Mobile from )
{
Container pack = from.Backpack;
if ( from.Kills == 0 )
{
from.SendMessage ( 0x35, "You do not have any kills to remove!" );
}
else
{
if ( pack != null && pack.ConsumeTotal( typeof( Gold ), 1000 ) )
{
from.SendMessage( 0x35, "You now have no kills!" );
from.Kills = 0;
}
else
{
from.SendMessage( 0x35, "You need at least 1000gp in your backpack to use this." );
}
}
}
}
}
__________________
DarkKonoko visit my website | runuo irc channel | uogateway "One of the universal rules of happiness is: always be wary of any helpful item that weighs less than its operating manual." - Jingo, Terry Pratchett. |
|
|
|
|
|
|
#6 (permalink) |
|
baby jesus is crying
Join Date: May 2004
Age: 27
Posts: 439
|
Code:
from.SendMessage( 0x35, "You now have no kills!" ); from.Kills = 0; Code:
if ( pack != null && pack.ConsumeTotal( typeof( Gold ), 1000 ) )
__________________
Silver Mist A more mature Shard for people who hate neon BS and 12 year old admins. Swear: “Jesus Christ! That guy is fat!” Prayer: “Jesus Christ! That guy is fat! Please help him find an stationary bike he can fit on. Amen.” |
|
|
|
|
|
#9 (permalink) |
|
P3'c Orion Aviator
Join Date: Sep 2004
Age: 30
Posts: 1,272
|
Change this line
Code:
from.SendMessage( 0x35, "You now have no kills!" ); from.Kills = 0; Code:
from.SendMessage( 0x35, "You now have no kills!" ); from.Kills -= 1; you can change how much gold it takes per kill like posted above -jamie good script tho, good idea |
|
|
|
|
|
#11 (permalink) |
|
baby jesus is crying
Join Date: May 2004
Age: 27
Posts: 439
|
ya I didnt see one piece of working code in that entire thread
![]() so no, it might have been written two years ago, but RunUO has done much in two years.
__________________
Silver Mist A more mature Shard for people who hate neon BS and 12 year old admins. Swear: “Jesus Christ! That guy is fat!” Prayer: “Jesus Christ! That guy is fat! Please help him find an stationary bike he can fit on. Amen.” |
|
|
|
|
|
#12 (permalink) |
|
Forum Novice
Join Date: Nov 2002
Posts: 131
|
you mean this?
Code:
somemobile = the reference to the mobile affected
[code:1]using System;
using Server.Items;
namespace Server.Items
{
public class Killdeed : Item
{
[Constructable]
public Killdeed() : base( 0x14F0 )
{
base.Weight = 1.0;
base.Name = "a kill deed";
base.Newbied = true;
}
public Killdeed( 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();
}
public override void OnDoubleClick( Mobile from )
{
if ( from.Kills == 0 )
{
from.SendMessage( "Thou hast no need for this" );
}
else
{
from.Kills = 0;
this.Delete();
}
}
}
}
|
|
|
|
|
|
#13 (permalink) | |
|
Join Date: Nov 2004
Age: 24
Posts: 1
|
Quote:
You know the little saying goes "It's the last place you would think to look' Not 'The last place you look'.. Changing the meaning entirely.... |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|