Jump to content
  • 0

Disable guilds entering WoE Maps


Question

4 answers to this question

Recommended Posts

  • 0
Posted
-	script	sample	-1,{
OnInit:
	setarray .guild_id, 89,202; // allowed guild ID
	.guild_id_size = getarraysize(.guild_id);
	
	setarray .map$, "prtg_cas03"; // restricted map
	.map_size = getarraysize(.map$);
	
	for ( .@i = 0; .@i < .map_size; .@i++ )
		setmapflag .map$[.@i], mf_loadevent;
	end;
	
OnPCLoadMapEvent:
//	GMs should bypass this kind of things
	if ( getgmlevel() >= 99 ) end;

	.@map$ = strcharinfo(3);
	for ( .@i = 0; .@i < .map_size; .@i++ ) {
		if ( .@map$ == .map$[.@i] ) { // is on the map
			for ( .@j = 0; .@j < .guild_id_size; .@j++ ) {
				if ( getcharid(2) == .guild_id[.@j] )
					end; // if the condition met, the player isn't warp away
			}
			warp "Save", 0,0;
			end;
		}
	}
	end;
}

Use this i hope its what do u want and work

  • 0
Posted

Hi! is there anyone who can help me with the script?

-    script    arugm    -1,{
    OnPCLoadMapEvent:
        getmapxy .@map$,.@x,.@y,0;
        if (.@map$ == "aru_gld" && getcharid(2)!=263) {
            dispbottom "You cannot enter this map.";
            warp "SavePoint",0,0;
        }
        end;
}
aru_gld    mapflag    loadevent


My Goals it just to put specific guilds to be able to warp to the castles areas.

Please help!

  • 0
Posted
 if (.@map$ == "aru_gld" && getcharid(2)!=263) {

your condition statement only allow guild_id 263 to enter the map.

if you intend to disable the access for only 1 guild, then it should be like this

 if (.@map$ == "aru_gld" && getcharid(2) == 263) {

this will prevent player with guild_id 263 to enter the said map.

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