Ir para conteúdo

Quando clico na alavanca os monstros não nascem e aparece a seguinte mensagem: (luadocreatemonster): Cannot create monster.

Featured Replies

Postado

Quando clico aparece assim:

image.png.d1bcd350d5316d67cb7d44c336a00bab.png

 

E também assim:

image.png.8bd08c72ff1d50733161889db86d464c.png

 

Script:

Spoiler

local bixos = {"Dog", "Deer", "Pig", "Rat"}
local positions = {{x = 143, y = 46, z = 6}, {x = 144, y = 46, z = 6}, {x = 145, y = 46, z = 6}} -- Posicao q os bixos nascem
local price = 1000000 -- Preco para jogar
local prize = 10000000 -- Premio

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local first = math.random(1, #bixos)
    local second = math.random(1, #bixos)
    local third = math.random(1, #bixos)
    local tab = {}
        
    if getGlobalStorageValue(82192) > os.time() then
        doPlayerSendCancel(cid, "Aguarde um pouco para apostar.")
        return true
    end
    
    if getPlayerMoney(cid) < price then
        doPlayerSendCancel(cid, "Voce precisa de " .. price .. " para jogar.")
        return true
    end
    
    setGlobalStorageValue(82192, os.time() + 6)
    for i = 1, (#positions) do
        doSendMagicEffect(positions, 22)
    end
    
    doPlayerRemoveMoney(cid, price)
    doCreateMonster(bixos[first], positions[1])
    doSendMagicEffect(positions[1], 26)
    addEvent(doSendMagicEffect, 100, positions[1], 31)
    table.insert(tab, first)
    setGlobalStorageValue(bixos[first], getGlobalStorageValue(bixos[first])+1) 
    addEvent(function()
        doCreateMonster(bixos[second], positions[2])
        doSendMagicEffect(positions[2], 26)
        addEvent(doSendMagicEffect, 100, positions[2], 31)
        table.insert(tab, second)
    end, 1000)
    addEvent(function()
        doCreateMonster(bixos[third], positions[3])
        doSendMagicEffect(positions[3], 26)
        addEvent(doSendMagicEffect, 100, positions[3], 31)
        setGlobalStorageValue(bixos[third], getGlobalStorageValue(bixos[third])+1)
        table.insert(tab, third)
    end, 2000)
    addEvent(function()
        doRemoveCreature(getTopCreature(positions[1]).uid)
        doRemoveCreature(getTopCreature(positions[2]).uid)
        doRemoveCreature(getTopCreature(positions[3]).uid)
            doSendMagicEffect(positions[1], 54)
            doSendMagicEffect(positions[2], 54)
            doSendMagicEffect(positions[3], 54)
        if tab[1] == tab[2] and tab[1] == tab[3] then
            doPlayerAddMoney(cid, prize)
            doSendAnimatedText(getThingPos(cid), "Voce", 93)
            addEvent(doSendAnimatedText, 800, getThingPos(cid), "Ganhou", 93)
            addEvent(doSendAnimatedText, 1600, getThingPos(cid), "" .. prize .."gps!", 93)
            doSendMagicEffect(getThingPos(cid), 30)
            doSendMagicEffect(positions[1], 30)
            doSendMagicEffect(positions[2], 30)
            doSendMagicEffect(positions[3], 30)
            addEvent(doSendMagicEffect, 800, getThingPos(cid), 29)
            addEvent(doSendMagicEffect, 800, positions[1], 29)
            addEvent(doSendMagicEffect, 800, positions[2], 29)
            addEvent(doSendMagicEffect, 800, positions[3], 29)
            addEvent(doSendMagicEffect, 1600, getThingPos(cid), 28)
            addEvent(doSendMagicEffect, 1600, positions[1], 28)
            addEvent(doSendMagicEffect, 1600, positions[2], 28)
            addEvent(doSendMagicEffect, 1600, positions[3], 28)
        else
            doSendAnimatedText(getThingPos(cid), "Voce", 93)
            addEvent(doSendAnimatedText, 800, getThingPos(cid), "Perdeu", 93)
            addEvent(doSendAnimatedText, 1600, getThingPos(cid), "=(", 93)
        end
end, 3500)
    return true
end

 

Se trata de uma script de Cassino, estarei deixando o LINK de onde eu peguei a Script. 

 

LINK:>>>>>> https://www.xtibia.com/forum/topic/228936-cassino-interativo/

 

Por favor, me ajudem solucionar este erro, gostei muito dessa script, os monstros com os nomes de RAT, DOG, PIG existem no meu servidor, porque diz que não encontra? Obrigado a todos que tentaram me ajudar.

Postado

@Fabio Leandro tente escrever o nome dos monstros em letra minúscula.

Spoiler

local config = {
	delrey = getPlayerCarValue(cid, DELREY),
	cigarro = getPlayerCancer(cid, DERBY),
	prostituta = getPlayerAIDS(cid, cracuda),
	tresOitao = getPlayerRevorvi(cid, 38)
}

if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end

 

Postado
  • Autor

Não funcionou, irmão. Obrigado pela tentativa, mas continuo com o mesmo problema, alguém poderia me ajudar?

image.thumb.png.e76f2d31c666fe35dd3ffabc925f2d51.png

@Vodkart consegue me ajudar, irmão? sei que pra vc isso é mole

Consegui Resolver o erro, era só tirar a área PZ do mapa, tópico fechado.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.2k

Informação Importante

Confirmação de Termo