|
||
|
|
#1 (permalink) |
|
Forum Novice
|
This is a script that includes a Vendor (ContractSeller) who sells an Item (MonsterContract). The Monster Contracts are basically a contract for a random number of a random type of monster. You go out and kill a monster of the type specified, double click the contract, click the claim corpse button, and it adds to the amount you have killed so far. After you have killed th required amount of the required monster, you will click the claim reward button and a check in the amount of the reward promised will be placed in your bank.
This was intended for use by new characters as a way to gain the necessary funds needed to survive. However, the veteran players will also find this usefull as a quick source of income. All settings can be adjusted in the scripts and there are a few items to note. To claim the corpse it must have been killed by the owner of the contract, can not be channeled and all items that you want to keep must be removed from the corpse before claiming. The MonsterContracts can be used seperate from the ContractSeller if you would like to use them in other scripts, such as quests. Installation: Unzip *.cs to your Scripts folder. Usage: [ADD ContractSeller [ADD MonsterContract { this adds a contract for a random amount, type, and reward } [ADD MonsterContract( string type, int AmountToKill, int Reward ) { specifies attributes } Updates: 11-09-04 12:09PM MST Corrected exploit allowing for unlimited gold. 10-15-04 7:58AM MST Corrected issue with the Random statements I was using. Thanks to x-ray for pointing this out! Please let me know if you find any bugs, and as always comments, questions, concerns and suggestions are welcome.
__________________
Thanks, Tom Sapp |
|
|
|
|
|
#2 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Location: The Netherlands
Posts: 647
|
Very interesting. I'll be sure to try this once I get back to my servers. Until then a very commendable effort on your part.
__________________
Captain The First _________________ Undisclosed shard (status: building since Feb. 2003) |
|
|
|
|
|
#8 (permalink) | |
|
Forum Novice
|
Quote:
__________________
Thanks, Tom Sapp |
|
|
|
|
|
|
#11 (permalink) |
|
Forum Novice
Join Date: May 2004
Age: 30
Posts: 152
|
Btw, as i remember, Utility.Random(4) can give 0,1,2 and 3 but not 4,
so this and following code after this block has never visited cases such a Wraith for example. Code:
public string GetRandomMonster( int genre )
{
switch ( genre )
{
case 0:
switch (Utility.Random( 4 ) )
{
case 0: return "Lich Lord";
break;
case 1: return "Lich";
break;
case 2: return "Spectre";
break;
case 3: return "Shade";
break;
case 4: return "Wraith";
break;
default: return "Wraith";
break;
}
break;
|
|
|
|
|
|
#12 (permalink) | |
|
Forum Novice
|
Quote:
![]()
__________________
Thanks, Tom Sapp |
|
|
|
|
|
|
#16 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Location: UK, Essex
Age: 21
Posts: 1,252
|
First of all cool script, my players have been having fun with them so far
However one hting that I think would make these really cool would be to have them like warrior BoDs so that you can only get them every X mins for certain skill in swords, mace, fence or archery (or maybe just tactics if it's easier to sue one skill ). Just my opinion on what I think would be cool ![]()
__________________
It is not the hand that creates worlds, It is the mind controlling it ! The New Dawn Network |
|
|
|
|
|
#18 (permalink) | |
|
Forum Novice
|
Quote:
My scripts are tested with a base install of RunUO and on my shard where I mainly have my scripts setup and that is it. If it conflicts with someone else's script then you will need to modify one or the other to work.
__________________
Thanks, Tom Sapp |
|
|
|
|
|
|
#20 (permalink) |
|
Forum Novice
Join Date: Nov 2004
Age: 32
Posts: 152
|
One of my players noticed a flaw within the scripting, and I had to temp remove the script from our database.
When you go to turn your Deed in (After Filling it), you can double click it over and over, as many times as you like. After you do taht, you get to return each one of those gumps to the bank for a reward. So you fill one deed that will reward 5200gp, but when you return it you click it 25 times, you will receive 25 gumps that return 5200gp each time. Thankfully the one who found this bug was kind enough to report it before it was abused on our server. ~ Guadah of CBP ICQ: 409707 Yahoo: MyzerX My profile will not update, so there is my contact information if needed. |
|
|
|
|
|
#21 (permalink) |
|
Lurker
Join Date: Nov 2004
Age: 19
Posts: 18
|
Too bad, the level of moster doesn't affect the reward.
I got ~10k reward for killing 10 spectres and 5k reward for killing same ammount of lich lords. Oh, and is it possible to make it like BODs? I mean that you could only get one deed in 1hour or so. Allso, as i recall, it says somenthign about having rewad in BACKPACK, i got it in bank. Goodscript in all. |
|
|
|
|
|
#22 (permalink) |
|
Newbie
Join Date: Dec 2003
Posts: 43
|
Its working great for me. After its filled and I double click on it, it goes poof....
I use the xml spawner that sets off a quest reward gump. That took care of my timed reward issue. I have it set for every hour. also just incase anyone asks, here is the snippit I put in some of my monsters profiles to get random drops. Its a blessed item so getting it to drop can be a pain sometimes. Code:
public override void OnDeath( Container c )
{
if ( 0.2 > Utility.RandomDouble() )
{
c.DropItem( new MonsterContract() );
base.OnDeath( c );
}
}
|
|
|
|
|
|
#23 (permalink) |
|
Newbie
Join Date: Dec 2003
Posts: 43
|
Also on making contracts I noticed I can't make a contract for some of the added monsters. Like amazons. The script will also allow the making of non existant creatures as well. Not a knock or anything....all 10's from me..Thanks again for the awesom script.
|
|
|
|
|
|
#24 (permalink) |
|
Forum Novice
Join Date: Jul 2004
Location: IL, USA
Posts: 590
|
Great Script Raisor. I made some mods to your scripts. Hope you don't mind. I modified the Contract script to give different rewards according to the difficulty of the critters on the contract. I also noticed that the Contract Seller would not buy the contracts back. So I changed the gump and added a cancel button so if the monsters are too much for your present ability, you can cancel the contract and get a refund of your fee.
I love this script you wrote. I've been looking for something similar for a long while. Hope you dont mind the mods. The attached file has just the 2 files I changed. The other files in the original post are still needed. |
|
|
|
|
|
#25 (permalink) | |
|
Forum Novice
Join Date: Jul 2004
Location: IL, USA
Posts: 590
|
Quote:
Adding the CloseGump line here solves this exploit. this.Resizable=false; from.CloseGump( typeof( MonsterContractGump ) ); this.AddPage(0); |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|