emery Posted March 11, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 15 Reputation: 0 Joined: 01/29/12 Last Seen: March 14, 2012 Share Posted March 11, 2012 i want to disable @storage and @die in my pvp room thanks Quote Link to comment Share on other sites More sharing options...
tr0n Posted March 11, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Share Posted March 11, 2012 http://www.rathena.org/wiki/Mapflag Quote Link to comment Share on other sites More sharing options...
Legato Posted March 11, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 87 Reputation: 1 Joined: 11/20/11 Last Seen: September 10, 2013 Share Posted March 11, 2012 if( map_flag_vs(sd->bl.m) ) { clif_displaymessage(fd,"Sorry, you can't use this command on a PvP map."); return -0; } Paste it under your @die and @storage command. Don't forget to recompile, though. Quote Link to comment Share on other sites More sharing options...
tr0n Posted March 11, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Share Posted March 11, 2012 @Legato, after that you can set a @die mapflag or what ? any explanation? Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 11, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 11, 2012 @tr0n.... ...like title mentioned...those command will be disabled at pvp map.. when player use the command... a message of disabling they use the command will be shown to player.. ( just a 4 line code...how come you didnt saw the 2nd line ? ) "Sorry , you cant use this command at pvp map." @legato/.... there is a little typo mistake at your code.. return -0; -------> should be -1; anyway..if legato didnt work..maybe you can try this.. if( map[sd->bl.m].flag.pvp ){ clif_displaymessage(fd, "This Command is Disabled in PVP Map."); return -1; } Quote Link to comment Share on other sites More sharing options...
tr0n Posted March 11, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Share Posted March 11, 2012 I didn't understand this: if( map_flag_vs(sd->bl.m) ) { but yours I understand: if( map[sd->bl.m].flag.pvp ){ I'm not that dumb <.< Is mapflag VS same as PVP ? Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 11, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 11, 2012 erm..ya...actually i feel the same as you... and i didnt found any example for map_flag_vs inside the src part.. >.< that's why i write 1 using the current exist mapflag checking code.. anyway..hope it work... Quote Link to comment Share on other sites More sharing options...
Legato Posted March 11, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 87 Reputation: 1 Joined: 11/20/11 Last Seen: September 10, 2013 Share Posted March 11, 2012 I wrote it that way, Emistry. Thanks for pointing it out, though. You can put either -0 or -1. Return -1 will show the @storage / @die failed message when a player tries to use any of these 2 commands inside a PvP map. While return -0 won't show any failed message. @Tr0n, you don't have to set any mapflag. With that piece of code, no one will be able to use the commands inside a pvp map(including WoE maps, and when you use @pvpon). And Emistry's code would only work on the maps that has a mapflag pvp enabled. Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 11, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 11, 2012 owh..thx for the explaination legato xD it though it was wrong..coz i didnt found any sample with -0 and that map_flag_vs also haha and thx you teach me a great lesson on src Quote Link to comment Share on other sites More sharing options...
xRyusuke Posted November 5, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 07/24/12 Last Seen: January 19, 2013 Share Posted November 5, 2012 I am sorry, but i cant follow, which file should I edit and add in that code? Quote Link to comment Share on other sites More sharing options...
Question
emery
i want to disable @storage and @die in my pvp room thanks
Link to comment
Share on other sites
9 answers 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.