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!

Monster Contracts

raisor

Wanderer
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.
 

Attachments

  • MonsterContract.1.2.zip
    4.2 KB · Views: 616

nocturnosbg

Wanderer
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.
 

dstarz20

Sorceror
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. :)
 

raisor

Wanderer
dstarz20 said:
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
 

x-ray

Wanderer
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

Wanderer
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;
 

raisor

Wanderer
x-ray said:
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. :D
 

raisor

Wanderer
swppws said:
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?
 

LordHogFred

Knight
First of all cool script, my players have been having fun with them so far :p
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 :p ). Just my opinion on what I think would be cool :D
 

raisor

Wanderer
swppws said:
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. :D 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.
 

Guadah

Wanderer
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.
 
Top