
Histórico de Curtidas
-
Absolute recebeu reputação de carlos123456 em [BUG EM TODOS OS OTS] TFS 1.X, FIXED!Fala meus lindos!
Há alguns dias diversos servidores grandes como: Shadowcores, Fortera, Dolera, Inflame, Forsaken entre demais proprietários de servidores que conversaram comigo, me disseram o ocorrido e fui investigar o que realmente estava ocorrendo.
Um engraçadinho descobriu a FALHA no TFS e estava realizando em todos os servidores pedindo dinheiro para revelar o bug, mas não sabia a solução.
Então com permissão, tomei posse a servidor de um cliente INFLAME-GLOBAL para junto com ele ADM Henrique achar o temível bug que causava um crash no servidor, investigamos e ACHAMOS!
Então resolvi conversar com meu amigo @Bruno Minervino para reporta-lo (pois muitos usam sua base VANAHEIM GLOBAL) e chegarmos logo ao fix problem.
Então, não contente com a situação resolvemos fixar o mais rápido possível e vim trazer as INFORMAÇÕES do BUG e a SOLUÇÃO para quem ainda não arrumou.
Entenda como o BUG é causado:
https://www.youtube.com/watch?v=ube4b-q4Ncg&spfreload=10
O player retorna para a from pos, quando ele realiza a ação... BUMP, ele fica dando um stack infinito, causando um LOOP infinito e por fim, o servidor é crashado (derrubado)
Erro: [Error - MoveEvent::executeStep] Call stack overflor
Ou seja, ele causa um STACK OVERFLOW, para quem não sabe este é um dos erros mais estúpidos, ele significa um ESTOURO DE PILHA... isso ocorre quando uma variável está tentando gravar mais informações do que é permitido na memória, quando o bug ocorre o loop infinito causa isto.
Este erro está presente apenas nas atualização do novo TFS, Versão 1.1 e 1.2, portanto junto com Bruno estudamos e trazemos o FIX para quem usa 1.1 e 1.2.
Vamos arrumar?
É simples, siga comigo:
Em suas sources, abra o arquivo creature.cpp procure por:
void Creature::onCreatureAppear(Creature* creature, bool) Vamos adicionar um isLogin, ou seja substitua a linha a cima por:
void Creature::onCreatureAppear(Creature* creature, bool isLogin)
Ainda no creature.cpp procure por:
if (creature == this) { if (useCacheMap()) { isMapLoaded = true; updateMapCache(); } Logo abaixo pule uma linha e adicione:
if (isLogin) { setLastPosition(getPosition()); }
Agora abra o seu creature.h
Na linha 156 procure por:
virtual void addList() = 0; Pule uma linha e adicione:
const Position& getLastPosition() const { return lastPosition; } void setLastPosition(const Position& newLastPos) { lastPosition = newLastPos; } Ainda no creature.h procure por
virtual void onCreatureAppear(Creature* creature, bool); Substitua a linha a cima por:
virtual void onCreatureAppear(Creature* creature, bool isLogin); Procure por:
Outfit_t defaultOutfit; Pule uma linha e adicione:
Position lastPosition;
Agora abra o seu game.cpp e procure por:
ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags /*= 0*/) { Logo abaixo adicione:
creature->setLastPosition(creature->getPosition());
Agora por fim, abra seu movement.cpp procure por:
LuaScriptInterface::pushPosition(L, fromPos); Substitua a linha a cima por:
LuaScriptInterface::pushPosition(L, creature->getLastPosition());
Pronto pessoal, você está livre desse bug que pode ter lhe prejudicado muito.
Ao engraçadinho que descobriu e saiu espalhando, que pena em jovem.
Espero ter ajudado, não esqueçam de fixar em seu servidor!
Até a próxima!
-
Absolute recebeu reputação de Veigh em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de marcelo92devv em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de xainvi em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de sandrosousa em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de rcx777 em [8.6] [GLOBAL TELEPORTS ABSOLUTE EDITED] PERFECT!Fala galera do TK, como vão? -qq
Poisé cheguei recentemente aqui no fórum e já trago para vocês um super projeto que venho trabalhando há algum tempo na versão 8.6 mas por falta de tempo disponível venho disponibilizar aqui para que outras pessoas possam usa-lo.
Este global é um GLOBAL COM TELEPORTS, há teleports para hunts, quests e tudo mais, ou seja para quem é um pouco preguiçoso rsrs'.
Chega de blábláblá e vamos ao que interessa;
Algumas imagens do servidor tiradas do MAP Editor:
Clique no SPOILER e veja as imagens ;p
Não vou ficar falando o tanto de sistema que tem, tem o mínimo de bugs possíveis, nenhum bug que derruba o servidor ou que possa afetar a jogabilidade dos seus jogadores.
Principal conteúdo:
Diversos Teleports;
Diversas Quests;
Diversas Citys;
Diversos Items;
Animações nos teleports;
Anti PUSH;
Anti DV;
Monstros adequados para exp maior com os tps;
Magias balanceadas;
Items balanceados
E diversas coisas que vocês poderão conferir realizando o download.
Servidor completo, acompanha as distros compiladas, database tudo pronto para abrir!
Download & Scan:
É importante lembrar que o servidor possui a base da chaitosoft e eu ABSOLUTE trabalhei na mesma para melhorias.
Créditos:
Absolute
Matheus Sesso (SOURCES)
Chaitosoft
Otland
Desculpa se esqueci de algum lindo ae -qq
Até a próxima postagem, aproveitem e divirtam-se pois está muitooo TOP!
-
Absolute recebeu reputação de WolfOts em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de JulianoZN em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de thiagoventura413 em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de poverelo em [8.6] [GLOBAL TELEPORTS ABSOLUTE EDITED] PERFECT!Fala galera do TK, como vão? -qq
Poisé cheguei recentemente aqui no fórum e já trago para vocês um super projeto que venho trabalhando há algum tempo na versão 8.6 mas por falta de tempo disponível venho disponibilizar aqui para que outras pessoas possam usa-lo.
Este global é um GLOBAL COM TELEPORTS, há teleports para hunts, quests e tudo mais, ou seja para quem é um pouco preguiçoso rsrs'.
Chega de blábláblá e vamos ao que interessa;
Algumas imagens do servidor tiradas do MAP Editor:
Clique no SPOILER e veja as imagens ;p
Não vou ficar falando o tanto de sistema que tem, tem o mínimo de bugs possíveis, nenhum bug que derruba o servidor ou que possa afetar a jogabilidade dos seus jogadores.
Principal conteúdo:
Diversos Teleports;
Diversas Quests;
Diversas Citys;
Diversos Items;
Animações nos teleports;
Anti PUSH;
Anti DV;
Monstros adequados para exp maior com os tps;
Magias balanceadas;
Items balanceados
E diversas coisas que vocês poderão conferir realizando o download.
Servidor completo, acompanha as distros compiladas, database tudo pronto para abrir!
Download & Scan:
É importante lembrar que o servidor possui a base da chaitosoft e eu ABSOLUTE trabalhei na mesma para melhorias.
Créditos:
Absolute
Matheus Sesso (SOURCES)
Chaitosoft
Otland
Desculpa se esqueci de algum lindo ae -qq
Até a próxima postagem, aproveitem e divirtam-se pois está muitooo TOP!
-
Absolute recebeu reputação de wiz444 em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de Verokan em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de joao Oliveira 30 em Erro em Carregar Mapano config.lua em mapName coloque: mastermap.otbm e ligue novamente.
-
Absolute recebeu reputação de ITALOx em [Pagseguro Automático] 100% e com Double Points OPCIONALFala linduxos do TK, hoje vim trazer para vocês um sistema que venho modificando a algum tempo.
O Sistema de pagseguro automático, ao longo do script ensinarei perfeitamente como instalar/configurar.
Lembrando que uso esse sistema em um servidor meu e está 100% entregando os pontos no mesmo instante, adicionei a opção de entregar pontos dobrados, para promoção double points acima de X valor.
Vá em sua pasta www ou htocs/config abra o arquivo config.php e procure por: $config['site']['layout'] = ... embaixo disto adicione o seguinte:
// Pagseguro Automático by Absolute on Luminera // Seu email cadastrado no PagSeguro $config['pagseguro']['email'] = 'SEU E-MAIL DO PAGSEGURO'; // Nome do produto $config['pagseguro']['produtoNome'] = 'Premium Points'; // Valor de cada ponto // Exemplo de valores: // 100 = R$ 1,00 // 250 = R$ 2,50 $config['pagseguro']['produtoValor'] = '100'; Simples explicação sobre este passo: em SEU E-MAIL DO PAGSEGURO basta colocar o seu e-mail do pagseguro, ficando como exemplo:
$config['pagseguro']['email'] = '[email protected]'; (não mexa em mais nada)
Próximo passo:
Agora vá na sua pasta www ou htocs e crie um arquivo chamado pagseguro_retorno.php (Extensão PHP formato de página PHP), dentro do pagseguro_retorno.php adicione:
<?PHP $host = "localhost"; /* HOST */ $user = "root"; /* USER */ $passwd = "SENHADOPHPMYADMIN"; /* PASSWORD */ $db = "NOMEDADATABASE"; /* DB */ ############################################################## # CONFIGURAÇÕES ############################################################## $retorno_token = 'SEUTOKENPAGSEGURO'; // Token gerado pelo PagSeguro if (empty($_POST['Referencia'])) { header("Location http://pagseguro.com.br"); } list($accname, $world) = explode('-', $_POST['Referencia']); if ($world=='sv') { $retorno_host = "$host"; // Local da base de dados MySql $retorno_database = "$db"; // Nome da base de dados MySql $retorno_usuario = "$user"; // Usuario com acesso a base de dados MySql $retorno_senha = "$passwd"; // Senha de acesso a base de dados MySql } ############################################################### # ATENÇÃO TIBIAKING NÃO ALTERE DESTA LINHA PARA BAIXO OK? Absolute Agradeçe hihi # $lnk = mysql_connect("$host", "$user", "$passwd") or die ('Nao foi possível conectar ao MySql: ' . mysql_error()); mysql_select_db("$db", $lnk) or die ('Nao foi possível ao banco de dados selecionado no MySql: ' . mysql_error()); // Validando dados no PagSeguro $PagSeguro = 'Comando=validar'; $PagSeguro .= '&Token=' . $retorno_token; $Cabecalho = "Retorno PagSeguro"; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $PagSeguro .= "&$key=$value"; } if (function_exists('curl_exec')) { $curl = true; } elseif ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen ('ssl://pagseguro.uol.com.br', 443, $errno, $errstr, 30)) ) { $fsocket = true; } elseif ($fp = @fsockopen('pagseguro.uol.com.br', 80, $errno, $errstr, 30)) { $fsocket = true; } if ($curl == true) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://pagseguro.uol.com.br/Security/NPI/Default.aspx'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $PagSeguro); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_URL, 'https://pagseguro.uol.com.br/Security/NPI/Default.aspx'); $resp = curl_exec($ch); curl_close($ch); $confirma = (strcmp ($resp, "VERIFICADO") == 0); } elseif ($fsocket == true) { $Cabecalho = "POST /Security/NPI/Default.aspx HTTP/1.0\r\n"; $Cabecalho .= "Content-Type: application/x-www-form-urlencoded\r\n"; $Cabecalho .= "Content-Length: " . strlen($PagSeguro) . "\r\n\r\n"; if ($fp || $errno>0) { fputs ($fp, $Cabecalho . $PagSeguro); $confirma = false; $resp = ''; while (!feof($fp)) { $res = @fgets ($fp, 1024); $resp .= $res; if (strcmp ($res, "VERIFICADO") == 0) { $confirma=true; break; } } fclose ($fp); } else { echo "$errstr ($errno)<br />\n"; } } if ($confirma) { ## Recebendo Dados ## $TransacaoID = $_POST['TransacaoID']; $VendedorEmail = $_POST['VendedorEmail']; $Referencia = $_POST['Referencia']; $TipoFrete = $_POST['TipoFrete']; $ValorFrete = $_POST['ValorFrete']; $Extras = $_POST['Extras']; $Anotacao = $_POST['Anotacao']; $TipoPagamento = $_POST['TipoPagamento']; $StatusTransacao = $_POST['StatusTransacao']; $CliNome = $_POST['CliNome']; $CliEmail = $_POST['CliEmail']; $CliEndereco = $_POST['CliEndereco']; $CliNumero = $_POST['CliNumero']; $CliComplemento = $_POST['CliComplemento']; $CliBairro = $_POST['CliBairro']; $CliCidade = $_POST['CliCidade']; $CliEstado = $_POST['CliEstado']; $CliCEP = $_POST['CliCEP']; $CliTelefone = $_POST['CliTelefone']; $NumItens = $_POST['ProdValor_1']; $ProdQuantidade_x = $POST['ProdQuantidade_1']; # GRAVA OS DADOS NO BANCO DE DADOS # mysql_query("INSERT into pagsegurotransacoes SET TransacaoID='$TransacaoID', VendedorEmail='$VendedorEmail', Referencia='$Referencia', TipoFrete='$TipoFrete', ValorFrete='$ValorFrete', Extras='$Extras', Anotacao='$accname', TipoPagamento='$TipoPagamento', StatusTransacao='$StatusTransacao', CliNome='$CliNome', CliEmail='$CliEmail', CliEndereco='$CliEndereco', CliNumero='$CliNumero', CliComplemento='$CliComplemento', CliBairro='$CliBairro', CliCidade='$CliCidade', CliEstado='$CliEstado', CliCEP='$CliCEP', CliTelefone='$CliTelefone', NumItens='$NumItens', Data=now(), ProdQuantidade_x='$ProdQuantidade_x';"); if ($NumItens >= 5) { $pontosadd = $NumItens * 2; } else { $pontosadd = $NumItens; } if ($StatusTransacao == "Aprovado") { mysql_query("UPDATE accounts SET premium_points = premium_points + '$pontosadd' WHERE name = '".htmlspecialchars($accname)."'"); mysql_query("UPDATE pagsegurotransacoes SET StatusTransacao = 'Entregue' WHERE CONVERT( `pagsegurotransacoes`.`TransacaoID` USING utf8 ) = '$TransacaoID' AND CONVERT( `PagSeguroTransacoes`.`StatusTransacao` USING utf8 ) = 'Aprovado' LIMIT 1 ;"); mysql_query('OPTIMIZE TABLE `pagsegurotransacoes`'); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Donate Server</title> <style type="text/css"> body { font-family: Tahoma, Geneva, sans-serif; font-size: 16px; width: 900px; margin: 0px auto; margin-top: 30px; } b { font-size: 18px; font-weight: bold; } </style> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="11%" align="center" valign="middle"><img src="images/true.png" height="auto" width="64" /></td> <td width="89%"><p><b>S</b>ua compra está sendo processada por nossos sistemas de apuração, dentro de no máximo <u>1 hora seus pontos serão creditados</u>, caso o pagamento não for efetuado, ficará em aberto 1 ou mais pagamentos pendentes em sua conta. Caso você tenha mais de 3 pagamentos pendentes por falta de pagamento, sua conta será bloqueada temporariamente para efetuar pagamentos.</p></td> </tr> </table> <p><b>ID de Transação:</b> <?php echo $_POST['TransacaoID']; ?></p> </body> </html> Explicação de configuração deste passo:
Coloque a senha que você usa para entrar no phpmyadmin aqui: $passwd = "SENHADOPHPMYADMIN"; /* PASSWORD */
Exemplo de como ficaria: $passwd = "absolute123"; /* PASSWORD */
Coloque aqui o nome que está seu banco de dados (o mesmo que vai no config.lua, onde salva os characters, contas e cia):
$db = "NOMEDADATABASE"; /* DB */ ;
Exemplo de como ficaria:
$db = "otserver"; /* DB */
IMPORTANTE, TOKEN Pagseguro!
Você irá entrar neste link, aparecerá uma página pedindo para colocar a url de retorno, no entanto você colocará o seu site terminado em /pagseguro_retorno.php, exemplo de link para colocar: http://otglobal.com/pagseguro_retorno.php (LEMBRANDO QUE É APENAS UM EXEMPLO, SERÁ SEUSITE.COM/pagseguro_retorno.php, como na imagem a seguir:
Pós verificar a seleção do "Ativar" e o link correto clique em Salvar.
Agora descendo um pouco esta página onde terá a opção a cima terá uma opção como a imagem a seguir:
Clique em GERAR, você receberá o seu código token e coloque no script que estará na sua pasta www ou htocs, mude na linha:
$retorno_token = 'SEUTOKENPAGSEGURO'; // Token gerado pelo PagSeguro
EM SEUTOKENPAGSEGURO coloque o TOKEN que você acabou de pegar, será vários números e letras, exemplo de como ficaria:
$retorno_token = 'AE89464AE8145487484PAEA978E91'; // Token gerado pelo PagSeguro
DOUBLE POINTS EXPLICAÇÃO:
Neste mesmo script há algumas linhas com a seuginte função:
if ($NumItens >= 5) {
$pontosadd = $NumItens * 2;
Isto quer dizer, > 5 (A cima de 5 pontos, receba: NumItens * 2, receba em 2x PONTOS EM DOBRO!)
Para alterar o valor a cima que a pessoa receberá em dobro: NumItens >= 5) 5 pontos ou mais a pessoa receberá em dobro, caso seja para qualquer valor, troque o 5 pelo 1.
Caso não deseje DOUBLE POINTS e sim 50% do valor em pontos, exemplo: 10R$ = 15 Pontos, altere para:
$pontosadd = $NumItens * 1.5;
Caso não deseje promoção e queira que seja 1 Real = 1 Ponto:
$pontosadd = $NumItens * 1;
Próximo passo:
Calma gente, está quase acabando eu prometo, então abra o seu PHPMYADMIN, localhost/phpmyadmin ou seusite.com/phpmyadmin, exemplo: www.absolutewar.com/phpmyadmin ; absoluteot.servegame.com/phpmyadmin, clique na opção SQL do phpmyadmin (como mostrarei na imagem e de executar.
Código a inserir no "espaço":
CREATE TABLE `pagsegurotransacoes` ( `TransacaoID` varchar(36) NOT NULL, `VendedorEmail` varchar(200) NOT NULL, `Referencia` varchar(200) default NULL, `TipoFrete` char(2) default NULL, `ValorFrete` decimal(10,2) default NULL, `Extras` decimal(10,2) default NULL, `Anotacao` text, `TipoPagamento` varchar(50) NOT NULL, `StatusTransacao` varchar(50) NOT NULL, `CliNome` varchar(200) NOT NULL, `CliEmail` varchar(200) NOT NULL, `CliEndereco` varchar(200) NOT NULL, `CliNumero` varchar(10) default NULL, `CliComplemento` varchar(100) default NULL, `CliBairro` varchar(100) NOT NULL, `CliCidade` varchar(100) NOT NULL, `CliEstado` char(2) NOT NULL, `CliCEP` varchar(9) NOT NULL, `CliTelefone` varchar(14) default NULL, `NumItens` int(11) NOT NULL, `Data` datetime NOT NULL, `status` tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY `TransacaoID` (`TransacaoID`,`StatusTransacao`), KEY `Referencia` (`Referencia`), KEY `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Pós executar irá aparecer uma mensagem que o código foi aceito e uma tabela nova foi criada, como na imagem a seguir:
Agora por fim o ÚLTIMO PASSO
Novamente na pasta www ou htdocs substitua o seu arquivo donate.php por este:
<?php if(!$logged) if($action == "logout") $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Logout Successful</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td></tr> </table> </div> </table></div></td></tr>'; else $main_content .= 'Please enter your account name and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>'; else { $main_content .= '<br><br><b>Valores:</b><br> 1 Point = R$ 1,00<br> 10 Points = R$ 10,00<br> 20 Points = R$ 20,00<br> E assim por diante...<br><br> '; $main_content .= ' <form target="pagseguro" method="post" action="https://pagseguro.uol.com.br/checkout/checkout.jhtml"> <input type="hidden" name="email_cobranca" value="'. $config['pagseguro']['email']. '"> <input type="hidden" name="tipo" value="CP"> <input type="hidden" name="moeda" value="BRL"> <input type="hidden" name="item_id_1" value="1"> <input type="hidden" name="item_descr_1" value="Pontos na account de nome: '.$account_logged->getCustomField("name").'"> <input type="hidden" name="item_valor_1" value="'. $config['pagseguro']['produtoValor'] .'"> <input type="hidden" name="item_frete_1" value="0"> <input type="hidden" name="item_peso_1" value="0"> <input type="hidden" name="ref_transacao" value="'.$account_logged->getCustomField("name").'"> <table border="0" cellpadding="4" cellspacing="1" width="100%" id="#estilo"><tbody> <tr bgcolor="#505050" class="white"> <th colspan="2"><strong>Escolha a quantidade de pontos que deseja comprar</strong></th> </tr> <tr> <td width="10%">Sua conta</td> <td><strong>'.$account_logged->getCustomField("name").'</strong></td> </tr> <tr> <td width="10%">Pontos</td> <td> <input name="item_quant_1" type="text" value="10" size="5" maxlength="5"> </td> </tr> <tr> <td colspan="2"> <input type="image" src="https://p.simg.uol.com.br/out/pagseguro/i/botoes/carrinhoproprio/btnFinalizar.jpg" name="submit" alt="Pague com PagSeguro - é rápido, grátis e seguro!" /> </td> </tr> </tbody></table></form> <b><span style="color:#ff0000;">OBS¹:</span></b> Os pontos são entregues <b>automáticamente</b> logo após a <u>aprovação</u> do seu pagamento pelo PagSeguro, ou seja, pagou e foi aprovado pontos depositados. Você pdoerá acessar o shop offer e desfrutar dos melhores items do servidor! <?php } ?>'; } ?> Pronto galera tão fácil né? agora vocês poderão pegar seu guarda sol, sua água de coco e sentar na sua cadeira de praia enquanto o script entregará os pontos automáticamente em menos de 1 minuto.
Espero ter ajudado, quaisquer dúvidas podem solicitar no tópico ou até mesmo me mandar uma mensagem privado que estarei disposto a ajuda-los.
Créditos:
Absolute (EU)
Matheus Sesso pela página donate.php
Nos vemos na próxima!
Enjoy.
-
Absolute recebeu reputação de ruanvioto em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de Eduardo1534 em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de Lurk em [Eject System] Expulsar Player Inativo da HouseSalve galerinha do TK.
Hoje vim trazer um script muito útil e buscado hoje em dia nos otservers, é o sistema de !eject.
Como funciona ?
Caso o player fica X dias sem logar (configurável) qualquer outro jogador pode chegar na porta da house dizendo o comando !eject, então a house ficará sem dono e em seugida o player poderá compra-la normalmente, dizendo !buyhouse.
É um sript simples e que poderá dar lugar e novas houses a jogadores novos, expulsando os jogadores que não logam mais no seu servidor.
Nota: o script é vendido em uma "empresa" de open tibia onde estou colocando os créditos , disponibilizando aqui minha adaptação e o scrpit para vocês, achou errado? não gostou? ENTÃO COMPRA LÁ =p
Vamos ao que interessa;
Abra sua pasta talkactions/scripts e dentro dela crie um arquivo .lua com o nome de: expulse_house.lua e dentro coloque:
function onSay(cid, words, param) local position = getPlayerPosition(cid) if getPlayerLookDir(cid) == 0 then positions = {x=position.x, y=position.y-1, z=position.z} elseif getPlayerLookDir(cid) == 1 then positions = {x=position.x+1, y=position.y, z=position.z} elseif getPlayerLookDir(cid) == 2 then positions = {x=position.x, y=position.y+1, z=position.z} elseif getPlayerLookDir(cid) == 3 then positions = {x=position.x-1, y=position.y, z=position.z} end if getHouseFromPos(positions) == false then doPlayerSendTextMessage(cid, 27, "Voce precisa estar na frente a porta da casa para usar o comando.") return true end local days = 5*24*60*60 local own = getHouseOwner(getHouseFromPos(positions)) local qry = db.getResult("SELECT `lastlogin` FROM `players` WHERE `id` = "..own) if(qry:getID() ~= -1) then last = tonumber(qry:getDataInt("lastlogin")) if last < os.time() - days then setHouseOwner(getHouseFromPos(positions), NO_OWNER_PHRASE,true) doPlayerSendTextMessage(cid, 27, "A Casa agora esta sem dono, você ou outro jogador pode compra-la") end if last > os.time() - days then doPlayerSendTextMessage(cid, 27, "O proprierário desta casa ainda está ativo no servidor, tente outra casa.") end end return true end Pós ter feito isto, abra o seu arquivo talkactions.xml e coloque debaixo de uma linha qualquer a seguinte linha:
<talkaction words="!eject" event="script" value="expulse_house.lua"/> Pronto. basta o player chegar na porta da casa e dizer !eject, caso o jogador esteja a 5 dias sem logar, os items do antigo dono irão para o DEPOT e a casa ficará sem dono.
@Configuração do script:
local days = 5*24*60*60 Onde está o número 5 é o tanto de dias que o player tem que ficar sem logar para outro jogador executar o comando.
Para alterar para 3 dias, ficaria como exemplo:
local days = 3*24*60*60 E assim sucessivamente.
Qualquer dúvida não deixe de me comunicar, estarei disposto a ajuda-lo.
Créditos:
Keilost
-
Absolute recebeu reputação de KingsotServ em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
Absolute recebeu reputação de Rodrigo94 em (Resolvido)[PEDIDO] Item que aumenta a Exp para PDA?Configurado para durar 1 dia.
------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 1440, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 1}, costmana = {TRUE, mana = 1000}, addrate = 100, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]> domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= 1 then return doPlayerSendCancel(cid, "You are already taking effect from this item.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "You need to be a premmium account to use this item.") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "You need to be level " .. configs.needlvl.level .. " to use this item.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "You need " .. configs.costmana.mana .. " mana to use this item.") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "The effect of the exp potion end.") setPlayerStorageValue(cid, 62164, 0) end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "2x de experiencia!, o efeito acabara em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora voce ira receber mais exp por matar os mosntros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]> domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "The effect of the exp potion end.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "2x de experiencia!, o efeito acabara em "..a..".") end end return TRUE ]]> -
Absolute recebeu reputação de jakons em (Resolvido)[PEDIDO] Critical SystemCara eu acho que você tem que fechar a boca, criatividade todo mundo tem, eis da pessoa conseguir ou não fazer um sistema igual.
@Topic, irei fazer.
-
Absolute recebeu reputação de jakons em [UP-LEVEL] Recompensa ao subir de levelFala TKZIANOS de plantão WTF? AUEHAUHEA Mas ok...
Venho hoje trazer a vocês um sistema de ganhar uma recompensa ao conquistar determinado nível (Configurável)
Como funciona?
Quando o jogador conquistar determinado level ele recebe como recompensa X item ou GOLD!
Mais Absolute, o cara vai ficar se matando e upando de novo para ficar pegando a recompensa... NÃO! Quando o player conquista o level ele recebe uma STORAGE, essa storage faz com que salve isto, ou seja faz com que marque que o jogador já recebeu, se ele tentar burlar o sistema ele não vai receber pelo fato da tal STORAGE já estar gravada nele =p
Em data/creaturescripts/scripts crie um arquivo chamado uplevelabsolute.lua e coloque o seguinte dentro:
function onAdvance(cid, skill, oldLevel, newLevel) local config = { [50] = {item = 2160, count = 5}, [100] = {item = 2160, count = 15}, [150] = {item = 2160, count = 20}, [200] = {item = 2160, count = 25}, [250] = {item = 2160, count = 30}, [300] = {item = 2160, count = 50}, [350] = {item = 4891, count = 1}, [400] = {item = 4892, count = 1}, } if skill == 8 then for level, info in pairs(config) do if newLevel >= level and (getPlayerStorageValue(cid, 30700) == -1 or not (string.find(getPlayerStorageValue(cid, 30700), "'" .. level .. "'"))) then doPlayerAddItem(cid, info.item, info.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Parabéns, você atingiu o level "..newLevel.." e ganhou "..info.count.." "..getItemNameById(info.item)..".") local sat = getPlayerStorageValue(cid, 30700) == -1 and "Values: '" .. level .. "'" or getPlayerStorageValue(cid, 30700) .. ",'" .. level .. "'" setPlayerStorageValue(cid, 30700, sat) end end end return TRUE end Em data/creaturescripts/creaturescripts.xml adicione a seguinte linha:
<event type="advance" name="UpAbsolute" event="script" value="uplevelabsolute.lua"/> Em data/creaturescripts/scripts/login.lua abaixo de registerCreatureEvent(cid, "Mail") adicione a seguinte linha:
registerCreatureEvent(cid, "UpAbsolute") Pronto, você implantou o sistema em seu servidor.
Como configurar:
[50] = {item = 2160, count = 5}, [50] = level que o player vai receber a tal recompensa
2160 = item que o player vai receber, no caso 2160 é o Crystal Coin
count = 5 = quantidade do item, no caso 5 Crystal Coins
Observação: Ao atingir o level o player receberá uma mensagem e o prêmio estará diretamente em sua backpack.
Qualquer dúvida peço que poste =D
Até o próximo sisteminha bb's.
-
Absolute recebeu reputação de jakons em [Sistema de Ticket] Atendimento - Gesior AccFala galerinha do TK, depois de ver muitos pedidos em busca desse simples sistema, resolvi pegar um antigo meu e realizar algumas modificações para que vocês possam usar em seus servidores, aprimorando o atendimento aos seus players.
Funcionamento;
Quando o player logar a conta e clicar na página para abrir um chamado, irá abrir:
Qualquer jogador com a conta logada, poderá abrir seu chamado, clicando em [Abrir chamado] (como mostra na imagem a cima). Então o mesmo será redirecionado para:
Campos requeridos:
Assunto;
O nome já diz tudo, o motivo da abertura do chamado.
Descrição;
Nome também diz tudo, o assunto do motivo da abertura do chamado.
Tag;
Em tag ele selecionará o motivo do chamado (para ajudar o administrador dos tickets no assunto), Ficando mais ágil e bonito hihi .
Prioridade;
Em prioridade ele irá selecionar a prioridade da resposta do ticket, Alta; Normal ou Baixa.
Pós clicar em "Submit" irá abrir o chamado como na imagem:
Nota: Quando estiver logado com a conta do administrador (Page acess 6) irá aparecer na página um "Admin Painel" onde você irá ver, responder e gerenciar os chamados abertos pelos jogadores.
Toda vez que o ticket for respondido o status é alterado para "Respondido" e então caso ainda haja alguma dúvida o players poderá responder o ticket, até você selecionar o status como "Fechado"
Creio que está bem explicado o funcionamento.
Enfim, agora vamos a instalação do sistema *-*
Primeiramente na sua pasta htocs(em windows) ou www(no caso de linux), ou seja, na pasta do seu site, onde fica as páginas principais como: latestnews.php, arichive.php, highscores.php e companhia.
Nesta pasta crie um arquivo com o nome de helpdesk.php e adicione o seguinte dentro:
<?php if($logged) { // type (1 = question; 2 = answer) // status (1 = open; 2 = new message; 3 = closed;) $dark = $config['site']['darkborder']; $light = $config['site']['lightborder']; $priority = array(1 => "Baixa", "Normal", "Alta"); $tags = array(1 => "[Vendas]", "[Suporte]", "[Parceria]", "[Bug]", "[Outros]"); if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] and $_REQUEST['control'] == "true") { if(empty($_REQUEST['id']) and empty($_REQUEST['acc']) or !is_numeric($_REQUEST['acc']) or !is_numeric($_REQUEST['id']) ) $bug[1] = $SQL->query('SELECT * FROM '.$SQL->tableName('z_helpdesk').' where `type` = 1 order by `uid` desc'); if(!empty($_REQUEST['id']) and is_numeric($_REQUEST['id']) and !empty($_REQUEST['acc']) and is_numeric($_REQUEST['acc'])) $bug[2] = $SQL->query('SELECT * FROM '.$SQL->tableName('z_helpdesk').' where `account` = '.$_REQUEST['acc'].' and `id` = '.$_REQUEST['id'].' and `type` = 1')->fetch(); if(!empty($_REQUEST['id']) and is_numeric($_REQUEST['id']) and !empty($_REQUEST['acc']) and is_numeric($_REQUEST['acc'])) { if(!empty($_REQUEST['reply'])) $reply=true; $account = $ots->createObject('Account'); $account->load($_REQUEST['acc']); $account->isLoaded(); $players = $account->getPlayersList(); if(!$reply) { if($bug[2]['status'] == 2) $value = "<font color=gray><b>Aguardando</b> <img src=images/bug/waiting.gif></font>"; elseif($bug[2]['status'] == 4) $value = "<font color=green><b>Respondido</b></font> <img src=images/bug/ok.png>"; elseif($bug[2]['status'] == 3) $value = "<font color=red><b>Fechado</b></font> <img src=images/bug/closed.png>"; elseif($bug[2]['status'] == 1) $value = "<font color=#4169E1><b>Nova Resposta</b></font> <img src=images/bug/new.png>"; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Atendimento</B></TD></TR>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td width=40%><img src=images/bug/report.png> <b>Assunto:</b></td><td> '.$tags[$bug[2]['tag']].' '.$bug[2]['subject'].' '.$value.'</td></tr>'; $main_content .= '<TR BGCOLOR="'.$light.'"><td><img src=images/bug/pri.gif> <b>Prioridade:</b></td><td> <img src=images/bug/'.$bug[2]['priority'].'.png> '.$priority[$bug[2]['priority']].''; $main_content .= '<TR BGCOLOR="'.$dark.'"><td><img src=images/bug/tibia.png> <b>Enviado por:</b></td><td>'; foreach($players as $player) { $main_content .= '<img src=images/bug/t.png> '.$player->getName().'<br>'; } $main_content .= '</td></tr>'; $main_content .= '<TR BGCOLOR="'.$light.'"><td colspan=2><img src=images/bug/des.png><b>Descrição:</b></td></tr>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td colspan=2>'.nl2br($bug[2]['text']).'</td></tr>'; $main_content .= '</TABLE>'; $answers = $SQL->query('SELECT * FROM '.$SQL->tableName('z_helpdesk').' where `account` = '.$_REQUEST['acc'].' and `id` = '.$_REQUEST['id'].' and `type` = 2 order by `reply`'); $ot = $config['site']['worlds']; foreach($answers as $answer) { if($answer['who'] == 1) $who = "<img src=images/bug/staff.gif> <font color=red><b>Staff</b></font>"; else $who = "<img src=images/bug/player.gif> <font color=green><b>Player</b></font>"; $main_content .= '<br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Resposta #'.$answer['reply'].'</B></TD></TR>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td width=70%><img src=images/bug/tibia.png><i><b>Enviado por:</b></i></td><td>'.$who.'</td></tr>'; $main_content .= '<TR BGCOLOR="'.$light.'"><td colspan=2><img src=images/bug/des.png><i><b>Descrição:</b></i></td></tr>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td colspan=2>'.nl2br($answer['text']).'</td></tr>'; $main_content .= '</TABLE>'; } if($bug[2]['status'] <= 4) $main_content .= '<br><a href="index.php?subtopic=helpdesk&control=true&id='.$_REQUEST['id'].'&acc='.$_REQUEST['acc'].'&reply=true"><b>[Responder]</b></a>'; } else { //if($bug[2]['status'] < 3) //{ $reply = $SQL->query('SELECT MAX(reply) FROM `z_helpdesk` where `account` = '.$_REQUEST['acc'].' and `id` = '.$_REQUEST['id'].' and `type` = 2')->fetch(); $reply = $reply[0] + 1; $iswho = $SQL->query('SELECT * FROM `z_helpdesk` where `account` = '.$_REQUEST['acc'].' and `id` = '.$_REQUEST['id'].' and `type` = 2 order by `reply` desc limit 1')->fetch(); if(isset($_POST['finish'])) { if(empty($_POST['text'])) $error[] = "<font color=black><b>Por favor, preencha a descrição.</b></font>"; //if($iswho['who'] == 1) //$error[] = "<font color=black><b>Você precisa aguardar a resposta do usuário.</b></font>"; if(empty($_POST['status'])) $error[] = "<font color=black><b>Status cannot be empty.</b></font>"; if(!empty($error)) { foreach($error as $errors) $main_content .= ''.$errors.'<br>'; } else { $type = 2; $INSERT = $SQL->query('INSERT INTO `z_helpdesk` (`account`,`id`,`text`,`reply`,`type`, `who`) VALUES ('.$SQL->quote($_REQUEST['acc']).','.$SQL->quote($_REQUEST['id']).','.$SQL->quote($_POST['text']).','.$SQL->quote($reply).','.$SQL->quote($type).','.$SQL->quote(1).')'); $UPDATE = $SQL->query('UPDATE `z_helpdesk` SET `status` = '.$_POST['status'].' where `account` = '.$_REQUEST['acc'].' and `id` = '.$_REQUEST['id'].''); header('Location: index.php?subtopic=helpdesk&control=true&id='.$_REQUEST['id'].'&acc='.$_REQUEST['acc'].''); } } $main_content .= '<br><form method="post" action=""><table><tr><td>Mensagem:</i></td><td><textarea name="text" rows="3" cols="25"></textarea></td></tr><tr><td><br><font color=gray><b>Aguardando</b></font> <img src=images/bug/waiting.gif></td><td><input type=radio name=status value=2></td></tr><tr><td><font color=green><b>Respondido <img src=images/bug/ok.png /></b></font></td><td><input type=radio name=status value=4></td></tr><tr><td><font color=red><b>Fechado <img src=images/bug/closed.png></b></font></td><td><input type=radio name=status value=3></td></tr></table><br><input type="submit" name="finish" value="Submit" class="input2"/></form>'; //} //else //{ //$main_content .= "<br><font color=black><b>You can't add answer to closed bug thread.</b></font>"; //} } $post=true; } if(!$post) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD colspan=2 CLASS=white><B>Atendimento Admin</B></TD></TR>'; $i=1; foreach($bug[1] as $report) { if($report['status'] == 2) $value = "<font color=gray><b>Aguardando</b> <img src=images/bug/waiting.gif></font>"; elseif($report['status'] == 3) $value = "<font color=red><b>Fechado</b></font> <img src=images/bug/closed.png>"; elseif($report['status'] == 4) $value = "<font color=green><b>Respondido </b></font> <img src=images/bug/ok.png>"; elseif($report['status'] == 1) $value = "<font color=#4169E1><b>Nova Resposta</b></font> <img src=images/bug/new.png>"; if(is_int($i / 2)) { $bgcolor = $dark; } else { $bgcolor = $light; } $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td width=75%><img src=images/bug/'.$report['priority'].'.png> <a href="index.php?subtopic=helpdesk&control=true&id='.$report['id'].'&acc='.$report['account'].'">'.$tags[$report['tag']].' '.$report['subject'].'</a></td><td>'.$value.'</td></tr>'; $showed=true; $i++; } $main_content .= '</TABLE>'; } } else { $acc = $account_logged->getId(); $account_players = $account_logged->getPlayersList(); foreach($account_players as $player) { $allow=true; } if(!empty($_REQUEST['id'])) $id = addslashes(htmlspecialchars(trim($_REQUEST['id']))); if(empty($_REQUEST['id'])) $bug[1] = $SQL->query('SELECT * FROM '.$SQL->tableName('z_helpdesk').' where `account` = '.$account_logged->getId().' and `type` = 1 order by `id` desc'); if(!empty($_REQUEST['id']) and is_numeric($_REQUEST['id'])) $bug[2] = $SQL->query('SELECT * FROM '.$SQL->tableName('z_helpdesk').' where `account` = '.$account_logged->getId().' and `id` = '.$id.' and `type` = 1')->fetch(); else $bug[2] = NULL; if(!empty($_REQUEST['id']) and $bug[2] != NULL) { if(!empty($_REQUEST['reply'])) $reply=true; if(!$reply) { if($bug[2]['status'] == 1) $value = "<font color=gray><b>Aguardando</b> <img src=images/bug/waiting.gif></font>"; elseif($bug[2]['status'] == 2) $value = "<font color=#4169E1><b>Nova Resposta</b></font> <img src=images/bug/new.png>"; elseif($bug[2]['status'] == 3) $value = "<font color=red><b>Fechado</b></font> <img src=images/bug/closed.png>"; elseif($bug[2]['status'] == 4) $value = "<font color=green><b>Respondido</b></font> <img src=images/bug/ok.png>"; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Atendimento</B></TD></TR>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td width=40%><img src=images/bug/report.png><b> Assunto:</b></td><td> '.$tags[$bug[2]['tag']].' '.$bug[2]['subject'].' '.$value.'</td></tr>'; $main_content .= '<TR BGCOLOR="'.$light.'"><td><img src=images/bug/pri.gif> <b>Prioridade:</b></td><td> <img src=images/bug/'.$bug[2]['priority'].'.png> '.$priority[$bug[2]['priority']].''; $main_content .= '<TR BGCOLOR="'.$dark.'"><td><img src=images/bug/tibia.png> <b>Enviado por:</b></td><td>'; $main_content .= '<img src=images/bug/t.png> You <br>'; $main_content .= '<TR BGCOLOR="'.$light.'"><td colspan=2><img src=images/bug/des.png><b>Descrição:</b></td></tr>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td colspan=2>'.nl2br($bug[2]['text']).'</td></tr>'; $main_content .= '</TABLE>'; $answers = $SQL->query('SELECT * FROM '.$SQL->tableName('z_helpdesk').' where `account` = '.$account_logged->getId().' and `id` = '.$id.' and `type` = 2 order by `reply`'); foreach($answers as $answer) { if($answer['who'] == 1) $who = "<img src=images/bug/staff.gif> <font color=red><b>Staff</b></font>"; else $who = "<img src=images/bug/player.gif> <font color=green><b>YOU</b></font>"; $main_content .= '<br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Answer #'.$answer['reply'].'</B></TD></TR>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td width=70%><img src=images/bug/tibia.png><i><b> Enviado por:</b></i></td><td>'.$who.'</td></tr>'; $main_content .= '<TR BGCOLOR="'.$light.'"><td colspan=2><img src=images/bug/des.png><i><b>Descrição:</b></i></td></tr>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td colspan=2>'.nl2br($answer['text']).'</td></tr>'; $main_content .= '</TABLE>'; } if($bug[2]['status'] != 3) $main_content .= '<br><a href="index.php?subtopic=helpdesk&id='.$id.'&reply=true"><b>[Responder]</b></a>'; } else { //if($bug[2]['status'] != 3) //{ $reply = $SQL->query('SELECT MAX(reply) FROM `z_helpdesk` where `account` = '.$acc.' and `id` = '.$id.' and `type` = 2')->fetch(); $reply = $reply[0] + 1; $iswho = $SQL->query('SELECT * FROM `z_helpdesk` where `account` = '.$acc.' and `id` = '.$id.' and `type` = 2 order by `reply` desc limit 1')->fetch(); if(isset($_POST['finish'])) { if(empty($_POST['text'])) $error[] = "<font color=black><b>Descrição não pode ser vazia.</b></font>"; if($iswho['who'] == 0) $error[] = "<font color=black><b>Você precisa aguardar a resposta da staff.</b></font>"; if(!$allow) $error[] = "<font color=black><b>Você não possui nenhum char na conta.</b></font>"; if(!empty($error)) { foreach($error as $errors) $main_content .= ''.$errors.'<br>'; } else { $type = 2; $INSERT = $SQL->query('INSERT INTO `z_helpdesk` (`account`,`id`,`text`,`reply`,`type`) VALUES ('.$SQL->quote($acc).','.$SQL->quote($id).','.$SQL->quote($_POST['text']).','.$SQL->quote($reply).','.$SQL->quote($type).')'); $UPDATE = $SQL->query('UPDATE `z_helpdesk` SET `status` = 1 where `account` = '.$acc.' and `id` = '.$id.''); header('Location: index.php?subtopic=helpdesk&id='.$id.''); } } $main_content .= '<br><form method="post" action=""><table><tr><td><i>Description</i></td><td><textarea name="text" rows="15" cols="35"></textarea></td></tr></table><br><input type="submit" name="finish" value="Submit" class="input2"/></form>'; //} //else // //$main_content .= "<br><font color=black><b>You can't add answer to closed bug thread.</b></font>"; //} } $post=true; } elseif(!empty($_REQUEST['id']) and $bug[2] == NULL) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white><B>Atendimento</B></TD></TR>'; $main_content .= '<TR BGCOLOR="'.$dark.'"><td><i>Ticket doesn\'t exist.</i></td></tr>'; $main_content .= '</TABLE>'; $post=true; } if(!$post) { if($_REQUEST['add'] != TRUE) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD colspan=2 CLASS=white><B>Atendimento</B></TD></TR>'; foreach($bug[1] as $report) { if($report['status'] == 1) $value = "<font color=gray><b>Aguardando</b> <img src=images/bug/waiting.gif></font>"; elseif($report['status'] == 2) $value = "<font color=#4169E1><b>Nova Resposta</b></font> <img src=images/bug/new.png>"; elseif($report['status'] == 3) $value = "<font color=red><b>Fechado</b></font> <img src=images/bug/closed.png>"; elseif($report['status'] == 4) $value = "<font color=green><b>Respondido </b></font> <img src=images/bug/ok.png>"; if(is_int($report['id'] / 2)) { $bgcolor = $dark; } else { $bgcolor = $light; } $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td width=75%><img src=images/bug/'.$report['priority'].'.png> <a href="index.php?subtopic=helpdesk&id='.$report['id'].'">'.$tags[$report['tag']].' '.$report['subject'].'</a></td><td>'.$value.'</td></tr>'; $showed=true; } if(!$showed) { $main_content .= '<TR BGCOLOR="'.$dark.'"><td><i>Nenhum atendimento solicitado.</i></td></tr>'; } $main_content .= '</TABLE>'; $main_content .= '<br><a href="index.php?subtopic=helpdesk&add=true"><b>[Abrir Chamado]</b></a>'; } elseif($_REQUEST['add'] == TRUE) { $thread = $SQL->query('SELECT * FROM `z_helpdesk` where `account` = '.$acc.' and `type` = 1 order by `id` desc')->fetch(); $id_next = $SQL->query('SELECT MAX(id) FROM `z_helpdesk` where `account` = '.$acc.' and `type` = 1')->fetch(); $id_next = $id_next[0] + 1; if(empty($thread)) $thread['status'] = 3; if(isset($_POST['submit'])) { //if($thread['status'] != 3) //$error[] = "<font color=black><b>Can be only 1 open bug thread.</b></font>"; if(empty($_POST['subject'])) $error[] = "<font color=black><b>Assunto cannot be empty.</b></font>"; if(empty($_POST['text'])) $error[] = "<font color=black><b>Description cannot be empty.</b></font>"; if(!$allow) $error[] = "<font color=black><b>You haven't any characters on account.</b></font>"; if(empty($_POST['tags'])) $error[] = "<font color=black><b>Tag cannot be empty.</b></font>"; if(!empty($error)) { foreach($error as $errors) $main_content .= ''.$errors.'<br>'; } else { $type = 1; $status = 1; $INSERT = $SQL->query('INSERT INTO `z_helpdesk` (`account`,`id`,`text`,`type`,`subject`,`status`,`tag`,`priority`) VALUES ('.$SQL->quote($acc).','.$SQL->quote($id_next).','.$SQL->quote($_POST['text']).','.$SQL->quote($type).','.$SQL->quote($_POST['subject']).','.$SQL->quote($status).','.$SQL->quote($_POST['tags']).','.$SQL->quote($_POST['priority']).')'); header('Location: index.php?subtopic=helpdesk&id='.$id_next.''); } } $main_content .= '<br><form method="post" action=""><font size=4><b>Atendimento</b></font><br><br><br><table><tr><td><img src=images/bug/report.png> <b>Assunto:</b></td><td><input type=text name="subject"/></td></tr><tr><td><img src=images/bug/des.png><b>Descrição:</b></td><td><textarea name="text" rows="4" cols="15"></textarea></td></tr><tr><td><img src=images/bug/tag.png> <b>TAG:</b></td><td><select name="tags"><option value="">SELECT</option>'; for($i = 1; $i <= count($tags); $i++) { $main_content .= '<option value="' . $i . '">' . $tags[$i] . '</option>'; } $main_content .= '</td></tr><tr><td><br><img src=images/bug/pri.gif> <b>Prioridade:</b></td><td><br><select name="priority"><option value="">SELECT</option>'; for($i = 1; $i <= count($priority); $i++) { $main_content .= '<option value="' . $i . '">' . $priority[$i] . '</option>'; } $main_content .= '</select></tr></tr></table><br><input type="submit" name="submit" value="Submit" class="input2"/></form>'; } } } if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] and empty($_REQUEST['control'])) { $main_content .= '<br><br><a href="index.php?subtopic=helpdesk&control=true">[ADMIN PANEL]</a>'; } } else { $main_content .= 'Please enter your account name and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/><form action="?subtopic=helpdesk" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>'; } ?> Salve e feche.
Pós isso abra o seu phpmyadmin, seuip.com/phpmyadmin, clique em executar e dentro da caixa coloque o seguinte:
CREATE TABLE IF NOT EXISTS `z_helpdesk` ( `account` varchar(255) NOT NULL, `type` int(11) NOT NULL, `status` int(11) NOT NULL, `text` text NOT NULL, `id` int(11) NOT NULL, `subject` varchar(255) NOT NULL, `priority` int(11) NOT NULL, `reply` int(11) NOT NULL, `who` int(11) NOT NULL, `uid` int(11) NOT NULL AUTO_INCREMENT, `tag` int(11) NOT NULL, `registered` int(11) NOT NULL, PRIMARY KEY (`uid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=61 ; E então irá aparecer aquela linha verde dizendo que o comando foi executado com sucesso...
Pronto, o sistema foi implantando.
Agora irei ensinar vocês (caso não saibam) adicionar a aba de atendimento no menu do seu website.
Primeiramente, na pasta principal do seu site abra o arquivo index.php e procure por:
case "houses": $topic = "Houses"; $subtopic = "houses"; include("houses.php"); break; Logo abaixo de break; adicione o seguinte:
case "helpdesk": $topic = "Helpdesk"; $subtopic = "helpdesk"; include("helpdesk.php"); break; Ficando então:
case "houses": $topic = "Houses"; $subtopic = "houses"; include("houses.php"); break; case "helpdesk": $topic = "Helpdesk"; $subtopic = "helpdesk"; include("helpdesk.php"); break; Salve e feche.
Logo depois na pasta principal vá em layouts/tibiacom/layout.php e procure por:
<a href='index.php?subtopic=archive'> <div id='submenu_archive' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(<?PHP echo "$layout_name"; ?>/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_archive' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo "$layout_name"; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'>News Archive</div> <div class='RightChain' style='background-image:url(<?PHP echo "$layout_name"; ?>/images/general/chain.gif);'></div> </div> </a> Logo depois do </a> adicione:
<a href='index.php?subtopic=helpdesk'> <div id='submenu_helpdesk' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(<?PHP echo "$layout_name"; ?>/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_helpdesk' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo "$layout_name"; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'>Atendimento <font size=-3>NOVO</font></div> <div class='RightChain' style='background-image:url(<?PHP echo "$layout_name"; ?>/images/general/chain.gif);'></div> </div> </a> Salve e feche.
Pronto, atualize seu site e no menu News verifique que estará lá em funcionalidade o sistema de Atendimento por Ticket.
Dica: Seja formal e tenha eficaz com seus jogadores, isto mostrará a dedicação da equipe em cima do servidor.
Este sistema é antigo, onde venho adaptando para postar para vocês do TibiaKing, não autorizo o post do mesmo em outro fórum seja qual for a relação. O conteúdo foi adaptado por mim e exclusivo ao fórum do tibiaking.
Qualquer dúvida quero que me comunique e poste aqui no fórum.
O Sistema foi testado e encontra-se em funcionalidade a qualquer gesior account, seja qual for a versão do mesmo.
Créditos:
Averatec -OTLAND
Absolute
Gostaram?
Até o próximo sistema/script/servidor seja o que for!
Até mais galerinha do TK!
-
Absolute recebeu reputação de Jeff Delay em [ANTI-CLONE] 100% NOVO [O MELHOR]Fala galera do TK!
Trago hoje a vocês um sistema que desenvolvi sob uma base de shop com meu parceiro Thales Valentim do pokemonbr.com.br a alguns meses, pós vários testes e visando que funcionou perfeitamente trago para vocês!
Como funciona?
Toda vez que um ItemVIP ou qualquer Item comprado no SHOP do seu site, quando ele for entregar ao player, irá ficar; COMPRADOR POR:, ou seja; irá adicionar uma "KEY" algo que realmente saiu direto do seu SHOP, pois quando o item é disparado para o player ele vai entregar normal com a função "doCreateItemEx" e então adicionar a descrição no mesmo com a função "doItemSetAttribute".
E como evitará os clones Absolute?
Você terá uma QUERY para executar no seu banco de dados, fazendo uma checagem dos items VIPS que não possuem esse SERIAL KEY (o script também já faz a checagem), ou seja; os que não tiverem a KEY foram clonados (não saíram do SHOP), e então vocês poderão deleta-los manualmente caso necessário.
É muito simples, apenas um script e a QUERY de checagem.
Vamos a instalação?
Em data/globalevents/scripts substitua o seu arquivo shop.lua por este:
-- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### 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 container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end 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) doItemSetAttribute(new_container, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') local iter = 0 while iter ~= container_count do local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') doAddContainerItemEx(new_container, new_item) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') 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.') doPlayerSave(cid) db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end
Confira se no seu globalevents.xml já possui a tag:
<globalevent name="shop" interval="30000" script="shop.lua"/>
PRONTO, VOCÊ ESTÁ LIVRE DE CLONES! TÃO SIMPLES NÃO?
Para fazer a checagem se há items clonados, abra o seu phpmyadmin e execute a seguinte query:
------------------- COMANDO SQL BY ABSOLUTE PARA VERIFICAR A TABELA PLAYER_DEPOTITEMS---------------------- SELECT `player_id`,`pid`,`sid`,CONVERT( `attributes` USING latin1 ) FROM `player_depotitems` WHERE CONVERT( `attributes` USING latin1 ) LIKE '%description%' ------------------- COMANDO SQL BY ABSOLUTE PARA VERIFICAR A TABELA PLAYER_ITEMS---------------------- SELECT `player_id`,`pid`,`sid`,CONVERT( `attributes` USING latin1 ) FROM `player_items` WHERE CONVERT( `attributes` USING latin1 ) LIKE '%description%'
OBSERVAÇÃO IMPORTANTE: Caso seu servidor já esteja online e já possua vendas no seu SHOP, você terá que adicionar a "KEY" em todos os items ou reseta-los.
OUTRA OBSERVAÇÃO: Nunca crie items VIP com o ADMIN e de aos jogadores, pois eles ficaram sem a "KEY" e poderão ser deletados.
ESTE SCRIPT FUNCIONA PERFEITAMENTE NAS REVS 0.3.6 e 0_4, caso necessário passo para a 1.x. S
IMPLES, PRATICO E PERFEITO NÃO?
Quero vê-los usando, espero ter ajudado. :D
Até a próxima!
Absolute.
-
Absolute recebeu reputação de rkkksalgado em [Castle War 24H] Conquiste o trono!Fala galera linduxa do TK; hoje trago a vocês o tão desejado CASTLE WAR 24 HORAS, isto gera disputa intensa entre as guilds de seu servidor, atraindo assim mais jogadores que se interessam por guerras e seus demais sistemas! Modificado e com funções diferentes, no tópico ensinarei como instalar e como funciona.
Como funciona? WOOOOOOOOW!
Há um portal 24h aberto em algum lugar do seu mapa que ficará com o castle disponível 24h (avá).
Quando uma guild qualquer acessar o portal do castelo, irá aparecer para o servidor que a X guild está tentando dominar o castelo, então o líde da guild dominante atual irá dizer !gocastle para teleportar ao castelo e defende-lo.
O Objetivo para conquista do mesmo é invadi-lo derrotar os defensor da guild atual para abrir passagem, digamos assim, e subir ao trono, quando um membro da guild invadir o templo do trono e subir no mesmo a antiga guild dominadora é teleportada para o templo e o castelo fica sob domínio da nova guild.
Você poderá colocar como premiação acesso a áreas exclusivas do castelo, no caso hunts e cia. (Fica a vosso critério)
Evento testado nas versões 8.6; 9.6; 9.83; 9.86!
Observação:
Comando !gocastle faz com que o líder possa teleportar todos os membros da sua guild online para perto dele, desde que ele esteja no castle. Comando pode ser usado a cada 3 horas (exhausted).
Vamos aos scripts do sistema;
Em data/actions/scripts crie um arquivo com o nome de naviocastle.lua e coloque dentro:
function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.actionid == 65500) then if getTopCreature({x=32464,y=32378,z=5}).uid > 0 then doTeleportThing(getTopCreature({x=32464,y=32378,z=5}).uid, {x=32526,y=32421,z=5}) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) else doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.") return true end elseif (item.actionid == 65501) then if getTopCreature({x=32526,y=32421,z=5}).uid > 0 then doTeleportThing(getTopCreature({x=32526,y=32421,z=5}).uid, {x=32464,y=32378,z=5}) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) else doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.") end end return true end
Em actions.xml adicione a seguinte linha:
<action actionid="65500-65501" event="script" value="naviocastle.lua"/> Pós feito isto, em data/lib crie um arquivo com o nome de 015-COH e adicione dentro dele:
-- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // COH_PUSHTIME = 10800 -- Tempo (em segundos) de exhausted para usar o comando !gocastle - Padrão (3 horas) COH_AREA = {{x = 32458, y = 32332, z = 7}, {x = 32558, y = 32429, z = 7}} -- Canto superior esquerdo / inferior direito do Castle -- // Não mexa daqui para baixo COH_STATUS = 201320111714 COH_PREPARE1 = 201320111715 COH_PUSHSTOR = 201320111716 COH_PREPARE2 = 201320111717 function doCastleRemoveEnemies() for index, creature in ipairs(getPlayersOnline()) do if isInArea(getThingPos(creature), COH_AREA[1], COH_AREA[2]) then if getPlayerGuildName(creature) ~= getGlobalStorageValue(COH_STATUS) then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature))) end end end return true end Proximo passo, em data/monster.xml adicione a seguinte linha:
<monster name="Castle Guardian" file="Castle Guardian.xml"/> Em data/monsters crie um arquivo com o nome de Castle Guardian.xml e adicione o seguinte:
<?xml version="1.0" encoding="UTF-8"?> <monster name="Castle Guardian" nameDescription="a castle guardian" race="blood" experience="0" speed="0" manacost="0"> <health now="800000" max="800000"/> <look type="131" head="57" body="19" legs="57" feet="95" addons="1" corpse="6080"/> <targetchange interval="5000" chance="30"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="4"/> <flag staticattack="90"/> <flag runonhealth="800"/> </flags> <attacks> <attack name="melee" interval="2000" min="-60" max="-180"/> <attack name="physical" interval="1000" chance="35" range="7" min="-205" max="-385"> <attribute key="shootEffect" value="energy"/> </attack> <attack name="manadrain" interval="1000" chance="17" range="7" min="-205" max="-560"/> <attack name="speed" interval="1000" chance="12" range="7" speedchange="-600" duration="40000"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="fire" interval="2000" chance="45" range="7" radius="3" target="1" min="-250" max="-420"> <attribute key="shootEffect" value="burstarrow"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="20" range="7" radius="2" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="2000" chance="25" length="8" spread="0" min="-265" max="-445"> <attribute key="areaEffect" value="energy"/> </attack> <attack name="speed" interval="6000" chance="10" range="5" speedchange="-600" duration="20000"> <attribute key="areaEffect" value="redshimmer"/> </attack> </attacks> <defenses armor="1" defense="1"/> <elements> <element firePercent="100"/> <element energyPercent="100"/> <element icePercent="100"/> <element earthPercent="90"/> <element holyPercent="-25"/> <element physicalPercent="-33"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="deathspawn" interval="1500" chance="0" max="0"/> </summons> <loot> <item id="2148" countmax="20" chance1="100000" chancemax="0"/> </loot> </monster> Pós isto;
Em data/movements/scripts crie um arquivo com o nome de COH.lua e adicione o seguinte:
-- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "CoH", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não pertence á guild "..getGlobalStorageValue(COH_STATUS)..".") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, vá dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está muito próxima do domínio, ataquem!") end end return true end Em data/movements/movements.xml adicione a seguinte linha:
<movevent type="StepIn" actionid="16200-16203" event="script" value="COH.lua"/> Próximo passo:
Em data/talkactions/scripts crie um arquivo com o nome de COHABSOLUTE.lua e adicione o seguinte:
-- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // function onSay(cid, words, param) if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then if getPlayerStorageValue(cid, COH_PUSHSTOR) < os.time() then if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then if isInArea(getThingPos(cid), COH_AREA[1], COH_AREA[2]) then if #getMembersOnline(getPlayerGuildId(cid)) > 0 then for index, creature in ipairs(getMembersOnline(getPlayerGuildId(cid))) do if (getTileInfo(getThingPos(creature)).protection ~= true) then return doPlayerSendCancel(cid, "[CoH] Os membros devem estar em área PZ.") end doTeleportThing(creature, getThingPos(cid)) end setPlayerStorageValue(cid, COH_PUSHSTOR, os.time() + COH_PUSHTIME) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "[Castle of Honor] Você teleportou seus membros, comando pode ser usado a cada "..tostring(COH_PUSHTIME / 60).." minuto(s).") else doPlayerSendCancel(cid, "[CoH] Para executar isso, sua guild deve ter 2 ou mais membros online.") end else doPlayerSendCancel(cid, "[CoH] Você deve estar no castelo.") end else doPlayerSendCancel(cid, "[CoH] Sua guild não é dona do castelo.") end else doPlayerSendCancel(cid, "[CoH] Você deve aguardar "..tostring(math.ceil((getPlayerStorageValue(cid, COH_PUSHSTOR) - os.time()) / 60)).." minuto(s) para usar este comando.") end else doPlayerSendCancel(cid, "[CoH] Você deve ser líder de uma guild para executar este comando.") end return true end function getMembersOnline(id) local mbr = {} for index, creature in ipairs(getPlayersOnline()) do if getPlayerGuildId(creature) == id then if getCreatureSkullType(creature) < 3 then table.insert(mbr, creature) end end end return mbr or #mbr end Em data/talkactions/talkactions.xml adicione a seguinte linha:
<talkaction words="!castlepush;!pushmembers;!gocastle" event="script" value="COHABSOLUTE.lua"/> Quem disponibiliza o mapa do castelo a vocês é nosso amigo ViitinG, segue o link do tópico para download do mesmo já adaptado para este Castle:
http://www.tibiaking.com/forum/topic/35730-mapa-evento-war-castle/
Explicação das actions e demais (caso não use o mapa disponibilizado pelo Viiting lembre de adicionar ao castelo);
ActionID 16200 - No meio do caminho para o castelo, ActionID 16201 - Perto do castelo, ActionID 16202 - No piso, trono que faz com que domine, e ActionID 16203 - Para a passagem de acesso ás hunts / city exclusivas da guild vencedora. Importante: Para colocar uma passagem para as hunts ou o que for a premiação da guild vencedora, coloque um caminho único com os actionIDS 16203, assim só a guild dominante do castelo poderá passar neste local. É importante lembrar que este script é de autoria do Roksas Nunez, ex scripter da empresa chaitosoft, fiz simples modificações de otimização.
Qualquer dúvida peço que entre em contato comigo e poste aqui no tópico.
Créditos:
Absolute
Roksas
ViitinG
Espero que gostem, afinal raro alguém disponibilizar algo tão desejado e útil assim!
Até o próximo sistema.
Absolute on tibiaking =p
-
Absolute recebeu reputação de MicroUsb em [Linux] Compilar TFS 1.0 [Fácil]Fala galera do TK, como estão?
Hoje trago a vocês um tutorial de como compilar o novo TFS 1.0 no Linux, Ubuntu / Debian.
Ferramentas necessárias:
Putty
WinSCP
Irei ensinar em instantes estará compilado, vamos lá:
Primeiramente ao acessar seu putty/ssh vamos instalar na máquina as libs necessárias para rodar o TFS 1.0, vamos instalar:
sudo apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev Pós instalar as libs vamos fazer o download do TFS 1.0 (ATUALIZADO 10.41). Executaremos o seguinte comando:
git clone https://github.com/otland/forgottenserver.git Pós feito o download iremos acessar a pasta das sources (ARQUIVOS QUE FORMARAM O TFS). Executamos:
cd forgottenserver Vamos criar um diretório executando:
mkdir build && cd build Então executar:
cmake .. E finalmente digitar o comando para compilar o TFS:
make Pós feito isto, pelo Winscp/Filezilla vá na pasta forgottenserver/build e mova o TFS para pasta principal do seu servidor.
Feito isto iremos ao diretório da pasta do servidor, exemplo: cd /home/Global e execute:
chmod 777 -R tfs Pós isto, rode o TFS com:
./tfs Feito. TFS compilado e servidor rodando, simples e prático não é?
Caso haja alguma dúvida poste no tópico que estarei ajudando a solucionar o possível erro.
Espero ter ajuda-los.
Qualquer dúvida me deixe saber.
Até a próxima.
Absolute.