Brynner Posted April 14, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 14 hours ago Share Posted April 14, 2013 is it possible to disable all gm accounts to enter gvg maps? Quote Link to comment Share on other sites More sharing options...
Akinari Posted April 14, 2013 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 247 Reputation: 207 Joined: 10/23/12 Last Seen: March 2, 2022 Share Posted April 14, 2013 I know this is script support, but I thought I'd put in a different fix for this issue. It's a source fix. pc.c in int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype) FIND m = map_mapindex2mapid(mapindex); ADD AFTER if (map[m].flag.gvg && pc_get_group_level(sd) > 0) return 1; Replace "0" with any number where you want the GM level to restrict GVG access. For instance, if group level restricted 5 and above: pc_get_group_level(sd) > 4 Just suggesting another option. Quote Link to comment Share on other sites More sharing options...
Emistry Posted April 14, 2013 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 April 14, 2013 OnPCLoadMapEvent: if( getgmlevel() ) warp "SavePoint"; end; mapname mapflag loadevent Quote Link to comment Share on other sites More sharing options...
jaBote Posted April 14, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 182 Reputation: 36 Joined: 01/26/12 Last Seen: October 6, 2021 Share Posted April 14, 2013 OnPCLoadMapEvent: if( getgmlevel() ) warp "SavePoint"; end; mapname mapflag loadevent I think you should add a map name check, because if the loadevent mapflag is set on another map it'll warp the GM anyways. Quote Link to comment Share on other sites More sharing options...
Brynner Posted April 14, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 14 hours ago Author Share Posted April 14, 2013 just like this? OnPCLoadMapEvent: if( getgmlevel() ) warp "SavePoint"; end; // Guild Castles ========== aldeg_cas01 mapflag gvg_castle aldeg_cas02 mapflag gvg_castle aldeg_cas03 mapflag gvg_castle aldeg_cas04 mapflag gvg_castle aldeg_cas05 mapflag gvg_castle gefg_cas01 mapflag gvg_castle gefg_cas02 mapflag gvg_castle gefg_cas03 mapflag gvg_castle gefg_cas04 mapflag gvg_castle gefg_cas05 mapflag gvg_castle payg_cas01 mapflag gvg_castle payg_cas02 mapflag gvg_castle payg_cas03 mapflag gvg_castle payg_cas04 mapflag gvg_castle payg_cas05 mapflag gvg_castle prtg_cas01 mapflag gvg_castle prtg_cas02 mapflag gvg_castle prtg_cas03 mapflag gvg_castle prtg_cas04 mapflag gvg_castle prtg_cas05 mapflag gvg_castle schg_cas01 mapflag gvg_castle schg_cas02 mapflag gvg_castle schg_cas03 mapflag gvg_castle schg_cas04 mapflag gvg_castle schg_cas05 mapflag gvg_castle arug_cas01 mapflag gvg_castle arug_cas02 mapflag gvg_castle arug_cas03 mapflag gvg_castle arug_cas04 mapflag gvg_castle arug_cas05 mapflag gvg_castle // Novice Guild Castles === //n_castle mapflag gvg_castle nguild_alde mapflag gvg_castle nguild_gef mapflag gvg_castle nguild_pay mapflag gvg_castle nguild_prt mapflag gvg_castle Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted April 14, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted April 14, 2013 If your players warp via an NPC, why not create a check there before the warp? Quote Link to comment Share on other sites More sharing options...
jaBote Posted April 14, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 182 Reputation: 36 Joined: 01/26/12 Last Seen: October 6, 2021 Share Posted April 14, 2013 Nope, I'll take the lead of Emistry and fix the little problem it had. This should work: instead of a map name check I've used a mapflag check: OnPCLoadMapEvent: getmapxy (.@map$,.@x,.@y,0); if( getgmlevel() && (gemapflag(.@map$,"mf_gvg") || (gemapflag(.@map$,"mf_gvg_noparty") || (gemapflag(.@map$,"mf_gvg_castle") || (gemapflag(.@map$,"mf_gvg_dungeon")) ) warp "SavePoint"; end; mapname mapflag loadevent // Add this mapflag to every map that also has mapflag gvg of any kind AND you want this script to be run Try this one. Quote Link to comment Share on other sites More sharing options...
Brynner Posted April 14, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 14 hours ago Author Share Posted April 14, 2013 Nope, I'll take the lead of Emistry and fix the little problem it had. This should work: instead of a map name check I've used a mapflag check: OnPCLoadMapEvent: getmapxy (.@map$,.@x,.@y,0); if( getgmlevel() && (gemapflag(.@map$,"mf_gvg") || (gemapflag(.@map$,"mf_gvg_noparty") || (gemapflag(.@map$,"mf_gvg_castle") || (gemapflag(.@map$,"mf_gvg_dungeon")) ) warp "SavePoint"; end; mapname mapflag loadevent // Add this mapflag to every map that also has mapflag gvg of any kind AND you want this script to be run Try this one. where should i add this? Quote Link to comment Share on other sites More sharing options...
jaBote Posted April 14, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 182 Reputation: 36 Joined: 01/26/12 Last Seen: October 6, 2021 Share Posted April 14, 2013 (edited) You can add it to an already existing NPC (any NPC script) or if you want you can make a new one with this code and then load it: - script GMdontwarptoGvG -1,{ OnPCLoadMapEvent: getmapxy (.@map$,.@x,.@y,0); if( getgmlevel() && (gemapflag(.@map$,"mf_gvg")) || (gemapflag(.@map$,"mf_gvg_noparty")) || (gemapflag(.@map$,"mf_gvg_castle")) || (gemapflag(.@map$,"mf_gvg_dungeon")) ) warp "SavePoint"; end; } mapname mapflag loadevent // Add this mapflag to every map that also has mapflag gvg of any kind AND you want this script to be run mapname2 mapflag loadevent mapname3 mapflag loadevent mapname4 mapflag loadevent mapname5 mapflag loadevent mapname6 mapflag loadevent mapname7 mapflag loadevent I personally would use a separate NPC. P.S.: Careful, the script I made on the other post has unbalanced brackets and that's an error, that piece of code won't run. Edited April 14, 2013 by jaBote Quote Link to comment Share on other sites More sharing options...
Brynner Posted April 14, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 14 hours ago Author Share Posted April 14, 2013 I know this is script support, but I thought I'd put in a different fix for this issue. It's a source fix. pc.c in int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype) FIND m = map_mapindex2mapid(mapindex); ADD AFTER if (map[m].flag.gvg && pc_get_group_level(sd) > 0) return 1; Replace "0" with any number where you want the GM level to restrict GVG access. For instance, if group level restricted 5 and above: pc_get_group_level(sd) > 4 Just suggesting another option. thanks for this. i didn't know that this could be fix by source. thank you to all of you. Quote Link to comment Share on other sites More sharing options...
Question
Brynner
is it possible to disable all gm accounts to enter gvg maps?
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.