The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Death Menu
Author Message
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #1
Death Menu
Just updated an old old script.

Death Menu v2.2
Pop up menu when a player dies gives them the option to:

Go to the nearest Town & Resurrect
Go to the nearest Shrine & Resurrect
Resurrect in place (once per day)
Wait for player assistance

when using the last option the menu will pop up again after 60 seconds if the player has not been resurrected.

[Image: 2nis46r.jpg]
09-10-2012 06:17 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #2
RE: Death Menu
I love it !

Erm... where is the @death you talking about in your script ? ^^'
(This post was last modified: 12-14-2012 05:58 AM by Onirim.)
12-14-2012 05:36 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #3
RE: Death Menu
Damn... i've put the script in the server, and add the lines on \scripts\add-on\sphere_events_players.scp after the @death and @login lines... but norhing appends :/
12-14-2012 07:04 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: Death Menu
If you have an event that is on all players defined in sphere.ini

Code:
//Events related to all players
EventsPlayer=e_allplayers    // <--- here

You can add:

Code:
        ON=@Death
            if !(<isgm>)
                TIMERF 3, f_closest //timer allows for death screen change
            endif
        
        ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
            if (<flags>&=statf_dead>) && !(<isgm>)
                f_closest
            endif

To that event, or alternatively create an event:

Code:
[EVENTS e_death_event]
        ON=@Death
            if !(<isgm>)
                TIMERF 3, f_closest //timer allows for death screen change
            endif
        
        ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
            if (<flags>&=statf_dead>) && !(<isgm>)
                f_closest
            endif
[code]

and set your ini to look like this:

[code]
//Events related to all players
EventsPlayer=e_death_event

A third option exists where you all player event line in the ini can look like this:

Code:
//Events related to all players
EventsPlayer=e_random_event, e_another_random_event, e_death_event

[Image: 2nis46r.jpg]
12-14-2012 07:05 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #5
RE: Death Menu
Okay, it's better now, thank you very much Smile
When I tested, I die in Minoc, and the gump say me the nearest town for resurrect is Moonglow. But when I choose it, I resurrect in Minoc. So it's good, I think I can arrange this myself (but maybe the script need a correction ?)
12-15-2012 01:15 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #6
RE: Death Menu
So, in death-menu2.2.scp, on line 47, the coords of Moonglow are in Minoc. it must be:
Code:
dest1_3 4442,1172,0 Moonglow

But I've another problem with the script. When I log with a character, I've an error:

Code:
18:58:ERROR:(sphere_events_players.scp,413)Undefined symbol ''
18:58:ERROR:(sphere_events_players.scp,413)Undefined symbol ''
I've just copied your lines here, juste after the ON=@Death section.
Code:
ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
If (<flags>&=statf_dead>) && !(<isgm>)
   f_closest
Endif

If I'm dead and login, I don't have the menu Confused

Any idea ? ^^
(This post was last modified: 12-15-2012 04:12 AM by Onirim.)
12-15-2012 03:31 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #7
RE: Death Menu
Okay... corrected the line
Code:
ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
If (<<flags>&=statf_dead>) && !(<isgm>)
   f_closest
Endif
Addes a < before the <flags> Smile
Now I've still an error, but the gump appear on login screen.
Maybe another error for Sphere in the line, but I don't find it.
12-15-2012 04:41 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #8
RE: Death Menu
(12-15-2012 04:41 AM)Onirim Wrote:  Okay... corrected the line
Code:
ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
If (<<flags>&=statf_dead>) && !(<isgm>)
   f_closest
Endif
Addes a < before the <flags> Smile
Now I've still an error, but the gump appear on login screen.
Maybe another error for Sphere in the line, but I don't find it.

it should be

Code:
ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
If (<flags>&=statf_dead) && !(<isgm>)
   f_closest
Endif
Never spotted that before, plus I have ammended the Moonglow location, thanks for reporting it. New version is available on the same link as before

[Image: 2nis46r.jpg]
(This post was last modified: 12-15-2012 10:29 AM by Mordaunt.)
12-15-2012 10:28 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #9
RE: Death Menu
Really, in my server this section is okay
Code:
ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
If (<<flags>&=statf_dead>) && !(<isgm>)
   f_closest
Endif

and this section doesn't work at all
Code:
ON=@Login //This section to allow for those killed on logout who HAVE NOT used menu
If (<flags>&=statf_dead) && !(<isgm>)
   f_closest
Endif

I've a Sphere 56b 23/11/2012 build Smile
Maybe a problem between 56b builds ?
12-15-2012 05:33 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #10
RE: Death Menu
Sorry completely my bad should be

Code:
If (<flags>&statf_dead) && !(<isgm>)

[Image: 2nis46r.jpg]
12-16-2012 03:12 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)