Budots Posted November 28, 2013 Posted November 28, 2013 (edited) Hi guys, I have here my farm zone script, the room is capable only for 5 players.Can you add on the script that it will automatically kick players who is AFK for more than 5 mins. farm_zone.txt Edited November 28, 2013 by Patskie Topic merged ( http://rathena.org/board/topic/90077-restricted-area/#entry234078 ) Quote
Emistry Posted November 29, 2013 Posted November 29, 2013 use areamonster , define the rectangle area that your monster may spawn at. Quote
nanakiwurtz Posted November 28, 2013 Posted November 28, 2013 Untested: // Just change map whatever you want prontera,147,158,5 script Farm Zone 900,{ mes "This is a Farm Zone."; mes "You will be able to hunt Budots Coin inside this Room."; mes "But please be careful, this room is PK Enabled."; next; menu "Are you sure to go? [" + getmapusers("bat_c01.gat") +"/5]", L_Go, "Nevermind", L_nvm; L_Go: next; if (getmapusers("bat_c01") >= 5) { mes "This map is currently full."; close; } attachnpctimer ""+strcharinfo(0)+""; initnpctimer; warp "bat_c01",55,119; end; L_nvm: mes "No problem come back again"; close; end; OnTimerQuit: detachnpctimer; end; OnTimer10000: getmapxy( .@map$, .@x, .@y, 0 ); if ((@map$ == .@map$) && (@x == .@x) && (@y == .@y)) { set @afk, @afk + 1; } else { set @afk, 0; } if (@map$ != "bat_c01") { detachnpctimer; } set @map$, .@map$; set @x, .@x; set @y, .@y; if (@afk >= 30) { dispbottom "You have been kicked from the room because you have been AFK for 5 minutes."; detachnpctimer; warp "SavePoint",0,0; end; } initnpctimer; } // -------------------------------------------------------------- - script Monsters -1,{ OnInit: OnNPCKillEvent: if ( strcharinfo(3) == "bat_c01" ) { if( killedrid == 1369){ getitem 9524,1; } end; } } bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; bat_c01,0,0,52,52 monster Am Mut 1301,20,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,10,40000,20000; bat_c01,0,0,52,52 monster Am Mut 1301,10,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,10,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,10,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; Quote
Budots Posted November 28, 2013 Author Posted November 28, 2013 Untested: // Just change map whatever you want prontera,147,158,5 script Farm Zone 900,{ mes "This is a Farm Zone."; mes "You will be able to hunt Budots Coin inside this Room."; mes "But please be careful, this room is PK Enabled."; next; menu "Are you sure to go? [" + getmapusers("bat_c01.gat") +"/5]", L_Go, "Nevermind", L_nvm; L_Go: next; if (getmapusers("bat_c01") >= 5) { mes "This map is currently full."; close; } attachnpctimer ""+strcharinfo(0)+""; initnpctimer; warp "bat_c01",55,119; end; L_nvm: mes "No problem come back again"; close; end; OnTimerQuit: detachnpctimer; end; OnTimer10000: getmapxy( .@map$, .@x, .@y, 0 ); if ((@map$ == .@map$) && (@x == .@x) && (@y == .@y)) { set @afk, @afk + 1; } else { set @afk, 0; } if (@map$ != "bat_c01") { detachnpctimer; } set @map$, .@map$; set @x, .@x; set @y, .@y; if (@afk >= 30) { dispbottom "You have been kicked from the room because you have been AFK for 5 minutes."; detachnpctimer; warp "SavePoint",0,0; end; } initnpctimer; } // -------------------------------------------------------------- - script Monsters -1,{ OnInit: OnNPCKillEvent: if ( strcharinfo(3) == "bat_c01" ) { if( killedrid == 1369){ getitem 9524,1; } end; } } bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; bat_c01,0,0,52,52 monster Am Mut 1301,20,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,10,40000,20000; bat_c01,0,0,52,52 monster Am Mut 1301,10,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,10,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,10,40000,20000; bat_c01,0,0,52,52 monster Grand Peco 1369,20,40000,20000; Wait lemme try Quote
Budots Posted November 28, 2013 Author Posted November 28, 2013 Hi guys, I have a working FARM ZONE, it works well but there's a portion on the map that mob respawn and players cannot hit them. I want to restrict the mobs from spawning on that area. How? farm_zone.txt Quote
karazu Posted November 28, 2013 Posted November 28, 2013 put a coordinates where u want this monsters spawn Quote
Budots Posted November 28, 2013 Author Posted November 28, 2013 Can i just make it spawn randomly but in that portion of the map they will not respawn? Quote
Dynasty Posted November 28, 2013 Posted November 28, 2013 look what happen with that area... it is actually a map of event that have mapflag, maybe there is a mapflag that restricts that area.. Quote
Question
Budots
Hi guys,
I have here my farm zone script, the room is capable only for 5 players.
Can you add on the script that it will automatically kick players who is AFK for more than 5 mins.
farm_zone.txt
Edited by PatskieTopic merged ( http://rathena.org/board/topic/90077-restricted-area/#entry234078 )
7 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.