Jump to content
  • 0

noguild no enter script


Question

3 answers to this question

Recommended Posts

Posted (edited)

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
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...