Hi
I want to do quest with 3 option to choose .
I have it : (but it doesn't work)
Action.xml :
Qests have 11011 Unique ID - All
Please help me!
I want to do quest with 3 option to choose .
I have it : (but it doesn't work)
Code:
local itactionid = {
11011,
11012,
11013
}
local itemss = {
2433, --saiyan power
2190, --ki blast
2191 --makankosappo
}
local storagge = 11011
function onUse(cid, item, frompos, item2, topos)
if item.uid == itactionid[1] then
queststatus = getPlayerStorageValue(cid,storagge)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"This is your reward !.")
doPlayerAddItem(cid,itemss[1],1)
setPlayerStorageValue(cid,storagge,1)
else
doPlayerSendTextMessage(cid,22,"You can't do twice on the same quest !")
end
else
doPlayerSendTextMessage(cid,22,"asdasdasdasdadst !")
return 0
end
if item.uid == itactionid[2] then
queststatus = getPlayerStorageValue(cid,storagge)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"This is your reward !.")
doPlayerAddItem(cid,itemss[2],1)
setPlayerStorageValue(cid,storagge,1)
else
doPlayerSendTextMessage(cid,22,"You can't do twice on the same quest !")
end
else
doPlayerSendTextMessage(cid,22,"asdasdasdasdadst !")
return 0
end
if item.uid == itactionid[3] then
queststatus = getPlayerStorageValue(cid,storagge)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"This is your reward !.")
doPlayerAddItem(cid,itemss[3],1)
setPlayerStorageValue(cid,storagge,1)
else
doPlayerSendTextMessage(cid,22,"You can't do twice on the same quest !")
end
else
doPlayerSendTextMessage(cid,22,"asdasdasdasdadst !")
return 0
end
return true
end
Action.xml :
Code:
-Wand quest (sp,ki , makanko)
<action actionid="11011" event="script" value="moje/wandquest.lua"/>
![shir5.jpg](/proxy.php?image=http%3A%2F%2Fscreenshotuploader.com%2Fi%2F1310%2Fshir5.jpg&hash=1e646a1f61b12c0602fec0fb662beacc)
Qests have 11011 Unique ID - All
Please help me!