Mariuskens
Sword Art Online 2D-MMORPG
Guys possible build some script when player open Reward Chest give Random mount (1 - 32)??
And can run in TFS. 1.0?
And can run in TFS. 1.0?
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1740 then
queststatus = getPlayerStorageValue(cid, 3305)
if queststatus == -1 then
setPlayerStorageValue(cid, 3305, 1)
mountFunction(cid,math.random(32))
else
doPlayerSendTextMessage(cid, 22, "it is empty.")
end
end
return 1
end
local storage = 3305
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
if player:getStorageValue(storage) == -1 then
player:setStorageValue(storage, 1)
player:addMount(math.random(32))
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is empty.")
end
return true
end