• 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 Help to fix this script

Tul

New Member
Joined
Apr 19, 2011
Messages
60
Reaction score
0
who can fix this script when a player have item 2345 he can summon this pet but dont remove the item

PHP:
local d,l,g,m,s = 'pet one'
function onSay(cid,words,param)
local v = getThingPos(cid)
    if getPlayerStorageValue(cid,s) ~= 1 then
        if not getTilePzInfo(v) then
            if getPlayerLevel(cid) >= l then
if item.itemid == 2345 then
                    setPlayerStorageValue(cid,s,1)
                    doSummonMonster(cid,d:lower())
                    doSendMagicEffect(v,12)
                    doPlayerSendTextMessage(cid,27,'You summoned a '..d..'.')
                else
                    doPlayerSendCancel(cid,'Not enough gold, need '..g..' gold.')
                    doSendMagicEffect(v,2)
                end
            else
            local n = l - getPlayerLevel(cid)
                doPlayerSendCancel(cid,'You need '..n..' levels more to summon this.')
                doSendMagicEffect(v,2)
            end
        else
            doPlayerSendCancel(cid,'Not allowed in PZ.')
            doSendMagicEffect(v,2)
        end
    else
        for _,c in ipairs(getCreatureSummons(cid)) do
            doSendMagicEffect(getThingPos(c),2)
            doRemoveCreature(c)
        end
        setPlayerStorageValue(cid,s,0)
        doPlayerSendTextMessage(cid,27,d..' is called back.')
    end
    return true
end

rep++
 
Back
Top