I have a serious problem that i can't figure out.
there are 3 monsters from "tpmobfrom.from" to "tpmobfrom.to" and i want them to teleport to "tpmobto".
I don't want to create one variable for each monster, then the script would become enormous!
I don't get any errors, it's just that they don't get teleported.
I'm thankful for help!
there are 3 monsters from "tpmobfrom.from" to "tpmobfrom.to" and i want them to teleport to "tpmobto".
I don't want to create one variable for each monster, then the script would become enormous!
I don't get any errors, it's just that they don't get teleported.
LUA:
local tpmobfrom = {
from = {x =1179, y =1019, z =7, stackpos =255},
to = {x =1181, y =1019, z =7, stackpos =255}
}
local tpmobto = {
from = {x =1179, y =1021, z = 7},
to = {x =1181, y =1021, z = 7}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 and item.uid == 1554 then
if isInArea(getCreaturePosition(cid), tpmobfrom.from, tpmobfrom.to) then
doTeleportThing(tpmobto.from, tpmobto.to)
else
doPlayerSendTextMessage(cid,21,'Something went wrong...')
end
end
end
I'm thankful for help!