SHARE
TWEET

Untitled

a guest Nov 14th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  local keywordHandler = KeywordHandler:new()
  2. local npcHandler = NpcHandler:new(keywordHandler)
  3. NpcSystem.parseParameters(npcHandler)
  4. function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)            end
  5. function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)            end
  6. function onCreatureSay(cid, type, msg)    npcHandler:onCreatureSay(cid, type, msg)    end
  7. function onThink()                        npcHandler:onThink()    end
  8. -- Storage IDs --
  9. citizen     = 22001  
  10. hunter        = 22004    
  11. mage        = 22056    
  12. knight        = 22007    
  13. nobleman    = 22009    
  14. summoner    = 22011    
  15. warrior        = 22013    
  16. barbarian    = 22015    
  17. druid        = 22017    
  18. wizard        = 22019    
  19. oriental    = 22021    
  20. pirate        = 22023    
  21. assassin    = 22025    
  22. beggar        = 22027    
  23. shaman        = 22029    
  24. norseman    = 22031    
  25. nightmare    = 22033    
  26. jester        = 22035    
  27. brotherhood    = 22037
  28. wayfarer = 22039
  29. pumpkin = 22040
  30. yalaharian = 22041
  31. glooth = 22042
  32. rift = 22043
  33. elementalist = 22044
  34. newaddon    = 'Here you are, enjoy your brand new addon!'
  35. noitems        = 'You do not have all the required items.'
  36. noitems2    = 'You do not have all the required items or you do not have the first addon, which by the way, is a requirement for this addon.'
  37. already        = 'It seems you already have this addon, don\'t you try to mock me son!'
  38.      
  39.  
  40.  
  41.    -- ELEMENTALIST START --
  42. function elementalistFirst(cid, message, keywords, parameters, node)
  43.     if(not npcHandler:isFocused(cid)) then
  44.         return false
  45.     end
  46.     if isPremium(cid) then
  47.     addon = getPlayerStorageValue(cid,elementalist)
  48.     if addon == -1 then
  49.         if getPlayerItemCount(cid,13940) >= 1 then
  50.         if doPlayerRemoveItem(cid,13940,1) then
  51.             selfSay(newaddon, cid)
  52.              
  53.             doSendMagicEffect(getCreaturePosition(cid), 13)
  54.             doPlayerAddOutfit(cid, 432, 2)
  55.             doPlayerAddOutfit(cid, 433, 2)
  56.             setPlayerStorageValue(cid,elementalist,1)
  57.         end
  58.         else
  59.             selfSay(noitems, cid)
  60.         end
  61.     else
  62.         selfSay(already, cid)
  63.     end
  64.     end
  65. end
  66. function elementalistSecond(cid, message, keywords, parameters, node)
  67.     if(not npcHandler:isFocused(cid)) then
  68.         return false
  69.     end
  70.     if isPremium(cid) then
  71.     addon = getPlayerStorageValue(cid,elementalist+1)
  72.     if addon == -1 then
  73.         if getPlayerItemCount(cid,13756) >= 1 then
  74.         if doPlayerRemoveItem(cid,13756,1) then
  75.             selfSay(newaddon, cid)
  76.              
  77.             doSendMagicEffect(getCreaturePosition(cid), 13)
  78.             doPlayerAddOutfit(cid, 432, 1)
  79.             doPlayerAddOutfit(cid, 433, 1)
  80.             setPlayerStorageValue(cid,elementalist+1,1)
  81.         end
  82.         else
  83.             selfSay(noitems, cid)
  84.         end
  85.     else
  86.         selfSay(already, cid)
  87.     end
  88.     end
  89. end
  90. -- ELEMENTALIST END --
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