Jump to content
  • 0

disable @autopot by checking pc_block PCBLOCK_SKILL


Question

Posted

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

  • 1
Posted

@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

  • 0
Posted

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

  • 0
Posted
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.

 

  • 0
Posted

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;
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...