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

[Spell] Ghost

renancs

New Member
Joined
Jul 8, 2008
Messages
252
Reaction score
3
Hello, im needing a spell for assassin class...
Normaly the asssassins have a talent to use the spell ghost in games...
But in tibia the "utana vid" is a sh..!

So, i think i can use the ghost of gms/gods...
More... How can i put to when the player stay in ghost mode, when he attack a player or monster,
he go show again?

and the stealth is realy stealth like the ghost of gms...

Help plss... :ninja:
 
Last edited:
onCastSpell:
use the executeTalkaction function with /ghost command ignoring the access check (parameter) + set a storage

onAttack/onCombat:
check if player has storage (is ghost?) and call the executeTalkaction again, set storage and be happy

Though I don't think this will work well..
 
can u mount this spell for me? im noob i don't know do this...
thnks alot!

'if possible, can u give me in private?'
 
I understand this.
goto data/talkactions talkactions.xml

change
LUA:
<talkaction log="yes" words="/ghost" access="5" event="function" value="ghost"/>

for

LUA:
<talkaction log="yes" words="gms;gods" access="5" event="function" value="ghost"/>

config.lua and..
LUA:
	-- Ghost mode
	ghostModeInvisibleEffect = yes
	ghostModeSpellEffects = false
 
onCastSpell:
use the executeTalkaction function with /ghost command ignoring the access check (parameter) + set a storage

onAttack/onCombat:
check if player has storage (is ghost?) and call the executeTalkaction again, set storage and be happy

Though I don't think this will work well..

It'd be sth like that:
LUA:
function onCombat(cid, target)
	if(isPlayer(target) and isInGhostMode(target)) then
		doSendMagicEffect(getPlayerPosition(target), CONST_ME_POFF)
		doPlayerSetGhostMode(target, false)
	end
	return true
end

function onCastSpell(cid, var)
	if(isInGhostMode(cid)) then
		return false
	else
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC RED)
		doPlayerSetGhostMode(cid, true)
	end
	return true
end

But you need to add ghost mode functions in source.
 
Back
Top