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!

Runuo [2.1] Convert Items To "Point" How?

Xenendor

Wanderer
Hello,
Im not newbie about C and C# , but im little newbie in working with Ultima Online.
I would make a script which convert some kind of artifact to "Points" with drag and dropping to an npc. like this:
Spirit of the totem --> 10 points
Ornament --> 20 points
Etc.
So then i can add a Vendor where people can buy some Custom Artifact with that point.

If not point i could also use a special kind of gold,
Anyone know if there is alredy a script to do this? Or how can i move to do it?
Thanks you all, sorry for my bad english.
Xenendor.
 

m309

Squire
You can probably just use the artifact rarity as a value, since its already there - sounds about the same as what you're intending.
 

Xenendor

Wanderer
I tought something like this, but i dont know if the concept could work and i dont really have in mind how to write this:
//i declare a variable where place all artifact i want in the list like : 'Artif'
//then script proceed in that way:
if (dropped is SpiritoftheTotem)
{
dropped.Delete();
mobile.AddToBackpack (new "new kind of money and number"());
this.PrivateOverheadMessage (MessageType.Regular, 1153, false, "You reward for TOT point!!", Mobile.Netstate);
return true;
}
//from here do the same for each Artifact i declared then:
if (dropped != Artif) //The variable for Artifact declared before
{
This.PrivateOverheadMessage (MessageType.Regular, 1153, false, "This is not in the Item's List);
return false;
}
 

m309

Squire
Seems like a decent start. I'd flesh it out and then start posting errors as they occur to get more help.
 

Xenendor

Wanderer
Ok, i created npc which convert "an item" to gold .
Now i need to create a special item like WhiteGold to use there. How can i create it?

Thanks for your help :)
 

pooka01

Sorceror
Copy paste something like Sapphire.cs, then change all the Sapphire in the newly copied script to WhiteGold, then change it's:
public Sapphire( int amount ) : base( 0xF19 )
to
public Sapphire( int amount ) : base( gold item id here )

and under that;
Code:
Stackable = true;
Amount = amount;
Hue = 1153;

then the rest is up to you.
Also consider posting in Script support section next time, as this requires support.
 

Xenendor

Wanderer
Copy paste something like Sapphire.cs, then change all the Sapphire in the newly copied script to WhiteGold, then change it's:
public Sapphire( int amount ) : base( 0xF19 )
to
public Sapphire( int amount ) : base( gold item id here )

and under that;
Code:
Stackable = true;
Amount = amount;
Hue = 1153;

then the rest is up to you.
Also consider posting in Script support section next time, as this requires support.



Thanks you :D
Im new in this forum, i'll check the section better next time, thanks
 
Top