|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
Claim System 1.6 by Xanthos
Introduction The Claim System rewards users for helping keep item count down thereby reducing lag. As corpses are claimed, the player is given the looted items as well as a gold reward based on the fame of the mob. The system also helps make looting corpses and scavenging items from the ground less tedius by automating the tasks. The system can be configured to keep looting of player corpses and competing for loot a social activity by disabling its commands in the presence of other players. The system comes with a special gold bag that looted/scavenged gold is placed into automatically. The bag can be dropped on an Arya.Savings.SavingsAccount (packaged with the Auction system) and all gold within will be deposited into the account; saving the tedium of dragging piles of gold to the account. The system honors the notoriety system and will not loot high fame mobs for which rights have not been earned. A player is always free to loot by hand those corpses that the system will not loot. The system requires no modifications to the standard distro files. Features
Unzip the Xanthos folder into your customs folder. Copy ClaimConfig.xml to your Data folder if you wish to modify configuration parameters. Acknowlegements All original code by Xanthos; inspried by an idea implemented by Daat99. Changes Version 1.6
Note that there are new configuration parameters in ClaimConfig.xml.
Last edited by Xanthos; 03-23-2006 at 12:41 AM. |
|
|
#4 (permalink) |
|
Forum Expert
|
Great job, looks great!
Just wondering... I saw that the award calculation had a Minimum Award parameter, is there a max award parameter as well? Thought that would make sense for those monsters that have 20k plus fame and only drop 500 gold. Without a max and a divisor at 100, the award would be more than the loot Just a thought if it's not there already ![]() Thanks again Xanthos, keep it up! |
|
|
|
|
#6 (permalink) |
|
Forum Expert
|
Just wanted to let you know that there is a small bug in the AwardGold routine. Here is the scenario...
1. Players kill mobiles. 2. Shard is restarted. 3. When shard is back up, player enters dungeon to claim bodies. 4. Shard crashes. The problem is in almost every [claim script that I have used, that awards gold based on the fame of the corpses owner. When the shard is restarted, the Owner prop on corpses is nulled, thus when the players claim after restart, the shard crashes with a NullReferenceException error. This is easily fixed with a check if corpse.Owner == null, before you check corpse.Owner.Fame, I did something along these lines... Code:
int corpseFame;
if(null == corpse.Owner)
corpseFame = 1000; //to give the something!
else
corpseFame = corpse.Owner.Fame;
Hope this helps ![]() |
|
|
|
|
#7 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
|
|
|
|
#10 (permalink) |
|
Account Terminated
Join Date: Feb 2006
Posts: 9
|
It's a nice script, but I run into a mysterious behavior: I can claim/grab bodies as desired, however I only get the reward, the corpses are not looted. After having done much debugging (yeah, I just LOVE guessing types of variables and Console.WriteLine-ing to show them... does C# have anything like print_r in PHP?), I've closed down on the suggestion that it is a ConfigParser issue. It seems to parse arrays in a way which this Claim System does not expect... Any plans to fix it?
|
|
|
|
|
#11 (permalink) | |
|
Forum Expert
Join Date: Oct 2002
Location: Germany (american though)
Age: 33
Posts: 957
|
Quote:
<!-- List the item classes to claim/grab --> <TypesToLoot type="array"> Jewel will not work, I have modified the code to grab BaseJewel instead as default, regardless of what the config says. in claimconfig.cs around line 72 else if ( ((IList)(ClaimConfig.TypesToLoot)).Contains( item.GetType()) || ( ClaimConfig.LootArtifacts && Misc.IsArtifact( item ) || item is BaseJewel )) items.Add( item ); other items should be .grabbed fine, you just have to be specific. Last edited by Jarrod; 02-10-2006 at 06:00 AM. |
|
|
|
|
|
#12 (permalink) |
|
Account Terminated
Join Date: Feb 2006
Posts: 9
|
Well, I've done some more debugging and seem to have closed down on the error. Take a look at ConfigParser.cs, line 437:
Code:
array[ i ] = Type.GetType( ChildElements[ i ].Text ); Code:
Console.WriteLine("--->" + ChildElements[ i ].Text + "<--->" + Type.GetType( ChildElements[ i ].Text) + "<--");
Code:
Xanthos.Utilities.ConfigParser attempting to load Data/ClaimConfig.xml... Xanthos.Utilities.ConfigParser success! --->Server.Items.Gold<---><-- --->Server.Items.Bandage<---><-- --->Server.Items.Arrow<---><-- --->Server.Items.Jewel<---><-- |
|
|
|
|
#13 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
||
|
|
|
|
#14 (permalink) |
|
Account Terminated
Join Date: Feb 2006
Posts: 9
|
This would address another issue, I think. However, I gave it a try:
Code:
Xanthos.Utilities.ConfigParser attempting to load Data/ClaimConfig.xml... Xanthos.Utilities.ConfigParser success! --->Server.Items.Gold<---><-- --->Server.Items.Bandage<---><-- --->Server.Items.Arrow<---><-- --->Server.Items.BaseJewel<---><-- |
|
|
|
|
#15 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
||
|
|
|
|
#16 (permalink) |
|
Account Terminated
Join Date: Feb 2006
Posts: 9
|
Okay, I've given up my attempt to figure out, why that GetType function does not work as desired.
I've patched the scripts to firstly work with the string values (and therefore not to care if GetType functions...) and secondly - not to treat anyone with AccessLevel > Player as a blocking Mobile. You don't want a hidden GM to be spotted due to blocked grab&claim, do you? ![]() If Xanthos gives his permission, I will post the updated versions here. |
|
|
|
|
#19 (permalink) |
|
Guest
Posts: n/a
|
Mystery solved. There is nothing wrong with the ConfigParser. The code was doing an exact match on the Types. It now looks for Types and their derived types. Rings for instance are derived from BaseJewel and will now be looted whereas before they were failing the exact match test.
I also implemented Dmitri's suggestion to not block the grab when invisible staff are within the block range. |
|
|
#23 (permalink) |
|
Forum Expert
|
I don't think it does...if you want to be able to do that you might want to try a 3rd party tool like Easy UO
I hope it's okay to post the link...if not, can a mod let me know and I'll remove it
__________________
In some cases stupid makes you win-Radwen |
|
|
|
|
#24 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
If you want to do it yourself you can get started and post in the script support forum for help.
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|