• 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 Simple quest Action ID

MaR0

Banned User
Joined
Apr 16, 2018
Messages
272
Solutions
3
Reaction score
29
Hello guy's I have this script but i don't know why it doesn't work? i'm using TFS 1.2 Ninja sources 8.00,, is something wrong with storageValue?
When I use it Don't work for just one time with only a few times.. here is the script
Lua:
local cfgItems = {{8849, 1}, {7378, 1}, {2516, 1}, {2160, 1}}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item:getActionId(4321) and player:getStorageValue(2600) == 2 then
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already chosen your reward.")
    elseif player:getStorageValue(2600) <= 2 then
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found a modified cross bow, a royal spear, a dragon shield and 1 crystal coin!")
 
        local bag = player:addItem(1991) -- Bag id
        for i = 1, #cfgItems do
            bag:addItem(cfgItems[i][1], cfgItems[i][2])
        end
        player:setStorageValue(2600, 1)
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "Something went wrong.")
       end
end

XML:
 <action actionid="4321" script="first items.lua" />

Illustrative image:-
451cdb036df44d3d8bc279e854911dd5.png

here is some gif to explain what is going on
Screen capture - ea7a90600380fed6738f256b8cb54bef - Gyazo
i hope someone help me
 
Solution
SOLVED:- i was checking the storage to be of value 2 that was the problem the conditions will never be met
and I'll be able to get as many items as i want :''D
SOLVED:- i was checking the storage to be of value 2 that was the problem the conditions will never be met
and I'll be able to get as many items as i want :''D
 
Solution
Back
Top