Advertisement
Guest User

Untitled

a guest
Mar 1st, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.07 KB | None | 0 0
  1. local npc = NPC({
  2.     name = "Beatrice",
  3.    
  4.     messages = {
  5.         greet = "Hello, hiho, and ashari Player. Looking forward to {trade} with you.",
  6.         farewell = "See you later, |PLAYERNAME|.",
  7.         walkway = "See you later, |PLAYERNAME|.",
  8.         sendTrade = "Of course, just browse through my wares. {Footballs} have to be purchased separately."
  9.     },
  10.    
  11.     keywords = {
  12.         ["job"]  = "I'm selling all kind of useful equipment.",
  13.         ["name"]  = "I'm called Beatrice.",
  14.         [{"equipament", "offer"}]  = "My inventory of general goods and paperware is large, ask me for a trade to take a look.",
  15.         ["time"]  = "It's |TIME| right now.",
  16.         ["king tibianus"]  = "I've seen him once. What a handsome man!",
  17.         ["edron"]  = "It's the best place to live at.",
  18.         ["thais"]  = "We are no longer in need for supplies from there.",
  19.         ["carlin"]  = "Even though they rebelled against our king, the city is supposed to be very lovely.",
  20.         ["venore"]  = "I'm somewhat nervous about the Venorean traders. They've been trying to buy my shop for years, and they are becoming more and more aggressive.",
  21.         ["Ferumbras"]  = "I vaguely remember that name.",
  22.         ["Excalibug"]  = "That's just a myth like the screwdriver of Kurik or the endless casket of mana potions.",
  23.        
  24.         ["Orshabaal"]  = {
  25.             "I've heard a dragon or something like that with the name Orshabaal often ravages the northern part of our isle ...",
  26.             "If it were not for the soldiers here, I'd be worried, but I'm sure the army will keep us safe ...",
  27.             "If these adventurers weren't always scaring away that beast before the army can intervene, we'd be rid of this creature for years."
  28.         },
  29.        
  30.         ["army"]  = "I supply them with some basic stuff.",
  31.         ["tibia"]  = "I don't like travelling much. I prefer to live in the safety of our city.",
  32.         ["news"]  = "There are always rumours about the dangers in the far North of Edron.",
  33.     },
  34.    
  35.     voices = {
  36.         timeout = 16,
  37.         chance = 100,
  38.        
  39.         "Selling general goods and paperware! Come to my shop!"
  40.     },
  41.    
  42.     shop = {
  43.         {id = 2532,     buy = 5000,     sell = 900,     name='Ancient Shield'},
  44.         {id = 2489,     buy = 1500,     sell = 400,     name='Dark Armor'},
  45.         {id = 2490,     buy = 1000,     sell = 250,     name='Dark Helmet'},
  46.         {id = 2396,     buy = 5000,     sell = 0,       name='Ice Rapier'},
  47.         {id = 2409,     buy = 6000,     sell = 900,     name='Serpent Sword'},
  48.         {id = 2529,     buy = 0,        sell = 800,     name='Black Shield'},
  49.         {id = 7428,     buy = 0,        sell = 10000,   name='Bonebreaker'},
  50.         {id = 2434,     buy = 0,        sell = 2000,    name='Dragon Hammer'},
  51.         {id = 7419,     buy = 0,        sell = 15000,   name='Dreaded Cleaver'},
  52.         {id = 7860,     buy = 0,        sell = 2000,    name='Earth Knight Axe'},
  53.         {id = 7875,     buy = 0,        sell = 2000,    name='Energy Knight Axe'},
  54.         {id = 7750,     buy = 0,        sell = 2000,    name='Fiery Knight Axe'},
  55.         {id = 2393,     buy = 0,        sell = 17000,   name='Giant Sword'},
  56.         {id = 7407,     buy = 0,        sell = 8000,    name='Haunted Blade'},
  57.         {id = 7769,     buy = 0,        sell = 2000,    name='Icy Knight Axe'},
  58.         {id = 2476,     buy = 0,        sell = 5000,    name='Knight Armor'},
  59.         {id = 2430,     buy = 0,        sell = 2000,    name='Knight Axe'},
  60.         {id = 2477,     buy = 0,        sell = 5000,    name='Knight Legs'},
  61.         {id = 2663,     buy = 0,        sell = 150,     name='Mystic Turban'},
  62.         {id = 7421,     buy = 0,        sell = 22000,   name='Onyx Flail'},
  63.         {id = 7411,     buy = 0,        sell = 20000,   name='Ornamented Axe'},
  64.         {id = 2411,     buy = 0,        sell = 50,      name='Poison Dagger'},
  65.         {id = 2436,     buy = 0,        sell = 6000,    name='Skull Staff'},
  66.         {id = 2479,     buy = 0,        sell = 500,     name='Strange Helmet'},
  67.         {id = 7413,     buy = 0,        sell = 4000,    name='Titan Axe'},
  68.         {id = 2528,     buy = 0,        sell = 8000,    name='Tower Shield'},
  69.         {id = 2534,     buy = 0,        sell = 15000,   name='Vampire Shield'},
  70.         {id = 2475,     buy = 0,        sell = 5000,    name='Warrior Helmet'},
  71.         {id = 2201,     buy = 1000,     sell = 100,     name = 'Dragon Necklace'},
  72.         {id = 2213,     buy = 2000,     sell = 100,     name = 'Dwarven Ring'},
  73.         {id = 2167,     buy = 2000,     sell = 100,     name = 'Energy Ring'},
  74.         {id = 2168,     buy = 900,      sell = 50,      name = 'Life Ring'},
  75.         {id = 2164,     buy = 5000,     sell = 250,     name = 'Might Ring'},
  76.         {id = 2200,     buy = 700,      sell = 100,     name = 'Protection Amulet'},
  77.         {id = 2216,     buy = 2000,     sell = 100,     name = 'Ring of Healing'},
  78.         {id = 2170,     buy = 100,      sell = 50,      name = 'Silver Amulet'},
  79.         {id = 2161,     buy = 100,      sell = 30,      name = 'Strange Talisman'},
  80.         {id = 2169,     buy = 2000,     sell = 100,     name = 'Time Ring'},
  81.         {id = 2327,     buy = 0,        sell = 100,     name = 'Ankh'},
  82.         {id = 18412,    buy = 0,        sell = 6500,    name = 'Glacial Rod'},
  83.         {id = 2183,     buy = 0,        sell = 3000,    name = 'Hailstorm Rod'},
  84.         {id = 2186,     buy = 0,        sell = 200,     name = 'Moonlight Rod'},
  85.         {id = 18411,    buy = 0,        sell = 6000,    name = 'Muck Rod'},
  86.         {id = 2194,     buy = 0,        sell = 50,      name = 'Mysterious Fetish'},
  87.         {id = 2185,     buy = 0,        sell = 1000,    name = 'Necrotic Rod'},
  88.         {id = 8911,     buy = 0,        sell = 1500,    name = 'Northwind Rod'},
  89.         {id = 2182,     buy = 0,        sell = 100,     name = 'Snakebite Rod'},
  90.         {id = 8912,     buy = 0,        sell = 3600,    name = 'Springsprout Rod'},
  91.         {id = 2181,     buy = 0,        sell = 2000,    name = 'Terra Rod'},
  92.         {id = 8910,     buy = 0,        sell = 4400,    name = 'Underworld Rod'},
  93.         {id = 2208,     sell = 100,     buy = 500,      name = 'Axe Ring'},
  94.         {id = 2209,     sell = 100,     buy = 500,      name = 'Club Ring'},
  95.         {id = 2166,     sell = 50,      buy = 100,      name = 'Power Ring'},
  96.         {id = 2165,     sell = 200,     buy = 5000,     name = 'Stealth Ring'},
  97.     }
  98. })
  99.  
  100. npc.topicHandler:addTopic({
  101.     word = {"footballs", "football"},
  102.     answer = "Do you want to buy a football for 111 gold?",
  103.  
  104.     topics = {
  105.         {
  106.             word = "yes",
  107.             answer = "Here it is.",
  108.            
  109.             reset = true,
  110.            
  111.             condition = {
  112.                 topicCondition.haveMoney(111, "You don't have enough money."),
  113.             },
  114.            
  115.             action = {
  116.                 topicAction.giveItem(2109, 1),
  117.                 topicAction.removeMoney(111)
  118.             },
  119.         },
  120.        
  121.         {
  122.             word = "no",
  123.             answer = "Oh, but it's fun to play!",
  124.            
  125.             reset = true
  126.         }
  127.     }
  128. })
  129.  
  130.  
  131. function onCreatureAppear(cid)          npc:onCreatureAppear(cid)           end
  132. function onCreatureDisappear(cid)       npc:onCreatureDisappear(cid)        end
  133. function onCreatureSay(cid, type, msg)  npc:onCreatureSay(cid, type, msg)   end
  134. function onThink()                      npc:onThink()                       end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement