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

Lua Mount Talkaction!

Wartio

Any game ideas?
Joined
Apr 2, 2010
Messages
457
Reaction score
29
Location
Sweden
Is there anybody that gives out "Mount buy Talkaction"? cuz i have a real map and some of the mounts cant be catched / reason = no existing monsters to get the mounts , so i wonder if there is any good scripter which could make talkaction to buy mounts

Example: !mount draptor / !mountdraptor and it will only work while having mount item in backpack :blink:
 
I created script for you.. yes your like wanna take rep me :p
here you go:
data/talkactions/scripts created file name: mount.lua
and paste this:
LUA:
-- Talkaction mount system by Cronox 
function onSay(cid, words, param, channel)
            if param == "widowqueen" then
               if getPlayerItemCount(cid) >= 1 then
                  doPlayerAddMount(cid, 1)
                  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now Mounted in " .. param .. ".")                      
               else
                   doPlayerSendCancel(cid, "You not have item special for mount in " .. param .. ".")
               end
 
            elseif param == "racingbird" then
            if getPlayerItemCount(cid) >= 1 then
                  doPlayerAddMount(cid, 2)
                  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now Mounted in " .. param .. ".")                 
               else
                   doPlayerSendCancel(cid, "You not have item special for mount in " .. param .. ".")
               end

            elseif param == "warbear" then
            if getPlayerItemCount(cid) >= 1 then
                  doPlayerAddMount(cid, 3)
                  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now Mounted in " .. param .. ".")
               else
                   doPlayerSendCancel(cid, "You not have item special for mount in " .. param .. ".")
               end
              
            end
         else
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You dont have any special item for get your mount.")
         end
         return TRUE
end

You can add more lines you know how not? and.. put in talkactions.xml
LUA:
<talkaction log="yes" words="/mount;!mount" event="script" value="mount.lua"/>
you remember in data/XML - mount.xml you can see number mount: example..
LUA:
<mount id="6" clientId="373" name="Draptor" speed="19" premium="yes" />
and for add my script you need put this line..
LUA:
            elseif param == "draptor" then
            if getPlayerItemCount(cid) >= 1 then
                  doPlayerAddMount(cid, 6)
                  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now Mounted in " .. param .. ".")
               else
                   doPlayerSendCancel(cid, "You not have item special for mount in " .. param .. ".")
               end
              
            end

Remember all this:
in doPlayerAddMount(cid, 6) <- 6 is number what mount get
and for what item need use is in..
if getPlayerItemCount(cid) >= 1 then
changed 1 for what itemid need for mount.
 
Could you make all mounts ? so i can use !mount tinlizzard, !mount sandstonescorpion etc... all of them would be nice, cuz i would just make bugs if i try,

btw i got error when i added these scripts you sent
4[JEcy.jpg

- - - Updated - - -

Anyone ;)?
 
try now:
LUA:
-- Talkaction mount system by Cronox  
function onSay(cid, words, param, channel)
      if getPlayerItemCount(cid) >= 1 then
            if param == "widowqueen" then
               if getPlayerMoney(cid) >= moneyReq then
                  doPlayerAddMount(cid, 1)
                  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Se te ha agregado la montura de " .. param .. ".")
                                    
               else
                    doPlayerSendCancel(cid, "You not have item special for mount in " .. param .. ".")
               end
 
            elseif param == "racingbird" then
               if getPlayerItemCount(cid) >= 1 then
                  doPlayerAddMount(cid, 2)
                  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now Mounted in " .. param .. ".")                  
               else
                   doPlayerSendCancel(cid, "You not have item special for mount in " .. param .. ".")
               end

            elseif param == "warbear" then
               if getPlayerItemCount(cid) >= 1 then
                  doPlayerAddMount(cid, 3)
                  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now Mounted in " .. param .. ".")
               else
                   doPlayerSendCancel(cid, "You not have item special for mount in " .. param .. ".")
               end
              
            end
         else
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You dont have any special item for get your mount.")
         end
         return TRUE
end
 
still the same ;S

- - - Updated - - -

btw Cronox instead of making talkaction, could you do script or anything that when "Player create character on website and when they login they got all mounts, also "Free Mounts", example gunzodus.net they got free mounts, its like that i want it
 
Last edited:
login.lua
LUA:
for i = 1, 32 do
    doPlayerAddMount(cid, i)
end

Add it above this,
LUA:
            str = str .. " Please choose your outfit."
            doPlayerSendOutfitWindow(cid)
        end
 
Back
Top