Jump to content
  • 0

Need Edit Support For GM restriction script


Question

Posted (edited)

I need that player can enter too..because this script is (// GM Level X and below will be Restricted) anyone can edit or modify this? to enable players to enter to.. Only restricted GM is lvl 2 to 80 if its possible thanks

- script Sample -1,{
OnInit:
// GM Level X and below will be Restricted
set .GMLevel,99;
// Map Names
setarray .MapList$[0],"e_tower","1@tower","2@tower","3@tower","4@tower","5@tower","6@tower","tha_t01","tha_t02","tha_t03","tha_t04","tha_t05","tha_t06","tha_t07","tha_t08","tha_t09","tha_t10","tha_t11","tha_t12","thana_boss","payg_cas04","aldeg_cas02","prtg_cas01","prtg_cas03","arug_cas05","kh_dun02","1@nyd","2@nyd";
for( set .i,0; .i < getarraysize( .MapList$ ); set .i,.i + 1 )
setmapflag .MapList$[.i],mf_loadevent;
end;
OnPCLoginEvent:
OnPCLoadMapEvent:
for( set .@i,0; .@i < getarraysize( .MapList$ ); set .@i,.@i + 1 )
if( strcharinfo(3) == .MapList$[.@i] && getgmlevel() <= .GMLevel ){
 mes "You are not allow to stay at here.";
 close2;
 warp "SavePoint",156,191;
 break;
}
end;
}

Edited by dize11

10 answers to this question

Recommended Posts

Posted (edited)

Search:

if( strcharinfo(3) == .MapList$[.@i] && getgmlevel() <= .GMLevel 

Replace with:

if( strcharinfo(3) == .MapList$[.@i] && getgmlevel() <= 80 && getgmlevel() >= 2 ){

Edited by Joseph
Posted (edited)

Try this:

- script Sample -1,{

OnInit:

// GM Level X and below will be Restricted

set .GMLevel,99;

// Map Names

setarray .MapList$[0],"e_tower","1@tower","2@tower","3@tower","4@tower","5@tower","6@tower","tha_t01","tha_t02","tha_t03","tha_t04","tha_t05","tha_t06","tha_t07","tha_t08","tha_t09","tha_t10","tha_t11","tha_t12","thana_boss","payg_cas04","aldeg_cas02","prtg_cas01","prtg_cas03","arug_cas05","kh_dun02","1@nyd","2@nyd";

for( set .i,0; .i < getarraysize( .MapList$ ); set .i,.i + 1 )

setmapflag .MapList$[.i],mf_loadevent;

end;

OnPCLoginEvent:

OnPCLoadMapEvent:

for( set .@i,0; .@i < getarraysize( .MapList$ ); set .@i,.@i + 1 ){

if( strcharinfo(3) == .MapList$[.@i] && getgmlevel() <= 80 && getgmlevel() >= 2 ){

mes "You are not allow to stay at here.";

close2;

warp "SavePoint",156,191;

break;

}

}

end;

Edited by JayPee
Posted (edited)

@Jaypee not working i think its because cant use double (getgmlevel() <= 80 && getgmlevel() >= 2) because it goes to the max both and all level by pass this. because ill try only (getgmlevel() >= 2) and works..

it can be (getgmlevel() == 40 && getgmlevel() == 60 && getgmlevel() == 80) or ( getgmlevel(2) > 90) ? I also try but not working too..

Edited by dize11
Posted (edited)

Look at this:

// GM Level X and below will be Restricted
set .GMLevel,99;

just change the value. everything equal and above this can stay.

Edited by tr0n
Posted (edited)

@Emistry that script its like this i think

if( strcharinfo(3) == .MapList$[.@i] && getgmlevel() <= 80 && getgmlevel() >= 2 ){

Not working because

>= .GMLevelX && getgmlevel() <= .GMLevelY 90 and above.. can enter and also 20 and upper can too..

I having this error at mapserver

m: npc_parsesrcfile: Unknown syntax in file 'npc/custom/not_allow_gm_area.txt', line '1'. Stopping...
* w1=- script Sample -1,{
* w2=
* w3=
* w4=

Edited by dize11
Posted (edited)

-<TAB>script<TAB>Sample<TAB>-1,{

getgmlevel() >= .GMLevelX && getgmlevel() <= .GMLevelY

This means: If GM LVL equal/above .GMLevelX AND equal/under .GMLevelY THEN ...

Edited by tr0n

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