galera...
eu quero uma ajuda com esse script aki!
function onSay(cid, words, param) local buyprice = { ['rat'] = {price = 1000, message = "Parabéns, você comprou o Rat, cuide bem dele.", seconds = 10, soul = 30}, ['skeleton'] = {price = 10000, message = "Parabéns, você comprou o Skeleton, cuide bem dele.", seconds = 30, soul = 40}, ['demon'] = {price = 100000, message = "Parabéns, você comprou o Demon, cuide bem dele.", seconds = 60, soul = 50}, } local offert = "" if words == "!summon" then if getPlayerStorageValue(cid, 22000) ~= -1 then if #getCreatureSummons(cid) == 0 then if getPlayerSoul(cid) >= buyprice[getPlayerStorageValue(cid, 22000)].soul then doSummonPet(cid, getPlayerStorageValue(cid, 22000), buyprice[getPlayerStorageValue(cid, 22000)].seconds) doPlayerSendTextMessage(cid, 4, "Você usou seu summon, dentro de ".. buyprice[getPlayerStorageValue(cid, 22000)].seconds .." ele irá ser removido.") doPlayerAddSoul(cid, - (buyprice[getPlayerStorageValue(cid, 22000)].soul)) else doPlayerSendCancel(cid, "Você não tem soul suficiente.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doPlayerSendCancel(cid, "Você não pode mais sumonar.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doPlayerSendCancel(cid, "Você ainda não possui um summon.") doSendMagicEffect(getCreaturePosition(cid), 2) end end if words == "!buysummon" then if param ~= "" then if getPlayerStorageValue(cid, 22000) == -1 then if getPlayerMoney(cid) >= buyprice[string.lower(param)].price then setPlayerStorageValue(cid, 22000, string.lower(param)) doPlayerSendTextMessage(cid, 4, buyprice[string.lower(param)].message) doPlayerRemoveMoney(cid, buyprice[string.lower(param)].price) else doPlayerSendCancel(cid, "Você não tem dinheiro suficiente para comprar este summon.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doPlayerSendCancel(cid, "Você já possui um summon.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doPlayerSendCancel(cid, "Escolha o summon a ser comprado.") doSendMagicEffect(getCreaturePosition(cid), 2) end end if words == "!sellsummon" then if getPlayerStorageValue(cid, 22000) ~= -1 then doPlayerAddMoney(cid, (buyprice[getPlayerStorageValue(cid, 22000)].price)*5/10) doPlayerSendTextMessage(cid, 4, "Summon vendido com sucesso.") setPlayerStorageValue(cid, 22000, -1) else doPlayerSendCancel(cid, "Você não possui um summon.") doSendMagicEffect(getCreaturePosition(cid), 2) end end if words == "!offer" then for name, _ in pairs(buyprice) do offert = offert == "" and "Summons: \n\n" .. name .. " " .. buyprice[name].price or offert .. "\n" .. name .. " " .. buyprice[name].price end doShowTextDialog(cid, 2160, offert) end return TRUE end
eu queria sumonar mais de um summon?
quando tento sumonar 2 "no caso tento comprar outro"
aparece
Você já possui um summon
ajuda rep+