caspa Posted May 31, 2012 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Share Posted May 31, 2012 OnPCLogoutEvent: if(getmapusers("1@pump") == 0) hideoffnpc "MvP Summoner"; announce "MvP room is now availabe.",bc_all; }else if(strcharinfo(3) != "1@pump"){ warp "prontera",150,150; end; is there anything wrong with this? coz i want it to : 1. it kills the monster in the map if the last person in the map log out 2. it announce mvp room is now available if the last person in the map log out 3. it hideoffnpc if the last person in the map log out 4. it warps the person to prontera if they log out and log in again. Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted May 31, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted May 31, 2012 You should test it before ask Missing a "{", missing a "}", bad else location, the announce is send every time a player log out, warp players every time the log out to prontera. Should be something like this: OnPCLogOutEvent: if ( strcharinfo(3) == "1@pump" ) { if ( getmapusers("1@pump") == 0 ) // 0 or 1 ? Does the script is execute before decrement the map counter ? { hideoffnpc "MvP Summoner"; announce "MvP room is now availabe.", bc_all; killmonsterall "1@pump"; } warp "prontera", 150, 150; end; } 1 Quote Link to comment Share on other sites More sharing options...
Magnetix Posted May 31, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 446 Reputation: 30 Joined: 12/08/11 Last Seen: October 13, 2024 Share Posted May 31, 2012 (edited) OnPCLogOutEvent: if ( strcharinfo(3) == "1@pump" ) { if ( getmapusers("1@pump") == 0 ) { announce "MvP room is now availabe.", bc_all; killmonsterall "1@pump"; disablenpc "MvP Summoner"; } } // = Mapflag 1@pump mapflag nosave SavePoint I don't know if this will work. I can't find event that triggers when a user leaves a map example warping out of the map. You may want to add a check script for the map every x minutes to get mapusers, in case they leave the map without logging out. Another alternative is to provide an npc to exit the map. Edited May 31, 2012 by Magnetix Quote Link to comment Share on other sites More sharing options...
Question
caspa
is there anything wrong with this?
coz i want it to :
1. it kills the monster in the map if the last person in the map log out
2. it announce mvp room is now available if the last person in the map log out
3. it hideoffnpc if the last person in the map log out
4. it warps the person to prontera if they log out and log in again.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.