- Mariel Posted May 4, 2013 Posted May 4, 2013 I've search for a script that blocks @item2 and it's made by Euphy and it's totally working. Is there any way to block @guildrecall and @recall when woe or prevent gm from logging in when WoE starts ? Quote
1 Euphy Posted May 4, 2013 Posted May 4, 2013 An easier way: - script #sample -1,{ OnAgitStart: OnAgitStart2: sleep rand(10,50); // In case both are executed simultaneously, don't overlap. if (!.bound) { set .bound,1; bindatcmd("guildrecall",strnpcinfo(0)+"::OnBlock"); bindatcmd("recall",strnpcinfo(0)+"::OnBlock"); } end; OnAgitEnd: OnAgitEnd2: sleep rand(10,50); if (.bound && !agitcheck() && !agitcheck2()) { set .bound,0; unbindatcmd("guildrecall"); unbindatcmd("recall"); } end; OnBlock: message strcharinfo(0),.@atcmd_command$+" is blocked during WoE."; end; } 1 Quote
Jaburak Posted May 4, 2013 Posted May 4, 2013 src/map/atcommand.c For @guildrecall; Search for: memset(atcmd_output, '\0', sizeof(atcmd_output)); Add Below: if(agit_flag) { clif_displaymessage(fd, "You cannot use @guildrecall during WoE."); return -1; } For @recall; Search for: ACMD_FUNC(recall) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); Add Below: if(agit_flag) { clif_displaymessage(fd, "You cannot use @recall during WoE."); return -1; } 1 Quote
Jaburak Posted May 4, 2013 Posted May 4, 2013 An easier way: - script #sample -1,{ OnAgitStart: OnAgitStart2: sleep rand(10,50); // In case both are executed simultaneously, don't overlap. if (!.bound) { set .bound,1; bindatcmd("guildrecall",strnpcinfo(0)+"::OnBlock"); bindatcmd("recall",strnpcinfo(0)+"::OnBlock"); } end; OnAgitEnd: OnAgitEnd2: sleep rand(10,50); if (.bound && !agitcheck() && !agitcheck2()) { set .bound,0; unbindatcmd("guildrecall"); unbindatcmd("recall"); } end; OnBlock: message strcharinfo(0).@atcmd_command$+" is blocked during WoE."; end; } Too pro Euphy! Quote
- Mariel Posted May 4, 2013 Author Posted May 4, 2013 (edited) @Euphy thanks a lot. I just have to add party recall there right ? another thing, do i have to put a number here to block partyrecall too ? sleep rand(10,50,x); Edited May 4, 2013 by - Mariel Quote
Jaburak Posted May 4, 2013 Posted May 4, 2013 For @partyrecall; Find: ACMD_FUNC(partyrecall) { struct map_session_data* pl_sd; struct s_mapiterator* iter; char party_name[NAME_LENGTH]; struct party_data *p; int count; nullpo_retr(-1, sd); memset(party_name, '\0', sizeof(party_name)); memset(atcmd_output, '\0', sizeof(atcmd_output)); Add below: if(agit_flag) { clif_displaymessage(fd, "You cannot use @partyrecall during WoE."); return -1; } 1 Quote
Rage Guy Posted May 4, 2013 Posted May 4, 2013 An easier way: - script #sample -1,{ OnAgitStart: OnAgitStart2: sleep rand(10,50); // In case both are executed simultaneously, don't overlap. if (!.bound) { set .bound,1; bindatcmd("guildrecall",strnpcinfo(0)+"::OnBlock"); bindatcmd("recall",strnpcinfo(0)+"::OnBlock"); } end; OnAgitEnd: OnAgitEnd2: sleep rand(10,50); if (.bound && !agitcheck() && !agitcheck2()) { set .bound,0; unbindatcmd("guildrecall"); unbindatcmd("recall"); } end; OnBlock: message strcharinfo(0).@atcmd_command" is blocked during WoE."; end; } Nice one i 've used it xD Quote
- Mariel Posted May 5, 2013 Author Posted May 5, 2013 Thanks Anakid and Euphy. But somehow, Euphy scripts don't work for me, it said that in the line 23 it needs ' I added ' in the last part of line 21 but somehow didn't manage to make it work. Anyway thanks ! Quote
Jarek Posted May 5, 2013 Posted May 5, 2013 Thanks Anakid and Euphy. But somehow, Euphy scripts don't work for me, it said that in the line 23 it needs 'I think there is a typo. Must be ',' instead of '.' in linemessage strcharinfo(0).@atcmd_command$+" is blocked during WoE."; Quote
Capuche Posted May 5, 2013 Posted May 5, 2013 @Euphy thanks a lot. I just have to add party recall there right ? Add near the other bindatcmd/unbind bindatcmd("partyrecall",strnpcinfo(0)+"::OnBlock"); unbindatcmd("partyrecall"); I think there is a typo. Must be ',' instead of '.' in line message strcharinfo(0), .@atcmd_command$+" is blocked during WoE."; Quote
Question
- Mariel
I've search for a script that blocks @item2 and it's made by Euphy and it's totally working. Is there any way to block @guildrecall and @recall when woe or prevent gm from logging in when WoE starts ?
11 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.