• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell Bodie Transfer

zfrank17

New Member
Joined
Jul 6, 2010
Messages
27
Reaction score
1
data/spells/spells.xml
PHP:
<instant name="Transfer of Bodies" words="utori con mas" lvl="100" mana="800" needtarget="1" prem="0" range="5" exhaustion="1000" blockwalls="1" needlearn="0" script="transfer.lua">
                <vocation name="Sorcerer"/>
                <vocation name="Druid"/>
                <vocation name="Master Sorcerer"/>
                <vocation name="Elder Druid"/>
        </instant>
Data/Spells/scripts/create a new lua(called: transfer)
PHP:
function onCastSpell(cid, var)
local jogadorpos = getCreaturePosition(cid)
local target = getCreatureTarget(cid)
local monsterpos = getCreaturePosition(target)
if target == isMonster or isCreature then
doTeleportThing(cid,monsterpos)
doTeleportThing(target,jogadorpos)
doSendMagicEffect(jogadorpos, 65)
doSendMagicEffect(monsterpos, 65)
else
doPlayerSendTextMessage(cid,20,'You can only use it on creatures')
end
end
tibia.jpg
 
or make a table with not affected monster like boss or training or joking xD

with some limits and modifications, this spell can be very good for rpg
 
Code:
local shitlisted = {'Training Monk', 'Trainer', 'Training Dummy'}

function onCastSpell(cid, var)
	local target = getCreatureTarget(cid)
	if isMonster(target) and not isInArray(shitlisted, getCreatureName(target)) then
		local pos, tpos = getThingPos(cid), getThingPos(target)
		if isSightClear(pos, tpos, true) then
			doTeleportThing(cid, tpos)
			doTeleportThing(target, pos)
			doSendMagicEffect(pos, 65)
			doSendMagicEffect(tpos, 65)
		else
			return not doPlayerSendDefaultCancel(cid, RETURNVALUE_CREATUREISNOTREACHABLE)
		end
	else
		return not doPlayerSendCancel(cid, 'You can only use this spell on monsters.')
	end
	return true
end
 
Code:
[B][I][U][SIZE="4"]local shitlisted[/SIZE][/U][/I][/B] = {'Training Monk', 'Trainer', 'Training Dummy'}

function onCastSpell(cid, var)
	local target = getCreatureTarget(cid)
	if isMonster(target) and not isInArray(shitlisted, getCreatureName(target)) then
		local pos, tpos = getThingPos(cid), getThingPos(target)
		if isSightClear(pos, tpos, true) then
			doTeleportThing(cid, tpos)
			doTeleportThing(target, pos)
			doSendMagicEffect(pos, 65)
			doSendMagicEffect(tpos, 65)
		else
			return not doPlayerSendDefaultCancel(cid, RETURNVALUE_CREATUREISNOTREACHABLE)
		end
	else
		return not doPlayerSendCancel(cid, 'You can only use this spell on monsters.')
	end
	return true
end
lmfao
 
Back
Top