function onUse(cid, item, fromPosition, itemEx, toPosition)
local tp {x=XXX, y=YYY, z=ZZZ}
doTeleportThing(cid, tp)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_YELLOW)
doPlayerSendTextMessage(cid, 19, "This text pwn")
end
thx bro Rep+ But i need other script Tp send magic effect and Text
Can't be more simple..LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) local tp {x=XXX, y=YYY, z=ZZZ} doTeleportThing(cid, tp) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_YELLOW) doPlayerSendTextMessage(cid, 19, "This text pwn") end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local tp {x = 100, y = 200, z = 7}
if item.actionid == 9531 then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POOF)
doTeleportThing(cid, tp)
doSendMagicEffect(tp, CONST_ME_FIREWORK_YELLOW)
doSendAnimatedText(tp, "It Pwns!", 180)
end
return true
end
:thumbup:w8 24h before bumping
what is the globalevents.xml codeLUA:function onUse(cid, item, fromPosition, itemEx, toPosition) local tp {x = 100, y = 200, z = 7} if item.actionid == 9531 then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POOF) doTeleportThing(cid, tp) doSendMagicEffect(tp, CONST_ME_FIREWORK_YELLOW) doSendAnimatedText(tp, "It Pwns!", 180) end return true end
what is the globalevents.xml code
<action actionid="9531" script="tp.lua"/>
This is an action script put it in data/actions/scripts
then the actions.xml part here
then place the actionid in the certain tile u want from the map editor and it should work fineCode:<action actionid="9531" script="tp.lua"/>