Premium FlorinMarian 122 Posted August 4, 2017 Premium Share Posted August 4, 2017 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 ! Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
ElBrujoo 4 Posted August 5, 2017 Share Posted August 5, 2017 I can guess the problem but i prefer looking on skype. In char item usually an item is selected, but your "isfight" method is surely related to a character, so you have to call it from a char instance(bad engl). I'll try to help you on skype -> xelbrujoox Link to comment Share on other sites More sharing options...
Root 58 Posted August 5, 2017 Share Posted August 5, 2017 if you trying to restrict something when in duel you can check my thread here some use of the functions Spoiler 1 Link to comment Share on other sites More sharing options...
Premium FlorinMarian 122 Posted August 6, 2017 Author Premium Share Posted August 6, 2017 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. Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
Premium Dash 81 Posted August 6, 2017 Premium Share Posted August 6, 2017 This is the only way to use IsFight but you need to find victim CPVP kPVP(GetPlayerID(), pkVictim->GetPlayerID()); CPVP * pkPVP = Find(kPVP.m_dwCRC); if (pkPVP || pkPVP->IsFight()) Link to comment Share on other sites More sharing options...
Root 58 Posted August 6, 2017 Share Posted August 6, 2017 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 More sharing options...
Premium FlorinMarian 122 Posted August 6, 2017 Author Premium Share Posted August 6, 2017 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 ! Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now