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

War Horse unlocked

TFS 1.0 onwards:
player:addMount(25)

From memory, prior TFS versions used: doPlayerAddMount(cid, 25)
Where 25 = Rented Horse

Correct. Thanks! I would like everyone who created a new character had the horse unlocked automatically.
The same model of outfits.
I tried to put in the xml file:
<mount id="25" clientid="437" name="Rented Horse" speed="20" premium="no" unlocked="1" enabled="1" />
But did not succeed


TFS version?
TFS 1.1
 
Correct. Thanks! I would like everyone who created a new character had the horse unlocked automatically.
The same model of outfits.
I tried to put in the xml file:
<mount id="25" clientid="437" name="Rented Horse" speed="20" premium="no" unlocked="1" enabled="1" />
But did not succeed



TFS 1.1
You can't add "unlocked" to the mounts in XML.

You can achieve this by checking in a onLogin script if the player got the mount or if the player got a certain storage value.
Then you can simply add the mount.
 
data/XML/mounts.xml
is where you can find all the mount ID's.

data/creaturescripts/creaturescripts.xml
data/creaturescripts/scripts/others/firstmounts.lua
-- this file will need to be created.
this is where you can add a small check for players to gain the mount.

Code:
<event type="login" name="FirstMounts" script="others/firstmounts.lua"/>
Code:
function onLogin(cid)
   local player = Player(cid)

   if player:getLastLoginSaved() ~= 0 then
     return true
   end

   player:addMount(111) -- change number to mount id you want new players to have.
   player:addMount(111) -- add/remove additional mounts.
 
   return true
end
 
data/XML/mounts.xml
is where you can find all the mount ID's.

data/creaturescripts/creaturescripts.xml
data/creaturescripts/scripts/others/firstmounts.lua
-- this file will need to be created.
this is where you can add a small check for players to gain the mount.

Code:
<event type="login" name="FirstMounts" script="others/firstmounts.lua"/>
Code:
function onLogin(cid)
   local player = Player(cid)

   if player:getLastLoginSaved() ~= 0 then
     return true
   end

   player:addMount(111) -- change number to mount id you want new players to have.
   player:addMount(111) -- add/remove additional mounts.

   return true
end

Grateful for the help and sorry for the delay :)
 
Back
Top