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

Put evolution levels in this pet action? plss

demonrage

New Member
Joined
Oct 28, 2014
Messages
22
Reaction score
2
hello, I have this simple action script, where when clicking on the item a pet is summoned..
but I would like, if possible, to put another item to evolve it
ex:
when using a stone he gains levels, and also gains strength, life .. etc.

tfs: 0.4


Script:
Lua:
function onUse(cid, item, frompos, item2, topos)

local dolls = {
    [12179] = {pet = "[Pet] Demon"},   
}
    
local go = dolls[item.itemid]
local summon = getCreatureSummons(cid)
    ---------------------------------------------------
    if #summon >= 1 then
        for _, pid in ipairs(summon) do
            doRemoveCreature(pid)
            doCreatureSay(cid, ""..go.pet..", Recuar!", TALKTYPE_ORANGE_1)
        end
    return true
    end
    
    if (getPlayerItemCount(cid, item.itemid) <= 0) then
        doPlayerSendTextMessage(cid, 19, "Voce precisa do item em sua backpack.")
        doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)
        return true
    end

    if (getTilePzInfo(getCreaturePosition(cid))) then
        doPlayerSendTextMessage(cid, 19, "Voce nao pode sumonar seu PET em Protect Zone!")
        doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)
        return true
    end
    
    if (getPlayerStorageValue(cid, 6641) == 1 or isPlayer(cid)) then
        doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid)))
        doCreatureSay(cid, ""..go.pet..", GO!", TALKTYPE_ORANGE_1)
    else
        doPlayerSendTextMessage(cid, 19, "Voce precisa da quest para usar esse PET!")
        doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)
    end
return true
end
 

Similar threads

Back
Top