|
||
|
|
#1 (permalink) |
|
Forum Novice
|
My first submission, this is just a simple script that allows you to add "bind stones" to your world, which players may return to upon dying (kinda like Asheron's Call, or FFXI).
Use is simply "[add bindstone" Players may set their bind point by double clicking on a bind stone and selecting "ok." Upon death, a player will be presented with a gump that asks if they'd like to return to their bind point; if they say yes, they're warped back to that particular location and resurrected (you may remove the resurrect option by commenting out the "from.Resurrect();" code on line 64 of BindReturnGump.cs). Otherwise, they remain where they are and must find another way to get ressed. Just unzip the files in the "BindPoint" folder to your custom directory and replace your current PlayerMobile.cs with the one provided. If you've already altered your PlayerMobile.cs file for another system, please follow the instructions listed in the Readme file to see what changes you'll need to make to it. And that's it! I hope you all enjoy it - I've gained so much knowledge from this community in both UO scripting and coding in general that I just wanted to contribute something back, even if it is just a simple little system like this. God bless, -Hal ************ Update History ************ September 5, 2004 7:26 RDT: Finally got around to updating the gumps. Now newer and more attractive. July 28, 2004 3:37 AM EST: Updated with better descriptions for serialization/deserialization method alterations. July 21, 2004 11:05 PM EST: -Fixed a HORRIBLE serialization error I left in the PlayerMobile included in the script. This only matters for people who replaced their old PlayerMobile with the one included in the package. Do-it-yourselvers have nothing to worry about. July 21, 2004 12:13 AM EST: -Fixed misplaced serialization of variables in the included PlayerMobile.cs file, which caused faulty deserializations on boot. Sorry about that one, guys, I wasn't looking where I typed. July 20, 2004 4:25 am EST: -Replaced BindMap with more appropriate variable, and likewise trimmed out useless code as a result. All previous users might want to download the newest version of the script, as these are the FINAL changes to the PlayerMobile variables; any future updates will only affect the gumps. July 19, 2004 3:48 PM EST: -Removed BindX, BindY, and BindZ variables, replacing them with Point3D BindPoint, as suggested by ASayre8 (thanks!). -Included a modified version of the default PlayerMobile for people who have not already altered their PlayerMobile.cs file. July 19, 2004 6:01 AM EST: -Rearranged code a bit; now, players who do not have a bind point set will not get the return gump when killed. July 19, 2004 4:37 AM EST: -Added support for cross-facet death transportation; As my server is restricted to one facet, I didn't think to make it check the map when placing the player. This led to players being set in blackness if they died in Ilsh/Malas/Trammel and tried to go back to their Felucca bindstone. ************ |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Mar 2003
Location: where I belong
Posts: 1,784
|
Very nice script. Great idea, and thank you for the contribution. It will definitely be handy.
__________________
"Misfortune shows those who are not really friends." -Aristotle "A multitude of words is no proof of a prudent mind." -Thales |
|
|
|
|
|
#3 (permalink) |
|
Forum Novice
|
Thanks a lot Khaz
![]() I just updated to provide support for servers with multiple facets; as my shard only has one, I didn't have to worry about it, but it just dawned on me that not every server is like mine, so I upgraded support for it. Kinda sloppy, but it works! Oh, and Wraith, nice work on the Dereth map, I like that you included the Dark Majesty expansion island too (which was the last time I played). What kind've scale are you going to run the map at? Around that of the real AC? -Hal |
|
|
|
|
|
#4 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
|
#5 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#6 (permalink) |
|
RunUO Developer/Demise Person
Join Date: Mar 2003
Location: California
Age: 20
Posts: 1,700
|
Good, script, also reminds me a bit of Everquest. Anyways, Instead of serializing the x, y, & z, You can Serialize things of type Point3D.
To create 'em, you have Point3D SomeVariable = new Point3D( x, y, z); (replace it with the correct locations of course) There are also serialization & deserialization methods for 'em
__________________
Andre Sayre, Core Developer The RunUO Software Team The day we are born is the day Death inches ever closer... E-mail: ASayre ( AT ) RunUO ( Dot ) c o m I'm as graceful as a gazelle galloping over glistening green grass with it's head on fire. |
|
|
|
|
|
#8 (permalink) | |
|
Forum Novice
|
Quote:
That's EXACTLY what I was wanting to do originally, but I wasn't sure on the serialization/deserialization methods for Point3D. You got me thinking about it though, and so I've went back and fixed it. Thanks a lot! Wraith: I'll look into adding an "unbind" option to the Bind Stone, I just didn't think anyone would ever really want to unbind, since if they didn't want to return they could just click cancel or right-click out. I'll look into adding one as soon as I get the chance though; I'll just rebuild the gump system entirely. As for the "res on arrival" thing, it's very easy to do actually; you just need to add: from.Resurrect(); after the "from.PlaySound( 0x202 );" line (or anywhere in that final "else" clause) in BindReturnGump.cs. Then the player will auto-res when they arrive at the stone; I was just getting around this by placing them near healers, but that's actually a pretty good idea, I might make it default. Thanks for the great feedback guys! -Hal |
|
|
|
|
|
|
#9 (permalink) |
|
Forum Novice
|
Thanks a lot man
I updated the download version to include that resurrect option, as well as the Point3D change mentioned by ASayre; you might wanna get the new version and make the changes listed (very small) just to have the most efficient version.-Hal |
|
|
|
|
|
#10 (permalink) |
|
Join Date: Jun 2004
Age: 29
Posts: 10
|
Ive put everything where I think its suppose to go. I say this because this is the first time I edit the playermobile.cs script. I keep getting a serialize error message. I dont know if I'm placing the lines in the correct place or not. Here is the error that is thrown.
System.Exception: Load Failed <items=False, mobiles=True, guilds=False, regions=False, type=Server.Mobiles.PlayerMobile, serial=0x000041B4> -------> System.Exception: ***** Bad serialize on Server.Mobiles.PlayerMobile ***** at Server.World.Load<> --- End of inner exception stack trace --- at Server.World.Load<> at Server.ScripCompiler.Compile<Boolean debug> at Server.Core.Main<String[] args> This exception is fatal, press return to exit Im just starting to learn c# and have yet to catch on to serialize and deserialize. Any help greatly appreciated. |
|
|
|
|
|
#11 (permalink) |
|
Forum Novice
|
Yes, it works with RC0, as I only work on supporting the most current distro.
If this is the first time you've edited the PlayerMobile script, just replace your old one with the one I have provided in the most recent version of the System. Make sure you back up your old one somewhere just incase. If you do want to try editing it yourself, just open up the version I have included in the download to see where the changes are placed. Ctrl+F and seach for "Bind Point System Start" to find each specific location (there are four total), and then add the block to your own PlayerMobile. -Hal |
|
|
|
|
|
#12 (permalink) |
|
Forum Novice
|
Glad to hear it's working for you now buddy, but I have some good news and some bad news for you:
The bad news is that I've updated the script once more, with changes to the PlayerMobile, which means your characters will have to be wiped to update to this version. =/ The GOOD news is that the changes to PlayerMobile are now FINALIZED, and much more efficient. Any future updates will only alter the gump scripts, and as such, you'll never have to delete Players as a result of upgrading a version of this script again. Sorry that it took me two days to get it optimized =/ -Hal |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|