• 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!

Spells ( TFS 0.4 REV 3858)

Axelor

Member
Joined
Sep 2, 2010
Messages
505
Reaction score
9
Hello,
does some1 know how to make this;

when somone summon a monster, other players can walk trough the summon.

Example spells: undead legion, anime dead legion, utevo res "monster"

Rep++ for the person who help me fix this!!

Its rly important, since very much people block much spawns with this
 
Last edited:
You need to edit:
[cpp]bool Player::canWalkthrough(const Creature* creature) const[/cpp]

Add something like:
[cpp] const Player* master = creature->getMaster()->getPlayer();
if(master)
return true;[/cpp]
 
Use CTRL+F and put:
LUA:
bool Player::canWalkthrough(const Creature* creature) const
and should can add:
LUA:
 const Player* master = creature->getMaster()->getPlayer();
	if(master)
		return true;
 
function onTargetTile(cid, position)
position.stackpos = 255
local corpse = getThingFromPos(position)
if(corpse.uid == 0 or not isCorpse(corpse.uid) or not isMoveable(corpse.uid) or getCreatureSkullType(cid) == SKULL_BLACK) then
return false
end

doRemoveItem(corpse.uid)
doConvinceCreature(cid, doCreateMonster("Skeleton", position, false))
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
return true
end

local area, combat = createCombatArea(AREA_CIRCLE3X3), createCombatObject()
setCombatArea(combat, area)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end



this is the code
 
haha you can't solve that by a simple lua edit. You need to edit sources (players.cpp), do what i wrote above..
Press Shift + Alt + F to find the canWalkthrough function in sources.
 
Back
Top