Jump to content

Recommended Posts

  • Premium

Hello !

I try to use a function from pvp.cpp on char_item.cpp and using this simple checkup:

if(IsFight())

I get error 

error: 'IsFight' was not declared in this scope

I've included "pvp.h" on header. Any idea ? Thank you !

Link to comment
Share on other sites

  • Premium
Acum 9 ore, Root a spus:

if you trying to restrict something when in duel you can check my thread here some use of the functions

  Reafișează conținuturi ascunse

 

 

It's a good point but i want to check if autopotion it's enabled.

Try to check with

if (FindAffect(AFFECT_AUTO_HP_RECOVERY) || FindAffect(AFFECT_AUTO_SP_RECOVERY))

but don't succeed.

Link to comment
Share on other sites

7 hours ago, FlorinMarian said:

It's a good point but i want to check if autopotion it's enabled.

Try to check with


if (FindAffect(AFFECT_AUTO_HP_RECOVERY) || FindAffect(AFFECT_AUTO_SP_RECOVERY))

but don't succeed.

Try this 

Spoiler

LPCHARACTER pkChr;//Setting pinter for char class
int blocked_items[] = {72723,  72724, 72725, 72726};//Banned potions

for(size_t i = 0; i < INVENTORY_MAX_NUM; i++) //Running ineventory scan
{
for (size_t id = 0; id < 4; id++) 
{
if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == blocked_items[id])
{
			pkChr->ChatPacket(CHAT_TYPE_INFO, "%s Potion detected" , pkChr->GetName());
			return false;//Stoping code here
}

 

 

Link to comment
Share on other sites

  • Premium
1 oră în urmă, Root a spus:

Try this 

  Ascunde conținuturi


LPCHARACTER pkChr;//Setting pinter for char class
int blocked_items[] = {72723,  72724, 72725, 72726};//Banned potions

for(size_t i = 0; i < INVENTORY_MAX_NUM; i++) //Running ineventory scan
{
for (size_t id = 0; id < 4; id++) 
{
if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == blocked_items[id])
{
			pkChr->ChatPacket(CHAT_TYPE_INFO, "%s Potion detected" , pkChr->GetName());
			return false;//Stoping code here
}

 

 

haha, great bro but i wanna disable some functions while autopotions are enabled, not only blocking potions use.

Thank you !

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.