Ahkay, irritated by the lack of functionality in the game's Dungeon respawning, I wrote my own code for dying and reappearing. Very simple, actually, but I like it ^_^
First step: This following block goes under the Commands sub, preferably before the Select Case portion, at least that's where I have it:
'*********************************************************************************************
'OnDeath - daMoose's Commands v.01 7/31/2006
'*********************************************************************************************
' These Subs allow you to define regions and outputs to OnDeath.ini When a player dies, OnDeath
' is consulted for the player's current map, then warped to the appropriate restart point.
If LCase(Mid(TextSay, 1, 10)) = "/setregion" Then
If GetPlayerAccess(index) < 3 Then
Call PlayerMsg(index,"You do not have the authority to use this command.",2)
Exit Sub
End If
If Len(TextSay) > 11 Then
TextSay = Mid(TextSay, 11, Len(TextSay) - 10)
Call PutVar("Scripts/OnDeath.ini", "Maps",GetPlayerMap(index), Trim(TextSay))
Call PlayerMsg(index,"You have set Map " & GetPlayerMap(index) & " to region " & Trim(TextSay) & ".",2)
Exit Sub
End If
Call PlayerMsg(index,"Please specify a region...",2)
Exit Sub
End If
If LCase(Mid(TextSay,1,11)) = "/setrestart" then
If GetPlayerAccess(index) < 3 Then
Call PlayerMsg(index,"You do not have the authority to use this command.",2)
Exit Sub
End If
If Len(TextSay) > 12 Then
TextSay = Trim(Mid(TextSay, 12, Len(TextSay) - 11))
Call PutVar("Scripts/OnDeath.ini",Trim(TextSay),"StartX", GetPlayerX(index))
Call PutVar("Scripts/OnDeath.ini",Trim(TextSay),"StartY", GetPlayery(index))
Call PutVar("Scripts/OnDeath.ini",Trim(TextSay),"StartMap", GetPlayerMap(index))
Call PlayerMsg(index,"You have marked this map as a restart point!",2)
Exit Sub
End If
Call PlayerMsg(index,"Please specify a region...",2)
Exit Sub
End If
'*********************************************************************************************
'End daMoose's Subs
'*********************************************************************************************
This gives us the commands "/setrestart" and "/setregion".
How to use these commands:
/setrestart <Region Name> = This designates the map and your coordnates when you use it as the restart point for the specified region. Typically, you want to set a "region" or a restart point for each dungeon or area. This allows the players to warp back to the entrance.
/setregion <Region Name> = This sets the map where you are when you use this command to a particular region name, such as "Capitol", "Cave", etc. When a player dies on the map, they are warped to that region's designated restart point, defined by the above command.
Both of these commands output to the file OnDeath.ini, which will appear in your scripts folder when you use this.
This does include rudementary "hack-proofing" by checking the player's access level. I currently have it set to 3, as I don't neccesarily want my mappers defining the whole world, but thats just me. You can set it down to 2 if you prefer or up to 4 for absolute Admin-only access.
Now, for the OnDeath sub itself:
'*********************************************************************************************
'daMoose's OnDeath Script v.01 7/31/2006
'*********************************************************************************************
Dim ToRegion
Dim ToX
Dim ToY
Dim ToMap
ToRegion = GetVar("Scripts/OnDeath.ini", "Maps", GetPlayerMap(index))
ToX = Int(GetVar("Scripts/OnDeath.ini", Trim(ToRegion),"StartX"))
ToY = Int(GetVar("Scripts/OnDeath.ini", Trim(ToRegion),"StartY"))
ToMap = Int(GetVar("Scripts/OnDeath.ini", Trim(ToRegion),"StartMap"))
Call PlayerWarp(index, ToMap ToX, ToY)
'*********************************************************************************************
'End OnDeath Script
'*********************************************************************************************
Simply plug that into your OnDeath sub and it's ready to rock & roll!
I would appreciate leaving the header tags in place, I don't post my scripts often so I'd appreciate keeping the couple tag notes in place, thanks!
Hopefully, some other folks find this as useful as it was for me.