Ir para conteúdo
US
Blazera 8.60
blazera.net
SOBRE O BLAZERA
Um fresh start em um servidor 8.6 clássico, com real map, focado na experiência raiz do Tibia. | Classic Real Map • Fresh Start • Client 8.6 • Old School Gameplay • Active Community
Inicia em: --
Participar

Featured Replies

Postado

 

tinha um sistema de casino em meu servidor ot no entanto na época eu tinha um TSF 0.3.6 ... mas agora atualizado para 0,4, no entanto, o tempo de algum script é muito rápido, eu me pergunto onde edito a deixar o sistema mais lento...

 

 

local bixos = {"Pig", "Rat"}
local positions = {{x = 1598, y = 365, z = 4}, {x = 1599, y = 365, z = 4}, {x = 1600, y = 365, z = 4}} -- Posicao q os bixos nascem
local price = 5000 -- Preco para jogar
local prize = 50000 -- 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[i], 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

 

 

Postado
  • Autor
<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
	<globalevent name="save" interval="1800000" event="script" value="save.lua"/>
	<globalevent name="clean" interval="7200000" event="script" value="clean.lua"/>
        <globalevent name="texto" interval="46000" script="texto.lua" />
        <globalevent name="propaganda" interval="4000000" script="propaganda.lua" />
        <globalevent name="info" interval="600000" script="info.lua" />
       	<globalevent name="shop" interval="300" script="shop.lua"/> 
        <globalevent name="hexa" interval="2700000" script="Hexa.lua" />
    

	<!-- <globalevent name="timer_example" time="21:35" event="script" value="my_script.lua"/> -->
</globalevents>

 

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.

Estatísticas dos Fóruns

  • Tópicos 96.1k
  • Posts 512.4k

Informação Importante

Confirmação de Termo