Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local keywordHandler = KeywordHandler:new()
- local npcHandler = NpcHandler:new(keywordHandler)
- NpcSystem.parseParameters(npcHandler)
- 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
- -- Storage IDs --
- citizen = 22001
- hunter = 22004
- mage = 22056
- knight = 22007
- nobleman = 22009
- summoner = 22011
- warrior = 22013
- barbarian = 22015
- druid = 22017
- wizard = 22019
- oriental = 22021
- pirate = 22023
- assassin = 22025
- beggar = 22027
- shaman = 22029
- norseman = 22031
- nightmare = 22033
- jester = 22035
- brotherhood = 22037
- wayfarer = 22039
- pumpkin = 22040
- yalaharian = 22041
- glooth = 22042
- rift = 22043
- elementalist = 22044
- newaddon = 'Here you are, enjoy your brand new addon!'
- noitems = 'You do not have all the required items.'
- 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.'
- already = 'It seems you already have this addon, don\'t you try to mock me son!'
- -- ELEMENTALIST START --
- function elementalistFirst(cid, message, keywords, parameters, node)
- if(not npcHandler:isFocused(cid)) then
- return false
- end
- if isPremium(cid) then
- addon = getPlayerStorageValue(cid,elementalist)
- if addon == -1 then
- if getPlayerItemCount(cid,13940) >= 1 then
- if doPlayerRemoveItem(cid,13940,1) then
- selfSay(newaddon, cid)
- doSendMagicEffect(getCreaturePosition(cid), 13)
- doPlayerAddOutfit(cid, 432, 2)
- doPlayerAddOutfit(cid, 433, 2)
- setPlayerStorageValue(cid,elementalist,1)
- end
- else
- selfSay(noitems, cid)
- end
- else
- selfSay(already, cid)
- end
- end
- end
- function elementalistSecond(cid, message, keywords, parameters, node)
- if(not npcHandler:isFocused(cid)) then
- return false
- end
- if isPremium(cid) then
- addon = getPlayerStorageValue(cid,elementalist+1)
- if addon == -1 then
- if getPlayerItemCount(cid,13756) >= 1 then
- if doPlayerRemoveItem(cid,13756,1) then
- selfSay(newaddon, cid)
- doSendMagicEffect(getCreaturePosition(cid), 13)
- doPlayerAddOutfit(cid, 432, 1)
- doPlayerAddOutfit(cid, 433, 1)
- setPlayerStorageValue(cid,elementalist+1,1)
- end
- else
- selfSay(noitems, cid)
- end
- else
- selfSay(already, cid)
- end
- end
- end
- -- ELEMENTALIST END --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement