Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Paste Description for travel.lua

Here it is

travel.lua
Sunday, July 29th, 2007 at 8:28:20pm MDT 

  1. local keywordHandler = KeywordHandler:new()
  2. local npcHandler = NpcHandler:new(keywordHandler)
  3. NpcSystem.parseParameters(npcHandler)
  4.  
  5.  
  6.  
  7. -- OTServ event handling functions start
  8. function onCreatureAppear(cid)        npcHandler:onCreatureAppear(cid) end
  9. function onCreatureDisappear(cid)                   npcHandler:onCreatureDisappear(cid) end
  10. function onCreatureSay(cid, type, msg)  npcHandler:onCreatureSay(cid, type, msg) end
  11. function onThink()                               npcHandler:onThink() end
  12. -- OTServ event handling functions end
  13.  
  14.  
  15. -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
  16. local travelNode = keywordHandler:addKeyword({'hictar city'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Hictar City for 100 gold coins?'})
  17.         travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 100, destination = {x=447, y=280, z=6} })
  18.         travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'})
  19.  
  20. local travelNode = keywordHandler:addKeyword({'sarena city'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Sarena City for 100 gold coins?'})
  21.         travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 100, destination = {x=824, y=241, z=6} })
  22.         travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})
  23.  
  24. local travelNode = keywordHandler:addKeyword({'saffron city'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Saffron City for 100 gold coins?'})
  25.         travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 100, destination = {x=791, y=647, z=6} })
  26.         travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})
  27.  
  28. keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to Hictar City, Sarena City, or Saffron City for just a small fee.'})
  29.  
  30. -- Makes sure the npc reacts when you say hi, bye etc.
  31. npcHandler:addModule(FocusModule:new())

Paste Details

Tags: a

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.