• 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!

Tame mount

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
457
Reaction score
17
i need script for tame mounts when use the items on mount get chance to tame the mount or the mount disappear or items broken " remove"

tfs 0.4

example mount
clientId="368" name="Widow Queen"
 
The id is what determines the mount added, not the clientId. That's used for displaying the mount after it's been obtained.
XML:
<mount id="1"  clientId="368" name="Widow Queen" speed="100" premium="yes" />
LUA:
local mount = 1 -- Widow Queen
local success_chance = 20

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local rand = math.random(100)
    if rand <= success_chance then
        doCreatureSay(cid, "Success.", TALKTYPE_ORANGE_1, cid)
        doPlayerAddMount(cid, mount)
    else
        doCreatureSay(cid, "Fail.", TALKTYPE_ORANGE_1, cid)
    end
    doRemoveItem(item.uid, 1)
    return true
end
 

Similar threads

Back
Top