Ir para conteúdo

Npc System 8.31


decion

Posts Recomendados

Pessoal não vi nenhum topico aqui com o novo sistema, claro q ainda ta falando alguma coisas nele mas pelo menos funciona em ot 8.31. Bom vamos ao que intereça!!

 

Aqui vai um exemplo de um npc que compra items raros. SIM eu peguei do Eldin antes que falem mas porem não vi ninguem postar nenhum exemplo aqui.

 

 

XML:

 

<?xml version="1.0" encoding="UTF-8"?>

<npc name="Epicoraz" script="data/npc/scripts/SellRareLoot.lua" walkinterval="2000" floorchange="0">

<health now="100" max="100"/>

<look type="130" head="58" body="132" legs="114" addons="0"/>

<parameters>

<parameter key="message_greet" value="So you passed my guard Mr. |PLAYERNAME|? Then I'll gess you have something rare I might want? I will pay good in pure cash. So, what do you have...?" />

<parameter key="module_keywords" value="1" />

<parameter key="keywords" value="quest;help;item;rare;rare items" />

<parameter key="keyword_reply1" value="Seek the undergrounds, a Demon Helmet is said to be earned somewhere down there." />

<parameter key="keyword_reply2" value="I buy rare items." />

<parameter key="keyword_reply3" value="Ask me about an item and I will give you a price if I want it. "/>

<parameter key="keyword_reply4" value="Ask me about an item and I will give you a price if I want it. "/>

<parameter key="keyword_reply5" value="Ask me about an item and I will give you a price if I want it. "/>

</parameters>

</npc>

 

 

Lua:

 

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

 

local shopModule = ShopModule:new()

npcHandler:addModule(shopModule)

 

shopModule:addSellableItem({'sword of valor', 'sov', 'magic sword'}, 2400, 600000, 'sword of valor')

shopModule:addSellableItem({'warlord sword', 'warlord'}, 2408, 350000, 'warlord sword')

shopModule:addSellableItem({'noble lance'}, 2438, 20000, 'noble lance')

shopModule:addSellableItem({'excalibur'}, 2446, 870000, 'excalibur')

shopModule:addSellableItem({'magic longsword', 'cyclomania sword'}, 2390, 980000, 'magic longsword')

shopModule:addSellableItem({'bright sword', 'bright'}, 2407, 45000, 'bright sword')

shopModule:addSellableItem({'avenger'}, 6528, 100000, 'avenger')

 

shopModule:addSellableItem({'noble mace'}, 2452, 20000, 'noble mace')

shopModule:addSellableItem({'crystal mace'}, 2445, 350000, 'crystal mace')

shopModule:addSellableItem({'thunder hammer'}, 2421, 600000, 'thunder hammer')

shopModule:addSellableItem({'hammer of wrath'}, 2444, 870000, 'hammer of wrath')

 

shopModule:addSellableItem({'noble axe'}, 2447, 20000, 'noble axe')

shopModule:addSellableItem({'great axe'}, 2415, 350000, 'great axe')

shopModule:addSellableItem({'stonecutter axe', 'stonecutter', 'stonecutters axe'}, 2431, 600000, 'stonecutters axe')

shopModule:addSellableItem({'golden halberd'}, 2443, 870000, 'golden halberd')

 

shopModule:addSellableItem({'lumenia helmet'}, 2499, 20000, 'lumenia helmet')

shopModule:addSellableItem({'dragon scale helmet', 'dsh'}, 2506, 35000, 'dragon scale helmet')

shopModule:addSellableItem({'demon helmet'}, 2493, 250000, 'demon helmet')

shopModule:addSellableItem({'ceremonial mask'}, 2501, 110000, 'ceremonial mask')

shopModule:addSellableItem({'helmet of the ancient', 'helmet of the ancients'}, 2342, 100000, 'helmet of the ancient')

shopModule:addSellableItem({'full helmet of the ancient', 'full helmet of the ancients'}, 2343, 350000, 'full helmet of the ancient')

shopModule:addSellableItem({'horned helmet'}, 2496, 550000, 'horned helmet')

shopModule:addSellableItem({'golden helmet', 'hots'}, 2471, 700000, 'golden helmet')

shopModule:addSellableItem({'winged helmet'}, 2474, 1000000, 'winged helmet')

 

shopModule:addSellableItem({'lumenia armor'}, 2500, 40000, 'lumenia armor')

shopModule:addSellableItem({'elven armor'}, 2505, 100000, 'elven armor')

shopModule:addSellableItem({'demon armor'}, 2494, 600000, 'demon armor')

shopModule:addSellableItem({'magic plate armor', 'mpa'}, 2472, 250000, 'magic plate armor')

 

shopModule:addSellableItem({'dragon scale legs', 'dsl'}, 2496, 150000, 'dragon scale legs')

shopModule:addSellableItem({'elven legs'}, 2507, 100000, 'elven legs')

shopModule:addSellableItem({'demon legs'}, 2495, 1000000, 'demon legs')

shopModule:addSellableItem({'golden legs'}, 2470, 160000, 'golden legs')

 

shopModule:addSellableItem({'lumenia shield'}, 2500, 50000, 'lumenia shield')

shopModule:addSellableItem({'great shield'}, 2505, 150000, 'great shield')

shopModule:addSellableItem({'blessed shield'}, 2494, 1000000, 'blessed shield')

shopModule:addSellableItem({'mastermind shield', 'mms'}, 2514, 140000, 'mastermind shield')

 

shopModule:addSellableItem({'ruby necklace'}, 2133, 30000, 'ruby necklace')

 

shopModule:addSellableItem({'golden ring'}, 2179, 1500, 'golden ring')

shopModule:addSellableItem({'ring of the sky'}, 2123, 50000, 'ring of the sky')

 

shopModule:addSellableItem({'magic staff'}, 2433, 600000, 'magic staff')

shopModule:addSellableItem({'sprite wand'}, 2453, 450000, 'sprite wand')

shopModule:addSellableItem({'arbalest'}, 5803, 400000, 'arbalest')

shopModule:addSellableItem({'soft boots'}, 6132, 500000, 'soft boots')

 

npcHandler:addModule(FocusModule:new())

 

Bom ta ai pessoal!! Posso ter poucos posts mas ja sou antigo aqui no forum é que eu nao posto mesmo xD

 

CREDITOS:

90% Eldin World

10% Pra mim por trazer aqui para voces!!

 

Se eu descobrir algo novo eu venho postar aqui!!E axo que não funciona em 8.22

 

Flow

Abraços

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...