// remove magic walls/wild growth
if (id == ITEM_MAGICWALL_SAFE || id == ITEM_WILDGROWTH_SAFE || isBlocking()) {
if (!creature->isInGhostMode()) {
g_game.internalRemoveItem(this, 1);
}
return;
}
void MagicField::onStepInField(Creature* creature)
its works for all servers not just in non pvp, glad to know you solved it by yourself althoughThanks!
I figured it out before your response by adding:
In
C++:void MagicField::onStepInField(Creature* creature)
C++:// remove magic walls/wild growth if (id == ITEM_MAGICWALL_SAFE || id == ITEM_WILDGROWTH_SAFE || isBlocking()) { if (!creature->isInGhostMode()) { g_game.internalRemoveItem(this, 1); } return; }
In combat.cpp
The comment you referenced seems more suitable for a non-PVP server, mine is PVP, but I still appreciate your help.
function onStepIn(creature, item, position, fromPosition)
if not creature:isPlayer() then
return false
end
if(position.z == fromPosition.z) then
return false
end
position:sendMagicEffect(CONST_ME_EXPLOSIONAREA)
item:remove()
return true
end
<movevent event="StepIn" itemid="1497" script="magic_wall.lua" />
Idk why he manged to remove this line from the original tfs but yeah this is absolutly the solutionThanks!
I figured it out before your response by adding:
In
C++:void MagicField::onStepInField(Creature* creature)
C++:// remove magic walls/wild growth if (id == ITEM_MAGICWALL_SAFE || id == ITEM_WILDGROWTH_SAFE || isBlocking()) { if (!creature->isInGhostMode()) { g_game.internalRemoveItem(this, 1); } return; }
In combat.cpp
The comment you referenced seems more suitable for a non-PVP server, mine is PVP, but I still appreciate your help.