Ir para conteúdo
  • Cadastre-se

(Resolvido)tibia global 8.6


Ir para solução Resolvido por Sekk,

Posts Recomendados

  • Solução
18 horas atrás, Sekk disse:

Tenta executar isso na sua database do server

  Ocultar conteúdo

ALTER TABLE `accounts` ADD `vip_time` INT( 11 ) NOT NULL DEFAULT '0';

 

sou novato nessa área onde executo pls ..

 

18 horas atrás, Sekk disse:

Tenta executar isso na sua database do server

  Ocultar conteúdo

ALTER TABLE `accounts` ADD `vip_time` INT( 11 ) NOT NULL DEFAULT '0';

 

 

Link para o post
Compartilhar em outros sites

Sabe o site 127.0.0.1/phpmyadmin ou localhost/phpmyadmin   ???

 

Então, la é a sua database, seleciona a database que você criou la, e vai na coluna SQL, vai ter uma caixa branca pra escrever la, cola esse comando la, e clica no botão EXECUTAR.

Link para o post
Compartilhar em outros sites
4 minutos atrás, paulorogerio disse:

Muito obrigado, salvou a pátria .. agora vou tentar tirar os bugs que eu estava tirando  antes de dar problema se tiver algo sobre bug de entregar a grana e itens que vou colocar no site fico grato ..

 REP+

 

Se você se refere à entrega de itens do Shop do site do Gesior, na pasta globalevents/scripts crie um arquivo(se não existir já) chamado shop.lua e coloque o seguinte dentro dele:

Spoiler

SHOP_MSG_TYPE = 19
 
SQL_interval = 30
 
function onThink(interval, lastExecution)
    local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';")
    if(result_plr:getID() ~= -1) then
        while(true) do
            id = tonumber(result_plr:getDataInt("id"))
            action = tostring(result_plr:getDataString("action"))
            delete = tonumber(result_plr:getDataInt("delete_it"))
            cid = getCreatureByName(tostring(result_plr:getDataString("name")))
            if isPlayer(cid) == TRUE then
                local itemtogive_id = tonumber(result_plr:getDataInt("param1"))
                local itemtogive_count = tonumber(result_plr:getDataInt("param2"))
                local container_id = tonumber(result_plr:getDataInt("param3"))
                local container_count = tonumber(result_plr:getDataInt("param4"))
                local add_item_type = tostring(result_plr:getDataString("param5"))
                local add_item_name = tostring(result_plr:getDataString("param6"))
                local received_item = 0
                local full_weight = 0
                if add_item_type == 'container' then
                    full_weight = getItemWeightById(itemtogive_id, 1)
                end
                local free_cap = getPlayerFreeCap(cid)
                if full_weight <= free_cap then
                    if add_item_type == 'container' then
                        local new_container = doCreateItemEx(container_id, 1)
                        local iter = 0
                        while iter ~= container_count do
                            doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
                            iter = iter + 1
                        end
                        received_item = doPlayerAddItemEx(cid, new_container)
                    else
                        local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
                        received_item = doPlayerAddItemEx(cid, new_item)
                    end
                    if received_item == RETURNVALUE_NOERROR then
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
                        db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
                        db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
doPlayerSave(cid)
else
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'')
                    end
                else
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'')
                end
            end
            if not(result_plr:next()) then
                break
            end
        end
        result_plr:free()
    end
    return TRUE
end

 

 

Ai no globalevents.xml adicione a tag:

Citar

<globalevents name="shop" interval="4000" script="shop.lua"/>

 

Isso se você usa o TFS 0.4, se não for TFS 0.4, no lugar de "4000" coloque apenas "4"

 

 

Obs.: O script está editado para funcionar com TFS 0.4, se não estiver usando o TFS 0.4, troque todos os

Citar

db.query

 

por

Citar

db.executeQuery

 

TODOS!

Link para o post
Compartilhar em outros sites
9 minutos atrás, Sekk disse:

 

Se você se refere à entrega de itens do Shop do site do Gesior, na pasta globalevents/scripts crie um arquivo(se não existir já) chamado shop.lua e coloque o seguinte dentro dele:

  Mostrar conteúdo oculto

