Witam, jak zrobi?, aby quest mo?na by?o wykona? dowoln? ilo?? razy ?
[LUA]function onUse(cid, item, frompos, item2, topos)
if item.uid == 7207 then
queststatus = getPlayerStorageValue(cid,7207)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
setPlayerStorageValue(cid,7207,1)
else
doPlayerSendTextMessage(cid,22,"There is nothing inside.")
end
elseif item.uid == 7208 then
queststatus = getPlayerStorageValue(cid,7208)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
setPlayerStorageValue(cid,7208,1)
else
doPlayerSendTextMessage(cid,22,"There is nothing inside.")
end
return 1
end
[/LUA]
Oto fragment kodu, mo?e mi go kto? przerobi? ?
[LUA]function onUse(cid, item, frompos, item2, topos)
if item.uid == 7207 then
queststatus = getPlayerStorageValue(cid,7207)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
setPlayerStorageValue(cid,7207,1)
else
doPlayerSendTextMessage(cid,22,"There is nothing inside.")
end
elseif item.uid == 7208 then
queststatus = getPlayerStorageValue(cid,7208)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
setPlayerStorageValue(cid,7208,1)
else
doPlayerSendTextMessage(cid,22,"There is nothing inside.")
end
return 1
end
[/LUA]
Oto fragment kodu, mo?e mi go kto? przerobi? ?