iraciz Posted October 10, 2020 Posted October 10, 2020 How to check this status via script? PCBLOCK_SKILL I'm using this line in autopot script to disable it in WoE, and it is working. OnStart: if (agitcheck() || agitcheck2()) {dispbottom "[Autopot Disabled During WoE Time.]"; end; } But, In a custom Battleground, when a player carries a Flag or a Stone, they can still consume the autopot item, when that happen, this status is triggered:setpcblock(PCBLOCK_SKILL|PCBLOCK_COMMANDS|PCBLOCK_USEITEM,true); Is possible to check the status? and end the script of the autopot? something like this?: if PCBLOCK_SKILL {dispbottom "[Autopot disabled at your current condition.]"; end; } Thanks in advance. Quote
1 AnnieRuru Posted October 15, 2020 Posted October 15, 2020 @Mael oh that, players can enable the command and bring it into the map ... OnStart: if (!getstatus(SC_BERSERK) && !getstatus(SC_SATURDAYNIGHTFEVER) && !getstatus(SC_GRAVITATION) && !getstatus(SC_TRICKDEAD) && !getstatus(SC_HIDING) && !getstatus(SC__SHADOWFORM) && !getstatus(SC__INVISIBILITY) && !getstatus(SC__MANHOLE) && !getstatus(SC_KAGEHUMI) && !getstatus(SC_HEAT_BARREL_AFTER) && !getstatus(SC_STONE) && !getstatus(SC_FREEZE) && !getstatus(SC_STUN) && !getstatus(SC_SLEEP) && !getmapflag(strcharinfo(3), MF_BATTLEGROUND) && !getmapflag(strcharinfo(3), MF_PVP) && !getmapflag(strcharinfo(3), MF_GVG)) { its more like replacing with this condition, so it doesn't trigger with mapflags Quote
0 AnnieRuru Posted October 10, 2020 Posted October 10, 2020 simple, why not just disable `@autopot` in a pvp/gvg/battleground maps ? save a lot of time doing so after all I think autopot feature should only use on pve = player vs monsters, its broken in player vs player situations Quote
0 iraciz Posted October 15, 2020 Author Posted October 15, 2020 On 10/10/2020 at 11:09 AM, AnnieRuru said: simple, why not just disable `@autopot` in a pvp/gvg/battleground maps ? save a lot of time doing so after all I think autopot feature should only use on pve = player vs monsters, its broken in player vs player situations Hi dear AnnieRuru, I'm happy to see you back here, could you guide me please, how to disable that comamand in those maps? remember that this command is binded via script and not by flag. Quote
0 Mael Posted October 15, 2020 Posted October 15, 2020 This maybe can help. - script #autopot -1,{ OnAtcommand: for ( .@i = 0; .@i < getarraysize(.map$); .@i++ ) { if (strcharinfo(3) == .map$[.@i] && getgmlevel() < 10 ) { dispbottom "@autopot failed. You cannot use this command on this map.",0xff0000; end; } } atcommand "@autopot"; end; OnInit: setarray .map$, "map1", "map2"; bindatcmd "autopot",strnpcinfo(3) + "::OnAtcommand"; end; } Quote
Question
iraciz
How to check this status via script?
PCBLOCK_SKILL
I'm using this line in autopot script to disable it in WoE, and it is working.
OnStart: if (agitcheck() || agitcheck2()) {dispbottom "[Autopot Disabled During WoE Time.]"; end; }
But, In a custom Battleground, when a player carries a Flag or a Stone, they can still consume the autopot item,
when that happen, this status is triggered:
setpcblock(PCBLOCK_SKILL|PCBLOCK_COMMANDS|PCBLOCK_USEITEM,true);
Is possible to check the status? and end the script of the autopot? something like this?:
if PCBLOCK_SKILL {dispbottom "[Autopot disabled at your current condition.]";
end;
}
Thanks in advance.
5 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.