So I had an idea, but I had to make some restrictions to make use of it. I can't get it to work, I've tried alot, but I guess it's because I don't really know what I am doing
This will send the "not correct location" message, wherever I am. It won't summon when I'm on the position given - that's where I need some help..
Lua:
function onUse(cid, item, frompos, item2, itemEx, topos)
player1pos = getCreaturePosition(cid)
player1 = getThingfromPos(player1pos)
pos = getPlayerPosition(cid)
if
player1pos == {x=165, y=162, z=7} then
player1level = getPlayerLevel(player1.uid)
questlevel = 300
if player1level >= questlevel then
doSummonCreature("Telarus",player1pos)
doPlayerSendTextMessage(player1.uid,22,"Telarus!")
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(player1.uid,22,"you need level 300.")
return true
end
else
doPlayerSendTextMessage(player1.uid,22,"Not correct location.")
end
end
This will send the "not correct location" message, wherever I am. It won't summon when I'm on the position given - that's where I need some help..
Last edited: