Jump to content
  • 0

noguild no enter script


xmaniacx

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   1
  • Joined:  04/03/12
  • Last Seen:  

how do i make a script whereas if your not in a guild your not allowed to enter and only the guild master can enter in the room

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

try this...

set .@gid,getcharid(2);
if( .@gid == 0 ){
mes "Only members of a guild are allowed here!";
Close;
}else if(getguildmaster(.@gid)!=strcharinfo(0))
mes "Only the guild master can enter in!";
Close;
}

edit: thx to Emistry code mention getguildmaster return name of ppl

Edited by QQfoolsorellina
Link to comment
Share on other sites


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

try this

if( strcharinfo(0) != getguildmaster(getcharid(2) || !getcharid(2) ){
   mes "Only guild master can go in.";
   close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I'm not sure if this will help you, but I wrote it for you anyways. It will prevent anybody not in a guild from entering the map, even if a GM warped/recalled them there.

- script GuildProtection -1,{
OnInit:
end;
OnPCLoadMapEvent:
if(getgmlevel()<20&&getcharid(2)==0&&strcharinfo(3)=="PUTCASTLEMAPHERE") { announce "You must be in a guild to be on this map!",bc_self; warp "SavePoint",0,0; end; }
end;
}
PUTCASTLEMAPHERE<TAB>mapflag<TAB>gvg_castle

Peopleperson49

Edited by peopleperson49
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...