Psy Ops Posted August 28, 2018 Posted August 28, 2018 Hi all! is there any way that i can allow only certain guilds inside the WoE Castle? Quote
0 LearningRO Posted August 28, 2018 Posted August 28, 2018 - script sample -1,{ OnInit: setarray .guild_id, 89,202; // allowed guild ID .guild_id_size = getarraysize(.guild_id); setarray .map$, "prtg_cas03"; // restricted map .map_size = getarraysize(.map$); for ( .@i = 0; .@i < .map_size; .@i++ ) setmapflag .map$[.@i], mf_loadevent; end; OnPCLoadMapEvent: // GMs should bypass this kind of things if ( getgmlevel() >= 99 ) end; .@map$ = strcharinfo(3); for ( .@i = 0; .@i < .map_size; .@i++ ) { if ( .@map$ == .map$[.@i] ) { // is on the map for ( .@j = 0; .@j < .guild_id_size; .@j++ ) { if ( getcharid(2) == .guild_id[.@j] ) end; // if the condition met, the player isn't warp away } warp "Save", 0,0; end; } } end; } Use this i hope its what do u want and work Quote
0 Psy Ops Posted August 28, 2018 Author Posted August 28, 2018 Hi! is there anyone who can help me with the script? - script arugm -1,{ OnPCLoadMapEvent: getmapxy .@map$,.@x,.@y,0; if (.@map$ == "aru_gld" && getcharid(2)!=263) { dispbottom "You cannot enter this map."; warp "SavePoint",0,0; } end; } aru_gld mapflag loadevent My Goals it just to put specific guilds to be able to warp to the castles areas. Please help! Quote
0 Ninja Posted August 28, 2018 Posted August 28, 2018 I don't see anything wrong wit your script, do you have errors of some sort? I suggest you use strcharinfo instead of getcharid. https://github.com/rathena/rathena/blob/da83e6173857076d793820c40ce0cae67973d4a6/doc/script_commands.txt#L2325-L2336 Quote
0 Emistry Posted August 28, 2018 Posted August 28, 2018 if (.@map$ == "aru_gld" && getcharid(2)!=263) { your condition statement only allow guild_id 263 to enter the map. if you intend to disable the access for only 1 guild, then it should be like this if (.@map$ == "aru_gld" && getcharid(2) == 263) { this will prevent player with guild_id 263 to enter the said map. Quote
Question
Psy Ops
Hi all! is there any way that i can allow only certain guilds inside the WoE Castle?
4 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.