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

Action Mount tutorial for 9.31 TFS

Ghost Creations

Active Member
Joined
Aug 2, 2011
Messages
227
Solutions
1
Reaction score
25
Location
Now in Korat, Thailand
This will get you going on the way mounts work, This is a Quest type mount getting sytem, the only one I found to work.

Credits: God Arcanus of OTland - Mount Quest

Put this in your actions.xml
XML Code:
Code:
	<!-- Mounts -->
	<action uniqueid="2601" script="mounts/Widow Queen.lua"/>
	<action uniqueid="2602" script="mounts/Racing Bird.lua"/>
	<action uniqueid="2603" script="mounts/War Bear.lua"/>
	<action uniqueid="2604" script="mounts/Black Sheep.lua"/>
	<action uniqueid="2605" script="mounts/Midnight Panther.lua"/>
	<action uniqueid="2606" script="mounts/Draptor.lua"/>
	<action uniqueid="2607" script="mounts/Titanica.lua"/>
	<action uniqueid="2608" script="mounts/Tin Lizzard.lua"/>
	<action uniqueid="2609" script="mounts/Blazebringer.lua"/>
	<action uniqueid="2610" script="mounts/Rapid Boar.lua"/>
	<action uniqueid="2611" script="mounts/Stampor.lua"/>
	<action uniqueid="2612" script="mounts/Undead Cavebear.lua"/>
	<action uniqueid="2613" script="mounts/Mule.lua"/>
	<action uniqueid="2614" script="mounts/Tiger Slug.lua"/>
	<action uniqueid="2615" script="mounts/Uniwheel.lua"/>
	<action uniqueid="2616" script="mounts/Crystal Wolf.lua"/>
	<action uniqueid="2617" script="mounts/Brown War Horse.lua"/>
	<action uniqueid="2618" script="mounts/Kingly Deer.lua"/>
	<action uniqueid="2619" script="mounts/Tamed Panda.lua"/>
	<action uniqueid="2620" script="mounts/Dromedary.lua"/>
	<action uniqueid="2621" script="mounts/Sandstone Scorpion.lua"/>
	<action uniqueid="2622" script="mounts/Brown n White Rented Horse.lua"/>
	<action uniqueid="2623" script="mounts/Fire War Horse.lua"/>
	<action uniqueid="2624" script="mounts/Grey n White Rented Horse.lua"/>
	<action uniqueid="2625" script="mounts/Brown Rented Horse.lua"/>

Make a lua file for each mount put in actions\scripts\mounts

Lua Code:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.itemid == 1353 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 50)
                doPlayerAddMount(cid, 1)
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You Have The Widow Queen Mount!")
        end
        return TRUE
end

were it says: doPlayerAddMount(cid, 1)
change the cid, 1) to the mount number 1-25

Lua Code:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.itemid == 1353 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 50)
                doPlayerAddMount(cid, 5)
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You Have The Midnight Panther Mount!")
        end
        return TRUE
end

Midnight Panther Mount, notice the cid is 5.

Now you are all done, run your server, ctrl+click on the mossy stone you set as the uid, and wala you have the mount.
Right click on your character, set look, then set mount.

then right click on your character click mount

Credits go to god arcanus original post http://otland.net/f81/mount-quest-115680/
 
Last edited:
This all could have been done in one file in a 20x shorter way by creating array that contains "uids"(arrays) in which there wuld be "mountId" and "name" :D
 
The script works fine, but when I click (in my case a statue) and I get the mount, and I click it again it says again I get the mount, could you give me a tip how to add something that it says: You already have the mount.
Thanks in advance,
 
All the Mounts to 9.40

data\XML\mounts.xml
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mounts>
	<mount id="1" clientid="368" name="Widow Queen" speed="20" premium="yes" />
	<mount id="2" clientid="369" name="Racing Bird" speed="20" premium="yes" />
	<mount id="3" clientid="370" name="War Bear" speed="20" premium="yes" />
	<mount id="4" clientid="371" name="Black Sheep" speed="20" premium="yes" />
	<mount id="5" clientid="372" name="Midnight Panther" speed="20" premium="yes" />
	<mount id="6" clientid="373" name="Draptor" speed="20" premium="yes" />
	<mount id="7" clientid="374" name="Titanica" speed="20" premium="yes" />
	<mount id="8" clientid="375" name="Tin Lizzard" speed="20" premium="yes" />
	<mount id="9" clientid="376" name="Blazebringer" speed="20" premium="yes" />
	<mount id="10" clientid="377" name="Rapid Boar" speed="20" premium="yes" />
	<mount id="11" clientid="378" name="Stampor" speed="20" premium="yes" />
	<mount id="12" clientid="379" name="Undead Cavebear" speed="20" premium="yes" />
	<mount id="13" clientid="387" name="Donkey" speed="20" premium="yes" />
	<mount id="14" clientid="388" name="Tiger Slug" speed="20" premium="yes" />
	<mount id="15" clientid="389" name="Uniwheel" speed="20" premium="yes" />
	<mount id="16" clientid="390" name="Crystal Wolf" speed="20" premium="yes" />
	<mount id="17" clientid="392" name="Brown War Horse" speed="20" premium="yes" />
	<mount id="18" clientid="401" name="Kingly Deer" speed="20" premium="yes" />
	<mount id="19" clientid="402" name="Tamed Panda" speed="20" premium="yes" />
	<mount id="20" clientid="405" name="Dromedary" speed="20" premium="yes" />
	<mount id="21" clientid="406" name="King Scorpion" speed="20" premium="yes" />
	<mount id="22" clientid="421" name="Palomino Rented Horse" speed="20" premium="no" />
	<mount id="23" clientid="426" name="Fire War Horse" speed="20" premium="yes" />
	<mount id="24" clientid="427" name="Shadow Draptor" speed="20" premium="yes" />
	<mount id="25" clientid="437" name="Appaloosa Rented Horse" speed="20" premium="no" />
	<mount id="26" clientid="438" name="Brown Rented Horse" speed="20" premium="no" />
	<mount id="27" clientid="439" name="Ladybug" speed="20" premium="yes" />
	<mount id="28" clientid="440" name="Manta" speed="20" premium="yes" />
</mounts>

These are the proper names also
 
Back
Top