Jump to content

Question

Posted

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

5 answers to this question

Recommended Posts

  • 0
Posted

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

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
  • 0
Posted
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

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