• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Black skull question

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello,
Where in source i can remove/edit that function:
You cannot use area spells when you have blackskull.
I want to : player can use area spells.

Help me, please. :(
 
Last edited:
spells.cpp (2x):
[cpp] if(!needTarget)
{
if(!isAggressive || player->getSkull() != SKULL_BLACK)
return true;

player->sendCancelMessage(RET_YOUMAYNOTCASTAREAONBLACKSKULL);
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
return false;
}[/cpp]
and:
[cpp] if(player->getSkull() == SKULL_BLACK && isAggressive && range == -1) //-1 is (usually?) an area spell
{
player->sendCancelMessage(RET_YOUMAYNOTCASTAREAONBLACKSKULL);
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
return false;
}[/cpp]
 
Last edited:
u did wrong ^_^

btw u had to replace:
[cpp] if(!needTarget)
{
if(!isAggressive || player->getSkull() != SKULL_BLACK)
return true;

player->sendCancelMessage(RET_YOUMAYNOTCASTAREAONBLACKSKULL);
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
return false;
}[/cpp]
with
[cpp] if(!needTarget)
return true;[/cpp]
 
Back
Top