• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Quest with Random Mount?

Mariuskens

Sword Art Online 2D-MMORPG
Joined
Nov 21, 2008
Messages
1,009
Reaction score
119
Location
Spain
GitHub
Olimpotibia
Guys possible build some script when player open Reward Chest give Random mount (1 - 32)??

And can run in TFS. 1.0?
 
HTML:
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

This?
 
Code:
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
 
Back
Top