Hello! I need quick help with this problem.
It doesnt matter who walks on the teleport, it still sais "You have already done this quest".
What do i need to change?
Thanks.
It doesnt matter who walks on the teleport, it still sais "You have already done this quest".
What do i need to change?
Code:
pos = {x=1468, y=853, z=7} --- Position monster summon
function onStepIn(cid, item, position, fromPosition)
local newPosition = {x=1468, y=847, z=7} --- new position
local noPosition = {x=1469, y=858, z=8} --- no position
if(getGlobalStorageValue(7778) < 1) and (getPlayerStorageValue(cid, 7778) == EMPTY_STORAGE) then
doTeleportThing(cid, newPosition, TRUE)
doSummonCreature("Dragonator", getClosestFreeTile(cid, pos))
doPlayerSendTextMessage(cid,18,'You need to kill the boss.')
setGlobalStorageValue(7779, 1)
else
doTeleportThing(cid, noPosition, TRUE)
doPlayerSendTextMessage(cid,18,'You have already done this quest.')
end
return true
end
Thanks.