Jump to content
  • 0

H> Level Restriction


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

help regarding this script i would like to put some level restriction example only level 15 below can use the command

 

Quote

-    script    at_mall_cmd1    -1,{
OnMallWarp:
    if (getmapflag(strcharinfo(3),mf_pvp) || getmapflag(strcharinfo(3),mf_gvg)) {
        dispbottom "You cannot use this command in the Battle field areas.",0x00ff00;
        end;
    }
    warp "new_1-2",100,100;
    end;
OnInit:
    bindatcmd "train", strnpcinfo(0)+"::OnMallWarp";

thank in advance

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

if ( BaseLevel > 15 ) {
	mes "This happens";
	close;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  461
  • Reputation:   61
  • Joined:  08/28/12
  • Last Seen:  

OnMallWarp:

    if (BaseLevel < 15) {
        mes "Your baselevel is to high.";
        close;
    }             
    if (getmapflag(strcharinfo(3),mf_pvp) || getmapflag(strcharinfo(3),mf_gvg)) {
        dispbottom "You cannot use this command in the Battle field areas.",0x00ff00;
        end;
    }
    warp "new_1-2",100,100;
    end;

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 4/11/2023 at 1:07 AM, WhiteEagle said:

OnMallWarp:

    if (BaseLevel < 15) {
        mes "Your baselevel is to high.";
        close;
    }             
    if (getmapflag(strcharinfo(3),mf_pvp) || getmapflag(strcharinfo(3),mf_gvg)) {
        dispbottom "You cannot use this command in the Battle field areas.",0x00ff00;
        end;
    }
    warp "new_1-2",100,100;
    end;

 

thank you this solved my problem 

 

On 4/11/2023 at 1:04 AM, pajodex said:
if ( BaseLevel > 15 ) {
	mes "This happens";
	close;
}

 

where did i exactly put this line sir

Edited by GM Winter
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  461
  • Reputation:   61
  • Joined:  08/28/12
  • Last Seen:  

Sorry dude, I've add the > in the wrong way.
Change -->
if (BaseLevel < 15)
to
if (Baselevel > 15)


This is right: 

if (BaseLevel > 15) {
        mes "Your baselevel is to high.";
        close;
    }             
    if (getmapflag(strcharinfo(3),mf_pvp) || getmapflag(strcharinfo(3),mf_gvg)) {
        dispbottom "You cannot use this command in the Battle field areas.",0x00ff00;
        end;
    }
    warp "new_1-2",100,100;
    end;

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

12 hours ago, WhiteEagle said:

Sorry dude, I've add the > in the wrong way.
Change -->
if (BaseLevel < 15)
to
if (Baselevel > 15)


This is right: 

if (BaseLevel > 15) {
        mes "Your baselevel is to high.";
        close;
    }             
    if (getmapflag(strcharinfo(3),mf_pvp) || getmapflag(strcharinfo(3),mf_gvg)) {
        dispbottom "You cannot use this command in the Battle field areas.",0x00ff00;
        end;
    }
    warp "new_1-2",100,100;
    end;

 

no worries i already edit it thank you so much buddy

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