local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}
function onRemoveItem(item, tileItem, pos)
doSummonCreature("Demon", demonpos1)
doSummonCreature("Demon", demonpos2)
doSummonCreature("Demon", demonpos3)
doSummonCreature("Demon", demonpos4)
return 1
end
local reward = *ITEMID OF THE REWARD*
local count = 1
local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}
function onUse(cid, item, frompos, item2, topos)
doRemoveItem(item.uid)
doPlayerAddItem(cid,reward,count)
doSummonCreature("Demon", demonpos1)
doSummonCreature("Demon", demonpos2)
doSummonCreature("Demon", demonpos3)
doSummonCreature("Demon", demonpos4)
return 1
end
local reward = *ITEMID OF THE REWARD*
local count = 1
local storage = 4512 -- storage value of the quest
local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,storage) ~= 1 then
doPlayerAddItem(cid,reward,count)
doSummonCreature("Demon", demonpos1)
doSummonCreature("Demon", demonpos2)
doSummonCreature("Demon", demonpos3)
doSummonCreature("Demon", demonpos4)
doPlayerSendTextMessage(cid,22,"You have found " .. getArticle(getItemName(reward)) .. getItemName(reward) .. ".")
else
doPlayerSendTextMessage(cid,22,"You have allready done the quest.")
end
return 1
end
If it is possible, do for the player can get it only once..21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
21:50 You have found golden key.
local reward = 2091
local count = 1
local storage = 4512 -- storage value of the quest
local demonpos1 = {x=870,y=937,z=8}
local demonpos2 = {x=870,y=941,z=8}
local demonpos3 = {x=875,y=937,z=8}
local demonpos4 = {x=875,y=941,z=8}
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,storage) ~= 1 then
doPlayerAddItem(cid,reward,count)
doSummonCreature("Demon", demonpos1)
doSummonCreature("Demon", demonpos2)
doSummonCreature("Demon", demonpos3)
doSummonCreature("Demon", demonpos4)
doPlayerSendTextMessage(cid,22,"You have found " .. getArticle(getItemName(reward)) .. getItemName(reward) .. ".")
setPlayerStorageValue(cid,storage,1)
else
doPlayerSendTextMessage(cid,22,"You have allready done the quest.")
end
return 1
end