Hello, so i have problem, i dont know how make c++ code so i need help, maybe someone can help me. I need script like that:
If player have guild with id like value in globalstorage then he cant atack "monster name". But ... this script in lua dont work for spells so i need make it in combat.cpp right? in this place:
but i dont know how :/ maybe someone can help me with convert lua script to code c++
Code:
function onAttack(cid, target)
local myGuild = getPlayerGuildId(cid)
if(target == "monster name") then
if(myGuild == getGlobalStorageValue(19893)) then
return FALSE
else
return TRUE
end
end
return TRUE
end
Code:
else if(target->getMonster())
{
if(attackerPlayer->hasFlag(PlayerFlag_CannotAttackMonster))
return RET_YOUMAYNOTATTACKTHISCREATURE;
}
but i dont know how :/ maybe someone can help me with convert lua script to code c++