Vim trazer um NPC que eu editei, NPC Mad, ele comprava somente uns items que antes do update da versao 8.0 do Tibia eram "quase todos", mais agora ja na versao 8.11 existem muitos outros novos items como Swords, Axes, Clubs, Armors, Legs, Helmets, Boots, etc... Entao decidi editar um com alguns novos items.

Certo ai vai:
†- Va para data/npc/scripts na pasta do seu OT;
†- Abra qualquer arquivo .LUA que estiver la, delete todo seu conteudo e cole o conteudo abaixo (clique em mostrar spoil):
local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello ' .. creatureGetName(cid) .. '! I buy your Helmets, Armors, Legs, Shields, Boots, Amulets and Rings, Swords, Axes and Clubs.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'demon helmet') then sell(cid,2493,getCount(msg),80000) elseif msgcontains(msg, 'royal helmet') or msgcontains(msg, 'rh') then sell(cid,2498,getCount(msg),40000) elseif msgcontains(msg, 'warrior helmet') then sell(cid,2475,getCount(msg),6000) elseif msgcontains(msg, 'horned helmet') then sell(cid,2496,getCount(msg),100000) elseif msgcontains(msg, 'amazon helmet') then sell(cid,2500,getCount(msg),40000) elseif msgcontains(msg, 'magma monocle') then sell(cid,7900,getCount(msg),20000) elseif msgcontains(msg, 'lightning headband') then sell(cid,7901,getCount(msg),20000) elseif msgcontains(msg, 'glacier mask') then sell(cid,7902,getCount(msg),20000) elseif msgcontains(msg, 'crusader helmet') then sell(cid,2497,getCount(msg),9000) elseif msgcontains(msg, 'terra hood') then sell(cid,7903,getCount(msg),20000) elseif msgcontains(msg, 'crown helmet') then sell(cid,2491,getCount(msg),3000) elseif msgcontains(msg, 'golden helmet') then sell(cid,2471,getCount(msg),1000000) elseif msgcontains(msg, 'winged helmet') then sell(cid,2474,getCount(msg),1000000) elseif msgcontains(msg, 'dwarven helmet') then sell(cid,2502,getCount(msg),30000) elseif msgcontains(msg, 'devil helmet') then sell(cid,2462,getCount(msg),4000) elseif msgcontains(msg, 'dragon scale helmet') then sell(cid,2506,getCount(msg),200000) elseif msgcontains(msg, 'skull helmet') then sell(cid,5741,getCount(msg),60000) elseif msgcontains(msg, 'beholder helmet') then sell(cid,3972,getCount(msg),30000) elseif msgcontains(msg, 'helmets') then selfSay('I buy Demon Helmet (80k), RH (40k), Warrior Helmet (6k), Horned Helmet (100k), Amazon Helmet (40k), Magma Monocle (20k), Lightning Headband (20k, Glacier Mask (20k), Terra Hood (20k), Crusader Helmet (5k), Crown Helmet (3k), Winged Helmet (1kk), Dwarven Helmet (30k), Devil Helmet (4k), Dragon Scale Helmet (200k), Skull Helmet (60k), Beholder Helmet (30k) and Golden Helmet (1kk).') elseif msgcontains(msg, 'steel boots') and focus == cid then sell(cid,2645,getCount(msg),30000) elseif msgcontains(msg, 'boh') or msgcontains(msg, 'boots of haste') and focus == cid then sell(cid,2195,getCount(msg),30000) elseif msgcontains(msg, 'golden boots') and focus == cid then sell(cid,2646,getCount(msg),100000) elseif msgcontains(msg, 'magma boots') and focus == cid then sell(cid,7891,getCount(msg),20000) elseif msgcontains(msg, 'glacier shoes') and focus == cid then sell(cid,7892,getCount(msg),20000) elseif msgcontains(msg, 'lightning boots') and focus == cid then sell(cid,7893,getCount(msg),20000) elseif msgcontains(msg, 'terra boots') and focus == cid then sell(cid,7886,getCount(msg),20000) elseif msgcontains(msg, 'boots') then selfSay('I buy BOH (30k), Steel Boots (30k), Golden Boots (100k), Magma Boots (20k), Glacier Shoes (20k), Lightning Boots (20k) and Terra Boots (20k).') elseif msgcontains(msg, 'magic plate armor') or msgcontains(msg, 'mpa') then sell(cid,2472,getCount(msg),300000) elseif msgcontains(msg, 'dragon scale mail') or msgcontains(msg, 'dsm') then sell(cid,2492,getCount(msg),60000) elseif msgcontains(msg, 'demon armor') then sell(cid,2494,getCount(msg),900000) elseif msgcontains(msg, 'magma coat') then sell(cid,7899,getCount(msg),30000) elseif msgcontains(msg, 'terra mantle') then sell(cid,7884,getCount(msg),30000) elseif msgcontains(msg, 'lightning robe') then sell(cid,7898,getCount(msg),30000) elseif msgcontains(msg, 'glacier robe') then sell(cid,7897,getCount(msg),30000) elseif msgcontains(msg, 'golden armor') then sell(cid,2466,getCount(msg),30000) elseif msgcontains(msg, 'dwarven armor') then sell(cid,2503,getCount(msg),50000) elseif msgcontains(msg, 'crown armor') then sell(cid,2487,getCount(msg),20000) elseif msgcontains(msg, 'knight armor') then sell(cid,2476,getCount(msg),5000) elseif msgcontains(msg, 'blue robe') then sell(cid,2656,getCount(msg),15000) elseif msgcontains(msg, 'amazon armor') then sell(cid,2500,getCount(msg),50000) elseif msgcontains(msg, 'plate armor') then sell(cid,2463,getCount(msg),500) elseif msgcontains(msg, 'armors') then selfSay('I buy MPA (300k), DSM (60k), Demon Armor (900k), Golden Armor (30k), Dwarven Armor (50k), Crown Armor (20k), Knight Armor (5k), Blue Robe (15k), Amazon Armor (50k), Plate Armor (500gps), Magma Coat (30k), Glacier Robe (30k), Lightning Ribe (30k) and Terra Mantle (30k).') elseif msgcontains(msg, 'golden legs') then sell(cid,2470,getCount(msg),120000) elseif msgcontains(msg, 'crown legs') then sell(cid,2488,getCount(msg),15000) elseif msgcontains(msg, 'knight legs') then sell(cid,2477,getCount(msg),6000) elseif msgcontains(msg, 'demon legs') then sell(cid,2495,getCount(msg),500000) elseif msgcontains(msg, 'dwarven legs') then sell(cid,2504,getCount(msg),50000) elseif msgcontains(msg, 'glacier kilt') then sell(cid,7896,getCount(msg),20000) elseif msgcontains(msg, 'lightning legs') then sell(cid,7895,getCount(msg),20000) elseif msgcontains(msg, 'blue legs') then sell(cid,7730,getCount(msg),15000) elseif msgcontains(msg, 'terra legs') then sell(cid,7885,getCount(msg),20000) elseif msgcontains(msg, 'magma legs') then sell(cid,7894,getCount(msg),20000) elseif msgcontains(msg, 'plate legs') then sell(cid,2647,getCount(msg),500) elseif msgcontains(msg, 'dragon scale legs') then sell(cid,2469,getCount(msg),1000000) elseif msgcontains(msg, 'legs') then selfSay('I buy Golden Legs (120k), Crown Legs (15k), Knight Legs (6k), Demon Legs (500k), Dwarven Legs (50k), Glacier Kilt (20k), Magma Legs (20k), Lightning Legs (20k), Terra Legs (20k), Blue Legs (15k), Dragon Scale Legs (1kk) and Plate Legs (500gps).') elseif msgcontains(msg, 'shield of the mastermind') or msgcontains(msg, 'mms') then sell(cid,2514,getCount(msg),80000) elseif msgcontains(msg, 'demon shield') then sell(cid,2520,getCount(msg),40000) elseif msgcontains(msg, 'blessed shield') then sell(cid,2523,getCount(msg),900000) elseif msgcontains(msg, 'great shield') then sell(cid,2522,getCount(msg),200000) elseif msgcontains(msg, 'vampire shield') then sell(cid,2534,getCount(msg),25000) elseif msgcontains(msg, 'tempest shield') then sell(cid,2542,getCount(msg),100000) elseif msgcontains(msg, 'castle shield') then sell(cid,2535,getCount(msg),30000) elseif msgcontains(msg, 'eagle shield') then sell(cid,2538,getCount(msg),70000) elseif msgcontains(msg, 'phoenix shield') then sell(cid,2539,getCount(msg),200000) elseif msgcontains(msg, 'medusa shield') then sell(cid,2536,getCount(msg),8000) elseif msgcontains(msg, 'amazon shield') then sell(cid,2537,getCount(msg),4000) elseif msgcontains(msg, 'crown shield') then sell(cid,2519,getCount(msg),5000) elseif msgcontains(msg, 'tower shield') then sell(cid,2528,getCount(msg),7000) elseif msgcontains(msg, 'dragon shield') then sell(cid,2516,getCount(msg),3000) elseif msgcontains(msg, 'guardian shield') then sell(cid,2515,getCount(msg),2000) elseif msgcontains(msg, 'necromancer shield') then sell(cid,6433,getCount(msg),1000000) elseif msgcontains(msg, 'nightmare shield') then sell(cid,6391,getCount(msg),1000000) elseif msgcontains(msg, 'shields') then selfSay('I buy MMS (80k), Demon Shield (40k), Blessed Shield (900k), Great Shield (200k), Vampire Shield (25k), Tempest Shield (100k), Castle Shield (30k), Eagle Shield (70k), Phoenix Shield (200k), Medusa Shield (8k), Amazon Shield (4k), Crown Shield (5k), Tower Shield (7k), Dragon Shield (3k), Guardian Shield (2k), Necromancer Shield (1kk) and Nightmare Shield (1kk).') elseif msgcontains(msg, 'magic longsword') then sell(cid,2390,getCount(msg),300000) elseif msgcontains(msg, 'warlord sword') then sell(cid,2408,getCount(msg),1000000) elseif msgcontains(msg, 'magic sword') then sell(cid,2400,getCount(msg),800000) elseif msgcontains(msg, 'mystic blade') then sell(cid,7384,getCount(msg),30000) elseif msgcontains(msg, 'avenger') then sell(cid,6528,getCount(msg),120000) elseif msgcontains(msg, 'justice seeker') then sell(cid,7390,getCount(msg),100000) elseif msgcontains(msg, 'mercenary sword') then sell(cid,7386,getCount(msg),17000) elseif msgcontains(msg, 'crimson sword') then sell(cid,7385,getCount(msg),3000) elseif msgcontains(msg, 'djinn blade') then sell(cid,2451,getCount(msg),80000) elseif msgcontains(msg, 'demonrage sword') then sell(cid,7382,getCount(msg),20000) elseif msgcontains(msg, 'relic sword') then sell(cid,7383,getCount(msg),50000) elseif msgcontains(msg, 'giant sword') then sell(cid,2393,getCount(msg),10000) elseif msgcontains(msg, 'pharaoh sword') then sell(cid,2446,getCount(msg),40000) elseif msgcontains(msg, 'dragon slayer') then sell(cid,7402,getCount(msg),12000) elseif msgcontains(msg, 'shenlong sword') then sell(cid,7405,getCount(msg),200000) elseif msgcontains(msg, 'bloody edge') then sell(cid,7416,getCount(msg),80000) elseif msgcontains(msg, 'dreaded cleaver') then sell(cid,7419,getCount(msg),40000) elseif msgcontains(msg, 'crystal sword') then sell(cid,7449,getCount(msg),2000) elseif msgcontains(msg, 'haunted blade') then sell(cid,7407,getCount(msg),14000) elseif msgcontains(msg, 'wyvern fang') then sell(cid,7408,getCount(msg),3000) elseif msgcontains(msg, 'bright sword') then sell(cid,2407,getCount(msg),6000) elseif msgcontains(msg, 'ice rapier') then sell(cid,2396,getCount(msg),4000) elseif msgcontains(msg, 'fire sword') then sell(cid,2392,getCount(msg),3000) elseif msgcontains(msg, 'assassin dagger') then sell(cid,7404,getCount(msg),50000) elseif msgcontains(msg, 'blacksteel sword') then sell(cid,7406,getCount(msg),5000) elseif msgcontains(msg, 'swords') then selfSay('I buy Magic Longsword (300k), Warlord Sword (1kk), Magic Sword (800k), Mystic Blade (30k), Avenger (120k), Justice Seeker (100k), Mercenary Sword (17k), Crimson Sword (3k), Djinn Blade (80k), Demonrage Sword (20k), Relic Sword (50k), Giant Sword (10k), Pharaoh Sword (40k), Dragon Slayer (12k), Shenlong Sword (200k), Bloody Edge (80k), Dreaded Cleaver (40k), Crystal Sword (2k), Haunted Blade (14k), Wyvern Fang (3k), Bright Sword (6k), Ice Rapier (4k), Fire Sword (3k) and Blacksteel Sword (5k).') elseif msgcontains(msg, 'dragon lance') then sell(cid,2414,getCount(msg),10000) elseif msgcontains(msg, 'stonecutters axe') then sell(cid,2431,getCount(msg),800000) elseif msgcontains(msg, 'guardian halberd') then sell(cid,2427,getCount(msg),8000) elseif msgcontains(msg, 'fire axe') then sell(cid,2432,getCount(msg),10000) elseif msgcontains(msg, 'knight axe') then sell(cid,2430,getCount(msg),2000) elseif msgcontains(msg, 'great axe') then sell(cid,2415,getCount(msg),2000000) elseif msgcontains(msg, 'ravagers axe') then sell(cid,2443,getCount(msg),40000) elseif msgcontains(msg, 'twin axe') then sell(cid,2447,getCount(msg),70000) elseif msgcontains(msg, 'headchopper') then sell(cid,7380,getCount(msg),5000) elseif msgcontains(msg, 'vile axe') then sell(cid,7388,getCount(msg),30000) elseif msgcontains(msg, 'heroic axe') then sell(cid,7389,getCount(msg),20000) elseif msgcontains(msg, 'naginata') then sell(cid,2426,getCount(msg),8000) elseif msgcontains(msg, 'butchers axe') then sell(cid,7412,getCount(msg),40000) elseif msgcontains(msg, 'titan axe') then sell(cid,7413,getCount(msg),40000) elseif msgcontains(msg, 'ruthless axe') then sell(cid,6553,getCount(msg),200000) elseif msgcontains(msg, 'war axe') then sell(cid,2454,getCount(msg),10000) elseif msgcontains(msg, 'royal axe') then sell(cid,7434,getCount(msg),120000) elseif msgcontains(msg, 'noble axe') then sell(cid,7456,getCount(msg),10000) elseif msgcontains(msg, 'dwarven axe') then sell(cid,2435,getCount(msg),4000) elseif msgcontains(msg, 'daramanian waraxe') then sell(cid,2440,getCount(msg),6000) elseif msgcontains(msg, 'axes') then selfSay('I buy Dragon Lance (10k), Stonecutters Axe (800k), Guardian Halberd (8k), Fire Axe (10k), Knight Axe (2k), Ravagers Axe (40k), Twin Axe (70k), Headchopper (5k), Vile Axe (30k), Heroic Axe (20k), Naginata (8k), Butchers Axe (40k), Titan Axe (40k) Ruthless Axe (200k), War Axe (10k), Royal Axe (120k), Noble Axe (10k), Dwarven Axe (4k) and Daramanian Waraxe (6k).') elseif msgcontains(msg, 'war hammer') then sell(cid,2391,getCount(msg),2000) elseif msgcontains(msg, 'thunder hammer') then sell(cid,2421,getCount(msg),300000) elseif msgcontains(msg, 'skull staff') then sell(cid,2436,getCount(msg),10000) elseif msgcontains(msg, 'dragonbone staff') then sell(cid,7430,getCount(msg),10000) elseif msgcontains(msg, 'demonbone') then sell(cid,7431,getCount(msg),500000) elseif msgcontains(msg, 'furry club') then sell(cid,7432,getCount(msg),3000) elseif msgcontains(msg, 'sapphire hammer') then sell(cid,7437,getCount(msg),5000) elseif msgcontains(msg, 'blessed sceptre') then sell(cid,7429,getCount(msg),90000) elseif msgcontains(msg, 'spiked squelcher') then sell(cid,7453,getCount(msg),12000) elseif msgcontains(msg, 'hammer of wrath') then sell(cid,2444,getCount(msg),40000) elseif msgcontains(msg, 'crystal mace') then sell(cid,2445,getCount(msg),30000) elseif msgcontains(msg, 'queens sceptre') then sell(cid,7410,getCount(msg),80000) elseif msgcontains(msg, 'abyss hammer') then sell(cid,7414,getCount(msg),30000) elseif msgcontains(msg, 'cranial basher') then sell(cid,7415,getCount(msg),30000) elseif msgcontains(msg, 'lunar staff') then sell(cid,7424,getCount(msg),9000) elseif msgcontains(msg, 'shadow sceptre') then sell(cid,7451,getCount(msg),80000) elseif msgcontains(msg, 'taurus mace') then sell(cid,7425,getCount(msg),1000) elseif msgcontains(msg, 'amber staff') then sell(cid,7426,getCount(msg),8000) elseif msgcontains(msg, 'chaos mace') then sell(cid,7427,getCount(msg),40000) elseif msgcontains(msg, 'heavy mace') then sell(cid,2452,getCount(msg),40000) elseif msgcontains(msg, 'arcane staff') then sell(cid,2453,getCount(msg),120000) elseif msgcontains(msg, 'lich staff') then sell(cid,3961,getCount(msg),20000) elseif msgcontains(msg, 'mammoth whopper') then sell(cid,7381,getCount(msg),5000) elseif msgcontains(msg, 'diamond sceptre') then sell(cid,7387,getCount(msg),10000) elseif msgcontains(msg, 'orcish maul') then sell(cid,7392,getCount(msg),3000) elseif msgcontains(msg, 'dragon hammer') then sell(cid,2434,getCount(msg),2000) elseif msgcontains(msg, 'clubs') then selfSay('I buy War Hammer (2k), Thunder Hammer (300k), Skull Staff (10k), Dragonbone Staff (10k), Demonbone (500k), Furry Club (3k), Sapphire Hammer (5k), Blessed Sceptre (90k), Spiked Squelcher (12k), Hammer of Wrath (40k), Crystal Mace (30k), Abyss Hammer (30k), Cranial Basher (30k), Lunar Staff (9k), Shadow Sceptre (80k), Taurus Mace (1k), Amber Staff (8k), Chaos Mace (40k), Heavy Mace (40k), Arcane Staff (120k), Lich Staff (20k), Mammoth Whopper (5k), Diamond Sceptre (10k) and Dragon Hammer (2k).') elseif msgcontains(msg, 'platinum amulet') then sell(cid,2171,getCount(msg),5000) elseif msgcontains(msg, 'ring of the sky') then sell(cid,2123,getCount(msg),10000) elseif msgcontains(msg, 'amulets and rings') then selfSay('I buy Platinum Amulet (5k) and Ring of The Sky (10k).') elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. ', come back later!') focus = 0 talk_start = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye and come back later!') focus = 0 end end end
†- Depois de ter colado o conteudo acima, salve o arquivo como loot.lua;
†- Depois va para a pasta data/npc e faça algo parecido, abra um arquivo .xml, delete seu conteudo e cole o conteudo abaixo (clique em mostrar spoil):
<?xml version="1.0"?> <npc name="Mad" script="data/npc/scripts/loot.lua" access="3" lookdir="2"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="131" head="116" body="113" legs="106" feet="76" addons="1"/> </npc>
†- Agora salve o arquivo como Mad.xml e pronto!
_____________________________________________________________________________
Obs.: Testei o NPC na versao 0.4.5 - XML do Aries, e funfo certinho, se der algum erro poste aqui...
O preço dos items foram de acordo com o meu server, mais voce pode editar eles de acordo com o seu,
no arquivo loot.lua voce pode editar, caso nao consiga procure um tutorial no forum...de tutoriais! :50_50:
† Lista dos Items que o NPC vende †
*Club: - War Hammer, Thunder Hammer, Skull Staff, Dragonbone Staff, Furry Club, Demonbone, Sapphire Hammer, Blessed Sceptre, Spiked Squelcher, Hammer of Wrath, Crystal Mace, Queen's Sceptre, Abyss Hammer, Cranial Basher, Lunar Staff, Shadow Sceptre, Taurus Mace, Amber Staff, Chaos Mace, Heavy Mace, Arcane Staff, Amber Staff, Lich Staff, Mammoth Whopper, Diamond Sceptre e Dragon Hammer. *Axe: - Dragon Lance, Stonecutter's Axe, Guardian Halberd, Fire Axe, Knight Axe, Ravager's Axe, Twin Axe, Headchopper, Vile Axe, Heroic Axe, Naginata, Butcher's Axe, Titan Axe, Ruthless Axe, War Axe, Royal Axe, Noble Axe, Dwarven Axe e Daramanian Waraxe. *Sword: - Magic Longsword, Warlord Sword, Magic Sword, Mystic Blade, The Avenger, Justice Seeker, Mercenary Sword, Crimson Sword, Djinn Blade, Demonrage Sword, Dragon Slayer, Relic Sword, Giant Sword, Pharaoh Sword, Shenlong Sword, Haunted Blade, Wyvern Fang, Bright Sword, Ice Rapier, Fire Sword, Assassin Dagger e Blacksteel Sword. *Shield: - Mastermind, Demon, Blessed, Great, Vampire, Tempest, Castle, Eagle, Phoenix, Medusa, Amazon, Crown, Tower, Dragon, Guardian, Necromancer e Nightmare Shield. *Legs: - Golden, Crown, Legs, Knight, Demon, Dwarven, Dragon Scale, Plate, Magma, Lightning, Terra, Blue Legs e Glacier Kilt. *Helmet: - Demon, Royal, Warrior, Horned, Amazon, Crusader, Crown, Winged, Dwarven, Devil, Dragon Scale, Skull, Beholder, Golden Helmet, Terra Hood, Glacier Mask, Lightning Headband e Magma Monocle. *Boots: - BOH, Steel Boots, Golden Boots, Magma Boots, Glacier Shoes, Lightning Boots e Terra Boots. *Amulets e Rings: - Platinum Amulet e Ring of The Sky.
Eh isso ae!
Espero que seja de bom uso, falows!
