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

it's possible to lock mount for certains outfits?

CipsoftStinks

www.relicaria.com
Joined
Oct 1, 2016
Messages
947
Solutions
3
Reaction score
137
Location
Argentina
Well Hello otland
i use tfs 0.4 also i use otclient

i have this questions about if its possible to lock mounts for certain outfits?
if it's possible how? via server or OTClient source side?

want to add old outfits to my server but as they are not made to use mounts, when i use the old outfits sprites + mount the sprites looks weird
 
you just have to change your outfits to newer in .spr file.
no i tried it men but for example old outfits 7.72 version doesn't comes with mount option or sprites... so i neeed to lock the mounts for these old outfits
or re-do the sprites but im not spriter :/ hah u.u

regards
 
yeah it is possible but if you have functions for example untamedmounts or something.

Then in creaturescripts
Lua:
function onOutfit(cid, old, current)
local outfits ={ids from .spr}
for _, k in pairs (outfits) do
if isInArray (outfits[k], current.lookType) then
unTamedMount(cid)
end
return true
end

something like this
 
yeah it is possible but if you have functions for example untamedmounts or something.

Then in creaturescripts
Lua:
function onOutfit(cid, old, current)
local outfits ={ids from .spr}
for _, k in pairs (outfits) do
if isInArray (outfits[k], current.lookType) then
unTamedMount(cid)
end
return true
end

something like this
Why are you looping twice thru the table? isInArray function is enough in this case.
 
yeah it is possible but if you have functions for example untamedmounts or something.

Then in creaturescripts
Lua:
function onOutfit(cid, old, current)
local outfits ={ids from .spr}
for _, k in pairs (outfits) do
if isInArray (outfits[k], current.lookType) then
unTamedMount(cid)
end
return true
end

something like this
thanks for the code men ! but how i do to add the numbers which i want to block mount option? for example for outfit 368-369 etc..?
 
i got console error and script doesnt works :C

Code:
[9/10/2017 17:15:47] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/nomountsoldoutfits.lua:2: '}' expected near 'from'
[9/10/2017 17:15:47] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/nomountsoldoutfits.lua)
[9/10/2017 17:15:47] data/creaturescripts/scripts/nomountsoldoutfits.lua:2: '}' expected near 'from'

Code:
function onOutfit(cid, old, current)
local outfits ={ids from .spr}
if isInArray ({387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410}, current.lookType) then
unTamedMount(cid)
end
return true
end

Code:
<event type="outfit" name="noMount" event="script" value="nomountsoldoutfits.lua"/>

Code:
registerCreatureEvent(cid, "NoMount")
 
Last edited:
dunno xddd i remove it

Code:
function onOutfit(cid, old, current)
if isInArray ({387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410}, current.lookType) then
unTamedMount(cid)
end
return true
end

change to this i get no errors in console now but script neither works, could u help me pls
im not scripter xdd as you can see
 
    1. function onOutfit(cid, old, current)
    2. local outfits ={387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410}
    3. if isInArray (outfits[k], current.lookType) then
    4. unTamedMount(cid)
    5. end
    6. return true
    7. end

^ it doesnt work btw
 
Last edited by a moderator:
yeah it is possible but if you have functions for example untamedmounts or something.

Then in creaturescripts
Lua:
function onOutfit(cid, old, current)
local outfits ={ids from .spr}
for _, k in pairs (outfits) do
if isInArray (outfits[k], current.lookType) then
unTamedMount(cid)
end
return true
end

something like this
function onOutfit(cid, old, current)
local outfits ={387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410}
for _, k in pairs (outfits) do
if isInArray (outfits[k], current.lookType) then
unTamedMount(cid)
end
return true
end
end

i did this i have no errors i console but script doesnt works help pls
 
Try this:
Lua:
function onOutfit(cid, old, current)
local outfits ={387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410}
if isInArray (outfits, current.lookType) then
unTamedMount(cid)
end
return true
end

But "unTamedMount" is a function which remove your mount if you have an outfit in this array. So I don't know what function you have. Just replace with yours.
 
Try this:
Lua:
function onOutfit(cid, old, current)
local outfits ={387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410}
if isInArray (outfits, current.lookType) then
unTamedMount(cid)
end
return true
end

But "unTamedMount" is a function which remove your mount if you have an outfit in this array. So I don't know what function you have. Just replace with yours.
that's exactly what im trying to do.. if someone is using some of the outfits in scripts get instantly unmounted i gonna test

thanks @jestem pro

i can still use mount wearing those outfits :c
 
Last edited by a moderator:
hm but what exactly happens? you have one outfit of the all and when you choose mount it can't say that you cannot use the mount?
 
It should be possible, i cannot mount either with my GM outfit.
How i haven't found out yet, but could be very usefull for custom outfits(to avoid debugs).

Only problem is if you mount yourself on a another outfit, and then change the outfit while mounted, you will debug everyone in screen.
Which could be abuseable like in wars or whatever..
 
Back
Top