SHOP_MSG_TYPE = 19
 
SQL_interval = 30
 
function onThink(interval, lastExecution)
    local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';")
    if(result_plr:getID() ~= -1) then
        while(true) do
            id = tonumber(result_plr:getDataInt("id"))
            action = tostring(result_plr:getDataString("action"))
            delete = tonumber(result_plr:getDataInt("delete_it"))
            cid = getCreatureByName(tostring(result_plr:getDataString("name")))
            if isPlayer(cid) == TRUE then
                local itemtogive_id = tonumber(result_plr:getDataInt("param1"))
                local itemtogive_count = tonumber(result_plr:getDataInt("param2"))
                local container_id = tonumber(result_plr:getDataInt("param3"))
                local container_count = tonumber(result_plr:getDataInt("param4"))
                local add_item_type = tostring(result_plr:getDataString("param5"))
                local add_item_name = tostring(result_plr:getDataString("param6"))
                local received_item = 0
                local full_weight = 0
                if add_item_type == 'container' then
                    full_weight = getItemWeightById(itemtogive_id, 1)
                end
                local free_cap = getPlayerFreeCap(cid)
                if full_weight <= free_cap then
                    if add_item_type == 'container' then
                        local new_container = doCreateItemEx(container_id, 1)
                        local iter = 0
                        while iter ~= container_count do
                            doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
                            iter = iter + 1
                        end
                        received_item = doPlayerAddItemEx(cid, new_container)
                    else
                        local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
                        received_item = doPlayerAddItemEx(cid, new_item)
                    end
                    if received_item == RETURNVALUE_NOERROR then
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
                        db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
                        db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
doPlayerSave(cid)
else
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'')
                    end
                else
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'')
                end
            end
            if not(result_plr:next()) then
                break
            end
        end
        result_plr:free()
    end
    return TRUE
end

 

 

Ai no globalevents.xml adicione a tag:

 

Isso se você usa o TFS 0.4, se não for TFS 0.4, no lugar de "4000" coloque apenas "4"

 

 

Obs.: O script está editado para funcionar com TFS 0.4, se não estiver usando o TFS 0.4, troque todos os

 

por

 

TODOS!

Eu tenho só xampp  ,geisor e o ot  to aprendendo ainda fico muito grato por sua ajuda ..

Esse é o que estava no globalevents.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<globalevents>

<!-- <globalevent name="record" type="record" event="script" value="record.lua"/> -->

<globalevent name="save" interval="500" event="script" value="save.lua"/>

<globalevent name="clean" interval="7200000" event="script" value="clean.lua"/>

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

<globalevent name="information" interval="900000" event="script" value="autobroadcast.lua"/>

<globalevent name="napis" interval="1" script="napis.lua"/>

</globalevents>

Link para o post
Compartilhar em outros sites
51 minutos atrás, paulorogerio disse:

Eu tenho só xampp  ,geisor e o ot  to aprendendo ainda fico muito grato por sua ajuda ..

Esse é o que estava no globalevents.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<globalevents>

<!-- <globalevent name="record" type="record" event="script" value="record.lua"/> -->

<globalevent name="save" interval="500" event="script" value="save.lua"/>

<globalevent name="clean" interval="7200000" event="script" value="clean.lua"/>

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

<globalevent name="information" interval="900000" event="script" value="autobroadcast.lua"/>

<globalevent name="napis" interval="1" script="napis.lua"/>

</globalevents>

 

Bah, nem precisava me mandar isso kkkkkk, o negocio de entregar itens pros players, é o shop do gesior, ai precisa desse script shop.lua pro site entregar os itens pro player entendeu? Qualquer coisa, pode me chamar!

Link para o post
Compartilhar em outros sites
Go Your account 0 7 December 2015, 21:14:31 Not realized yet.

Teste um test a p.a da certo mas o item não da não dei como entrar como god nesse ot o site ainda ta bugado

cloquei o script que vc mandou fiz um bloco de notas e colei la shop.lua

 

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo