Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 10-14-2004, 01:14 AM   #1 (permalink)
Forum Novice
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 33
Posts: 221
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Arrow Monster Contracts

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.
Attached Files
File Type: zip MonsterContract.1.2.zip (4.2 KB, 582 views)
__________________
Thanks,
Tom Sapp
raisor is offline   Reply With Quote
Old 10-14-2004, 02:53 AM   #2 (permalink)
Forum Novice
 
Captain The First's Avatar
 
Join Date: Jun 2003
Location: The Netherlands
Posts: 647
Default

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)
Captain The First is offline   Reply With Quote
Old 10-14-2004, 02:57 AM   #3 (permalink)
Forum Novice
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 33
Posts: 221
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Quote:
Originally Posted by Captain The First
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.
Thanks Cap'n!
__________________
Thanks,
Tom Sapp
raisor is offline   Reply With Quote
Old 10-14-2004, 04:24 AM   #4 (permalink)
Lurker
 
Join Date: Sep 2004
Age: 26
Posts: 7
Default

Nice script there
Indeed a good way for new players to get both money and raise their skills.
Restarting the server to see how this one works.
nocturnosbg is offline   Reply With Quote
Old 10-14-2004, 05:39 AM   #5 (permalink)
Newbie
 
Join Date: Sep 2004
Location: San Diego
Age: 32
Posts: 61
Send a message via ICQ to Azirath_JaGang Send a message via Yahoo to Azirath_JaGang
Smile

Nice Addition. Thank you for the Submission.
Azirath_JaGang is offline   Reply With Quote
Old 10-14-2004, 09:30 AM   #6 (permalink)
Forum Novice
 
Join Date: Jan 2004
Location: Huntsville, Alabama
Age: 33
Posts: 195
Send a message via ICQ to Kesia Send a message via AIM to Kesia Send a message via MSN to Kesia Send a message via Yahoo to Kesia
Default

cool, another quest type script. love those!
Kesia is offline   Reply With Quote
Old 10-14-2004, 10:50 AM   #7 (permalink)
Forum Novice
 
Join Date: Dec 2003
Age: 37
Posts: 462
Send a message via ICQ to dstarz20 Send a message via AIM to dstarz20
Default

Looks great man, thanks. One quick question, I have not used it yet, but do you have to click each corpse you kill, or just after you kill the amount spiecified? IE after i kill 5 mongbats, i click the Deed? Thanks alot.
dstarz20 is offline   Reply With Quote
Old 10-14-2004, 12:26 PM   #8 (permalink)
Forum Novice
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 33
Posts: 221
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Quote:
Originally Posted by dstarz20
Looks great man, thanks. One quick question, I have not used it yet, but do you have to click each corpse you kill, or just after you kill the amount spiecified? IE after i kill 5 mongbats, i click the Deed? Thanks alot.
You have to claim each corpse. so after you kill each monster you dbl clk the deed and then click claim corpse then target the corpse
__________________
Thanks,
Tom Sapp
raisor is offline   Reply With Quote
Old 10-14-2004, 10:18 PM   #9 (permalink)
Newbie
 
Join Date: Aug 2004
Age: 37
Posts: 53
Thumbs up

Very cool script...great job!
Forsaken01 is offline   Reply With Quote
Old 10-15-2004, 01:15 AM   #10 (permalink)
Forum Novice
 
Join Date: May 2004
Age: 30
Posts: 152
Default

Looks nice. Thanks !
ps I think another way to improve this script is to make rewards also depends of monster types but not on random
x-ray is offline   Reply With Quote
Old 10-15-2004, 02:51 AM   #11 (permalink)
Forum Novice
 
Join Date: May 2004
Age: 30
Posts: 152
Default

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;
x-ray is offline   Reply With Quote
Old 10-15-2004, 10:37 AM   #12 (permalink)
Forum Novice
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 33
Posts: 221
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Quote:
Originally Posted by x-ray
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;
You are correct, thanks for pointing this out. I have corrected the script.
__________________
Thanks,
Tom Sapp
raisor is offline   Reply With Quote
Old 10-15-2004, 09:09 PM   #13 (permalink)
Forum Novice
 
Join Date: May 2004
Age: 30
Posts: 152
Default

Quote:
Originally Posted by raisor
You are correct, thanks for pointing this out. I have corrected the script.
No problem, thats why we all here (like somebody said to me) Keep coding
x-ray is offline   Reply With Quote
Old 11-07-2004, 03:12 PM   #14 (permalink)
Forum Novice
 
Join Date: Nov 2003
Posts: 137
Send a message via AIM to swppws Send a message via Yahoo to swppws
Default

It says i have a contract seller already so when i upzip it to the file do i say yes over copy it?
__________________
Admin Sun Tzu-:)
swppws is offline   Reply With Quote
Old 11-07-2004, 06:16 PM   #15 (permalink)
Forum Novice
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 33
Posts: 221
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Quote:
Originally Posted by swppws
It says i have a contract seller already so when i upzip it to the file do i say yes over copy it?
That depends, do you have other scripts that have a contract seller?
__________________
Thanks,
Tom Sapp
raisor is offline   Reply With Quote
Old 11-07-2004, 07:18 PM   #16 (permalink)
Forum Expert
 
LordHogFred's Avatar
 
Join Date: Jan 2004
Location: UK, Essex
Age: 21
Posts: 1,252
Default

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
LordHogFred is offline   Reply With Quote
Old 11-07-2004, 07:32 PM   #17 (permalink)
Forum Novice
 
Join Date: Nov 2003
Posts: 137
Send a message via AIM to swppws Send a message via Yahoo to swppws
Default

I belive so... And if i due i just place the other files in at it will work? correct?
__________________
Admin Sun Tzu-:)
swppws is offline   Reply With Quote
Old 11-07-2004, 08:24 PM   #18 (permalink)
Forum Novice
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 33
Posts: 221
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Quote:
Originally Posted by swppws
I belive so... And if i due i just place the other files in at it will work? correct?
Only way to know for sure is to try. 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
raisor is offline   Reply With Quote
Old 11-07-2004, 10:43 PM   #19 (permalink)
Forum Novice
 
Join Date: Nov 2003
Posts: 137
Send a message via AIM to swppws Send a message via Yahoo to swppws
Default

OK thanks ill give a try
__________________
Admin Sun Tzu-:)
swppws is offline   Reply With Quote
Old 11-08-2004, 12:46 AM   #20 (permalink)
Forum Novice
 
Guadah's Avatar
 
Join Date: Nov 2004
Age: 32
Posts: 152
Default

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.
Guadah is offline   Reply With Quote
Old 11-08-2004, 01:22 AM   #21 (permalink)
Lurker
 
Join Date: Nov 2004
Age: 19
Posts: 18
Default

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.
LoeZ is offline   Reply With Quote
Old 11-08-2004, 04:35 PM   #22 (permalink)
Newbie
 
Join Date: Dec 2003
Posts: 43
Default

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 );
		}
}
Jebbit is offline   Reply With Quote
Old 11-08-2004, 04:38 PM   #23 (permalink)
Newbie
 
Join Date: Dec 2003
Posts: 43
Default

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.
Jebbit is offline   Reply With Quote
Old 11-08-2004, 11:23 PM   #24 (permalink)
Forum Novice
 
Join Date: Jul 2004
Location: IL, USA
Posts: 590
Default

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.
Attached Files
File Type: zip MonsterContract.zip (2.4 KB, 97 views)
haazen is offline   Reply With Quote
Old 11-09-2004, 07:05 AM   #25 (permalink)
Forum Novice
 
Join Date: Jul 2004
Location: IL, USA
Posts: 590
Default

Quote:
Originally Posted by Guadah
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.

Adding the CloseGump line here solves this exploit.

this.Resizable=false;
from.CloseGump( typeof( MonsterContractGump ) );
this.AddPage(0);
haazen is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5