• 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 Script PET SYSTEM [ACTION]

samuel157

/root
Joined
Mar 19, 2010
Messages
447
Solutions
3
Reaction score
49
Location
São Paulo, Brazil
GitHub
Samuel10M
summon 2 pet and of erro on console and kill magic on area

I don't want to take damage;. I want you to summon only one creature


Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local name = "[PET] NIVEL MAXIMO"
    local pet = getCreatureSummons(cid)

    if #pet <= 0 then
        doSummonMonster(cid, name)
        setPlayerStorageValue(pet[1], 83712, 1)
    else
        for i = 1, #pet do
            if getPlayerStorageValue(pet[i], 83712) == 1 then
                doRemoveCreature(pet[i])
                return true
            end
        end
        doSummonMonster(cid, name)
        setPlayerStorageValue(pet[#pet], 83712, 1)
    end

    return true
end

C++:
[29/05/2022 00:00:52] [Error - Action Interface]
[29/05/2022 00:00:52] data/actions/scripts/simple_pet.lua:onUse
[29/05/2022 00:00:52] Description:
[29/05/2022 00:00:52] (luaDoCreatureSetStorage) Creature not found
 
Back
Top