kito2
www.masteria.net
Hey there, this is one of my first scripts that I've made...
First lets paste this on actions.xml
Now go to scripts and create a file called cartkaz.lua and add this inside:
How it works?
Go to the mapeditor, take an itemID 7131 or 7132 or whatever that you want to click use and teleport, set actionID x and uniqueID y and another with the same actionID but uniqueID z.
You can add more zones, very easy, just add more lines here:
local pos3 = {
[y] = {{x=32657, y=31903, z=8}},
[z] = {{x=32676, y=31977, z=15}},
[m] = {{x=32676, y=31977, z=15}},
[n] = {{x=32676, y=31977, z=15}}
}
Quite simple, and also, you can't use if you are in fight.
First lets paste this on actions.xml
Lua:
<action actionid="x" script="cartkaz.lua"/>
Now go to scripts and create a file called cartkaz.lua and add this inside:
Lua:
local pos3 = {
[y] = {{x=32657, y=31903, z=8}},
[z] = {{x=32676, y=31977, z=15}}
}
function onUse(cid, item, frompos, item2, topos)
if (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE) then
doTeleportThing(cid, pos3[item.uid][1], TRUE)
doSendMagicEffect(getPlayerPosition(cid),10)
doCreatureSay(cid, "Uff...", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid,"You can't teleport immediately after fight.")
doSendMagicEffect(getPlayerPosition(cid),2)
end
return true
end
How it works?
Go to the mapeditor, take an itemID 7131 or 7132 or whatever that you want to click use and teleport, set actionID x and uniqueID y and another with the same actionID but uniqueID z.
You can add more zones, very easy, just add more lines here:
local pos3 = {
[y] = {{x=32657, y=31903, z=8}},
[z] = {{x=32676, y=31977, z=15}},
[m] = {{x=32676, y=31977, z=15}},
[n] = {{x=32676, y=31977, z=15}}
}
Quite simple, and also, you can't use if you are in fight.
Last edited: