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

Lua tfs 1.4 Random Monster Skins

VagosClubTM

Active Member
Joined
Aug 16, 2019
Messages
219
Reaction score
32
Location
Chile
Hello friends, I need to know if anyone has a mana rune script, I need it to request a vocation to be used and without a level limit. but if of magic level.

Also if a transformation rune is possible, which changes your appearance for a few seconds (1200) and that can be configured so that every time you throw the stone on it, it changes the appearance that would be monster skins and that those will be set up in the lua of the stone. I'll leave an example of my old 760 xml server

Lua:
  function onUse(cid, item, frompos, item2, topos)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
addOutfitCondition(condition, 0, 230, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 231, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 232, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 233, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 234, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 235, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 236, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 237, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 238, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 239, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 240, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 241, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 242, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 243, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 244, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 245, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 246, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 247, 0, 0, 0, 0)
setCombatCondition(combat, condition)
                                          doSendMagicEffect(topos,12)
doPlayerSay(cid,"Good..",1)

      return 1
  end
 
Hello friends, I need to know if anyone has a mana rune script, I need it to request a vocation to be used and without a level limit. but if of magic level.

Also if a transformation rune is possible, which changes your appearance for a few seconds (1200) and that can be configured so that every time you throw the stone on it, it changes the appearance that would be monster skins and that those will be set up in the lua of the stone. I'll leave an example of my old 760 xml server

Lua:
  function onUse(cid, item, frompos, item2, topos)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
addOutfitCondition(condition, 0, 230, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 231, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 232, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 233, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 234, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 235, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 236, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 237, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 238, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 239, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 240, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 241, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 242, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 243, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 244, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 245, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 246, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 247, 0, 0, 0, 0)
setCombatCondition(combat, condition)
                                          doSendMagicEffect(topos,12)
doPlayerSay(cid,"Good..",1)

      return 1
  end
Can you try to explain better what you want the script to do?

I don't understand.
 
It is a stone to transform for a certain time and when you use it once and again it changes you to a different skin, this configurable as I show you here

@Xikini
ezgif.com-gif-maker (1).gif Untitled.png

data/scripts/randomOutfit.lua
Lua:
local outfitIds = {230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247}

local randomOutfit = Condition(CONDITION_OUTFIT)
randomOutfit:setTicks(20000)

local action = Action()

function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    randomOutfit:setOutfit({lookType = outfitIds[math.random(#outfitIds)]})
    player:addCondition(randomOutfit)
    return true
end

action:aid(45020)
action:register()
 
View attachment 64213 View attachment 64214

data/scripts/randomOutfit.lua
Lua:
local outfitIds = {230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247}

local randomOutfit = Condition(CONDITION_OUTFIT)
randomOutfit:setTicks(20000)

local action = Action()

function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    randomOutfit:setOutfit({lookType = outfitIds[math.random(#outfitIds)]})
    player:addCondition(randomOutfit)
    return true
end

action:aid(45020)
action:register()
great but it doesn't work like that, this stone is the stones one uses to heal or attack example ID: 2295 that stone when used on oneself gives you different skins every time you use it.
 
great but it doesn't work like that, this stone is the stones one uses to heal or attack example ID: 2295 that stone when used on oneself gives you different skins every time you use it.
ezgif.com-gif-maker (2).gif

Such a minor change..

Lua:
local outfitIds = {230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247}

local randomOutfit = Condition(CONDITION_OUTFIT)
randomOutfit:setTicks(20000)

local action = Action()

function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if not target:isPlayer() then
        return false
    end
    randomOutfit:setOutfit({lookType = outfitIds[math.random(#outfitIds)]})
    target:addCondition(randomOutfit)
    item:remove(1)
    return true
end

action:id(2295)
action:register()
 
View attachment 64219

Such a minor change..

Lua:
local outfitIds = {230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247}

local randomOutfit = Condition(CONDITION_OUTFIT)
randomOutfit:setTicks(20000)

local action = Action()

function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if not target:isPlayer() then
        return false
    end
    randomOutfit:setOutfit({lookType = outfitIds[math.random(#outfitIds)]})
    target:addCondition(randomOutfit)
    item:remove(1)
    return true
end

action:id(2295)
action:register()
have they told you that you are the best? ahahaha thanks broder, I work perfectly, the other I want the chests to request a level to be able to open them, for example I got to a chest in a mission and it is without protection from creatures so I proceed to open it but this does not ask me for a level to open it.

I leave you the code of the chest to see where to add that request level and thank you very much bro.

Lua:
local uids = {
    chest1=3004
}

local action = Action()
for _, uid in pairs(uids) do
    action:uid(uid)
end

function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.uid == uids.chest1 then
         rewardChest(player, item.uid, 2140) -- dwarven axe
        return true
    end

    if item.uid == uids.chest2 then
        rewardChest(player, item.uid, 2140) -- dwarven axe
        return true
    end

    return false
end
action:register(-1)

@Xikini
 
View attachment 64219

Such a minor change..

Lua:
local outfitIds = {230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247}

local randomOutfit = Condition(CONDITION_OUTFIT)
randomOutfit:setTicks(20000)

local action = Action()

function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if not target:isPlayer() then
        return false
    end
    randomOutfit:setOutfit({lookType = outfitIds[math.random(#outfitIds)]})
    target:addCondition(randomOutfit)
    item:remove(1)
    return true
end

action:id(2295)
action:register()
It worked perfect bro, here is a sample.


bloggif_61c9db82a2e22.gif
Post automatically merged:

Lua:
if player:getLevel() < 200 then -- must be higher than level 200 to use
    print('must be atleast level 200')
    return true
end

unrter function
hanks broder, I work perfectly
 
Last edited:
Back
Top