Jump to content
  • 0

Block GM from entering certain map.


Noire

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

Example : Map of job_sword1 and arena_rooom what code can i use to make it?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

-	script	GMBlock	-1,{
OnPCLoadMapEvent:
	if(getgmlevel() == 60 || getgroupid() > 5){
		dispbottom "You can't enter this map.";
		warp "prontera",0,0;
	}
end;
 
OnInit:
setmapflag "job_sword1",mf_loadevent;
setmapflag "arena_room",mf_loadevent;
end;
 
}

Fixed it up for you. Try that now.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

Example : Map of job_sword1 and arena_rooom what code can i use to make it?

 

https://rathena.org/wiki/Getgroupid

 

Example:

if(getgroupid() == 99) {
mes "You cannot enter this map";
close;
}

( Change 99 to what group ID of GM you want to restrict )

 

 

Now if you also want to restrict them from using @warp to that map,

 

conf/groups.conf

 

Do not put / Remove this line on the GM group id:

permissions: {
		any_warp: true
	}
Edited by Scylla
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

- GMBlock -1,{
OnPCLoadMapEvent:
if(getgmlevel() == 99 || getgroupid() > 5){
dispbottom "You can't enter this map.";
warp "prontera",0,0;
end;

OnInit:
setmapflag "map_here",mf_loadevent;
end;
}

Untested and lazily made. Try to check if it works.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

- script GMBlock1 -1,{
OnPCLoadMapEvent:
if(getgmlevel() == 60 || getgroupid() > 5){
dispbottom "You can't enter this map.";
warp "prontera",0,0;
end;
}
 
OnInit:
- script GMBlock2 -1,{
setmapflag "job_sword1",mf_loadevent;
setmapflag "arena_room",mf_loadevent;
end;
 
}

Having an error help! :(

post-18342-0-34562900-1456359979_thumb.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

 

- script GMBlock1 -1,{
OnPCLoadMapEvent:
if(getgmlevel() == 60 || getgroupid() > 5){
dispbottom "You can't enter this map.";
warp "prontera",0,0;
end;
}
 
OnInit:
- script GMBlock2 -1,{
setmapflag "job_sword1",mf_loadevent;
setmapflag "arena_room",mf_loadevent;
end;
 
}

Having an error help! :(

 

 

I think you do not need to add that

- script GMBlock2 -1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

Tried removing it but it warp the attach player consecutively >.<

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

Oh my god, it wont stop warping me back to Prontera, once i enter to those map :( i mean it should warp me back once right? its like im using @go 0 non stop.

Edited by Noire
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

Oh my god, it wont stop warping me back to Prontera, once i enter to those map :( i mean it should warp me back once right? its like im using @go 0 non stop.

 

Try making:

getgroupid() > 5

to:

getgroupid() < 10
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Oh my bad. Insert this code on just under OnPCLoad...

if(strcharinfo(3) != "job_sword1" || strcharinfo(3) != "arena_room"){ end; }

You might have a running OnPCLoadMapEvent active somewhere else and is affecting that script.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

-	script	GMBlock	-1,{
OnPCLoadMapEvent:
	if(getgmlevel() == 60 || getgroupid() > 5){
		dispbottom "You can't enter this map.";
		warp "prontera",0,0;
	}
end;
 
OnInit:
setmapflag "job_sword1",mf_loadevent;
setmapflag "arena_room",mf_loadevent;
end;
 
}

Fixed it up for you. Try that now.

 

Still having an error for this script, once the GM enter the map script should work fine but when it warp back the GM back to prontera it wont stop. its like im using @go command non stop it keeps spawning and spawning.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Insert this code.

if(strcharinfo(3) != "job_sword1" || strcharinfo(3) != "arena_room"){ end; }
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

Yay, script working fine now thank a bunch again Panda :3

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   0
  • Joined:  06/19/18
  • Last Seen:  

Guys can this be changed to specific guilds that can only enter WoE Maps?

 

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