Histórico de Curtidas
-
DouGlaS Mapper deu reputação a Vodkart em (Resolvido)[PEDIDO] Script Para Não Usar Magic Wall em Tal ÁreaData > Spells > scripts > attack > energy wall.lua
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1495) local area = createCombatArea(AREA_WALLFIELD, AREADIAGONAL_WALLFIELD) setCombatArea(combat, area) function onCastSpell(cid, var) local block_area = { {{x=909,y=1019,z=7}, {x=1000,y=1019,z=7}}, -- pos começo e final da area {{x=156,y=1019,z=7}, {x=200,y=1019,z=7}}, {{x=200,y=1019,z=7}, {x=300,y=1019,z=9}} } for _, var in ipairs(block_area) do if isInRange(getCreaturePosition(cid), var[1], var[2]) then doPlayerSendCancel(cid, "você não pode jogar magic wall nesta area.") return false end end return doCombat(cid, combat, var) end -
DouGlaS Mapper deu reputação a Vodkart em [8.6] Task System 4.0! (Task system + Daily Task System)Removido:
*Boss Room
*Rank Task
*Prêmios para os 10 primeiros a terminar todas as tasks
Adicionado:
*Daily Task System (Sistema exclusivo de Task diario, podendo pegar 1x a cada 24 hrs, irei explicar mais depois.)
*Task agora é por progresso, você não pode sair e voltar, terá que terminar a task 1 para avançar para a task 2, assim sucessivamente.
*Task Points
*Level para realizar a task
*Nova talkaction que mostra uma janela de informações sobre o level da task, premios que irá receber, progresso, etc...
*Items para entrega(Se o jogador deverá levar algum item junto com a quantidade de monstro morta) para finalizar a task
*Sistema de look Task (Varia de acordo com a sua quantidade de Task Points, podendo ficar por exemplo como "Huntsman", "Ranger", etc...(alterável)
*Mods e npc mais "clean", várias linhas removidas e o sistema está mais rápido
*Vou Adicionar "scripts extras" Como:
--> Tile que só passa quem tiver permissão depois de finalizar determinada quest
--> Npc de Boss Room para entrar e enfrentar o monstro quem fez determinada quest
[+] Resumo do Task system + Daily Task System [+]
Task System: É o sistema de task "original", onde consiste em matar determinada quantidade de monstros(E entregar certo itens <- é configurável), para receber recompensas como Exp, Money e Items.
Algumas mudanças do simple task 3.0 para o 4.0 foram:
[+] O sistema agora é por progresso, isso quer dizer que você terá que ir terminando a quest para avançar para a seguinte.
[+] O sistema Também recebeu uma alteração, fazendo com que as Tasks precisem que o jogador tenha um level determinado
[+] A tabela para edição está mais fácil, fazendo com que você adicione ou remova monstros com mais tranquilidade, inclusive alterações das Rewards da Task.
Daily Task System: É um sistema que desenvolvi para que os jogadores sempre estejam se comunicando com o npc de Task, no caso da Task Diaria, vária de acordo com o level do jogador, por exemplo:
Jogadores entre level 6 ao 49 poderá cair em uma dessas 3 Task Diarias: Orcs, Tarantulas ou Wyverns
Jogadores entre level 50 ao 79 poderá cair em uma dessas 3 Task Diarias: Dragons, Wailing Widows ou Ancient Scarabs
E por ai vai, claro que você poderá aumentar as Task Diarias dependendo do level, eu fiz 3 para cada level que é pra postar, mas tudo isso você pode aumentar! Dependendo do seu servidor.
E sim, você pode fazer a TASK "ORIGINAL" e a TASK "DIARIA" ao mesmo tempo! Ambas são distintas e possuem Rewards diferenciadas!
No caso da Task diaria, levando em conta que você começou a fazer ela no dia 08/01 ás 20:00 Hrs, você tem até o dia 09/01 ás 20:00Hrs para termina-la e receber a recompensa, caso termine antes, a Task diaria só irá ficar disponível para repetição a partir desta mesma data 09/01 20:00 Hrs;
[+] Caso você não termine a tempo, não tem problema, basta esperar este horário e começar uma nova Task.
[+] Caso você começou a Daily Task e terminou antes desta data. mas por algum motivo esqueceu de entregar e a mesma passou do prazo, não tem importância, caso você tenha matado todos os monstros até 09/01 20:00 Hrs, você poderá entregar está Task em qualquer horário para receber suas Rewards e começar uma task a partir do momento em que você entregou! (INJUSTIÇA AQUI NÃO CARALHO).
[+] Comandos Adicionais [+]
/task -- Mostra as informações da sua Task Atual, como Nome da Task, Level, Rewards, Monstros que você poderá matar, Se tem que entregar algum Item junto, etc...
/task daily -- É basicamente mostra a mesma informação da Task Principal, porém mostra também qual o prazo limite para entrega da task.
/task counter -- É um comando que ATIVA ou DESATIVA o contador de monstros mortos na task no seu Channel.
[+] Imagens [+]
Cline neste link para ver algumas imagens da Task : http://imgur.com/a/eLIY3
------------------------------------------------ // --------------------------------------------------------------
[+] Instalação do Sistema [+]
Requisitos: Nível Médio de conhecimento em scripting LUA
Pasta Mods
Simple Task.xml
https://pastebin.com/raw/P5hqMC3j
NPC:
Ludger.xml
https://pastebin.com/raw/R56yLWHw
simple_task.lua
https://pastebin.com/raw/1mRzJ6aJ
---------------------------------------------- // ----------------------------------
[+] configuração [+ ]
Task System Principal
task_sys = { [1] = {name = "Trolls", start = 176201, monsters_list = {"Troll","Troll champion"}, level = 8, count = 40, points = 0, items = {}, reward = {}, exp = 2000, money = 2000} }
[1] --> O número entre os colchetes [] significa a ordem da Task, como a Task é por progresso sempre começará no 1 e irá pro [2], assim sucessivamente.
name --> É o nome da task que o jogador irá fazer.
start --> é a storage que indicará se o jogador começou a Task
monster_list ={} --> É o nome dos monstros em que o jogador deverá caçar para completar a Task
level --> É o level necessário para dar inicio á Task
count --> É o número de monstros que o jogador tem que matar para completar a Task
points --> Aqui determinada quantos Task points o jogador irá receber ao completar a Task
items = {} --> Aqui determinada se além de matar os monstros, o jogador terá que entregar item também! Caso tenha só colocar o {ITEM_ID, QUANTIDADE} EX:
items = {{2173,1},{2160,10},{2493,2}} rewad --> Aqui determinada se o jogador irá receber itens ao terminar a Task, mesma formula do items /\
reward = {{2520,1},{2173,1}} exp --> Se o jogador irá receber Exp ao terminar a task. 0 ou quantidade de exp
Money --> Se o jogador irá receber dinheiro ao terminar a task. 0 ou quantidade de dinheiro
Daily Task System
daily_task = { [1] = {name = "Orcs" ,monsters_list = {"Orc Berserker","Orc Rider","Orc Leader","Orc Warlord"}, count = 100, points = 0, reward = {}, exp = 5000, money = 10000} }
Segue o padrão da Task original, exceto que não precisa entregar items para o npc!
Como funciona A randomização de level de acordo com a Daily task?
Procure por está tabela em MODS
local t = { [{6,49}] = {1,3}, [{50,79}] = {4,6}, [{80,129}] = {7,9}, [{130,math.huge}] = {10,12} }
entre as chaves e colchetes é o level do jogador para as Daily Task, Você pode adicionar quantas você quiser!
Digamos que:
[{6,49}] = {1,3} --> Quer dizer que entre o level 6 ao 49 o jogador poderá cair na Daily Task número 1(Orcs), 2(Tarantulas) ou 3(Wyvern)!
[{50,79}] = {4,6} --> Quer dizer que entre o level 50 ao 79 o jogador poderá cair na Daily Task número 4(Dragons), 5(Wailing Widows) ou 6(Ancient Scarabs)!
...
[{130,math.huge}] = {10,12} --> Quer dizer que o jogador level 130 ou MAIS poderá cair na Daily Task número 10(Undead Dragons), 11(HydraS) ou 12(Ghastly Dragons)!
Look Rank System
Procure por está tabela em MODS
local ranks = { [{1, 20}] = "Huntsman", [{21, 50}] = "Ranger", [{51, 100}] = "Big Game Hunter", [{101, 200}] = "Trophy Hunter", [{201, math.huge}] = "Elite Hunter" }
Entre 1-20 Task points o Rank será Huntsman
Entre 21-50 Task posints o Rank será Ranger
Entre 51-100 Task Points o rank será Big Game Hunter
etc...
Altere como quiser!
-
DouGlaS Mapper deu reputação a Werner em Best Baiak CompletoEae pessoal do Tk
Trago aqui um Baiak (BestBaiak) com um novo visual e completo!
Se trata de um Servidor 8.60, completo e ja pronto para ser colocado Online, sem bugs. (funciona melhor em MySql)
+ de 50 Hunts Free
Muitos trainers, assim não ficara sem.
Vocations Equilibradas.
War System com escudos.
Itens donates balanceados.
Contando com todos os Eventos atuais:
Zombie Event
Snowball War Event
Capture the Flag
Battlefield
Desert War
Defend The Tower
Fire storm
Boss King
Conta também com:
Castle 24h
Castle 48h
Vip1 e Vip2 Free
Area Donate
SuperUp
Dodge e Critical system
Extra
Cidade com mais houses
MiniGames
Sistema de !autoloot já instalado
Quest Promotion 2
Npc que troca itens por EventCoins
Monstros exclusivos
ScreenShots do Servidor
Donwload:
Servidor completo 4shared: Clique Aqui!
Servidor completo Mediafire: Clique Aqui!
Scan
VirusTotal:(Acusando malware por conta das executáveis): Clique Aqui!
Créditos:
Coisas como items.xml e items.otb com os itens donate já editados podem ser encontrados aqui no tópico.
Suporte para alguns bugs encontrados até o momento também se encontram no tópico.
Espero que gostem.
-
DouGlaS Mapper deu reputação a Belmont em (Resolvido)[PEDIDO] DOUBLE POINTS ACIMA DE TANTOS REAIS@DouGlaS Mapper Se fizer tudo como está lá , vai rodar 100%
-
DouGlaS Mapper deu reputação a Natanael Beckman em [Gesior] PagSeguro Automático atualizado 09/09/2016.ATUALIZAÇÃO 09/09/2016!
Fala galera!
Bom venho atualizar este tópico que tem sido bem utilizado por todos, porém continha uma estrutura bem antiga/desatualizada.
Graças a um amigo Ivens Pontes que refez todo o sistema vou postar agora a nova atualização. Lembrando que esse sistema é feito baseado no Gesior ACC 2012.
1 - Se você utiliza linux é necessário ter instalado o php5-curl, mais abaixo irei deixar um comando completo:
apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl [ATENÇÃO] após a instalação reinicie seu apache ou nginx.
2 - Acesse sua conta PagSeguro e nesse link cadastre o seu link de retorno e gere sua token em integrações.
http://seusite.com/retpagseguro.php 3 - Abra seu config.php e adicione as seguintes tags:
# PAGE: donate.php $config['site']['usePagseguro'] = true; //true show / false hide $config['site']['usePaypal'] = true; //true show / false hide $config['site']['useDeposit'] = true; //true show / false hide $config['site']['useZaypay'] = true; //true show / false hide $config['site']['useContenidopago'] = true; //true show / false hide $config['site']['useOnebip'] = true; //true show / false hide # Pagseguro config By IVENSPONTES $config['pagSeguro']['email'] = "[email protected]"; //Email Pagseguro $config['pagSeguro']['token'] = "YOURTOKENHERE"; // TOKEN $config['pagSeguro']['urlRedirect'] = 'http://seusite.com/?subtopic=donate&action=final'; //turn off redirect and notifications in pagseguro.com.br $config['pagSeguro']['urlNotification'] = 'http://seusite.com/retpagseguro.php'; //your return location $config['pagSeguro']['productName'] = 'Premium Points'; $config['pagSeguro']['productValue'] = 1.00; // 1.50 = R$ 1,50 etc... $config['pagSeguro']['doublePoints'] = false; ## Double points - true is on / false is off $config['pagSeguro']['host'] = 'localhost'; ## YOUR HOST $config['pagSeguro']['database'] = 'gesior860'; ## DATABASE $config['pagSeguro']['databaseUser'] = 'root'; ## USER $config['pagSeguro']['databasePass'] = ''; ## PASSWORD [ATENÇÃO] Leia atentamente e preencha todos os campos corretamente para não haver falhas imprevistas.
MySQL CODE:
CREATE TABLE `pagseguro_transactions` ( `transaction_code` VARCHAR( 36 ) NOT NULL , `name` VARCHAR( 200 ) DEFAULT NULL , `payment_method` VARCHAR( 50 ) NOT NULL , `status` VARCHAR( 50 ) NOT NULL , `item_count` INT( 11 ) NOT NULL , `data` DATETIME NOT NULL , UNIQUE KEY `transaction_code` ( `transaction_code` , `status` ) , KEY `name` ( `name` ) , KEY `status` ( `status` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1; 4 - Vou disponibilizar um download com alguns arquivos que devem ficar localizados na pasta www/html ou pra você que usa windows htdocs.
html-pag-files1.zip
Contém:
+/custom_scripts/PagSeguroLibrary +/dntpagseguro.php +/retpagseguro.php 5 - Mais uma vez vamos fazer o mesmo procedimento só que agora vamos adicionar os seguintes arquivos na pasta pages.
pages.zip
Contém:
+/donate_forms/files.php +/donate.php
Bom é isso, faça um pequeno teste, comente e rep+.
Créditos:
Ivens Pontes
-
DouGlaS Mapper deu reputação a Mathias Kenfi em [Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana AbsorbEsse sistema foi feito utilizando a source disponibilizada neste link
Pode funcionar em TFS 0.4, OTX 2.X e, talvez, em TFS 0.4 só que a probabilidade erros é maior por ter diferentes nomes de funções e variáveis.
Fiz um vídeo seguindo o passo a passo abaixo para facilitar o processo de instalação do sistema.
Hoje estarei ensinando a instalar os seguintes novos atributos/sistemas em sua source
CriticalHitChance e DodgeChance -- (Funciona da mesma maneira que o critical básico de script, porém sem bugs de callstack) Life e Mana Absorb -- (Regenera, de acordo com a % atribuida, a partir de dano recebido) Life e Mana Leech -- (Regenera, de acordo com a % atribuida, a partir do dano causado) Exemplo de como vai ficar
Primeiro e antes de tudo, você terá de desativar o critical padrão do Tibia (Você pode pular essa parte se quiser)
Vamos lá! Vá em items.cpp e procure por:
attackSpeed = 0; Abaixo coloque:
criticalHitChance = dodgeChance = lifeAbsorb = manaAbsorb = lifeLeech = manaLeech = 0; Depois, ainda em items.cpp, procure por:
else if(tmpStrValue == "extradefense" || tmpStrValue == "extradef") { if(readXMLInteger(itemAttributesNode, "chance", intValue)) it.extraDefenseChance = intValue; if(readXMLInteger(itemAttributesNode, "value", intValue)) it.extraDefense = intValue; if(readXMLInteger(itemAttributesNode, "random_min", intValue)) it.extraDefenseRndMin = intValue; if(readXMLInteger(itemAttributesNode, "random_max", intValue)) it.extraDefenseRndMax = intValue; } Abaixo coloque:
else if(tmpStrValue == "criticalhitchance") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.criticalHitChance = intValue; } else if(tmpStrValue == "dodgechance") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.dodgeChance = intValue; } else if(tmpStrValue == "lifeabsorb") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.lifeAbsorb = intValue; } else if(tmpStrValue == "manaabsorb") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.manaAbsorb = intValue; } else if(tmpStrValue == "lifeleech") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.lifeLeech = intValue; } else if(tmpStrValue == "manaleech") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.manaLeech = intValue; } Agora vá em items.h e procure por:
int32_t attack, extraAttack, defense, extraDefense, armor, breakChance, hitChance, maxHitChance, runeLevel, runeMagLevel, lightLevel, lightColor, decayTo, rotateTo, alwaysOnTopOrder; Abaixo coloque:
int32_t criticalHitChance, dodgeChance, lifeAbsorb, manaAbsorb, lifeLeech, manaLeech;
Agora vá em item.cpp e procure por:
case ATTR_ATTACK: { int32_t attack; if(!propStream.getLong((uint32_t&)attack)) return ATTR_READ_ERROR; setAttribute("attack", attack); break; } Acima coloque:
case ATTR_CRITICALHITCHANCE: { int32_t criticalHitChance; if(!propStream.getLong((uint32_t&)criticalHitChance)) return ATTR_READ_ERROR; setAttribute("criticalhitchance", criticalHitChance); break; } case ATTR_DODGECHANCE: { int32_t dodgeChance; if(!propStream.getLong((uint32_t&)dodgeChance)) return ATTR_READ_ERROR; setAttribute("dodgechance", dodgeChance); break; } case ATTR_LIFEABSORB: { int32_t lifeAbsorb; if(!propStream.getLong((uint32_t&)lifeAbsorb)) return ATTR_READ_ERROR; setAttribute("lifeabsorb", lifeAbsorb); break; } case ATTR_MANAABSORB: { int32_t manaAbsorb; if(!propStream.getLong((uint32_t&)manaAbsorb)) return ATTR_READ_ERROR; setAttribute("manaabsorb", manaAbsorb); break; } case ATTR_LIFELEECH: { int32_t lifeLeech; if(!propStream.getLong((uint32_t&)lifeLeech)) return ATTR_READ_ERROR; setAttribute("lifeleech", lifeLeech); break; } case ATTR_MANALEECH: { int32_t manaLeech; if(!propStream.getLong((uint32_t&)manaLeech)) return ATTR_READ_ERROR; setAttribute("manaleech", manaLeech); break; } Procure por:
if(it.weaponType == WEAPON_DIST && it.ammoType != AMMO_NONE) { begin = false; s << " (Range:" << int32_t(item ? item->getShootRange() : it.shootRange); if(it.attack || it.extraAttack || (item && (item->getAttack() || item->getExtraAttack()))) { s << ", Atk " << std::showpos << int32_t(item ? item->getAttack() : it.attack); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; } if(it.hitChance != -1 || (item && item->getHitChance() != -1)) s << ", Hit% " << std::showpos << (item ? item->getHitChance() : it.hitChance) << std::noshowpos; } else if(it.weaponType != WEAPON_AMMO && it.weaponType != WEAPON_WAND) { if(it.attack || it.extraAttack || (item && (item->getAttack() || item->getExtraAttack()))) { begin = false; s << " (Atk:"; if(it.abilities.elementType != COMBAT_NONE && it.decayTo < 1) { s << std::max((int32_t)0, int32_t((item ? item->getAttack() : it.attack) - it.abilities.elementDamage)); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; s << " physical + " << it.abilities.elementDamage << " " << getCombatName(it.abilities.elementType); } else { s << int32_t(item ? item->getAttack() : it.attack); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; } } if(it.defense || it.extraDefense || (item && (item->getDefense() || item->getExtraDefense()))) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Def:" << int32_t(item ? item->getDefense() : it.defense); if(it.extraDefense || (item && item->getExtraDefense())) s << " " << std::showpos << int32_t(item ? item->getExtraDefense() : it.extraDefense) << std::noshowpos; } } Abaixo coloque:
if(it.criticalHitChance || (item && item->getCriticalHitChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Crit Chance:" << std::showpos << int32_t(item ? item->getCriticalHitChance() : it.criticalHitChance) << "%"<< std::noshowpos; } if(it.dodgeChance || (item && item->getDodgeChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Dodge Chance:" << std::showpos << int32_t(item ? item->getDodgeChance() : it.dodgeChance) << "%"<< std::noshowpos; } if(it.lifeAbsorb || (item && item->getLifeAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Absorb:" << std::showpos << int32_t(item ? item->getLifeAbsorb() : it.lifeAbsorb) << "%"<< std::noshowpos; } if(it.manaAbsorb || (item && item->getManaAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Absorb:" << std::showpos << int32_t(item ? item->getManaAbsorb() : it.manaAbsorb) << "%"<< std::noshowpos; } if(it.lifeLeech || (item && item->getLifeLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Leech:" << std::showpos << int32_t(item ? item->getLifeLeech() : it.lifeLeech) << "%"<< std::noshowpos; } if(it.manaLeech || (item && item->getManaLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Leech:" << std::showpos << int32_t(item ? item->getManaLeech() : it.manaLeech) << "%"<< std::noshowpos; } Procure por:
int32_t tmp = it.armor; if(item) tmp = item->getArmor(); bool begin = true; if(tmp) { s << " (Arm:" << tmp; begin = false; } Abaixo coloque:
if(it.criticalHitChance || (item && item->getCriticalHitChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Crit Chance:" << std::showpos << int32_t(item ? item->getCriticalHitChance() : it.criticalHitChance) << "%"<< std::noshowpos; } if(it.dodgeChance || (item && item->getDodgeChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Dodge Chance:" << std::showpos << int32_t(item ? item->getDodgeChance() : it.dodgeChance) << "%"<< std::noshowpos; } if(it.lifeAbsorb || (item && item->getLifeAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Absorb:" << std::showpos << int32_t(item ? item->getLifeAbsorb() : it.lifeAbsorb) << "%"<< std::noshowpos; } if(it.manaAbsorb || (item && item->getManaAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Absorb:" << std::showpos << int32_t(item ? item->getManaAbsorb() : it.manaAbsorb) << "%"<< std::noshowpos; } if(it.lifeLeech || (item && item->getLifeLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Leech:" << std::showpos << int32_t(item ? item->getLifeLeech() : it.lifeLeech) << "%"<< std::noshowpos; } if(it.manaLeech || (item && item->getManaLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Leech:" << std::showpos << int32_t(item ? item->getManaLeech() : it.manaLeech) << "%"<< std::noshowpos; } Agora vá em item.h e procure por:
ATTR_DUALWIELD = 43, Abaixo coloque:
ATTR_CRITICALHITCHANCE = 44, ATTR_DODGECHANCE = 45, ATTR_LIFEABSORB = 46, ATTR_MANAABSORB = 47, ATTR_LIFELEECH = 48, ATTR_MANALEECH = 49, Procure por:
int32_t getExtraDefense() const; Abaixo coloque:
int32_t getCriticalHitChance() const; int32_t getDodgeChance() const; int32_t getLifeAbsorb() const; int32_t getManaAbsorb() const; int32_t getLifeLeech() const; int32_t getManaLeech() const; Procure por:
inline int32_t Item::getExtraDefense() const { bool ok; int32_t v = getIntegerAttribute("extradefense", ok); if(ok) return v; return items[id].extraDefense; } Abaixo coloque:
inline int32_t Item::getCriticalHitChance() const { bool ok; int32_t v = getIntegerAttribute("criticalhitchance", ok); if(ok) return v; return items[id].criticalHitChance; } inline int32_t Item::getDodgeChance() const { bool ok; int32_t v = getIntegerAttribute("dodgechance", ok); if(ok) return v; return items[id].dodgeChance; } inline int32_t Item::getLifeAbsorb() const { bool ok; int32_t v = getIntegerAttribute("lifeabsorb", ok); if(ok) return v; return items[id].lifeAbsorb; } inline int32_t Item::getManaAbsorb() const { bool ok; int32_t v = getIntegerAttribute("manaabsorb", ok); if(ok) return v; return items[id].manaAbsorb; } inline int32_t Item::getLifeLeech() const { bool ok; int32_t v = getIntegerAttribute("lifeleech", ok); if(ok) return v; return items[id].lifeLeech; } inline int32_t Item::getManaLeech() const { bool ok; int32_t v = getIntegerAttribute("manaleech", ok); if(ok) return v; return items[id].manaLeech; }
Agora vá em player.cpp e procure por:
int32_t Player::getArmor() const { int32_t i = SLOT_FIRST, armor = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) armor += item->getArmor(); } if(vocation->getMultiplier(MULTIPLIER_ARMOR) != 1.0) return int32_t(armor * vocation->getMultiplier(MULTIPLIER_ARMOR)); return armor; } Abaixo coloque:
int32_t Player::getCriticalHitChance() const { int32_t i = SLOT_FIRST, crit = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) crit += item->getCriticalHitChance(); } return crit; } int32_t Player::getDodgeChance() const { int32_t i = SLOT_FIRST, dodge = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) dodge += item->getDodgeChance(); } return dodge; } int32_t Player::getLifeAbsorb() const { int32_t i = SLOT_FIRST, life = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) life += item->getLifeAbsorb(); } return life; } int32_t Player::getManaAbsorb() const { int32_t i = SLOT_FIRST, mana = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) mana += item->getManaAbsorb(); } return mana; } int32_t Player::getLifeLeech() const { int32_t i = SLOT_FIRST, life = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) life += item->getLifeLeech(); } return life; } int32_t Player::getManaLeech() const { int32_t i = SLOT_FIRST, mana = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) mana += item->getManaLeech(); } return mana; } Agora vá em player.h e procure por:
virtual int32_t getDefense() const; Abaixo coloque:
virtual int32_t getCriticalHitChance() const; virtual int32_t getDodgeChance() const; virtual int32_t getLifeAbsorb() const; virtual int32_t getManaAbsorb() const; virtual int32_t getLifeLeech() const; virtual int32_t getManaLeech() const;
Agora vá em luascript.cpp e procure por:
//getCreatureHealth(cid) lua_register(m_luaState, "getCreatureHealth", LuaInterface::luaGetCreatureHealth); Abaixo coloque:
//getPlayerCriticalHitChance(cid) lua_register(m_luaState, "getPlayerCriticalHitChance", LuaInterface::luaGetPlayerCriticalHitChance); //getPlayerDodgeChance(cid) lua_register(m_luaState, "getPlayerDodgeChance", LuaInterface::luaGetPlayerDodgeChance); //getPlayerLifeAbsorb(cid) lua_register(m_luaState, "getPlayerLifeAbsorb", LuaInterface::luaGetPlayerLifeAbsorb); //getPlayerManaAbsorb(cid) lua_register(m_luaState, "getPlayerManaAbsorb", LuaInterface::luaGetPlayerManaAbsorb); //getPlayerLifeLeech(cid) lua_register(m_luaState, "getPlayerLifeLeech", LuaInterface::luaGetPlayerLifeLeech); //getPlayerManaLeech(cid) lua_register(m_luaState, "getPlayerManaLeech", LuaInterface::luaGetPlayerManaLeech); Procure por:
int32_t LuaInterface::luaGetCreatureMaxHealth(lua_State* L) { //getCreatureMaxHealth(cid[, ignoreModifiers = false]) bool ignoreModifiers = false; if(lua_gettop(L) > 1) ignoreModifiers = popBoolean(L); ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) lua_pushnumber(L, creature->getPlayer() && ignoreModifiers ? creature->healthMax : creature->getMaxHealth()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } Abaixo coloque:
int32_t LuaInterface::luaGetPlayerCriticalHitChance(lua_State* L) { //getPlayerCriticalHitChance(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getCriticalHitChance()); else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerDodgeChance(lua_State* L) { //getPlayerDodgeChance(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getDodgeChance()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerLifeAbsorb(lua_State* L) { //getPlayerLifeAbsorb(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getLifeAbsorb()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerManaAbsorb(lua_State* L) { //getPlayerManaAbsorb(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getManaAbsorb()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerLifeLeech(lua_State* L) { //getPlayerLifeLeech(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getLifeLeech()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerManaLeech(lua_State* L) { //getPlayerManaLeech(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getManaLeech()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } Agora vá em luascript.h e procure por:
static int32_t luaGetPlayerSpentMana(lua_State* L); Abaixo coloque:
static int32_t luaGetPlayerCriticalHitChance(lua_State* L); static int32_t luaGetPlayerDodgeChance(lua_State* L); static int32_t luaGetPlayerLifeAbsorb(lua_State* L); static int32_t luaGetPlayerManaAbsorb(lua_State* L); static int32_t luaGetPlayerLifeLeech(lua_State* L); static int32_t luaGetPlayerManaLeech(lua_State* L);
As funções Lua adicionadas foram
getPlayerCriticalHitChance(cid) getPlayerDodgeChance(cid) getPlayerLifeAbsorb(cid) getPlayerManaAbsorb(cid) getPlayerLifeLeech(cid) getPlayerManaLeech(cid)
Agora a parte do game.cpp. (Esta é uma parte opcional, você pode optar por não adicioná-la)
Créditos: ~Mathias Kenfi
-
DouGlaS Mapper deu reputação a Storm em (PEDIDO) Um item que ao ser usado invoca um monstro que ajuda o invocador.@victor4312
local config = { name = "Demon", -- Nome do Summon max = 1, -- Máximo de summons storage = 42355, -- Storage que permite o uso exaust_sto = 5555, -- Storage que contabiliza o exaust exaust_time = 60 -- Segundos de Exaust } function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getCreaturePosition(cid) if getPlayerStorageValue(cid, config.storage) == 1 then if not exhaustion.check(cid, config.exaust_sto) then if table.maxn(getCreatureSummons(cid)) <= config.max then local target = doCreateMonster(config.name, pos) doConvinceCreature(cid, target) doPlayerSendTextMessage(cid, 27, "Voce invocou o monstro ".. config.name .."!!") doSendMagicEffect(pos, CONST_ME_TELEPORT) exhaustion.set(cid, config.exaust_sto, config.exaust_time) return true else doPlayerSendTextMessage(cid, 27, "Você ja tem a quantidade máxima de summons ativos!") doSendMagicEffect(pos, POFF) return false end else doPlayerSendTextMessage(cid, 27, "Exhaustion!! Wait ".. exhaustion.get(cid, config.exaust_sto) .." seconds.") doSendMagicEffect(pos, POFF) return false end else doPlayerSendTextMessage(cid, 27, "voce nao tem a storage necessaria") doSendMagicEffect(pos, POFF) return false end return true end
@CaioPinaa
local monster = "Demon" -- Monster name local max = 1 -- Max de summons ativos function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getCreaturePosition(cid) if table.maxn(getCreatureSummons(cid)) < max then local target = doCreateMonster(monster, pos) doConvinceCreature(cid, target) doSendMagicEffect(pos, 5) else doPlayerSendTextMessage(cid, 27, "Você ja tem a quantidade máxima de summons ativos!") doSendMagicEffect(pos, POFF) return false end return true end
-
DouGlaS Mapper deu reputação a poko360 em (Resolvido)Ajuste em Script de DNTfunction timeString(timeDiff) local dateFormat = { {"day", timeDiff / 60 / 60 / 24}, {"hour", timeDiff / 60 / 60 % 24}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end local ret = table.concat(out) if ret:len() < 16 and ret:find("second") then local a, b = ret:find(" and ") ret = ret:sub(b+1) end return ret end function onSay(cid, words, param) if(words == "!donater") then if doPlayerRemoveItem(cid, 9663, 1) == TRUE then local days = 30 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 457382) local timenow = os.time() if getPlayerStorageValue(cid, 457382) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de DNT no seu character.") setPlayerStorageValue(cid, 457382, time) local quantity = math.floor((getPlayerStorageValue(cid, 457382) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem ".. quantity .." dias de DNT restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce precisa do item Donater Acess para usar este comando.") end elseif(words == "!donaterdays") then local time = timeString(-(os.time() - getPlayerStorageValue(cid, 457382))) local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 457382) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem ".. time .." de DNT no seu character.") elseif(words == "/adddonater") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local name = getCreatureName(player) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(player, 457382) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de DNT no seu character.") setPlayerStorageValue(player, 457382, time) local quantity = math.floor((getPlayerStorageValue(player, 457382) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Voce tem "..quantity.." dias de DNT restantes.") end return true end testa ai, e me fala
-
DouGlaS Mapper deu reputação a RenanPhellip em (Resolvido)[PEDIDO] Subir Mana Em PZCONSEGUI PESSOAL!
Hoje resolvi pensar numa forma da mana/life regenerar normalmente em protection zone. Então pensei que a solução estava na função manaGain/healthGain que é usado no items.xml.
Dei uma fuçada nas sources e encontrei a função, localizada em condition.cpp
Procure por esta função:
bool ConditionRegeneration::executeCondition(Creature* creature, int32_t interval) Em seguida troque isso:
bool ConditionRegeneration::executeCondition(Creature* creature, int32_t interval) { internalHealthTicks += interval; internalManaTicks += interval; if(creature->getZone() != ZONE_PROTECTION) { if(internalHealthTicks >= healthTicks) { internalHealthTicks = 0; creature->changeHealth(healthGain); } if(internalManaTicks >= manaTicks) { internalManaTicks = 0; creature->changeMana(manaGain); } } return ConditionGeneric::executeCondition(creature, interval); } Por isso:
bool ConditionRegeneration::executeCondition(Creature* creature, int32_t interval) { internalHealthTicks += interval; internalManaTicks += interval; if(internalHealthTicks >= healthTicks) { internalHealthTicks = 0; creature->changeHealth(healthGain); } if(internalManaTicks >= manaTicks) { internalManaTicks = 0; creature->changeMana(manaGain); } return ConditionGeneric::executeCondition(creature, interval); } Em seguida é só compilar e já era, agora a mana e life irá regenerar em protection zone xd
-
DouGlaS Mapper deu reputação a Mathias Kenfi em (Resolvido)Auxilio com scripts de spells1º Magia
2º Magia
3º Magia: Acredito que esta magia seja apenas colocar isso
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) 4º Magia
No script da magia Big Regeneration, abaixo de function onCastSpell(cid, var) coloque:
if getPlayerStorageValue(cid, 154343232) os.time() >= 1 then return doPlayerSendTextMessage(cid,22,"You are silence") end Agora o script da magia que causa o silenciamento
Observação: Estas spells podem ser tanto alvo único, como também podem ser em área
-
DouGlaS Mapper deu reputação a Vodkart em Amuleto Infinito que dropa os itens apenas Red Skullvá até data\creaturescripts\scripts e crie um arquivo.lua e renomeie para preparedeathred.lua
dentro coloque:
function onDeath(cid, corpse, deathList) if (getPlayerSlotItem(cid, 2).itemid == 13755) then -- id do colar doCreatureSetDropLoot(cid, getPlayerSkullType(cid) >= 4 and true or false) if getPlayerSkullType(cid) >= 4 then doPlayerRemoveItem(cid, 13755, 1) end end return true end
em data\creaturescripts\scripts\login.lua adiciona a linha:
registerCreatureEvent(cid, "RedSkullAmulet")
creaturescripts.xml adicione:
<event type="death" name="RedSkullAmulet" event="script" value="preparedeathred.lua"/> em items.xml deixa assim:
<item id="13755" article="a" name="Amulet Vip"> <attribute key="description" value="Protect All 6%, Dropa os items apenas RedSkull" /> <attribute key="weight" value="500" /> <attribute key="absorbPercentAll" value="6" /> <attribute key="slotType" value="necklace" />
-
DouGlaS Mapper deu reputação a Cachorro em [Spells/Rune] Trap rune + Paralyze rune (3 x 3)Ola pessoal do Tibia King,
Hoje vim trazer um script que eu vou usar no meu servidor, bom o script e suas funções estará toda abaixo, segue o tópico
(Atenção)
Esse e o meu primeiro script para o Tibia King que emoção sakpsoakps
Para abrir os arquivos que citarei abaixo use o notepad++
1° passo:
Localize a seguinte pasta: Data/spells/scripts copie um arquivo e cole, renomeie para TrapParalyzeRune.lua. Coloque o que esta tudo abaixo dentro da pasta e salve-a.
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_EFFECT, 54) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 29) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1499) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 45000) setConditionFormula(condition, -5.0, 0, -5.0, 0) setCombatCondition(combat, condition) local areacombate = { {1, 1, 1}, {1, 3, 1}, {1, 1, 1}, } local area = createCombatArea(areacombate) setCombatArea(combat, area) function onCastSpell(cid, var) doCreatureSay(cid, "Trap Rune", TALKTYPE_ORANGE_1) return doCombat(cid, combat, var) end 2° passo:
Localize a seguinte pasta: Data/spells/spells.xml adicione no começo assim:
<rune name="TPR" id="ID_DO_ITEM" allowfaruse="1" charges="1" lvl="1" maglv="0" exhaustion="5000" mana="10000" blocktype="solid" event="script" value="TrapParalyzeRune.lua"/> 3° passo(Criando a runa):
Localize a seguinte pasta: Data/items/items.xml adicione no começo assim:
<item id="ID_DO_ITEM" name="Trap rune + Palalyze rune"> <attribute key="description" value="Runa que ataca o alvo com um efeito de arvore criando uma barreira 3x3 no alvo, paralizado o alvo por 45 segundos."/> <attribute key="type" value="rune"/> <attribute key="weight" value="100000"/> </item> 4° passo(Arrumando o TRAP):
Localize a seguinte pasta: Data/items/items.xml aperte CLTR+F e procure 1499, subtitua por:
<item id="1499" name="Trap rune effect.."> <attribute key="type" value="magicfield" /> <attribute key="decayTo" value="0"/> <attribute key="duration" value="45"/> </item> 5° passo(Editando o Efeito(Z) da TrapParalyzeRune):
Editando o efeito que soltara em volta do jogador colocando as raízes ao lado 3x3
setCombatParam(combat, COMBAT_PARAM_EFFECT, 54) (54) - Você poderá trocar para o efeito que você pretender, use o /z <id> in-game para saber os efeitos que queira e coloque o efeito aqui.
6° passo(Editando o Efeito(Y) da TrapParalyzeRune):
Editando o efeito que ira voar ate o jogador e ativar a trap + paralyze
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 29) (29) - Você poderá trocar para o efeito que você pretender, use o /x <id> in-game para saber os efeitos que queira e coloque o efeito aqui.
7° passo(Editando a Mensagem da TrapParalyzeRune):
Nesta parte voce pode editar a mensagem que vai sair do jogar quando ele usar a TrapParalyze rune
doCreatureSay(cid, "Trap Rune", TALKTYPE_ORANGE_1) (Trap Rune) - Você poderá trocar para a mensagem que você pretender.
8° passo(Editando o tempo de paralyze):
Nesta parte voce pode editar o tempo de paralyze que vai ficar no jogador quando for atingido pela TrapParalyze rune
setConditionParam(condition, CONDITION_PARAM_TICKS, 45000) (45000) - Você poderá trocar para outro numero. Exemplo: 2 segundos x 1000 = 2000 (45000 = 45 segundos)
9° passo(Editando o tempo de trap):
Nesta parte voce pode editar o tempo de trap que vai ficar no jogador quando for atingido pela TrapParalyze rune
Localize a seguinte pasta: Data/items/items.xml aperte CLTR+F e procure 1499, procure por:
<attribute key="duration" value="45"/> (45) - Você poderá trocar para outro numero(em segundos). Atencao: Deixe sempre igual ou da paralyze mais do que a da trap (45 segundos)
GOSTOU? Aperte em gostei ali em baixo não cai o dedo
-
DouGlaS Mapper deu reputação a tetheuscunha em [CreatureScript] Monster no Hit MonsterBoa Noite.
Hoje vou compartilhar com vocês o script que eu tenho aqui a muito tempo, não recordo quem fez ele pra mim (assim que lembrar colocarei os devidos creditos).
Ele funciona da seguinte forma :
- As Ue de monsters não hita os outros monsters da hunt, se tiver summon ele hita.
Versão testada
-8.6
-TFS 0.4.
Primeiro vai ate a pasta creaturescripts/script e crie um arquivo como nome noattack.lua e cole isso dentro.
function onStatsChange(cid, attacker, type, combat, value) -- This should block all damage monster cause on eachother expect player summons if isMonster(cid) and isMonster(attacker) then local master = getCreatureMaster(cid) if not master or not isPlayer(master) then return false end end return true end
Depois vá ate o arquivo Login.lua e cole essa linha depois do Ultimo registerCreatureEvent.
registerCreatureEvent(cid, "noattack")
Já em creaturescripts.xml registre essa linha.
<event type="statschange" name="noattack" event="script" value="noattack.lua"/>
Depois vá ate os monsters que você quer que não hite os outros e coloque essa linha dentro dele depois de <immunities>...</immunities>
<script> <event name="noattack"/> </script>
-
DouGlaS Mapper deu reputação a fireelement em [PEDIDO] Fast Attack Fixo TFS 0.4creature.h, tenta usar esses valores:
#define EVENT_CREATURECOUNT 1 #define EVENT_CREATURE_THINK_INTERVAL 50
Também pode mudar no arquivo player.cpp, função getAttackSpeed
-
DouGlaS Mapper deu reputação a Ramon RBN em (Resolvido)[Compilar com MSVS] Problema ao tentar compilar o TFS 1.3 & 8.60Eu usei as dll que gera a partir da compilação, joguei tudo na pasta e executei.
Testei com outro TFS e parece mesmo ser as dll porém não sei qual, vou procurar aqui.
#SOLUÇÃO
Consegui resolver por outro fórum, aqui algumas soluções que encontrei:
Meu tópico no outro fórum: aqui
É importante usar o CMD para executar o seu '.exe', é bem fácil.
Abra o CMD, coloque 'cd <destino do seu projeto>', logo após isso use '<seu executador>.exe' para iniciar.
Problema com dummy:
avoid name conflict from boost::variant Solução:
https://github.com/otland/forgottenserver/pull/2678/files/f51321dde4e9a40f23d3df4269849154395a4326
Problema após compilar (tela preta ao executar):
Vá em Propriedades do seu projeto -> Debugging -> Working Directory e mude para a pasta do seu projeto. Logo após isso edite as propriedades do projeto e alterne o Conjunto de Instruções Avançadas para SSE2.
https://otland.net/threads/illegal-instruction-on-compilling.259997/#post-2514777
Vai compilar sem problemas.
-
DouGlaS Mapper deu reputação a Ackerzin em Mana&Life 100/100 sem bug.Mana e Life 100/100
Salve galerinha, estive procurando em vários tópicos, algum codigo de life e mana 100/100, e nenhum deles funcionava perfeito para oque eu precisava, todos eles paravam de funcionar quando o player atingia o level 715835 ou mana/life "21474847" o numero 100 da vida virava 65750 ou da mana, de qual você atingisse primeiro "21474847" e pra quem quer por high XP isso é um problema, mas depois de muito, MUITO,MUITO,muito esforço de um amigo, @Rusherzin, ele conseguiu burla isso, e agora você pode pegar quantos de level/mana/life quiser que não vai sair de 100/100, então é isso vamos ao que interessa.
TFS 0.4 foi testado !
Nas SOURCES arquivo protocolgame.cpp procure por:
void ProtocolGame::AddPlayerStats(NetworkMessage_ptr msg) e substitua por isso:
Imagem mostrando certinho a life/mana
Créditos:
99% @Rusherzin Por fazer tudo !
1% @Zzyzx Por ficar incomodando até ele fazer !
-
DouGlaS Mapper deu reputação a Yan Liima em [8.60] TFS 0.4 Rev3996 War & CastAndei um tempo AFK, tinha até um update para fazer das sources. Mas esse BUG no qual você está tendo está normal aqui comigo, e com alguns amigos que testou não tiveram esse bug não. Você colocou o valor do tempo em milissegundos? caso não saiba oque é, procure a respeito
-
DouGlaS Mapper deu reputação a Mathias Kenfi em (Resolvido)Healando por segundo usando MLPara o healing aparecer, você tem que editar no config.lua na linha a seguir
showHealthChange = false Coloque true
-
DouGlaS Mapper deu reputação a Vodkart em [MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]@DouGlaS Mapper só 7 no máximo? eu acabei de testar aqui e spammo antes de terminar (testei com 2 players), ficaram 25 zombies no mapa.
e na outra tentativa, ficaram 13.
que server tais usando?
-
DouGlaS Mapper deu reputação a Vodkart em [MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]@DouGlaS Mapper Estranho, não está entregando o troféu... configurou o ID do trofeu ali? o resto da premiação ainda está dando?
tenta remover essas 2 linhas:
local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
-
DouGlaS Mapper deu reputação a Vodkart em [MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]Qual dúvida ou erro poste no tópico que estarei respondendo.
Obs: Antes que me falem besteiras, coloquei para os GM'S, CM'S E GOD'S não contarem no evento, então testem apenas com jogadores.
Zombie.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="zombie_config"><![CDATA[ zombie_config = { storages = {172100, 172101, 172102}, -- n edite players = {min = 2, max = 30}, -- min, max players no evento rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, timeToStartEvent = 30, -- segundos para começar o evento CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento teleport = {{x=147, y=55, z=7}, {x=125 , y=304, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp arena = {{x=110,y=297,z=7},{x=145,y=321,z=7}}, -- area positions monster_name = "Zombie Event", timeBetweenSpawns = 20, min_Level = 20 } zombie_days = { ["Monday"] = {"13:00","18:00","20:00","22:00"}, ["Tuesday"] = {"13:00","18:00","22:50","22:00"}, ["Wednesday"] = {"21:57","18:00","20:00","23:17"}, ["Thursday"] = {"13:00","18:00","20:00","22:00"}, ["Friday"] = {"13:00","18:00","21:45","22:00"}, ["Saturday"] = {"13:00","18:00","20:00","22:00"}, ["Sunday"] = {"13:00","18:00","20:00","22:00"} } function removeZombieTp() local t = getTileItemById(zombie_config.teleport[1], 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF) end function ZerarStoragesZombie() for _, stor in pairs(zombie_config.storages) do setGlobalStorageValue(stor, 0) end end function getPlayersInZombieEvent() local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then t[#t+1] = pid end end return t end function getZombieRewards(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function HaveCreatureZombie(area, remove) for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end end end end function spawnZombie() if #getPlayersInZombieEvent() > 1 then local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z} if not isWalkable(pos, false, false, false) then spawnZombie() else doSummonCreature(zombie_config.monster_name, pos) doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000) end end end function CheckZombieEvent(delay) if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then for _, cid in pairs(getPlayersInZombieEvent()) do doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end removeZombieTp() doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING) ZerarStoragesZombie() elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end addEvent(CheckZombieEvent, 60000, delay-1) end end]]></config> <event type="statschange" name="ZombieStats" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then if #getPlayersInZombieEvent() > 1 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) if #getPlayersInZombieEvent() == 1 then local winner = getPlayersInZombieEvent()[1] doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!') local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.") getZombieRewards(winner, zombie_config.rewards.items) doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false) doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT) doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!") HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end else doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE) HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end return false end end return true]]></event> <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[ domodlib('zombie_config') function onThink(interval, lastExecution) if zombie_days[os.date("%A")] then local hrs = tostring(os.date("%X")):sub(1, 5) if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(zombie_config.CheckTime) setGlobalStorageValue(zombie_config.storages[1], 0) setGlobalStorageValue(zombie_config.storages[2], 0) HaveCreatureZombie(zombie_config.arena, true) end end return true end]]></globalevent> <event type="login" name="Zombie_Login" event="script"><![CDATA[ domodlib('zombie_config') function onLogin(cid) registerCreatureEvent(cid, "ZombieBattle") registerCreatureEvent(cid, "ZombieStats") if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end]]></event> <event type="combat" name="ZombieBattle" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doPlayerSendCancel(cid, "You may not attack this player.") return false end return true ]]></event> <movevent type="StepIn" actionid ="45110" event="script"><![CDATA[ domodlib('zombie_config') function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end if getPlayerLevel(cid) < zombie_config.min_Level then doTeleportThing(cid, fromPosition, true) doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then doTeleportThing(cid, zombie_config.teleport[2]) setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end end return true end]]></movevent> <talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[ domodlib('zombie_config') if getGlobalStorageValue(zombie_config.storages[3]) > 0 then doPlayerSendCancel(cid, "The event is already starting.") return true elseif not param or not tonumber(param) then doPlayerSendCancel(cid, "Use only numbers.") return true end local param = tonumber(param) <= 0 and 1 or tonumber(param) local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(tonumber(param)) ZerarStoragesZombie() setGlobalStorageValue(zombie_config.storages[3], 1) HaveCreatureZombie(zombie_config.arena, true) ]]></talkaction> <globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[ domodlib('zombie_config') ZerarStoragesZombie() return true]]></globalevent> </mod>
OBS: Quem serve em milesegundos, mude essa parte:
<globalevent name="Zombie_Start" interval="60" event="script"><![CDATA[
para
<globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
----------------------------------------------------- // --------------------------------------------------
o monstro você instala em data/monsters
zombie event.xml
<?xml version="1.0" encoding="UTF-8"?> <monster name="Zombie Event" nameDescription="an zombie event" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster>
e a tag em monsters.xml
<monster name="Zombie Event" file="zombie event.xml"/>
Configuração
Sistema
zombie_config = {
storages = {172100, 172101}, -- não edite
players = {min = 2, max = 30}, -- número minimo e máximo para jogadores no evento
rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, -- premiações do jogador
timeToStartEvent = 30, -- segundos para começar o evento após dar start
CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
teleport = {{x=145, y=50, z=7}, {x=176 , y=54, z=5}}, -- posiçãodo tp onde aparece, posição para onde o jogador vai ao entrar no tp
arena = {{x=173,y=52,z=5},{x=179,y=56,z=6}}, -- posição começo e final da area do evento
monster_name = "Zombie Event", -- nome do monstro que será sumonado
timeBetweenSpawns = 20, -- a cada quantos segundos é dado o respaw time do zombie no evento
min_Level = 20 -- level minimo para participar do evento
}
Dia e Horário
zombie_days = {
["Monday"] = {"13:00","18:00","20:00","22:00"},
["Tuesday"] = {"13:00","18:00","20:00","22:00"},
["Wednesday"] = {"13:00","18:00","20:00","22:00"},
["Thursday"] = {"13:00","18:00","20:00","22:00"},
["Friday"] = {"13:00","18:00","20:00","22:00"},
["Saturday"] = {"13:00","18:00","20:00","22:00"},
["Sunday"] = {"13:00","18:00","20:00","22:00"}
}
["Dia em inglês"] = {"horário do evento"}
Configurando a área:
zombie lua.rar
-
DouGlaS Mapper deu reputação a Yan Liima em [8.60] TFS 0.4 Rev3996 War & CastEm \data\npc\lib\npcsystem tentem utilizar está LIB:
npchandler.lua
-
DouGlaS Mapper deu reputação a Yan Liima em [8.60] TFS 0.4 Rev3996 War & CastSalve salve pessoal, no inicio desse ano estava dando uma estudada e mexendo com a TFS 0.4 rev3884, e vi que havia alguns bugs e que não tinha Cast incluso. Com base nisso decidi atualizar e otimizar a source, já que ainda ela é uma das mais utilizadas no mundo de Otserv. Decidi compartilhar esse meu trabalho com vocês! Acredito que possa ser uma das melhores REV atualmente.
Conto com o seu feedback, caso haja algum bug, algo que tenha que mudar/optimizar, não exite em avisar aqui no tópico. Toda ajuda será bem vinda xD
The Forgotten Server, Tibia Versão: 8.60
O que contém nela?
Dentro da pasta contém o config.lua com todas as tag já adicionadas.
Não esquecam de executar a Query do Cast na sua DB:
Downloads uint8(Effects até 255)
Distro: TheForgottenServer.exe
Src + datapack: Source & Data
Recentes atualizações: GitHub
Downloads uint8 sem o CAST incluso
Distro: TheForgottenServer.exe
Src + datapack: Source & Data
-------------------------------------------------------
Downloads uint16(Effects até 65534)
Distro: TheForgottenServer.exe
Src + datapack: Source & Data
É necessário fazer a modificação do Hexadecimal no cliente. Aqui tem um já pronto: Cliente.exe(com mc) ou Cliente.exe(sem mc) (só será necessario se utilizar a src com o uint 16.)
Lembrado também que precisa utilizar a lib 000-constant.lua deste datapack.
-------------------------------------------------------
Scans:
Distro(uint8) & Distro(uint16)
Source
Cliente
Obs: Os virus detectado é um falso positivo, então não se preocupem!
A distro foi testada em Windows e em Linux Ubuntu 12.04, 14.04, em
ambos funcionaram muito bem!
É compatível com 16 também e o 18.04 é necessário fazer uma alteração que é possível encontrar no post desse tópico.
É possível compilar em Dev Cpp e Visual-Studio.
E para quem se interessa em saber onde se localiza os code do Cast, aqui está uma imagem. Você pode achar procurando por "//CAST"
Façam um ótimo aproveito ?
-
DouGlaS Mapper deu reputação a Ramon RBN em [PEDIDO] DODGE NO LOOKEditei ali em cima, me chama no discord a gente resolve e depois posto a solução aqui. RBN#2718
-
DouGlaS Mapper recebeu reputação de XGaduX em BLOQUEAR CERTOS ITEMS NO /iSALVE GALERA DO TIBIA KING
TO MONTANDO UM OT AKI E NÃO SOU MUITO BOM COM SCRIPT'S ENTÃO PRECISAVA QUE ALGUÉM ME DESSE UMA FORÇA AE!
-> PRECISO DE UM SCRIPT PARA SERVER 8.60 QUE TIPO CERTOS CARGOS DA STAFF N CONSIGA CRIAR CERTO ITEM, TIPO UM CM VAI LÁ E DIGITA /i 2160 (CRYSTAL COIN) E APAREÇA NO DEFAULT VOCÊ NÃO PODE CRIAR ESTE ITEM, MAIS QUE ELE CONSIGA CRIAR OUTROS ITEMS TIPO UMA BP E TALS.
SÓ BLOQUEAR CERTOS ITEMS NO /i, NÃO TODOS.
SE ALGUÉM PODER ME AJUDAR AI REP+
VLW