Ir para conteúdo
  • Cadastre-se

NPC TFS 1.X [NPC] Imbuement Assistant (ATUALIZADO)! Version 1.4.0x


Posts Recomendados

Olá Galera, acabei de editar o npc para que funcione de maneira correta na nova versão v1.4.0

do serverhttps://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!!! <3

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

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

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

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

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

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por ambrozii0
      Gostaria de fazer um pedido de um NPC de Task progressiva,

      Ele iniciaria dando missões para level 8 para caçar Troll, Rotworm e Ghoul.
       
      No level 30 liberaria: Cyclops, Dragon e Wyrm... e assim em diante se puder deixar comentado eu faço as criaturas na sequencia dos leveis seguintes.
       
      O jogador pode fazer as tasks dos leveis anteriores mesmo que já tenha ultrapassado o level do próximo nível de task.
       
      E o jogador ao terminar a missão poderia escolher a recompensa em gold ou experiência. As tasks podem se repetir sem problema, mas apenas pode pegar uma de cada vez.
       
      Ao finalizar todas as tasks o jogador ganha uma montaria.
       
      Minha versão de cliente é 12.91
      Versão da Canary 2.6.1
      Não sei qual o TFS do meu servidor.
    • Por Gustavo0098
      Bom queria um NPC  teleportasse um player para uma position e so poderia ser usado novamente depois de 24 horas, alguem para ajudar? OBG 
    • Por zGiovani
      Olá amigos do Tibia King, venho com muito carinho compartilhar com vocês esse npc com a lista dos itens de imbuiment para compra. ?
       
      Simples mas acredito que vá ajudar algumas pessoas, fiz com base no script adicionado pelo Bruxo Ots, apenas deixei ele de forma mais simplificada,
      é só adicionar a algum NPC de sua preferência!
       
      Localizado em: "PASTA DO SEU SERVER"/data/npc     
       
      escolha um deles,  de um Ctrl +F  localize seu: <parameter key="shop_buyable" value="   Nome Item, ID , Preço; "/>     
       
      Substitua por:
       
       
    • Por Bruxo Ots
      Fala meus queridos, como sabem existem alguns ots que possuem um npc que compra tudo pra facilitar a vida da galera.
      Vou compartilhar com vcs aqui.
      Npc ja atualizado com os items 12.60
      Porem e compativel com meu otb quem usa vai dar boa que não usa e so mudar os id e so alegria.
      Creditos ao dega aqui e a equipe do HadesOt.
       
       
       
      Arquivo.
      Tibia King.xml
       
    • Por Fabricante
      Alguém poderia me ajudar nn sei ND sobre script quero criar um npc que eu inicie uma Quest e o players tenha que matar 7 bosses quando o player matar o Boss final o npc dá uma outft a ele e deixa ele passar pra sala das recompensas onde ele pegue x item no baú quem puder me ajudar agradeço muito 
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo