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!

Trash Token System

Viago

Knight
Trash Token System

( this has been updated please scrool down for new files)

Support is no longer provided for older version

T4T is basicly the same version as the old one just a few lings added and edited, please dis regard that version, which was submited by another person, and i do not support that version so please stop emailing me =p lol

alll , if not almost all loop holes have been fixed, please see bellow
 

Revolution

Wanderer
humm, how can i edit it, to give tokens only for death robes, so players when die, they may put the robe in the trash for tokens and avoid littering. And other kinds of items won't give tokens
 

Igon

Wanderer
u have an error in your script...
(line 17, column 23) 'TRsystemGump': member names cannot be the same as their enclosing type

Change Line 17 from:
Code:
private static void TRsystemGump( CommandEventArgs e )
to
Code:
private static void TRsystemGump_OnCommand( CommandEventArgs e )
 

Igon

Wanderer
Revolution said:
humm, how can i edit it, to give tokens only for death robes, so players when die, they may put the robe in the trash for tokens and avoid littering. And other kinds of items won't give tokens

Change Line 29 from:
Code:
if ( IArmor != null )// && base is  item)
to
Code:
if ( IArmor != null && IArmor is DeathRobe )// && base is  item)
 

Viago

Knight
Updated

ok my apologies, i updated the gump befor i posted :p over highlighted hehe
new download is at end of this post it is fixed,

as for editing the lings

on ling
public override bool TryDropItem( Mobile from, Item item, bool sendFullMessage )
(around ling 27 or so)

change this
from this

if ( IArmor != null )// && base is item)
{
IArmor.Delete();
from.AddToBackpack (new Tokens(20));
from.PlaySound( 521 );
from.SendMessage("Your item has been Deleated, youve been rewarded");
return true;


To this

if ( item != null && item is DeathRobe )
{
item.Delete();
from.AddToBackpack (new Tokens(20));
from.PlaySound( 521 );
from.SendMessage("Your item has been Deleated, youve been rewarded");
return true;
}


/////////////////////////////////////////////////////
and on ling
public override bool OnDragDropInto( Mobile from, Item BaseArmor, Point3D p )
(this should be ling 44 or around it)
change this
from this

if ( BaseArmor != null )// && item is Tokens )
{
BaseArmor.Delete();
from.AddToBackpack (new Tokens(20));
from.PlaySound( 521 );
from.SendMessage("Your item has been Deleated, youve been rewarded");
return true;
}


to this
if ( item != null && item is DeathRobe )
{
item.Delete();
from.PlaySound( 521 );
from.AddToBackpack (new Tokens(20));
from.SendMessage("Your item has been Deleated, youve been rewarded");
return true;
}




that should make it work for only death robes to give token, or you can have it give bandaids.

next version should be alot cleaner, i do apologize for that error.

thanks igon for posting :D much apreciated
 

Alfinus

Sorceror
Ok our shard uses your script, but there is a bug in it. If you take a Token and drop it into the barrell, you get 5 tokens back.
So I tried to do some editing but my c# isn't that great, also we call them brownie points instead of tokens.

public override bool TryDropItem( Mobile from, Item IArmor, bool sendFullMessage )
{
if ( item != null && item is BrowniePoint )
{
from.SendMessage("You'd do almost anything for some BrowniePoints wouldn't you?" );
return;
}
if ( IArmor != null )// && base is item)
{
IArmor.Delete();
from.AddToBackpack (new BrowniePoint(5));
from.PlaySound( 521 );
from.SendMessage("Your item has been Deleted, you've been rewarded");
return true;
}
else
{
from.SendMessage("This Item Can not be Deleted");
return false;
}
}

Can you help me with this bug, I would love to kept this script if possible.
 

damionmarcus

Wanderer
this fixes it:

public override bool TryDropItem( Mobile from, Item IArmor, bool sendFullMessage )
{
if ( IArmor != null )// && base is item)
{
if ( IArmor != null && IArmor is Tokens)
{
from.SendMessage("This Item Can not be Deleated");
return false;
}
IArmor.Delete();
from.AddToBackpack (new Tokens(20));
from.PlaySound( 521 );
from.SendMessage("Your item has been Deleated, youve been rewarded");
return true;
}
else
{
from.SendMessage("This Item Can not be Deleated");
return false;
}
}

public override bool OnDragDropInto( Mobile from, Item BaseArmor, Point3D p )
{
if ( BaseArmor != null )// && item is Tokens )
{
if ( BaseArmor != null && BaseArmor is Tokens)
{
from.SendMessage("This Item Can not be Deleated");
return false;
}
BaseArmor.Delete();
from.AddToBackpack (new Tokens(20));
from.PlaySound( 521 );
from.SendMessage("Your item has been Deleated, youve been rewarded");
return true;
}
else
{
from.SendMessage("This Item Can not be Deleated");
return false;
}
}



Replace Tokens with BrowniePoints or what ever
 

kethoth

Page
how do you set it to a random amount between say 1-10 tokens so it's not as easily exploitable by players?
 

damionmarcus

Wanderer
kethoth said:
how do you set it to a random amount between say 1-10 tokens so it's not as easily exploitable by players?

I have thought about this, and yes it is somewhat exploitable, however if you got people killing themselves just to get a few(1-20) tokens, then maybe they deserve them :confused: .

But in order to answer your question you could do somthiing like the following:

untested psuedo code:

Random rand = new Random();
int j = rand.Next(10);

then just assign "j" instead of the 20 tokens that are being given out

Hope that helps
 

Viago

Knight
im curently working on another version of this and hope the loop holes will be fixed. i do not suport this verson anymore but i will take your alterations into the new updated one. also there will be a portable one in new update. sorry for the incoveniance of this.
 

ssunwr

Wanderer
bug

there is a bug in it. If you take a Gold and drop it into the barrell, you get 5 tokens back.

Can you help me with this bug??

Sorry for my poor english. I'm Korean.
 
well after reading this thread and considering all the possabilities ive come to a conclusion. This is a great system for rewarding people who keep the area clean but the downside is that if this uses tokens and we use tokens for anything else on our shard than the easiest way for a player to get the top prize is to go kill a weak enemy for 100g and go drop one gold at a time in the trash for 20t each that means 100g = 2000t this is not good so what i would do is cause this to not accept anything that can be stacked thus you get a good trash reward system with no way to exploit it or atleast not as bad.

Option 2 would be to change it from tokens to some other currency we will say trash points or tp in this example so now your token reward system is not affected by the trash reward system and you can give rewards for tp this would make the system much closer to what osi did during clean up britannia *wishing i had got the phoenix armor* this i think would be a good way to use this system.

The last idea i had was to make this give a set amount for each item you drop in the trash but the amount of work involved in that is more than i would like to deal with and i would rather use one of the methods above to deal with the exploits

All in all this is a great idea and i cant wait to use it on my shard all it needs is minor modifications and it will be perfect :)
 

Viago

Knight
i have solved all your probliums soo there will be a download of two versions plus a player carry bag

Stops token cheating
stops gold cheating

also stops
Spell books
rune books
bank checks
token checks

and many more


Almost finished for release

version 1
pre scripted, meening wats allready in script can not be deleated other than the Item ling which makes things deleateable, the other lings will be a loop whole cover, meening anything with the name on those lings can not be deleated, and if the item drop is not on there than its deleateable

version 2
in game editable, meening only the ones u select from the list will be deleateable. this will not contain an item ling, since i found many buggs in it.

Player Bag
the player bag is a portable version of version 1

also i have removed my gump and replaced it with the normal gump of barrel, or bag depending on wat one it is for speedy deleation

there are a few shards in my close friends that are already using a beta version of thease, please let me kknow of any issues befor i release it. because i found som loop holes with in it.

ive been rather bussy latly so i apologize for the delays.

==============
Added Files November 22, 2004

RewardTrash.cs - this is the script version anything listed in script can not be deleated. anything else can

RewardTrashPlayer.cs - Same thing as above only portable.
===============

I have Delayed the Release of the menued version due to some recent bugs ive been working on, lol reason was i took some time off, for got where i was and wat i did. lol so i gota re thing and such. lol sorry.

SEE PAGE 3 FOR DOWNLOAD
 

Viago

Knight
sorry bout the dubble post thing, ust forgot to include dtails a bit

In the script there are disabled loop hole coverings that you can enable If you have them or if you chose to enable to covering

spellcraft book
DragonEgg
BrowniePoints
Druidic Spell book
FS Shrink System

if you do not have these scripts then do not activate them

the checks are included as listed below, the checks will cover loop holes

Tokens
Gold
Bank Check
Token Check
Spell books
Necrospellbook
Runebook
Paladin Book
Container & Lockable containers aswell as container Base

if you feal this is not enught tell me ill add more or u can to fit your shard

to edit the token ling for reward simply at every statement edit this ling
from.AddToBackpack (new Tokens(12));

to this
from.AddToBackpack (new Your Item here(12));

replayce your item here with the item you want to be rewarded, such as Brownie Points

=======================================
Up Comming

Wats to come? well the menu system for one it will be more detaild for your servers specific needs ranging from weapon, armor, Comodeties, baseclothing Spells, and more so u can specify wat u want to be deleated for the reward, depending on location or over all.

i may do a ingame customizable player trash bag, but that will be iffy since it can be determind in script.
========================================
 

Viago

Knight
12 is basicly defualt i guess, u can change the amount on them all if you wish.

Sorry for the rename i have boath versions on my test center, just saved time typing it out.

the ingame option one will be here shortly. i had it workign one point in time but i did something too it. lol

also ive been thinking of an "easyer" way for the script to show wats to be deleated and not and its reward. sorta clean the s cript up a bit. but ill give this version some time to breath.
 

Deraj_88

Sorceror
sorry i did not set out to steal or in anyway copy it just meerly fixing it abit and offering it. but i have sense removed it and removed it from my shard. i find it kinda pointless and it only cuases players to just stand there and drop in robes/anything for hours on end. anyway i find that making the item decay faster more helpfull. thoe command for it was nice "[t4t"
very short for qwik use. anyway its just C. not like were saving lifes with this stuff.....or maybe we are somewhere
 

KillerBeeZ

Knight
Deraj_88 said:
sorry i did not set out to steal or in anyway copy it just meerly fixing it abit and offering it. but i have sense removed it and removed it from my shard. i find it kinda pointless and it only cuases players to just stand there and drop in robes/anything for hours on end. anyway i find that making the item decay faster more helpfull. thoe command for it was nice "[t4t"
very short for qwik use. anyway its just C. not like were saving lifes with this stuff.....or maybe we are somewhere

UO HAS saved at least one life that I know of.

sort of....

I was on an OSI a few years ago and a very troubled player had taken a bottle of drugs to kill themselves.. after about 30 minutes, a few other players talked them into calling 911....

Now I am a very good judge of character, and from what I saw it seemed that they were indeed telling the truth, but as you know, it might have just been an act... but, I still think his life was saved.
 
Top