SHARE
TWEET

Untitled

a guest Jun 19th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local keywordHandler = KeywordHandler:new()
  2. local shopModule = ShopModule:new()
  3. local npcHandler = NpcHandler:new(keywordHandler)
  4. NpcSystem.parseParameters(npcHandler)
  5. local talkState = {}
  6. function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
  7. function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
  8. function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
  9. function onThink() npcHandler:onThink() end
  10. function creatureSayCallback(cid, type, msg)
  11. if(not npcHandler:isFocused(cid)) then
  12. return false
  13. end
  14. local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
  15.     msg = string.lower(msg)
  16.         if msgcontains(msg, 'teleport me to') or msgcontains(msg, 'teleport me to') then
  17.                 if msgcontains(msg, 'Konoha') then
  18.                     to_destinationz = {cost = 1000, toPosition = {x=653, y=562, z=6}, premium = 0}
  19.                 elseif msgcontains(msg, 'Suna') then
  20.                     to_destinationz = {cost = 1000, toPosition = {x=227, y=490, z=6}, premium = 0}
  21.                 elseif msgcontains(msg, 'Pirate Island') then
  22.                     to_destinationz = {cost = 1000, toPosition = {x=986, y=639, z=6}, premium = 0}
  23.                 elseif msgcontains(msg, 'Winter Island') then
  24.                     to_destinationz = {cost = 1000, toPosition = {x=581, y=76, z=7}, premium = 0}
  25.                 elseif msgcontains(msg, 'Ryuchi Cave') then
  26.                     to_destinationz = {cost = 1000, toPosition = {x=554, y=207, z=7}, premium = 0}
  27.                 elseif msgcontains(msg, 'Katsuyu Rock') then
  28.                     to_destinationz = {cost = 1000, toPosition = {x=533, y=361, z=4}, premium = 0}
  29.                 elseif msgcontains(msg, 'Myoboku Island') then
  30.                     to_destinationz = {cost = 1000, toPosition = {x=970, y=251, z=8}, premium = 0}
  31.                 elseif msgcontains(msg, 'Edo Island') then
  32.                     to_destinationz = {cost = 1000, toPosition = {x=1082, y=104, z=7}, premium = 0}
  33.                 elseif msgcontains(msg, 'Legendary Pallace') then
  34.                     to_destinationz = {cost = 1000, toPosition = {x=497, y=514, z=7}, premium = 0}
  35.                 elseif msgcontains(msg, 'Akatsuki Hide') then
  36.                     to_destinationz = {cost = 1000, toPosition = {x=559, y=713, z=5}, premium = 0}
  37.                 else
  38.                     return true
  39.                 end
  40.                 if(getPlayerPremiumDays(cid) > 0 or to_destinationz.premium == 0) then
  41.                     if(doPlayerRemoveMoney(cid, to_destinationz.cost) == TRUE) then
  42.                         doTeleportThing(cid, to_destinationz.toPosition, 0)
  43.                         doSendMagicEffect(to_destinationz.toPosition, 10)
  44.                     end
  45.                 end
  46.         end
  47.     return true
  48. end
  49. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
  50. npcHandler:addModule(FocusModule:new())
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top