• 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 exevo pan (not working)

In newer TFS versions exevo pan isnt hardcoded anymore, it's a simple lua script. Just download a new TFS rev and copy the food.lua (or something) from spells to yours and add the path to it, just like other spells
 
XML:
        <instant name="Food" words="exevo pan" lvl="14" mana="120" soul="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" event="script" value="support/conjure food.lua">
                <vocation id="2"/>
                <vocation id="3"/>
                <vocation id="6"/>
                <vocation id="7"/>
        </instant>

Lua:
local FOODS = {
        2666, -- meat
        2671, -- ham
        2681, -- grape
        2674, -- aple
        2689, -- bread
        2690, -- roll
        2696 -- cheese
}

function onCastSpell(cid, var)
        local size = table.maxn(FOODS)
        if(not doPlayerAddItem(cid, FOODS[math.random(1, size)])) then
                doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
                doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF)
                return false
        end

        if(math.random(1, 100) > 50) then
                doPlayerAddItem(cid, FOODS[math.random(1, size)])
        end

        doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_GREEN)
        return true
end
 
Back
Top