roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 201
Hi, this spell make player "invisible". It only set player outfit to 0, and player cannot be attacked. But other peoples can see this player, so, he's not invisible.
How can i edit source to make "CONDITION_INVISIBLE " works like '/ghost'?
1) Make CONDITION_INVISIBLE works like '/ghost' (player will not be seen during the spell's time)
2) When player are in CONDITION_INVISIBLE, make he cant attack others creatures, and cannot be attacked by others creatures (players and monsters).
Using tfs 1.2
How can i edit source to make "CONDITION_INVISIBLE " works like '/ghost'?
1) Make CONDITION_INVISIBLE works like '/ghost' (player will not be seen during the spell's time)
2) When player are in CONDITION_INVISIBLE, make he cant attack others creatures, and cannot be attacked by others creatures (players and monsters).
Using tfs 1.2
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
local condition = Condition(CONDITION_INVISIBLE)
condition:setParameter(CONDITION_PARAM_TICKS, 200000)
combat:addCondition(condition)
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end