Jump to content
  • 0

OnDeath = Jail


Mystogan

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   1
  • Joined:  05/05/12
  • Last Seen:  

Hello im trying to get this script to work but i am having a bit of problems

 

what i want it to do is once a player dies and does not have a certin item they will be placed in jail and will not be allowed to leave

 

here is my script

-    script    death    -1,{
    
OnPCDieEvent:
 if  (countitem(512) == 0){
         charcommand  "@jail  "+strcharinfo(0)+"";
        end;
        }
        else if  (countitem(512) < 10) {  // 512 is the item ID for Apple, found in item_db
        dispbottom  "You are runing low on Life Crystals";
 end;
        
    }


}

the script will actually say it player has ben jailed but when i click revive im out of the prison

 

 

just tried adding a warp before the jail but now i get sent to jail and it says im in jail but i can still just logout and it will respawn me back to normal maps

-    script    death    -1,{
    
OnPCDieEvent:
 if  (countitem(512) == 0){
         warp "sec_pri",49,75;
         charcommand  "@jail  "+strcharinfo(0)+"";
        end;
        }
        else if  (countitem(512) < 10) {  // 512 is the item ID for Apple, found in item_db
        dispbottom  "You are runing low on Life Crystals";
 end;
        
    }


}

*edit got it to work ^-^*

Edited by Mystogan
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...