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!

Zero kill count deed

billy6guns

Wanderer
Zero kill count deed

how about a deed that erases all your kill counts :?:

(this would be usefull for my long-term goal's)
 
S

soundwav

Guest
that wouldnt be hard to do just make it set kills to 0 id look up the exact thing for you but im being lazy right now.
 

billy6guns

Wanderer
ick! this looks like a tuffy for my first real script

i was trying to use the clothing bless deed as a model...

ill try useing the name change deed instead, i bet it would be easier
 

billy6guns

Wanderer
like i said..this is my first shot at scripting, ive got errors all over the place

plz dont laugh :oops:

using System;
using Server.Network;
using Server.Prompts;
using Server.Items;

namespace Server.Items
{
public class zerokillsdeed : Item
{
[Constructable]
public ZeroKillsDeed() : base( 0x14F0 )
{
base.Weight = 1.0;
base.Name = "a zero kill's deed";
}

public ZeroKillsDeed( Serial serial ) : base( serial )
{
}
{
SomeMobile.Kills = 0;
}
// do zero kills
}
}
}
 

Spooky

Wanderer
Sudo Code

Its not that hard but ill give you this one

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

}

}
}[/code:1]
 

billy6guns

Wanderer
ook..im still haveing an old problem

i copied and pasted above code into a .txt doc
then save as zerokillsdeed.cs file type ALL

it changes over to zerokillsdeed.cs

move to item/deeds

restart server...all scripts compile with 0 warnings 0 errors

then in-game i say [add zerokillsdeed and target ground

system say's .. No type with that name found

same thing happend to me when i tried to add the jewler
 

Spooky

Wanderer
The deed

Because in the script itself its Killdeed

if you want to name it something else you have to change it the script too :)
 

Spooky

Wanderer
Deeds

RunUO doesnt look at your filenames you could call it eatshit.cs for all RunUO cares.

RunUO does care about [code:1]public class Killdeed : Item [/code:1]

You can also alter the deed in other ways like

[code:1]from.Kills = from.Kills - 5;[/code:1]

making the player purchase a deed for every 5 kills they want to erase

I would suggest that it be a very expensive item thou or you will find that you end up with a shard full of PK's because there is no deterent.
Not that PKing is inherintly detrimental to a shard but if all the players are PK's it will get old quick.
Just a suggestion
 

billy6guns

Wanderer
accually this is an item that im going to implement after races come out.

im wanting to eventually change wind into a Drow city.
of course once that out..i want starting (drow) characters to start off as red

but once they make the dicision to leave drow society they get the deed to make them blue

also in wind im trying to make it so that you have to have a certain amount of kill's to enter the city.

so drow start with 1000 kill counts
you can only enter wind with 500+ counts
you can choose to leave the drow society by useing a kill count deed
and thus be banned from wind
to prevent rune markers im wanting "perversed" town guards that whack blues
 

Spooky

Wanderer
Wind

You can prevent rune marking in wind by defining that rule on the wind region.

Otherwise I have answered the how to's in your other post no code just some ways to go about it :)
 

billy6guns

Wanderer
humm...
this
Region.AddRegion( new Region( "the town of", "Wind", Map.Felucca ) );//not a town, no guards, use all default behavior
}
to this?

Region.AddRegion( new Region( "the town of", "Wind", Map.Felucca )
public override void OnEnter( Mobile m )
{
if ( m.Kills < 5 )
{
m.SendMessage( "You cannot enter here" )
}
else
}
m.SetLocation( x , y , z )
}
}
not sure how to add the no marking
 

Spooky

Wanderer
Marking

Not tested code

[code:1]public overide void OnSpellCast( Mobile m, Spell s )
{
if ( m.s == "Mark" & m.Region == "Wind" )
{
return false;
}
}[/code:1]
 

billy6guns

Wanderer
that one looks much more simple...but that goes under regions? or does that get added to the Mark spell?

[code:1]Region.AddRegion( new Region( "the town of", "Wind", Map.Felucca ) );//not a town, no guards, use all default behavior
}
public overide void OnSpellCast( Mobile m, Spell s )
{
if ( m.s == "Mark" & m.Region == "Wind" )
{
return false;
}
}[/code:1]
 

billy6guns

Wanderer
well...if that code looks about right to you .. ill give it a test
im just worried about the placement of the second half...do i just tag it onto the Wind portion, like above?
 
Top