Jump to content
  • 0

Need Edit Support For GM restriction script


dize11

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  93
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

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
Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Search:

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

Replace with:

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

Edited by Joseph
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  93
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

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

This is not working @Joseph any idea why?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  93
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

@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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

^+1

That should work.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  93
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

@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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

-<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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  93
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

Ok i just repaired the wrong script! Thank you guys! also to @Emistry now work fine!

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