Postado Dezembro 19, 2017 7 anos Olá Tibianos do Tibia King. (Vou direto para o script) Vamos lá: Vá até a pasta data/npc copie e cole algum arquivo XML renomeie para stoned.xml e substitua por isto: (OBS esse é o NPC 1, vocações Paladin, Druid e Sorcerer) Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <npc name="Silyo" script="stoned.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="100" max="100"/> <look type="160" head="0" body="21" legs="115" feet="116" addons="0"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Eu sou especialista em skill de paladin, sorcerer e druid. Apenas diga {skill paladin}, {skill sorcerer} ou {skill druid}." /> <parameter key="message_farewell" value="Ate mais!" /> </parameters> </npc> Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso-- Agora volte para a pasta data/npc e copie e cole outro arquivo XML e renomeie para stonedkina.xml e substitua por isto: Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <npc name="Kalysto" script="stonedkina.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="100" max="100"/> <look type="134" head="0" body="32" legs="125" feet="3" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Eu sou o NPC especialista em Skills para Knight. Entao diga {skill club}, {skill sword} ou {skill axe}." /> <parameter key="message_farewell" value="Ate mais!" /> </parameters> </npc> (--Mesma coisa do anterior --) Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso-- ----SCRIPT DO NPC DE PALADIN, SORCERER E DRUID---- Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stoned.lua e cole isso dentro: Mostrar conteúdo oculto local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local itens = { ---- ITENS pally_item = 5909, mage_item = 5912, druid_item = 5910 } local effects = { ------EFEITOS pally_effect = 29, mage_effect = 31, druid_effect = 28 } local expTable = { ------Tabela de Exp para cada Vocação exp_pally = 700, exp_mage = 700, exp_druid = 700 } local quant = { ---Quantidade de item que vai ser removida do player! qt_pally = 1, qt_mage = 1, qt_druid = 1 } if msgcontains(msg, 'skill paladin') then if getPlayerItemCount(cid, itens.pally_item) >= 1 then if getPlayerVocation(cid) == 3 or getPlayerVocation (cid) == 7 then doPlayerAddSkillTry(cid, 4, expTable.exp_pally) doPlayerRemoveItem(cid, itens.pally_item, quant.qt_pally) doSendMagicEffect(getThingPos(cid), effects.pally_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não é Paladin e nem Royal Paladin!") end end if msgcontains(msg, 'skill sorcerer') then if getPlayerVocation (cid) == 1 or getPlayerVocation (cid) == 5 then if getPlayerItemCount(cid, itens.mage_item) >= 1 then doPlayerRemoveItem(cid, itens.mage_item, quant.qt_mage) doSendMagicEffect(getThingPos(cid), effects.mage_effect) doPlayerAddSpentMana(cid, expTable.exp_mage) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não Sorcerer e nem Master Sorcerer!") end end if msgcontains(msg, 'skill druid') then if getPlayerVocation (cid) == 2 or getPlayerVocation (cid) == 6 then if getPlayerItemCount(cid, itens.druid_item) >= 1 then doPlayerRemoveItem(cid, itens.druid_item, quant.qt_druid) doPlayerAddSpentMana(cid, expTable.exp_druid) doSendMagicEffect(getThingPos(cid), effects.druid_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não Druid e nem Elder Druid!") end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill. Em Azul são os efeitos que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD) Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada). Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100). -----SCRIPT DO NPC DE KNIGHT------ Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stonedkina.lua e cole isso dentro: Mostrar conteúdo oculto local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -----------------------CONFIG------------------------------- local itens = { ---- ITENS kina_club = 11223, kina_sword = 11219, kina_axe = 11227 } local effects = { ------EFEITO kina_effect = 30 } local expTable = { ------Tabela de Exp para cada Skill do Knight exp_club = 700, exp_sword = 700, exp_axe = 700 } local quant = { ---Quantidade de item que vai ser removida do player! qt_club = 1, qt_sword = 1, qt_axe = 1 } if msgcontains(msg, 'skill club') or msgcontains (msg, 'Skills club') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_club) >= 1 then doPlayerRemoveItem (cid, itens.kina_club, quant.qt_club) doPlayerAddSkillTry(cid, 1, expTable.exp_club) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end if msgcontains(msg, 'skill sword') or msgcontains (msg, 'Skills sword') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_sword) >= 1 then doPlayerRemoveItem (cid, itens.kina_sword, quant.qt_sword) doPlayerAddSkillTry(cid, 2, expTable.exp_sword) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end if msgcontains(msg, 'skill axe') or msgcontains (msg, 'Skills axe') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_axe) >= 1 then doPlayerRemoveItem (cid, itens.kina_axe, quant.qt_axe) doPlayerAddSkillTry(cid, 3, expTable.exp_axe) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) <-> As Configurações são as mesmas <-> Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill. Em Azul é o efeito que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD) Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada). Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100). Por fim é só Importar os NPC'S pelo mapa Editor e adicionar! :D Obrigado e Bom uso do script!!!
Postado Agosto 10, 2019 5 anos Em 19/12/2017 em 02:00, CowBoysFHell disse: Olá Tibianos do Tibia King. (Vou direto para o script) Vamos lá: Vá até a pasta data/npc copie e cole algum arquivo XML renomeie para stoned.xml e substitua por isto: (OBS esse é o NPC 1, vocações Paladin, Druid e Sorcerer) Mostrar conteúdo oculto Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <npc name="Silyo" script="stoned.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="100" max="100"/> <look type="160" head="0" body="21" legs="115" feet="116" addons="0"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Eu sou especialista em skill de paladin, sorcerer e druid. Apenas diga {skill paladin}, {skill sorcerer} ou {skill druid}." /> <parameter key="message_farewell" value="Ate mais!" /> </parameters> </npc> Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso-- Agora volte para a pasta data/npc e copie e cole outro arquivo XML e renomeie para stonedkina.xml e substitua por isto: Mostrar conteúdo oculto Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <npc name="Kalysto" script="stonedkina.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="100" max="100"/> <look type="134" head="0" body="32" legs="125" feet="3" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Eu sou o NPC especialista em Skills para Knight. Entao diga {skill club}, {skill sword} ou {skill axe}." /> <parameter key="message_farewell" value="Ate mais!" /> </parameters> </npc> (--Mesma coisa do anterior --) Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso-- ----SCRIPT DO NPC DE PALADIN, SORCERER E DRUID---- Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stoned.lua e cole isso dentro: Mostrar conteúdo oculto Mostrar conteúdo oculto local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local itens = { ---- ITENS pally_item = 5909, mage_item = 5912, druid_item = 5910 } local effects = { ------EFEITOS pally_effect = 29, mage_effect = 31, druid_effect = 28 } local expTable = { ------Tabela de Exp para cada Vocação exp_pally = 700, exp_mage = 700, exp_druid = 700 } local quant = { ---Quantidade de item que vai ser removida do player! qt_pally = 1, qt_mage = 1, qt_druid = 1 } if msgcontains(msg, 'skill paladin') then if getPlayerItemCount(cid, itens.pally_item) >= 1 then if getPlayerVocation(cid) == 3 or getPlayerVocation (cid) == 7 then doPlayerAddSkillTry(cid, 4, expTable.exp_pally) doPlayerRemoveItem(cid, itens.pally_item, quant.qt_pally) doSendMagicEffect(getThingPos(cid), effects.pally_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não é Paladin e nem Royal Paladin!") end end if msgcontains(msg, 'skill sorcerer') then if getPlayerVocation (cid) == 1 or getPlayerVocation (cid) == 5 then if getPlayerItemCount(cid, itens.mage_item) >= 1 then doPlayerRemoveItem(cid, itens.mage_item, quant.qt_mage) doSendMagicEffect(getThingPos(cid), effects.mage_effect) doPlayerAddSpentMana(cid, expTable.exp_mage) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não Sorcerer e nem Master Sorcerer!") end end if msgcontains(msg, 'skill druid') then if getPlayerVocation (cid) == 2 or getPlayerVocation (cid) == 6 then if getPlayerItemCount(cid, itens.druid_item) >= 1 then doPlayerRemoveItem(cid, itens.druid_item, quant.qt_druid) doPlayerAddSpentMana(cid, expTable.exp_druid) doSendMagicEffect(getThingPos(cid), effects.druid_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não Druid e nem Elder Druid!") end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill. Em Azul são os efeitos que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD) Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada). Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100). -----SCRIPT DO NPC DE KNIGHT------ Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stonedkina.lua e cole isso dentro: Mostrar conteúdo oculto Mostrar conteúdo oculto local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -----------------------CONFIG------------------------------- local itens = { ---- ITENS kina_club = 11223, kina_sword = 11219, kina_axe = 11227 } local effects = { ------EFEITO kina_effect = 30 } local expTable = { ------Tabela de Exp para cada Skill do Knight exp_club = 700, exp_sword = 700, exp_axe = 700 } local quant = { ---Quantidade de item que vai ser removida do player! qt_club = 1, qt_sword = 1, qt_axe = 1 } if msgcontains(msg, 'skill club') or msgcontains (msg, 'Skills club') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_club) >= 1 then doPlayerRemoveItem (cid, itens.kina_club, quant.qt_club) doPlayerAddSkillTry(cid, 1, expTable.exp_club) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end if msgcontains(msg, 'skill sword') or msgcontains (msg, 'Skills sword') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_sword) >= 1 then doPlayerRemoveItem (cid, itens.kina_sword, quant.qt_sword) doPlayerAddSkillTry(cid, 2, expTable.exp_sword) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end if msgcontains(msg, 'skill axe') or msgcontains (msg, 'Skills axe') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_axe) >= 1 then doPlayerRemoveItem (cid, itens.kina_axe, quant.qt_axe) doPlayerAddSkillTry(cid, 3, expTable.exp_axe) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) <-> As Configurações são as mesmas <-> Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill. Em Azul é o efeito que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD) Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada). Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100). Por fim é só Importar os NPC'S pelo mapa Editor e adicionar! :D Obrigado e Bom uso do script!!! Vou testar aqui
Postado Agosto 26, 2019 5 anos Em 19/12/2017 em 02:00, CowBoysFHell disse: Olá Tibianos do Tibia King. (Vou direto para o script) Vamos lá: Vá até a pasta data/npc copie e cole algum arquivo XML renomeie para stoned.xml e substitua por isto: (OBS esse é o NPC 1, vocações Paladin, Druid e Sorcerer) Mostrar conteúdo oculto Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <npc name="Silyo" script="stoned.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="100" max="100"/> <look type="160" head="0" body="21" legs="115" feet="116" addons="0"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Eu sou especialista em skill de paladin, sorcerer e druid. Apenas diga {skill paladin}, {skill sorcerer} ou {skill druid}." /> <parameter key="message_farewell" value="Ate mais!" /> </parameters> </npc> Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso-- Agora volte para a pasta data/npc e copie e cole outro arquivo XML e renomeie para stonedkina.xml e substitua por isto: Mostrar conteúdo oculto Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <npc name="Kalysto" script="stonedkina.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="100" max="100"/> <look type="134" head="0" body="32" legs="125" feet="3" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Eu sou o NPC especialista em Skills para Knight. Entao diga {skill club}, {skill sword} ou {skill axe}." /> <parameter key="message_farewell" value="Ate mais!" /> </parameters> </npc> (--Mesma coisa do anterior --) Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso-- ----SCRIPT DO NPC DE PALADIN, SORCERER E DRUID---- Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stoned.lua e cole isso dentro: Mostrar conteúdo oculto Mostrar conteúdo oculto local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local itens = { ---- ITENS pally_item = 5909, mage_item = 5912, druid_item = 5910 } local effects = { ------EFEITOS pally_effect = 29, mage_effect = 31, druid_effect = 28 } local expTable = { ------Tabela de Exp para cada Vocação exp_pally = 700, exp_mage = 700, exp_druid = 700 } local quant = { ---Quantidade de item que vai ser removida do player! qt_pally = 1, qt_mage = 1, qt_druid = 1 } if msgcontains(msg, 'skill paladin') then if getPlayerItemCount(cid, itens.pally_item) >= 1 then if getPlayerVocation(cid) == 3 or getPlayerVocation (cid) == 7 then doPlayerAddSkillTry(cid, 4, expTable.exp_pally) doPlayerRemoveItem(cid, itens.pally_item, quant.qt_pally) doSendMagicEffect(getThingPos(cid), effects.pally_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não é Paladin e nem Royal Paladin!") end end if msgcontains(msg, 'skill sorcerer') then if getPlayerVocation (cid) == 1 or getPlayerVocation (cid) == 5 then if getPlayerItemCount(cid, itens.mage_item) >= 1 then doPlayerRemoveItem(cid, itens.mage_item, quant.qt_mage) doSendMagicEffect(getThingPos(cid), effects.mage_effect) doPlayerAddSpentMana(cid, expTable.exp_mage) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não Sorcerer e nem Master Sorcerer!") end end if msgcontains(msg, 'skill druid') then if getPlayerVocation (cid) == 2 or getPlayerVocation (cid) == 6 then if getPlayerItemCount(cid, itens.druid_item) >= 1 then doPlayerRemoveItem(cid, itens.druid_item, quant.qt_druid) doPlayerAddSpentMana(cid, expTable.exp_druid) doSendMagicEffect(getThingPos(cid), effects.druid_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") end else selfSay("Você não tem o item necessário ou você não Druid e nem Elder Druid!") end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill. Em Azul são os efeitos que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD) Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada). Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100). -----SCRIPT DO NPC DE KNIGHT------ Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stonedkina.lua e cole isso dentro: Mostrar conteúdo oculto Mostrar conteúdo oculto local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end -----------------------CONFIG------------------------------- local itens = { ---- ITENS kina_club = 11223, kina_sword = 11219, kina_axe = 11227 } local effects = { ------EFEITO kina_effect = 30 } local expTable = { ------Tabela de Exp para cada Skill do Knight exp_club = 700, exp_sword = 700, exp_axe = 700 } local quant = { ---Quantidade de item que vai ser removida do player! qt_club = 1, qt_sword = 1, qt_axe = 1 } if msgcontains(msg, 'skill club') or msgcontains (msg, 'Skills club') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_club) >= 1 then doPlayerRemoveItem (cid, itens.kina_club, quant.qt_club) doPlayerAddSkillTry(cid, 1, expTable.exp_club) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end if msgcontains(msg, 'skill sword') or msgcontains (msg, 'Skills sword') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_sword) >= 1 then doPlayerRemoveItem (cid, itens.kina_sword, quant.qt_sword) doPlayerAddSkillTry(cid, 2, expTable.exp_sword) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end if msgcontains(msg, 'skill axe') or msgcontains (msg, 'Skills axe') then if getPlayerVocation (cid) == 4 or getPlayerVocation (cid) == 8 then if getPlayerItemCount(cid, itens.kina_axe) >= 1 then doPlayerRemoveItem (cid, itens.kina_axe, quant.qt_axe) doPlayerAddSkillTry(cid, 3, expTable.exp_axe) doSendMagicEffect(getThingPos(cid), effects.kina_effect) selfSay ("Parabéns você ganhou uma % a mais de skill para a sua vocação!") else selfSay ("Você não tem o item ou você não é Knight") end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) <-> As Configurações são as mesmas <-> Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill. Em Azul é o efeito que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD) Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada). Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100). Por fim é só Importar os NPC'S pelo mapa Editor e adicionar! :D Obrigado e Bom uso do script!!! Daria para adaptar o script e tirar o (check de vocations) qualquer players poder pegar qualquer skill? E daria para esse skill ser temporario? um exemplo que eu poderia dar seria o imbuement, comprar um skill de 3 magic level e após uma hora "configuravel" o skill sumir e o players possa comprar novamente caso ele queira. Se der seria de grande ajuda! Tópico muito bom, meus parabéns!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.