antonio664
Member
- Joined
- Jan 9, 2013
- Messages
- 130
- Reaction score
- 5
I want to unlock some horse for free. There is a possibility? Thanks
TFS 1.0 onwards:
player:addMount(25)
From memory, prior TFS versions used: doPlayerAddMount(cid, 25)
Where 25 = Rented Horse
TFS 1.1TFS version?
You can't add "unlocked" to the mounts in XML.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
<event type="login" name="FirstMounts" script="others/firstmounts.lua"/>
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