|
||
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
Version History:
[V 1.3] - 04/05/06 Fixed Serialization/Deserialization bug [V 1.2] - 04/04/21 Now RunUO 1.0 RC0 compatible [V 1.1] - 04/03/17 Fixed a small bug with Server.ContextMenus New Readme included [V 1.0] - 04/03/17 Initial Release Summary: "A Personal Bless Deed is a deed that will allow the blessing of a treasured personal item. The deed can only be used by the player it has been created for. The item will only be blessed for the player who used the deed on it, not even for other characters on the same account. Blessing a cursed item is not possible. The owner can use the 'Unbless' context menu on the blessed item to remove the effect. If he choses to do so, the Personal Bless Deed is restored and will be placed in the players backpack. Please note that, in order to bless or unbless an item, both the deed and the item must be in the players backpack or on the paperdoll." The deed works (nearly) similar to the one used on OSI servers. There is only one small difference: My version allows you to only bless weapons, armor and clothing (shields are actually derived from BaseArmor and thus can be blessed too). However, on OSI Servers you are able to bless any non-stackable item (with the exception of containers). This includes scissors, dye tubs and even usable items such as potions or food (This has been tested on 04/03/15 on Europa & Atlantic Servers). Since I believe this is a bug (your deed is lost when you drink a blessed potion or eat blessed food) my version will only be able to bless armor, clothing and weapons (as stated above). Every single message you get when using this deed is correct and 100% the same as on OSI. The standard RunUO warning gump is used in order to display the information when the Personal Bless Deed is used. Note that the sound when blessing an item also comes without any visual effects on OSI servers. Not getting any confirmation when removing a Personal Bless Deed is also intentional. Weight, displayed loot type and gump size / positions are correct. I want to thank the following people for helping me with this script: - Ignacio Vazquez-Abrams - Phantom - tobagin - Crack177 - LtLDevil This Version is FINAL. If any bugs are found I will fix them. I will not add any features though. If you have any problems with this script, feel free to post them here. Do not PM/email/ICQ me about this script or you will be put on ignore. If the answer can be found in the included README file or in the description, I will not bother to answer. Description: The following constructors are used:
When used with the Mobile owner parameter, the deed will save the owner in a variable of the Mobile type. It is only usable by the player set in this variable. If no player is set, the deed will not be usable by anyone. In the latter case it will display "Personal Bless Deed For A Player". If the Mobile is set, the correct ~1_name~ value will be used. Installation: Required Steps
Optional Step In case you want to give a Personal Bless Deed to all newly created characters you need to edit the file CharacterCreation.cs
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
#2 (permalink) | ||
|
This script works great. Thanks Dracarys. This will work good for my players. They will get this as a prize.
__________________
Quote:
Quote:
My Website |
|||
|
|
|
|
|
#3 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
You could have used an interface which would use forward-backward casting to integrate it into all items. Along with some reflection shit. That would be VERY difficult to do and probably not worth it. Great job, although since I use a baseitem class, I will be able to put this into it for it to work with every item.
![]() |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
That's good although i don't recommend it. You will have to make a check for a lot of items. Like
is BasePotion is BaseFood As i said, OSI PBD's are bugged. I have them implemented on my shard differently anyway. Currently you can throw your PBD away and it's lost forever. On a freeshard this might not be a big problem since it can be replaced. Losing it on OSI, however is quite bad since you won't get it back ever. Someone used the Insurance exploit on me on europa and looted a very good 1/3 bracelet with a lot of sdi and lmc. This brace was personally blessed. He even wanted to give the deed back but only the owner can remove it. Since he didn't want to give me the brace back (understandable) he called a GM to remove the blessing and give me the deed back. As it gies, however, the GM deleted the deed and left. To avoid this i used an old idea posted on stratics suggestions board that basically adds a context menu to your character and allows you to bless/unbless/retrieve your item. Works way better :-)
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
#5 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
Yeah definately does work better. It would be great if this could be put into distro and attached to the Item class, then using configure (for like insurance) it could be disabled.
The way it works on OSI is fine if there are no exploits to take the blessed item from the person who owns it. The GMs are also not part of OSI emulation, you cannot consider that when you are coding it, although dumbass asshole GMs are a part of shards so I guess you can think of it either way. |
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
Unfortunately these exploits still exist.
The OSI way is still crap: 1) Buy or mix a potion 2) Personal-Bless the potion 3) Drink it Whoops, deed gone. I tried that yesterday after server-save.
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
#7 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
Well obviously if this was made into the distro, the delete method would return the deed before it finishes the deletion proccess. Other than that, you can't do much. However with a baseitem class, you can do the same as what the devs would with the distro and that is, change the baseitem's (and basecontainer i might add) delete method to return the deed.
|
|
|
|
|
|
#8 (permalink) | |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
Quote:
I'm currently messing with interfaces and might re-release a more-close-to-osi version once i figured out how this stuff works.
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
|
#9 (permalink) |
|
Join Date: Oct 2003
Location: Wyoming
Age: 27
Posts: 62
|
Great script you have here...in fact it's one of the few scripts I've gotten here that I didn't need to edit any code on to make it work right. I've been waiting for this script for a while. Thanks for posting it.
-Davil the Dark AEther Storm Shard |
|
|
|
|
|
#13 (permalink) | |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
Quote:
Maybe I will post a re-written version of this, once I figure out how to do it with interfaces. Until then, this version will work with the current RunUO release.
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
|
#15 (permalink) | |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
Quote:
Let me fix this, just a minute, I'll repost it.
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
|
#18 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
Sorry I didn't post about this. What you would have to do is tack on an override to the delete method for basecontainer (if you want to allow containers to be personally blessed), in order to return the deed. I don't know, doesn't matter, good job on the bless deed.
|
|
|
|
|
|
#20 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
In order to prevent exploiting, I only allow blessing of Clothes, Armor and Weapons and all items derived from these classes (i.e. shields)
There is an extra check to disallow stackable items. What would happen? Well, technically you would have two blessed items if you split the stack. That's the exploit. PBD's can't be used on stackable items on OSI, by the way. But as mentioned before, you can bless food/potions on OSI. Containers can't also be blessed with this script (Or on OSI for that matter).
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
#21 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
Okay so nevermind what i said about basecontainer. As for making this fairly easy to use, and work with the item class, the easiest way is to use the baseitem class with an interface.
Another way you can do it, is to make an arraylist. While the bless deed is on an item, it is in the internal map. While there, whenever you want to find out if it should be blessed, you can check it by looping through the arraylist, then checking if one of them is linked to the item that is blessed, and then if the property of that bless deed also matches the person who owns the blessed item. To elaborate on the other method i said in pm. You can use the bless deed, put it into the internal map, then hook it via events and a delegate, to the OnDelete method (to return the deed to its owner), and hook it to the OnAdded method (or whatever other methods would take care of it being deleted or moved for its blessed effect). |
|
|
|
|
|
#22 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
See PM. Ad first method, we don't have a BaseItem class. Really the only problem is getting an interface to ADD a function to a existing class without editing the class itself! Kind of impossible, I think.
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
#24 (permalink) | ||
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
Quote:
Quote:
__________________
Dracarys retired - consider me dead to these boards |
||
|
|
|
|
|
#25 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
Nothing you can do other than that
. The interface will allow you to reference all of the blessable items without excessive if statements, and thats the best I can think of without interpolating, and reflecting the item class.Krrios did say, one day a long time ago. I wonder how long until someone figures out how to reflect the core. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|