• 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 [TFS 1.0]Mount Doll Dont work

samuelav3

Member
Joined
Aug 18, 2014
Messages
95
Reaction score
5
hey someone help me please
I have a problem with the mount doll
when I say
! mount "
(nothing happens)

My Mountdoll.lua
Code:
local config = {
   --["mount"] = {id = x},
   ["widow queen"] = {id = 1},
   ["racing bird"] = {id = 2},
   ["war bear"] = {id = 3},
   ["black Sheep"] = {id = 4},
   ["midnight panther"] = {id = 5},
   ["draptor"] = {id = 6},
   ["titanica"] = {id = 7},
   ["tin lizzard"] = {id = 8},
   ["blazebringer"] = {id = 9},
   ["rapid boar"] = {id = 10},
   ["Stampor"] = {id = 11},
   ["undead cavebear"] = {id = 12},
   ["donkey"] = {id = 13},
   ["tiger slug"] = {id = 14},
   ["Uniwheel"] = {id = 15},
   ["crystal wolf"] = {id = 16},
   ["brown war horse"] = {id = 17},
   ["kingly deer"] = {id = 18},
   ["tamed panda"] = {id = 19},
   ["dromedary"] = {id = 20},
   ["king scorpion"] = {id = 21},
   ["rented horse"] = {id = 22},
   ["armoured war horse"] = {id = 23},
   ["shadow draptor"] = {id = 24},
   ["rented horse"] = {id = 25},
   ["rented horse"] = {id = 26},
   ["ladybug"] = {id = 27},
   ["manta"] = {id = 28},
   ["ironblight"] = {id = 29},
   ["magma Crawler"] = {id = 30},
   ["dragonling"] = {id = 31},
   ["gnarlhound"] = {id = 32},
   ["crimson ray"] = {id = 33},
   ["Steelbeak"] = {id = 34},
   ["water buffalo"] = {id = 35},
   ["armoured scorpion"] = {id = 36},
   ["armoured dragonling"] = {id = 37},
   ["armoured cavebear"] = {id = 38},
   ["the Hellgrip"] = {id = 39},
   ["lion"] = {id = 40},
   ["golden lion"] = {id = 41},
   ["shock head"] = {id = 42}
}

function onSay(cid, words, param)

   local player, t, mountdoll_id = Player(cid), config[string.lower(param)], 11773 -- id do mount doll
  
   if (player:getItemCount(11773) > 1) then
        if (param ~= "" and t) then
         if(t and not player:hasMount(t.id)) then 
            player:removeItem(mountdoll_id, 1)
                player:sendTextMessage(MESSAGE_INFO_DESCR, "Su montura esta lista!")
            player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
            player:addMount(t.id)
            else
            player:sendCancelMessage("already have this mount.")
            end
        else
         player:sendCancelMessage("Say it again, something is wrong")
        end
    else
      player:sendCancelMessage("you need a Mount Doll!")
    end

   return true
end

talkAction
Code:
 <talkaction words="!mount" script="mountdoll.lua" />
 
Add = so it will be >= 1.
if (player:getItemCount(11773) >= 1) then

Also remove capitals from the names.
"stampor"
"uniwheel"
"steelbeak"
 
Back
Top