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
Illustrative image:-
here is some gif to explain what is going on
Screen capture - ea7a90600380fed6738f256b8cb54bef - Gyazo
i hope someone help me
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:-
here is some gif to explain what is going on
Screen capture - ea7a90600380fed6738f256b8cb54bef - Gyazo
i hope someone help me