powkda Posted January 11, 2022 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 90 Reputation: 1 Joined: 11/11/17 Last Seen: 12 hours ago Share Posted January 11, 2022 How to block enemy guilds from entering the castle already conquered by other guilds outside of war time? Can someone help me? thank you so much Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted January 11, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 15 hours ago Share Posted January 11, 2022 (edited) - script Sample -1,{ OnInit: .map$ = "prtg_cas01"; setmapflag(.map$, MF_LOADEVENT); end; OnPCLoadMapEvent: if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) { .@castle_guild_id = getcastledata(.map$, CD_GUILD_ID); if (.@castle_guild_id && getcharid(2) != .@castle_guild_id) { mes "You aren't allow to enter this area."; close2; warp "SavePoint", 0, 0; } } end; } Edited January 11, 2022 by Emistry 1 Quote Link to comment Share on other sites More sharing options...
0 powkda Posted January 11, 2022 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 90 Reputation: 1 Joined: 11/11/17 Last Seen: 12 hours ago Author Share Posted January 11, 2022 1 hour ago, Emistry said: - script Sample -1,{ OnInit: .map$ = "prtg_cas01"; setmapflag(.map$, MF_LOADEVENT); end; OnPCLoadMapEvent: if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3)) { .@castle_guild_id = getcastledata(.map$, CD_GUILD_ID); if (.@castle_guild_id && getcharid(2) != .@castle_guild_id) { mes "You aren't allow to enter this area."; close2; warp "SavePoint", 0, 0; } } end; } Thank you so much for helping me I got this error here need '(' 639 : 640 : setmapflag(.map$, MF_LOADEVENT); 641 : end; 642 : 643 : OnPCLoadMapEvent: * 644 : if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3')') { 645 : .@castle_guild_id = getcastledata(.map$, CD_GUILD_ID); 646 : if (.@castle_guild_id && getcharid(2) != .@castle_guild_id) { 647 : mes "You aren't allow to enter this area."; 648 : close2; 649 : warp "SavePoint", 0, 0; Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted January 11, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 15 hours ago Share Posted January 11, 2022 if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) { 1 Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted January 13, 2022 Group: Forum Moderator Topic Count: 48 Topics Per Day: 0.01 Content Count: 944 Reputation: 125 Joined: 05/23/12 Last Seen: Friday at 08:21 PM Share Posted January 13, 2022 On 1/11/2022 at 3:40 PM, Emistry said: if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) { @EmistryU missed a ) to close the if statement if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3())) { Rynbef~ 1 Quote Link to comment Share on other sites More sharing options...
0 powkda Posted January 15, 2022 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 90 Reputation: 1 Joined: 11/11/17 Last Seen: 12 hours ago Author Share Posted January 15, 2022 On 1/11/2022 at 10:40 PM, Emistry said: if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) { On 1/14/2022 at 6:08 AM, Rynbef said: @EmistryU missed a ) to close the if statement if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3())) { Rynbef~ There was no more error when loading, but it is not preventing the player of the enemy guild from staying inside the castle outside of war time, when this message enters the log: Can you help me with this error I got? Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted March 5, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 15 hours ago Share Posted March 5, 2022 your rathena is outdated since it probably doesn't have the newer script_constants.hpp that declare the variables and its values. /* castle data flags */ export_constant(CD_NONE); export_constant(CD_GUILD_ID); export_constant(CD_CURRENT_ECONOMY); export_constant(CD_CURRENT_DEFENSE); export_constant(CD_INVESTED_ECONOMY); export_constant(CD_INVESTED_DEFENSE); export_constant(CD_NEXT_TIME); export_constant(CD_PAY_TIME); export_constant(CD_CREATE_TIME); export_constant(CD_ENABLED_KAFRA); for( int i = CD_ENABLED_GUARDIAN00, j = 0; i < CD_MAX; i++, j++ ){ char constant[32]; sprintf( constant, "CD_ENABLED_GUARDIAN%02d", j ); script_set_constant( constant, i, false, false ); } export_constant(CD_MAX); Quote Link to comment Share on other sites More sharing options...
Question
powkda
How to block enemy guilds from entering the castle already conquered by other guilds outside of war time?
Can someone help me? thank you so much
Link to comment
Share on other sites
6 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.