Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logout anywere
Author Message
Capes
Journeyman
*

Posts: 57
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2018
Reputation: 0



Post: #1
Logout anywere
This is a simple script to allow players to logout anywhere using kindling and a bedroll. 0.56d

PHP Code:
[ITEMDEF i_bedroll]
DEFNAME=i_bedroll
TYPE
=t_bedroll
VALUE
=136  //maybe change value
WEIGHT=12.5
DUPELIST
=01f25,01f26,01f27
ON
=@DCLICK
    
//store badroll for recovery
    
src.cTag._bedroll = <I.uid>
    
//look for a campfire with in 2 tiles
    
foritems 2
        
IF (<type> == t_campfire)
            
//found a campfire, pass a camping skill check 
            
IF (<src.skillcheck 10,20>)
                
                
//show logout gump
                
src.sdialog d_log_out_gump
                
return
            ELSE
                
SRC.SYSMESSAGE You were unable to secure this camp site.
                return
            ENDIF
        ENDIF
    endfor
    
//if we made it here, there is no campfire in range
    
SRC.SYSMESSAGE To use a bedroll a campfire must be close.
    return

[
DIALOG d_log_out_gump]
0,0
page 0
resizepic 280 240 9270 232 120
dtext 339 266 1152 Camp Site Secured
!
dtext 310 286 1152 You may now logout safely.
button 368 320 247 249 1 0 1
tilepic 290 255 0FAC
tilepic 460 255 0A59

[DIALOG d_log_out_gump BUTTON]
ON=1
    
    
//move bedroll back to inventory
    
UID.<src.cTag._bedroll>.BOUNCE  //maybe change to remove
    //disconnect player after slight delay
    
timerf 1f_leave

[FUNCTION f_leave]
    
TRYSRV serv.uid.<uid>.disconnect
    timerf 1
TRYSRV serv.uid.<uid>.disconnect 


Capes
04-12-2018 01:00 AM
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)

This forum uses Lukasz Tkacz MyBB addons.