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

Rune that creates a teleport

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
287
Reaction score
2
I'd like a rune script that creates a teleport to certain destination for a certain amount of time.
 
Wrong section... This would be in requests.. xD
= i will help you
LUA:
local config = {
itemId = 1387,
toPos = {x=, y=, z=},
secs = 300
}
function remove(position)
if getThingFromPos(pos).itemid == config.itemId then
doRemoveItem(getThingFromPos(pos).uid)
end
return true
end

function onCastSpell(cid, var)
	local pos = variantToPosition(var)
	if(pos.x ~= 0 and pos.y ~= 0) then
	doCreateTeleport(itemId, toPos, pos)
	addEvent(remove, config.secs * 1000, config.pos)
end
return true
end

Maybe that works.... Hope it :D xDDD

Ammm.... dont forget to configure it well, any doubt, post it ;)
 
I got this error.

[29/05/2011 01:54:33] [C]: ?
[29/05/2011 01:54:33] [C]: in function 'doCreateTeleport'
[29/05/2011 01:54:33] data/spells/scripts/new/rune1.lua:16: in function <data/spells/scripts/new/rune1.lua:13>
 
Yeah, I use it on the floor.. still get the same error.

<rune group="attack" spellid="25" name="Teleport Rune" id="2314" allowfaruse="1" charges="3" lvl="15" maglv="1" cooldown="2000" groupcooldown="2000" blocktype="solid" script="new/rune1.lua"/>
 
Back
Top