DK77 Posted June 17, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 61 Reputation: 0 Joined: 06/30/17 Last Seen: July 19, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Winterfox Posted June 17, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 245 Reputation: 93 Joined: 06/30/18 Last Seen: November 27, 2024 Share 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 Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.