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!

Archeological System ver 2.0

Hammerhand

Knight
The New & Improved Archeological ver 2.0 system..by Hammerhand
Assistance by Vorspire, Thagoras, PigPen-divinity, Daat99 and whoever else tossed in their 2 cents. You folks kept me plugging away at it until it actually worked like I wanted. Thankyou.
Players can dig in an Archeological region (that you need to set up) for treasure from the past, or just dig in the sand if you dont want to do a region.
It starts off as a small quest to recover the Logbook of old Archeologist John Aubrey (1626 - 1697) from a band of graverobbers. When returned, the Archeologist gives the player an Archeologists Pack containing 2 Archeological Brushes and a book to learn how to dig for artifacts. This requires 100 mining to learn.
Each of the artifacts found bears the label of "Recovered from an Archeological site", just like you would get when fishing with an SOS. All the items are deco, for display and/or sale only.
System is set to mine sand tiles only and can be done by region (which you will have to create yourself) or any sand areas. A suggested site for a region would be near the Forgotten Pyramid in Malas.
The graverobbers are all pretty much identical in stats & title, including the leader who actually drops the Logbook. You cant tell which is the leader until you kill him/her and check the loot. And then it isnt dropped every time. I suggest spawning several graverobbers and only 1 GRLeader. The rate for getting an artifact is a bit faster than that of getting sand with an unmodified mining.cs. AKA... slightly faster than "Once in a Blue Moon" which should serve to make the artifacts rare. Should also provide hours of hearing "I cant get ANYTHING!" from your players. Archeological Brushes come with 10 uses each and are not craftable. Once the player has used them up, they need to do the quest again to get more.
I have added several misc items into the mix as well so that players wont just get artifacts. In fact, they might only get 1 or 2 artifacts per brush, or none at all. The system will also now consume 1 use each time the brush is used, whether the player gets an item, artifact or nothing at all.This should serve to make the labeled Archeological items more valuable, because they'll be much more rare than my original system.

(ArcheologicalDigRegion not included)

Requires 2 small PlayerMobile edits.

In PlayerMobile.cs / Enums
Archeology = 0x008000000,
then farther down in the Player Flags region
[CommandProperty(AccessLevel.GameMaster)]
public bool Archeology
{
get { return GetFlag(PlayerFlag.Archeology); }
set { SetFlag(PlayerFlag.Archeology, value); }

One version is for those that wish to set up an exclusive region & the other is for those that would rather have the mining work on ANY sand. Compiled & tested on a RunUO 2.2 test server.
Hope you enjoy this new version. Its a bit more involved, or should I say EVOLVED than the original.

*Edit* Both files reloaded with Mortis' addition. Now they tell you when the tool "poofs".

*Edit #2* Removed melted wax & replaced with dice & cups due to wax set movable false.
 

Attachments

  • Archeological ver 2.0 - no region.rar
    11.9 KB · Views: 110
  • Archeological ver 2.0 - region.rar
    11.9 KB · Views: 86

MrNice

Squire
with the player mobile edits, how easy would it be to remove the system if I ever wanted to down the road?
 

Hammerhand

Knight
All you would have to do is remove the 2 edits. The edits are so the players can "learn" how to dig the Archeology items. Same as learning sand or granite mining.
 

Mortis

Knight
Great job. A very nice system.

If any one wants the ( You have worn out your tool! ) message to work when the brush runs out of uses.

After line 154 in Archeology.cs add
Code:
        if (tool.Deleted)
        def.SendMessageTo( from, def.ToolBrokeMessage );

Like this
Code:
        public override void FinishHarvesting(Mobile from, Item tool, HarvestDefinition def, object toHarvest, object locked)
        {
            IUsesRemaining usesTool = tool as IUsesRemaining;
 
            int iUses = 0;
            if (usesTool != null)
                iUses = usesTool.UsesRemaining;
            base.FinishHarvesting(from, tool, def, toHarvest, locked);
            if (usesTool != null && !tool.Deleted)
            {
                usesTool.UsesRemaining = iUses - 1;
                if (usesTool.UsesRemaining <= 0)
                    tool.Delete();
                if (tool.Deleted)
                    def.SendMessageTo( from, def.ToolBrokeMessage );
            }
        }
 

Hammerhand

Knight
Gee Mortis.... you mean the tool suddenly vanishing isnt enough to tell you its gone? lol Thx for catching that. I was a little preoccupied with making it better that I sort of forgot the obvious... Ah well.. :oops:

*Edit* Both files reloaded with Mortis' addition.
 

Mortis

Knight
You did a great job. With all you have done with this it is easy to miss something.
You know us RunUO guys. Little things bug us:D. I am sure you would have done something about it once you noticed.
Besides I spent half the day today trying to get the uses to work properly myself and failing. So, I just had to see it all working.
Glad you managed to get them working as you wanted them to.
 

MrNice

Squire
Just one question how hard would it be to put an OnResponse method to the gump so when you click Ok it says a message? Players were waiting to see if they got an item or something when trying to "start the quest" would be nice if when you click ok he says like find my book please! or something :)
 

milva

Sorceror
I tested this code and it works, player has to watch their screen bottom left the message shows- you can remove the lines with the // in front . I just left them to show where to add the code.

Code:
      //public override void OnResponse( NetState state, RelayInfo info ){ Mobile from = state.Mobile;
        // switch ( info.ButtonID ) { case 0:{ break;
       
 
    public override void OnResponse( NetState state, RelayInfo info ) //Function for GumpButtonType.Reply Buttons
      {
        Mobile from = state.Mobile;
        switch ( info.ButtonID )
        {
            case 0: //Case uses the ActionIDs defenied above. Case 0 defenies the actions for the button with the action id 0
            {
              //Cancel
              from.SendMessage( "Bring Back My Log Book" );
              break;
            }
}
}   
}
  }
 

MrNice

Squire
Ok first bug! Kinda big.
Running Latest SVN
Shard has about 20 people on at it any given time so the players went right out and this was just reported:
Player dug up melted wax logged then logged back in. Apon logging in the melted wax reverted from an Archeological item to its base form and
thus cannot be moved around.
 

MrNice

Squire
Nevermind tested some more do not see any problems with the Archeological items, just the meltedwax which is a lesser.


Also on a side note, so I may better understand the system and change it a little, with this code:

new HarvestResource( 98.0, 65.0, 175.0,

what to the three sets of numbers represent? Thanks Alot!

(I changed the system from mining to Item ID - Give it a little love :) )
 

Hammerhand

Knight
The 98.0 is the reqSkill, 65.0 is minSkill, and 175.0 is maxSkill. reqSkill refers to the amount of skill needed to harvest 50% of the time, minSkill refers to the minimum amount of skill needed to be able to harvest the type of material, and maxSkill refers to the amount needed to successfully harvest at 100% of the time. I set them at those levels to make it more of a challenge to get any of the items, but easier than the labeled "artifacts". That way there are fewer of the labeled items being found, making them more valuable... AND keeping those interested in gaining them going back to get more brushes.
 

milva

Sorceror
So is this happening still? Are you saying that the wax is set to movable false in the pack?
Apon logging in the melted wax reverted from an Archeological item to its base form and
thus cannot be moved around.
 

MrNice

Squire
Yes it is, its one of the lesser's so I just removed it and added another item, but if a character gets the melted wax the server auto reverts it to its base form, thus not movable from their packs.
 

Hammerhand

Knight
I removed the melted wax & replaced with Dices (Dice & Cup). New files uploaded. Melted wax IS a bit difficult to remove from leather..... my bad. :eek:
 
Love this script. Been Playing with it abit to try it out. One Question.. How would i add in items by Name (Such as custom items)? The List of what you can get now is all Hex (can add other items via hex, but no items with special properties like a LongSword of Might... for example)
 

Hammerhand

Knight
You could try 1065, 1056, "LongSwordofMight", 2518 Just make sure you have it in the quotation marks & the name as it is in the script.
 

Obsidian Fire

Sorceror
Im not sure what exactly your trying to do but in the Archeology.cs script the is this section:
Code:
          res = new HarvestResource[]
                {
                    new HarvestResource( 98.0, 65.0, 175.0, "You find an item and put it in your backpack", typeof( BonePile ), typeof( Bone ),  typeof( RibCage ),
                typeof( MeltedWax ), typeof( SextantParts ), typeof( FishingPole ), typeof( FlourSifter ), typeof(Plate), typeof(Cards), typeof(PewterMug),
                typeof( BarrelHoops ), typeof( Scissors ), typeof(Fork), typeof(Knife), typeof(Chessmen), typeof(Bottle), typeof(BarrelTap), typeof( Spoon )),
                    new HarvestResource( 100.0, 70.0, 200.0, "You find an artifact and put it in your backpack", typeof (Archeological) )
                };

I have added some items there that are of special intrest to the players. You could try there I guess. Something like...
Code:
new HarvestResource( 100.0, 70.0, 200.0, "You find an artifact of special interest and put it in your backpack", typeof (LongSwordofMight) )
or something like that.
 
Top