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 how do you make a script that when a player logs out it would check the map if it has no user then it would announce the room is now available for rent. Quote Link to comment Share on other sites More sharing options...
Nameless2you Posted May 31, 2012 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 351 Reputation: 52 Joined: 11/15/11 Last Seen: June 15, 2015 Share Posted May 31, 2012 put this into the script: OnPCLogoutEvent: if(getmapusers(.@map$) <= 0) announce .@map$+" is now empty",0; end; Of course don't forget to define .@map$ Quote Link to comment Share on other sites More sharing options...
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 Author Share Posted May 31, 2012 its not announcing anything when the last player logs out it does not announce anything. 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 Kindly post your script. Quote Link to comment Share on other sites More sharing options...
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 Author Share Posted May 31, 2012 (edited) //=====NPC:=================================== //= 1@pump,46,118,3 script MvP Summoner 868,{ //= //=====Settings:================================= //= set .@npc$, "[MvP Summoner]"; //= //=========================================== mes .@npc$; mes "What would you like to do?"; next; switch(select("Nothing:Summon:Leave here")) { case 1: mes .@npc$; mes "Talk to me, if you want to start the event."; close; case 2: goto L_Check; end; case 3: warp "prontera",155,178; end; } L_Check: If(getmapusers("1@pump") >= 2) goto L_Start; mes .@npc$; mes "You need at least 3 people to use this service."; mes " "; mes "Currently, there are only " + getmapusers("1@pump") + " players."; close; L_Start: hideonnpc "MvP Summoner"; mes .@npc$; mes "Event started."; announce "[MvP Summoner]: The event has been officially started by " + strcharinfo(0) + ".",bc_map,0xFFFF00; close2; goto L_announce; end; L_announce: mapannounce "1@pump","[MvP Summoner]: 5",0,0xFFFF00; sleep2 1000; mapannounce "1@pump","[MvP Summoner]: 4",0,0xFFFF00; sleep2 1000; mapannounce "1@pump","[MvP Summoner]: 3",0,0xFFFF00; sleep2 1000; mapannounce "1@pump","[MvP Summoner]: 2",0,0xFFFF00; sleep2 1000; mapannounce "1@pump","[MvP Summoner]: 1",0,0xFFFF00; sleep2 1000; mapannounce "1@pump","[MvP Summoner]: The monster has been spawned.",0,0xFFFF00; monster 2001; goto L_Enable; end; L_Enable: if(getmapusers("1@pump") == 0) goto L_none; end; L_none: announce " MvP room is now available.",bc_all; end; OnPCLogoutEvent: if(getmapusers("1@pump") == 0) announce "the mvp room is now empty",bc_all; warp "prontera",155,178; end; } ============================ this is the script ============================ i want it that when there's 3 people inside and they cant handle it! whenever all of them char select and no person are left in the room it would say the room is now availabe! Edited May 31, 2012 by caspa Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 1, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted June 1, 2012 isnt this is the same ?? http://rathena.org/board/topic/64612-onpclogoutevent/ Quote Link to comment Share on other sites More sharing options...
Question
caspa
how do you make a script that when a player logs out it would check the map if it has no user then it would announce the room is now available for rent.
Link to comment
Share on other sites
5 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.