• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved 3 quests and 1 you can take.

medium

New Member
Joined
Nov 2, 2011
Messages
54
Reaction score
0
Hi

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

Qests have 11011 Unique ID - All


Please help me!
 
the first quest should have uid 11011 and the second 11012 and the third 11013
and change
Code:
-Wand quest (sp,ki , makanko)
    <action uniqueid="11011;11012;11013" event="script" value="moje/wandquest.lua"/>
 
give the chests this 3 actionid - actionid and not uniqueid

Code:
11011
11012
11013

and in your actions.xml

add this 3 lines

Code:
<action actionid="11011" event="script" value="moje/wandquest.lua"/>
<action actionid="11012" event="script" value="moje/wandquest.lua"/>
<action actionid="11013" event="script" value="moje/wandquest.lua"/>
 
Error was in IF -

Good code :
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

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



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
end
end

return true

end

To CLOSE
 
Back
Top