Postado Agosto 3, 2022 2 anos Olá Galera, acabei de editar o npc para que funcione de maneira correta na nova versão v1.4.0 do server: https://github.com/opentibiabr/otservbr-global/releases/download/stable-v1.4.0/otservbr.otbm Server/data/npc Imbuement Assistant.lua ? "PADRÃO - SEM ITENS IMBUEMENT DE HOLY" Spoiler local internalNpcName = "Imbuement Assistant" local npcType = Game.createNpcType(internalNpcName) local npcConfig = {} npcConfig.name = internalNpcName npcConfig.description = internalNpcName npcConfig.health = 100 npcConfig.maxHealth = npcConfig.health npcConfig.walkInterval = 2000 npcConfig.walkRadius = 2 npcConfig.outfit = { lookType = 141, lookHead = 41, lookBody = 72, lookLegs = 39, lookFeet = 96, lookAddons = 3, lookMount = 688 } npcConfig.flags = { floorchange = false } npcConfig.voices = { interval = 15000, chance = 50, {text = 'Hello adventurer, looking for Imbuement items? Just ask me!'} } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) npcType.onThink = function(npc, interval) npcHandler:onThink(npc, interval) end npcType.onAppear = function(npc, creature) npcHandler:onAppear(npc, creature) end npcType.onDisappear = function(npc, creature) npcHandler:onDisappear(npc, creature) end npcType.onMove = function(npc, creature, fromPosition, toPosition) npcHandler:onMove(npc, creature, fromPosition, toPosition) end npcType.onSay = function(npc, creature, type, message) npcHandler:onSay(npc, creature, type, message) end npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -- Basic keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, text = "Currently I have been working selling items for imbuement."}) npcHandler:setMessage(MESSAGE_GREET, "Welcome to Imbuement's shop!") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and come again.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye and come again.") npcHandler:addModule(FocusModule:new()) npcConfig.shop = { -- imbuement ITEMS { itemName = "imbuement fire 1", clientId = 9636, buy = 10000 }, { itemName = "imbuement fire 2", clientId = 5920, buy = 10000 }, { itemName = "imbuement fire 3", clientId = 5954, buy = 10000 }, { itemName = "imbuement earth 1", clientId = 9686, buy = 10000 }, { itemName = "imbuement earth 2", clientId = 9640, buy = 10000 }, { itemName = "imbuement earth 3", clientId = 21194, buy = 10000 }, { itemName = "imbuement ice 1", clientId = 9661, buy = 10000 }, { itemName = "imbuement ice 2", clientId = 21801, buy = 10000 }, { itemName = "imbuement ice 3", clientId = 9650, buy = 10000 }, { itemName = "imbuement energy 1", clientId = 18993, buy = 10000 }, { itemName = "imbuement energy 2", clientId = 21975, buy = 10000 }, { itemName = "imbuement energy 3", clientId = 23508, buy = 10000 }, { itemName = "imbuement death 1", clientId = 11484, buy = 10000 }, { itemName = "imbuement death 2", clientId = 9647, buy = 10000 }, { itemName = "imbuement death 3", clientId = 10420, buy = 10000 }, { itemName = "imbuement lifeleech 1", clientId = 9685, buy = 10000 }, { itemName = "imbuement lifeleech 2", clientId = 9633, buy = 10000 }, { itemName = "imbuement lifeleech 3", clientId = 9663, buy = 10000 }, { itemName = "imbuement manaleech 1", clientId = 11492, buy = 10000 }, { itemName = "imbuement manaleech 2", clientId = 20200, buy = 10000 }, { itemName = "imbuement manaleech 3", clientId = 22730, buy = 10000 }, { itemName = "imbuement critical 1", clientId = 11444, buy = 10000 }, { itemName = "imbuement critical 2", clientId = 10311, buy = 10000 }, { itemName = "imbuement critical 3", clientId = 22728, buy = 10000 }, { itemName = "reduces death 1", clientId = 11466, buy = 10000 }, { itemName = "reduces death 2", clientId = 22007, buy = 10000 }, { itemName = "reduces death 3", clientId = 9660, buy = 10000 }, { itemName = "reduces earth 1", clientId = 17823, buy = 10000 }, { itemName = "reduces earth 2", clientId = 9694, buy = 10000 }, { itemName = "reduces earth 3", clientId = 11702, buy = 10000 }, { itemName = "reduces fire 1", clientId = 5877, buy = 10000 }, { itemName = "reduces fire 2", clientId = 16131, buy = 10000 }, { itemName = "reduces fire 3", clientId = 11658, buy = 10000 }, { itemName = "reduces ice 1", clientId = 10295, buy = 10000 }, { itemName = "reduces ice 2", clientId = 10307, buy = 10000 }, { itemName = "reduces ice 3", clientId = 14012, buy = 10000 }, { itemName = "reduces energy 1", clientId = 9644, buy = 10000 }, { itemName = "reduces energy 2", clientId = 14079, buy = 10000 }, { itemName = "reduces energy 3", clientId = 9665, buy = 10000 }, { itemName = "reduces holy 1", clientId = 9639, buy = 10000 }, { itemName = "reduces holy 2", clientId = 9638, buy = 10000 }, { itemName = "reduces holy 3", clientId = 10304, buy = 10000 }, { itemName = "Speed imbuement 1", clientId = 17458, buy = 10000 }, { itemName = "Speed imbuement 2", clientId = 10302, buy = 10000 }, { itemName = "Speed imbuement 3", clientId = 14081, buy = 10000 }, { itemName = "axe imbuement 1", clientId = 10196, buy = 10000 }, { itemName = "axe imbuement 2", clientId = 11447, buy = 10000 }, { itemName = "axe imbuement 3", clientId = 21200, buy = 10000 }, { itemName = "sword imbuement 1", clientId = 9691, buy = 10000 }, { itemName = "sword imbuement 2", clientId = 21202, buy = 10000 }, { itemName = "sword imbuement 3", clientId = 9654, buy = 10000 }, { itemName = "club imbuement 1", clientId = 9657, buy = 10000 }, { itemName = "club imbuement 2", clientId = 22189, buy = 10000 }, { itemName = "club imbuement 3", clientId = 10405, buy = 10000 }, { itemName = "distance imbuement 1", clientId = 11464, buy = 10000 }, { itemName = "distance imbuement 2", clientId = 18994, buy = 10000 }, { itemName = "distance imbuement 3", clientId = 10298, buy = 10000 }, { itemName = "shield imbuement 1", clientId = 9641, buy = 10000 }, { itemName = "shield imbuement 2", clientId = 11703, buy = 10000 }, { itemName = "shield imbuement 3", clientId = 20199, buy = 10000 }, { itemName = "magic imbuement 1", clientId = 9635, buy = 10000 }, { itemName = "magic imbuement 2", clientId = 11452, buy = 10000 }, { itemName = "magic imbuement 3", clientId = 10309, buy = 10000 }, { itemName = "capacity imbuement 1", clientId = 25694, buy = 10000 }, { itemName = "capacity imbuement 2", clientId = 25702, buy = 10000 }, { itemName = "capacity imbuement 3", clientId = 20205, buy = 10000 } } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, inBackpacks, name, totalCost) npc:sellItem(player, itemId, amount, subType, true, inBackpacks, 2854) player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Bought %ix %s for %i %s.", amount, name, totalCost, ItemType(npc:getCurrency()):getPluralName():lower())) end -- On sell npc shop message npcType.onSellItem = function(npc, player, clientId, subtype, amount, name, totalCost) player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Sold %ix %s for %i gold.", amount, name, totalCost)) end -- On check npc shop message (look item) npcType.onCheckItem = function(npc, player, clientId, subType) end npcType:register(npcConfig) Server/data/npc Imbuement Assistant.lua ? "COM ITENS IMBUEMENT DE HOLY" Spoiler local internalNpcName = "Imbuement Assistant" local npcType = Game.createNpcType(internalNpcName) local npcConfig = {} npcConfig.name = internalNpcName npcConfig.description = internalNpcName npcConfig.health = 100 npcConfig.maxHealth = npcConfig.health npcConfig.walkInterval = 2000 npcConfig.walkRadius = 2 npcConfig.outfit = { lookType = 141, lookHead = 41, lookBody = 72, lookLegs = 39, lookFeet = 96, lookAddons = 3, lookMount = 688 } npcConfig.flags = { floorchange = false } npcConfig.voices = { interval = 15000, chance = 50, {text = 'Hello adventurer, looking for Imbuement items? Just ask me!'} } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) npcType.onThink = function(npc, interval) npcHandler:onThink(npc, interval) end npcType.onAppear = function(npc, creature) npcHandler:onAppear(npc, creature) end npcType.onDisappear = function(npc, creature) npcHandler:onDisappear(npc, creature) end npcType.onMove = function(npc, creature, fromPosition, toPosition) npcHandler:onMove(npc, creature, fromPosition, toPosition) end npcType.onSay = function(npc, creature, type, message) npcHandler:onSay(npc, creature, type, message) end npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -- Basic keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, text = "Currently I have been working selling items for imbuement."}) npcHandler:setMessage(MESSAGE_GREET, "Welcome to Imbuement's shop!") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and come again.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye and come again.") npcHandler:addModule(FocusModule:new()) npcConfig.shop = { -- imbuement ITEMS { itemName = "imbuement fire 1", clientId = 9636, buy = 10000 }, { itemName = "imbuement fire 2", clientId = 5920, buy = 10000 }, { itemName = "imbuement fire 3", clientId = 5954, buy = 10000 }, { itemName = "imbuement earth 1", clientId = 9686, buy = 10000 }, { itemName = "imbuement earth 2", clientId = 9640, buy = 10000 }, { itemName = "imbuement earth 3", clientId = 21194, buy = 10000 }, { itemName = "imbuement ice 1", clientId = 9661, buy = 10000 }, { itemName = "imbuement ice 2", clientId = 21801, buy = 10000 }, { itemName = "imbuement ice 3", clientId = 9650, buy = 10000 }, { itemName = "imbuement energy 1", clientId = 18993, buy = 10000 }, { itemName = "imbuement energy 2", clientId = 21975, buy = 10000 }, { itemName = "imbuement energy 3", clientId = 23508, buy = 10000 }, { itemName = "imbuement holy 1", clientId = 3058, buy = 10000 }, { itemName = "imbuement holy 2", clientId = 9632, buy = 10000 }, { itemName = "imbuement holy 3", clientId = 17831, buy = 10000 }, { itemName = "imbuement death 1", clientId = 11484, buy = 10000 }, { itemName = "imbuement death 2", clientId = 9647, buy = 10000 }, { itemName = "imbuement death 3", clientId = 10420, buy = 10000 }, { itemName = "imbuement lifeleech 1", clientId = 9685, buy = 10000 }, { itemName = "imbuement lifeleech 2", clientId = 9633, buy = 10000 }, { itemName = "imbuement lifeleech 3", clientId = 9663, buy = 10000 }, { itemName = "imbuement manaleech 1", clientId = 11492, buy = 10000 }, { itemName = "imbuement manaleech 2", clientId = 20200, buy = 10000 }, { itemName = "imbuement manaleech 3", clientId = 22730, buy = 10000 }, { itemName = "imbuement critical 1", clientId = 11444, buy = 10000 }, { itemName = "imbuement critical 2", clientId = 10311, buy = 10000 }, { itemName = "imbuement critical 3", clientId = 22728, buy = 10000 }, { itemName = "reduces death 1", clientId = 11466, buy = 10000 }, { itemName = "reduces death 2", clientId = 22007, buy = 10000 }, { itemName = "reduces death 3", clientId = 9660, buy = 10000 }, { itemName = "reduces earth 1", clientId = 17823, buy = 10000 }, { itemName = "reduces earth 2", clientId = 9694, buy = 10000 }, { itemName = "reduces earth 3", clientId = 11702, buy = 10000 }, { itemName = "reduces fire 1", clientId = 5877, buy = 10000 }, { itemName = "reduces fire 2", clientId = 16131, buy = 10000 }, { itemName = "reduces fire 3", clientId = 11658, buy = 10000 }, { itemName = "reduces ice 1", clientId = 10295, buy = 10000 }, { itemName = "reduces ice 2", clientId = 10307, buy = 10000 }, { itemName = "reduces ice 3", clientId = 14012, buy = 10000 }, { itemName = "reduces energy 1", clientId = 9644, buy = 10000 }, { itemName = "reduces energy 2", clientId = 14079, buy = 10000 }, { itemName = "reduces energy 3", clientId = 9665, buy = 10000 }, { itemName = "reduces holy 1", clientId = 9639, buy = 10000 }, { itemName = "reduces holy 2", clientId = 9638, buy = 10000 }, { itemName = "reduces holy 3", clientId = 10304, buy = 10000 }, { itemName = "Speed imbuement 1", clientId = 17458, buy = 10000 }, { itemName = "Speed imbuement 2", clientId = 10302, buy = 10000 }, { itemName = "Speed imbuement 3", clientId = 14081, buy = 10000 }, { itemName = "axe imbuement 1", clientId = 10196, buy = 10000 }, { itemName = "axe imbuement 2", clientId = 11447, buy = 10000 }, { itemName = "axe imbuement 3", clientId = 21200, buy = 10000 }, { itemName = "sword imbuement 1", clientId = 9691, buy = 10000 }, { itemName = "sword imbuement 2", clientId = 21202, buy = 10000 }, { itemName = "sword imbuement 3", clientId = 9654, buy = 10000 }, { itemName = "club imbuement 1", clientId = 9657, buy = 10000 }, { itemName = "club imbuement 2", clientId = 22189, buy = 10000 }, { itemName = "club imbuement 3", clientId = 10405, buy = 10000 }, { itemName = "distance imbuement 1", clientId = 11464, buy = 10000 }, { itemName = "distance imbuement 2", clientId = 18994, buy = 10000 }, { itemName = "distance imbuement 3", clientId = 10298, buy = 10000 }, { itemName = "shield imbuement 1", clientId = 9641, buy = 10000 }, { itemName = "shield imbuement 2", clientId = 11703, buy = 10000 }, { itemName = "shield imbuement 3", clientId = 20199, buy = 10000 }, { itemName = "magic imbuement 1", clientId = 9635, buy = 10000 }, { itemName = "magic imbuement 2", clientId = 11452, buy = 10000 }, { itemName = "magic imbuement 3", clientId = 10309, buy = 10000 }, { itemName = "capacity imbuement 1", clientId = 25694, buy = 10000 }, { itemName = "capacity imbuement 2", clientId = 25702, buy = 10000 }, { itemName = "capacity imbuement 3", clientId = 20205, buy = 10000 } } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, inBackpacks, name, totalCost) npc:sellItem(player, itemId, amount, subType, true, inBackpacks, 2854) player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Bought %ix %s for %i %s.", amount, name, totalCost, ItemType(npc:getCurrency()):getPluralName():lower())) end -- On sell npc shop message npcType.onSellItem = function(npc, player, clientId, subtype, amount, name, totalCost) player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Sold %ix %s for %i gold.", amount, name, totalCost)) end -- On check npc shop message (look item) npcType.onCheckItem = function(npc, player, clientId, subType) end npcType:register(npcConfig) EDITE TAMBÉM: imbuements.xml LOCALIZADO EM: data/xml/imbuements.xml edite ele para funcionar os ITENS IMBUEMENT DE HOLY Editei ele na linha 99 a 118 Spoiler <!-- HOLY IMBUEMENT INICIO --> <imbuement name="Divine" base="1" subgroup=" (Holy)" category="0" iconid="16" premium="0" storage="0"> <attribute key="description" value="Converts 10% of the physical damage to holy damage." /> <attribute key="effect" type="damage" combat="holy" value="10" /> <attribute key="item" value="3058" count="25" /> </imbuement> <imbuement name="Divine" base="2" subgroup=" (Holy)" category="0" iconid="16" premium="1" storage="0"> <attribute key="description" value="Converts 25% of the physical damage to holy damage." /> <attribute key="effect" type="damage" combat="holy" value="25" /> <attribute key="item" value="3058" count="25" /> <attribute key="item" value="9632" count="10" /> </imbuement> <imbuement name="Divine" base="3" subgroup=" (Holy)" category="0" iconid="16" premium="1" storage="0"> <attribute key="description" value="Converts 50% of the physical damage to holy damage." /> <attribute key="effect" type="damage" combat="holy" value="50" /> <attribute key="item" value="3058" count="25" /> <attribute key="item" value="9632" count="10" /> <attribute key="item" value="17831" count="5" /> </imbuement> <!-- HOLY IMBUEMENT FIM --> Valeu Galera! Aproveitem esse ótimo conteúdo que vai poupar muito tempo de vocês, até a próxima!!!
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.