DK77 Posted June 17, 2023 Posted June 17, 2023 How make custom commands script or bindcommand cannot use in certain mapflag like inside gvg castle or war castle . For example is like . Quote - script at_mall -1,{ OnMallWarp: warp "prontera",152,252; end; OnInit: bindatcmd "Mall", strnpcinfo(0)+"::OnMallWarp"; } ill try to add getmapflag like this Quote OnMallWarp: if(getmapflag(gvg_castle)){ mes "You cannot use this command inside a War of Emperium castle."; close; } warp "prontera",152,252; , but im having error on getmapflag Quote
0 Winterfox Posted June 17, 2023 Posted June 17, 2023 Hello, you should read the documentation more carefully, getmapflag takes at least two arguments. *getmapflag("<map name>",<flag>{,<type>}) So you need to input the map the user is on as the first argument. Based on your example, a working solution would be this: - script at_mall -1,{ OnMallWarp: if(getmapflag(strcharinfo(3), gvg_castle)){ dispbottom "You cannot use this command inside a War of Emperium castle.", 0xFF0000; end; } warp "prontera",152,252; end; OnInit: bindatcmd "Mall", strnpcinfo(0)+"::OnMallWarp"; } Quote
Question
DK77
How make custom commands script or bindcommand cannot use in certain mapflag like inside gvg castle or war castle . For example is like .
ill try to add getmapflag like this
, but im having error on getmapflag
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.