• 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 Problem Quest

Devlinn

Member
Joined
Mar 25, 2015
Messages
295
Reaction score
6
hello someone can explain and help me?
TFS 1.0
i want create quest when i click on chest i got (items)
but when i create quest and click on chest i got (purple backpack) no apocalipsis What is wrong?
quest.lua
PHP:
-- simple quests based on uniqueId
-- to make quest create chest on map and set its uniqueId to id of quest item

function onUse(cid, item, frompos, item2, topos)
    prize = item.uid

    if prize > 1000 and prize < 5000 then
        queststatus = getPlayerStorageValue(cid,prize)

        if queststatus == -1 then
            doPlayerSendTextMessage(cid,22,'You have found a ' .. getItemName(prize) .. '.')
            doPlayerAddItem(cid,prize,1)
            setPlayerStorageValue(cid,prize,1)
        else
            doPlayerSendTextMessage(cid,22,"It is empty.")
        end

        return 1
    else
        return 0
    end
end
action.xml
<action itemid="1740" script="quest.lua" />
<!-- Questy -->
<action itemid="2001" script="Quests/apocalipsis_sword.lua" />

apocalipsis_sword.lua
Code:
function onUse(cid, item, frompos, item2, topos)

       if item.uid == 2001 then
           queststatus = getPlayerStorageValue(cid,2001)
           if queststatus == -1 then
               doPlayerSendTextMessage(cid,22,"You have found a Apocalipsis.")
               doPlayerAddItem(cid,2438,1)
               setPlayerStorageValue(cid,2001,1)
           else
               doPlayerSendTextMessage(cid,22,"It is empty.")
          end
    else
        return 0
       end

       return 1
end
i got a purple backpack id 2001 wtf?
rme:
Screen_Shot_09_07_15_at_11_13_AM.png
 
Back
Top