Jump to content
  • 0

restricted area


Budots

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  200
  • Reputation:   1
  • Joined:  09/25/13
  • Last Seen:  

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 Patskie
Topic merged ( http://rathena.org/board/topic/90077-restricted-area/#entry234078 )
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

use areamonster , define the rectangle area that your monster may spawn at.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

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;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  200
  • Reputation:   1
  • Joined:  09/25/13
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  200
  • Reputation:   1
  • Joined:  09/25/13
  • Last Seen:  

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?

post-20873-0-71755400-1385630488_thumb.png

farm_zone.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

put a coordinates where u want this monsters spawn

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  200
  • Reputation:   1
  • Joined:  09/25/13
  • Last Seen:  

Can i just make it spawn randomly but in that portion of the map they will not respawn?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  151
  • Reputation:   5
  • Joined:  11/09/12
  • Last Seen:  

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..

Link to comment
Share on other sites

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...