soul4soul
Intermediate OT User
This NPC buys ALL creature products including 8.6 items(thanks Elvarion for 8.6 items n the haunted wood).
NOTE: all the prices are 10x the RL price so just remember to remove a '0' off of every1 if you want the cip prices
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Blind Witch" script="data/npc/scripts/creatureproducts.lua" walkinterval="1000" floorchange="0">
<health now="100" max="100"/>
<look type="157" head="114" body="114" legs="114" feet="94" addons="3"/>
<parameters>
<parameter key="message_greet" value="Who's There?!! I collect herbs and creature products, do you have any for me to buy?"/>
<parameter key="message_needmoremoney" value="come back when you get more money."/>
<parameter key="message_decline" value="Is |TOTALCOST| gold coins too much for you? Get out of here!"/>
</parameters>
</npc>
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
-- Start shop
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
--shop sells player buys
shopModule:addBuyableItem({'Blessed Wooden Stake'}, 5942, 12000, 1)
shopModule:addBuyableItem({'Obsidian Knife'}, 5908, 12000, 1)
shopModule:addBuyableItem({'Fire Bug'}, 5468, 100, 1)
shopModule:addBuyableItem({'Mead Horn'}, 7141, 50, 1)
shopModule:addBuyableItem({'Goat Grass'}, 2760, 150, 1)
shopModule:addBuyableItem({'Blood Herb'}, 2798, 10000, 1)
shopModule:addBuyableItem({'Rust Remover'}, 9930, 250, 1)
--player sells shop buys
shopModule:addSellableItem({'Acorn'}, 11207, 100)
shopModule:addSellableItem({'Ancient Stone'}, 10548, 2000)
shopModule:addSellableItem({'Antlers'}, 11208, 500)
shopModule:addSellableItem({'Ape Fur'}, 5883, 1200)
shopModule:addSellableItem({'Badger Fur'}, 11210, 150)
shopModule:addSellableItem({'Bamboo Stick'}, 12362, 300)
shopModule:addSellableItem({'Banana Sash'}, 12428, 550)
shopModule:addSellableItem({'Bat Wing'}, 5894, 500)
shopModule:addSellableItem({'Battle Stone'}, 12364, 2900)
shopModule:addSellableItem({'Bear Paw'}, 5896, 1000)
shopModule:addSellableItem({'Behemoth Claw'}, 5930, 20000)
shopModule:addSellableItem({'Beholder Eye'}, 5898, 800)
shopModule:addSellableItem({'Black Hood'}, 10561, 1900)
shopModule:addSellableItem({'Black Wool'}, 12365, 3000)
shopModule:addSellableItem({'Blood Preservation'}, 12366, 3200)
shopModule:addSellableItem({'Bloody Pincers'}, 10549, 1000)
shopModule:addSellableItem({'Boggy Dreads'}, 10583, 2000)
shopModule:addSellableItem({'Bone Shoulderplate'}, 11315, 1500)
shopModule:addSellableItem({'Bony Tail'}, 11188, 2100)
shopModule:addSellableItem({'Book of Necromantic Rituals'}, 11231, 1800)
shopModule:addSellableItem({'Book of Prayers'}, 10562, 1200)
shopModule:addSellableItem({'Brimstone Fangs'}, 12619, 3500)
shopModule:addSellableItem({'Brimstone Shell'}, 12620, 2100)
shopModule:addSellableItem({'Broken Crossbow'}, 12368, 300)
shopModule:addSellableItem({'Broken Draken Mail'}, 12577, 3500)
shopModule:addSellableItem({'Broken Gladiator Shield'}, 10572, 1800)
shopModule:addSellableItem({'Broken Halberd'}, 11329, 1000)
shopModule:addSellableItem({'Broken Helmet'}, 12370, 200)
shopModule:addSellableItem({'Broken Key Ring'}, 12569, 80000)
shopModule:addSellableItem({'Broken Shamanic Staff'}, 12369, 350)
shopModule:addSellableItem({'Broken Slicer'}, 12578, 1200)
shopModule:addSellableItem({'Bunch of Troll Hair'}, 10605, 300)
shopModule:addSellableItem({'Bundle of Cursed Straw'}, 10604, 8000)
shopModule:addSellableItem({'Carniphila Seeds'}, 11211, 500)
shopModule:addSellableItem({'Carrion Worm Fang'}, 11186, 350)
shopModule:addSellableItem({'Centipede Leg'}, 11212, 280)
shopModule:addSellableItem({'Chicken Feather'}, 5890, 300)
shopModule:addSellableItem({'Cobra Tongue'}, 10550, 150)
shopModule:addSellableItem({'Colourful Feather'}, 12431, 1100)
shopModule:addSellableItem({'Compass'}, 11213, 450)
shopModule:addSellableItem({'Corrupted Flag'}, 11213, 7000)
shopModule:addSellableItem({'Crab Pincers'}, 11183, 350)
shopModule:addSellableItem({'Cultish Mask'}, 10554, 2800)
shopModule:addSellableItem({'Cultish Robe'}, 10555, 1500)
shopModule:addSellableItem({'Cultish Symbol'}, 12372, 5000)
shopModule:addSellableItem({'Cursed Shoulder Spikes'}, 11321, 3200)
shopModule:addSellableItem({'Cyclops Toe'}, 10573, 550)
shopModule:addSellableItem({'Dark Rosary'}, 11214, 480)
shopModule:addSellableItem({'Demon Dust'}, 5906, 3000)
shopModule:addSellableItem({'Demon Horn'}, 5954, 10000)
shopModule:addSellableItem({'Demonic Skeletal Hand'}, 10563, 800)
shopModule:addSellableItem({'Dirty Turban'}, 12373, 1200)
shopModule:addSellableItem({'Downy Feather'}, 12601, 200)
shopModule:addSellableItem({'Dragon Claw'}, 10020, 80000)
shopModule:addSellableItem({'Dragon Priest\'s Wandtip'}, 11355, 1750)
shopModule:addSellableItem({'Dragon Tail'}, 12374, 1000)
shopModule:addSellableItem({'Draken Sulphur'}, 12575, 5500)
shopModule:addSellableItem({'Draken Wristbands'}, 12576, 4300)
shopModule:addSellableItem({'Elder Beholder Tentacle'}, 11187, 1500)
shopModule:addSellableItem({'Elven Astral Observer'}, 12382, 900)
shopModule:addSellableItem({'Elven Scouting Glass'}, 12381, 500)
shopModule:addSellableItem({'Elvish Talisman'}, 10551, 450)
shopModule:addSellableItem({'Essence of a Bad Dream'}, 11217, 3600)
shopModule:addSellableItem({'Eye of Corruption'}, 12588, 3900)
shopModule:addSellableItem({'ferumbras hat'}, 5903, 500000)
shopModule:addSellableItem({'Fiery Heart'}, 10552, 3750)
shopModule:addSellableItem({'Fish Fin'}, 5895, 1500)
shopModule:addSellableItem({'Flask of Embalming Fluid'}, 12383, 300)
shopModule:addSellableItem({'Frost Giant Pelt'}, 10574, 1600)
shopModule:addSellableItem({'Frosty Ear of a Troll'}, 10564, 300)
shopModule:addSellableItem({'Frosty Heart'}, 10577, 2800)
shopModule:addSellableItem({'Gauze Bandage'}, 10565, 900)
shopModule:addSellableItem({'Gear Crystal'}, 10571, 2000)
shopModule:addSellableItem({'Geomancer\'s Robe'}, 12375, 800)
shopModule:addSellableItem({'Geomancer\'s Staff'}, 12380, 1200)
shopModule:addSellableItem({'Ghastly Dragon Head'}, 11360, 7000)
shopModule:addSellableItem({'Ghostly Tissue'}, 10606, 900)
shopModule:addSellableItem({'Ghoul Snack'}, 12384, 600)
shopModule:addSellableItem({'Giant Eye'}, 11191, 3800)
shopModule:addSellableItem({'Girlish Hair Decoration'}, 12360, 300)
shopModule:addSellableItem({'Glob of Acid Slime'}, 9967, 250)
shopModule:addSellableItem({'Glob of Mercury'}, 9966, 200)
shopModule:addSellableItem({'Glob of Tar'}, 9968, 300)
shopModule:addSellableItem({'Goblin Ear'}, 12456, 200)
shopModule:addSellableItem({'Green Dragon Leather'}, 5877, 1000)
shopModule:addSellableItem({'Green Dragon Scale'}, 5920, 1000)
shopModule:addSellableItem({'Hair of a Banshee'}, 12363, 3500)
shopModule:addSellableItem({'Half-Digested Piece of Meat'}, 11194, 550)
shopModule:addSellableItem({'Half-Eaten Brain'}, 10575, 850)
shopModule:addSellableItem({'Hardened Bone'}, 5925, 700)
shopModule:addSellableItem({'Haunted Piece of Wood'}, 10599, 1150)
shopModule:addSellableItem({'Hellhound Slobber'}, 10553, 5000)
shopModule:addSellableItem({'Hellspawn Tail'}, 11215, 4750)
shopModule:addSellableItem({'High Guard Flag'}, 11326, 5500)
shopModule:addSellableItem({'High Guard Shoulderplates'}, 11327, 1300)
shopModule:addSellableItem({'Honeycomb'}, 5902, 400)
shopModule:addSellableItem({'Hunter\'s Quiver'}, 12386, 800)
shopModule:addSellableItem({'Hydra Egg'}, 4850, 5000)
shopModule:addSellableItem({'Hydra Head'}, 11193, 6000)
shopModule:addSellableItem({'Jewelled Belt'}, 12387, 1800)
shopModule:addSellableItem({'Kongra\'s Shoulderpad'}, 12388, 1000)
shopModule:addSellableItem({'Lancer Beetle Shell'}, 11366, 800)
shopModule:addSellableItem({'Legionnaire Flags'}, 11328, 5000)
shopModule:addSellableItem({'Lion\'s Mane'}, 10607, 600)
shopModule:addSellableItem({'Lizard Essence'}, 12597, 3000)
shopModule:addSellableItem({'Lizard Leather'}, 5876, 1500)
shopModule:addSellableItem({'Lizard Scale'}, 5881, 1200)
shopModule:addSellableItem({'Luminous Orb'}, 12371, 10000)
shopModule:addSellableItem({'Lump of Dirt'}, 10608, 100)
shopModule:addSellableItem({'Lump of Earth'}, 11216, 1300)
shopModule:addSellableItem({'Mammoth Tusk'}, 11216, 1000)
shopModule:addSellableItem({'Mantassin Tail'}, 12406, 280)
shopModule:addSellableItem({'Metal Spike'}, 11209, 3200)
shopModule:addSellableItem({'Minotaur Horn'}, 12389, 750)
shopModule:addSellableItem({'Minotaur Leather'}, 5878, 800)
shopModule:addSellableItem({'Miraculum'}, 12391, 600)
shopModule:addSellableItem({'Morgaroth\'s Heart'}, 5943, 150000)
shopModule:addSellableItem({'Mutated Bat Ear'}, 10578, 4200)
shopModule:addSellableItem({'Mutated Flesh'}, 11219, 500)
shopModule:addSellableItem({'Mutated Rat Tail'}, 10584, 1500)
shopModule:addSellableItem({'Mystical Hourglass'}, 10576, 7000)
shopModule:addSellableItem({'Necromantic Robe'}, 12392, 2500)
shopModule:addSellableItem({'Nettle Blossom'}, 11225, 750)
shopModule:addSellableItem({'Noble Turban'}, 12403, 4300)
shopModule:addSellableItem({'Orc Leather'}, 12396, 300)
shopModule:addSellableItem({'Orc Tooth'}, 11109, 1500)
shopModule:addSellableItem({'Orcish Gear'}, 12394, 850)
shopModule:addSellableItem({'Orshabaal\'s Brain'}, 5808, 120000)
shopModule:addSellableItem({'Pelvis Bone'}, 12398, 300)
shopModule:addSellableItem({'Perfect Behemoth Fang'}, 5893, 2500)
shopModule:addSellableItem({'Petrified Scream'}, 11331, 2500)
shopModule:addSellableItem({'Piece of Archer Armor'}, 12400, 200)
shopModule:addSellableItem({'Piece of Crocodile Leather'}, 11190, 150)
shopModule:addSellableItem({'Piece of Dead Brain'}, 10579, 4200)
shopModule:addSellableItem({'Piece of Hellfire Armor'}, 10580, 5500)
shopModule:addSellableItem({'Piece of Scarab Shell'}, 10557, 450)
shopModule:addSellableItem({'Piece of Warrior Armor'}, 12399, 500)
shopModule:addSellableItem({'Pig Foot'}, 10609, 100)
shopModule:addSellableItem({'Pile of Grave Earth'}, 12401, 250)
shopModule:addSellableItem({'Poison Spider Shell'}, 12402, 100)
shopModule:addSellableItem({'Poisonous Slime'}, 10556, 500)
shopModule:addSellableItem({'Polar Bear Paw'}, 10566, 300)
shopModule:addSellableItem({'Protective Charm'}, 12361, 600)
shopModule:addSellableItem({'Purple Robe'}, 12390, 1100)
shopModule:addSellableItem({'Quara Bone'}, 12408, 5000)
shopModule:addSellableItem({'Quara Eye'}, 12405, 3500)
shopModule:addSellableItem({'Quara Pincers'}, 12407, 4100)
shopModule:addSellableItem({'Quara Tentacle'}, 12404, 1400)
shopModule:addSellableItem({'Red Dragon Leather'}, 5948, 2000)
shopModule:addSellableItem({'Red Dragon Scale'}, 5882, 2000)
shopModule:addSellableItem({'Rope Belt'}, 12409, 660)
shopModule:addSellableItem({'Rotten Piece of Cloth'}, 11202, 300)
shopModule:addSellableItem({'Sabretooth'}, 11222, 4000)
shopModule:addSellableItem({'Safety Pin'}, 12410, 1200)
shopModule:addSellableItem({'Sandcrawler Shell'}, 11367, 200)
shopModule:addSellableItem({'Scale of Corruption'}, 12590, 6800)
shopModule:addSellableItem({'Scarab Pincers'}, 10547, 2800)
shopModule:addSellableItem({'Scorpion Tail'}, 10567, 250)
shopModule:addSellableItem({'Scroll of Heroic Deeds'}, 12427, 2300)
shopModule:addSellableItem({'Scythe Leg'}, 11223, 4500)
shopModule:addSellableItem({'Sea Serpent Scale'}, 10582, 5200)
shopModule:addSellableItem({'Shaggy Tail'}, 11318, 250)
shopModule:addSellableItem({'Shamanic Hood'}, 12395, 450)
shopModule:addSellableItem({'Shard'}, 7290, 20000)
shopModule:addSellableItem({'Shiny Stone'}, 11221, 5000)
shopModule:addSellableItem({'Silky Fur'}, 11203, 350)
shopModule:addSellableItem({'Skull Belt'}, 12397, 800)
shopModule:addSellableItem({'Skunk Tail'}, 11185, 509)
shopModule:addSellableItem({'Small Flask of Eyedrops'}, 12429, 959)
shopModule:addSellableItem({'Small Notebook'}, 12367, 4809)
shopModule:addSellableItem({'Small Pitchfork'}, 12430, 709)
shopModule:addSellableItem({'Snake Skin'}, 10610, 4009)
shopModule:addSellableItem({'Spider Fangs'}, 8859, 100)
shopModule:addSellableItem({'Spider Silk'}, 5879, 1000)
shopModule:addSellableItem({'Spiked Iron Ball'}, 11319, 1000)
shopModule:addSellableItem({'Spooky Blue Eye'}, 10558, 950)
shopModule:addSellableItem({'Stone Wing'}, 11189, 1200)
shopModule:addSellableItem({'Strand of Medusa Hair'}, 11220, 6000)
shopModule:addSellableItem({'Striped Fur'}, 11204, 500)
shopModule:addSellableItem({'Sulphurous Stone'}, 11226, 1000)
shopModule:addSellableItem({'Swamp Grass'}, 10602, 200)
shopModule:addSellableItem({'Tail of Corruption'}, 12589, 2400)
shopModule:addSellableItem({'Tarantula Egg'}, 11192, 800)
shopModule:addSellableItem({'Tattered Piece of Robe'}, 10600, 1200)
shopModule:addSellableItem({'Tentacle Piece'}, 12583, 50000)
shopModule:addSellableItem({'Terramite Legs'}, 11365, 600)
shopModule:addSellableItem({'Terramite Shell'}, 11363, 1700)
shopModule:addSellableItem({'Terrorbird Beak'}, 11184, 950)
shopModule:addSellableItem({'Thick Fur'}, 11218, 1500)
shopModule:addSellableItem({'Thorn'}, 10559, 1000)
shopModule:addSellableItem({'Trollroot'}, 12432, 500)
shopModule:addSellableItem({'Turtle Shell'}, 5899, 900)
shopModule:addSellableItem({'Tusk'}, 8614, 1000)
shopModule:addSellableItem({'Undead Heart'}, 11361, 2000)
shopModule:addSellableItem({'Unholy Bone'}, 11227, 4800)
shopModule:addSellableItem({'Vampire Dust'}, 5905, 1000)
shopModule:addSellableItem({'Vampire Teeth'}, 10601, 2750)
shopModule:addSellableItem({'War Crystal'}, 10570, 4600)
shopModule:addSellableItem({'Warmaster\'s Wristguards'}, 11316, 2000)
shopModule:addSellableItem({'Warwolf Fur'}, 11229, 300)
shopModule:addSellableItem({'Weaver\'s Wandtip'}, 11308, 2500)
shopModule:addSellableItem({'Werewolf Fur'}, 11228, 3800)
shopModule:addSellableItem({'Widow\'s Mandibles'}, 11322, 1100)
shopModule:addSellableItem({'Winged Tail'}, 11224, 8000)
shopModule:addSellableItem({'Winter Wolf Fur'}, 11206, 200)
shopModule:addSellableItem({'Witch Broom'}, 10568, 600)
shopModule:addSellableItem({'Wolf Paw'}, 5897, 700)
shopModule:addSellableItem({'Wool'}, 11230, 150)
shopModule:addSellableItem({'Wyrm Scale'}, 10581, 4000)
shopModule:addSellableItem({'Wyvern Talisman'}, 10560, 2650)
shopModule:addSellableItem({'Zaogun Flag'}, 11324, 6000)
shopModule:addSellableItem({'Zaogun\'s Shoulderplates'}, 11325, 1500)
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!... only average loot is listed here
keywordHandler:addKeyword({'skinning products'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy Minotaur Leathers(80gp), Lizard Leathers(150gp), Green Dragon Leathers(100gp) Red Dragon Leathers(200gp). I also buy Hardened Bones(70gp), Behemoth Fangs(250gp), Neutral Matters(5k).'})
keywordHandler:addKeyword({'stake products'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy Vampire Dust(100gp), Demon Dust(300gp).'})
keywordHandler:addKeyword({'tails'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy Bony Tail(210gp), Dragon Tail Tip(100gp), Hellspawn Tail(475gp), Mantassin Tail(280gp), Mutated Rat Tail(150p), Scorpion Tail(25gp), Shaggy Tail(25gp), Skunk Tail(50gp) Tail of Corruption(240gp), Winged Tail(800gp).'})
keywordHandler:addKeyword({'scales'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy Green Dragon Scale(100gp), Lizard Scale(120gp), Red Dragon Scale(200gp), Scale of Corruption(680gp), Sea Serpent Scale(520gp) and Wyrm Scale(400gp).'})
keywordHandler:addKeyword({'bone'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy Antlers(50gp), Bone Shoulderplate(150gp), Brimstone Fangs(350gp), Carrion Worm Fang(35gp), Demon Horn(100gp), Mammoth Tusk(100gp), Minotaur Horn(75gp), Orc Tooth(150gp), Orc Tusk, Pelvis Bone(30p), Sabretooth(400gp), Tusk(100gp), Vampire Teeth(275gp).'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
NOTE: all the prices are 10x the RL price so just remember to remove a '0' off of every1 if you want the cip prices
Last edited: