Jump to content
  • 0

disable @autopot by checking pc_block PCBLOCK_SKILL


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

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.

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

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.

 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  830
  • Reputation:   316
  • Joined:  02/11/19
  • Last Seen:  

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

solved, thankyou so much!

Link to comment
Share on other sites

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.

×
×
  • Create New...