balde
New Member
can someone help how i can change this script,
to a free users ...
but i dont wanna mess it all..
^^
__________________
to a free users ...
i have just edited,local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end
-- Storage IDs --
citizen = 22001
hunter = 22003
mage = 22005
knight = 22007
newaddon = 'Here you are, enjoy your free 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!'
-- CITIZEN START --
function CitizenFirst(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,citizen)
if addon == -1 then
if getPlayerItemCount(cid,11328) >= 40 then
if doPlayerRemoveItem(cid,11328,40) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 128, 1)
doPlayerAddOutfit(cid, 136, 1)
setPlayerStorageValue(cid,citizen,1)
end
else
selfSay(noitems, cid)
end
else
selfSay(already, cid)
end
end
end
function CitizenSecond(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,citizen+1)
if addon == -1 then
if getPlayerItemCount(cid,11328) >= 30 and getPlayerItemCount(cid,9774) >= 1 and getPlayerItemCount(cid,2160) >= 4 then
if doPlayerRemoveItem(cid,11328,30) and doPlayerRemoveItem(cid,9774,1) and doPlayerRemoveItem(cid,2160,4) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 128, 2)
doPlayerAddOutfit(cid, 136, 2)
setPlayerStorageValue(cid,citizen+1,1)
end
else
selfSay(noitems, cid)
end
else
selfSay(already, cid)
end
end
end
-- CITIZEN END --
-- HUNTER START --
function HunterFirst(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,hunter)
if addon == -1 then
if getPlayerItemCount(cid,11320) >= 30 and getPlayerItemCount(cid,2455) >= 1 and getPlayerItemCount(cid,2547) >= 100 and getPlayerItemCount(cid,2546) >= 50 and getPlayerItemCount(cid,2544) >= 100 and getPlayerItemCount(cid,11328) >= 60 and getPlayerItemCount(cid,2460) >= 3 then
if doPlayerRemoveItem(cid,11320,30) and doPlayerRemoveItem(cid,2455,1) and doPlayerRemoveItem(cid,2547,100) and doPlayerRemoveItem(cid,2546,50) and doPlayerRemoveItem(cid,2544,100) and doPlayerRemoveItem(cid,11328,60) and doPlayerRemoveItem(cid,2160,3) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 129, 1)
setPlayerStorageValue(cid,hunter,1)
end
else
selfSay(noitems, cid)
end
else
selfSay(already, cid)
end
end
end
function HunterSecond(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,hunter+1)
if addon == -1 then
if getPlayerItemCount(cid,10570) >= 30 then
if doPlayerRemoveItem(cid,10570,30) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 129, 2)
setPlayerStorageValue(cid,hunter+1,1)
end
else
selfSay(noitems, cid)
end
else
selfSay(already, cid)
end
end
end
-- HUNTER END --
-- MAGE START --
function MageFirst(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,mage)
if addon == -1 then
if getPlayerSex(cid) == 0 then
if getPlayerItemCount(cid,11320) >= 10 then
if doPlayerRemoveItem(cid,11320,10) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 138, 1)
doPlayerAddOutfit(cid, 130, 1)
setPlayerStorageValue(cid,mage,1)
end
else
selfSay(noitems, cid)
end
elseif getPlayerSex(cid) == 1 then
if getPlayerItemCount(cid,11320) >= 20 and getPlayerItemCount(cid,11331) >= 10 and getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2168) >= 1 and getPlayerItemCount(cid,2168) >= 1 and getPlayerItemCount(cid,2168) >= 1 and getPlayerItemCount(cid,2173) >= 1 and getPlayerItemCount(cid,11324) >= 1 and getPlayerItemCount(cid,2273) >= 25 and getPlayerItemCount(cid,10570) >= 20 and getPlayerItemCount(cid,2190) >= 1 then
if doPlayerRemoveItem(cid,11320,20) and doPlayerRemoveItem(cid,11331,10) and doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2168,1) and doPlayerRemoveItem(cid,2168,1) and doPlayerRemoveItem(cid,2168,1) and doPlayerRemoveItem(cid,2173,1) and doPlayerRemoveItem(cid,11324,1) and doPlayerRemoveItem(cid,2273,25) and doPlayerRemoveItem(cid,10570,20) and doPlayerRemoveItem(cid,2190,1) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 130, 1)
doPlayerAddOutfit(cid, 138, 1)
setPlayerStorageValue(cid,mage,1)
end
else
selfSay(noitems, cid)
end
end
else
selfSay(already, cid)
end
end
end
function MageSecond(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,mage+1)
if addon == -1 then
if getPlayerSex(cid) == 0 then
if getPlayerItemCount(cid,11320) >= 30 and getPlayerItemCount(cid,11331) >= 20 and getPlayerItemCount(cid,2173) >= 1 and getPlayerItemCount(cid,2160) >= 3 and getPlayerItemCount(cid,2168) >= 1 and getPlayerItemCount(cid,2273) >= 25 and getPlayerItemCount(cid,11324) >= 20 and getPlayerItemCount(cid,10570) >= 15 and getPlayerItemCount(cid,2190) >= 1 then
if doPlayerRemoveItem(cid,11320,30) and doPlayerRemoveItem(cid,11331,20) and doPlayerRemoveItem(cid,2173,1) and doPlayerRemoveItem(cid,2160,3) and doPlayerRemoveItem(cid,2168,1) and doPlayerRemoveItem(cid,2273,25) and doPlayerRemoveItem(cid,11324,20) and doPlayerRemoveItem(cid,10570,15) and doPlayerRemoveItem(cid,2190,1) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 138, 2)
doPlayerAddOutfit(cid, 130, 2)
setPlayerStorageValue(cid,mage+1,1)
end
else
selfSay(noitems, cid)
end
elseif getPlayerSex(cid) == 1 then
if getPlayerItemCount(cid,11320) >= 50 then
if doPlayerRemoveItem(cid,11320,50) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 130, 2)
doPlayerAddOutfit(cid, 138, 2)
setPlayerStorageValue(cid,mage+1,1)
end
else
selfSay(noitems, cid)
end
end
else
selfSay(already, cid)
end
end
end
-- MAGE END --
-- KNIGHT START --
function KnightFirst(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,knight)
if addon == -1 then
if getPlayerItemCount(cid,2396) >= 1 and getPlayerItemCount(cid,11321) >= 50 then
if doPlayerRemoveItem(cid,2396,1) and doPlayerRemoveItem(cid,11321,50) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 131, 1)
doPlayerAddOutfit(cid, 139, 1)
setPlayerStorageValue(cid,knight,1)
end
else
selfSay(noitems, cid)
end
else
selfSay(already, cid)
end
end
end
function KnightSecond(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if isPremium(cid) then
addon = getPlayerStorageValue(cid,knight+1)
if addon == -1 then
if getPlayerItemCount(cid,2396) >= 1 and getPlayerItemCount(cid,11321) >= 20 and getPlayerItemCount(cid,10570) >= 10 and getPlayerItemCount(cid,11328) >= 10 then
if doPlayerRemoveItem(cid,2396,1) and doPlayerRemoveItem(cid,11321,20) and doPlayerRemoveItem(cid,10570,10) and doPlayerRemoveItem(cid,11328,10) then
selfSay(newaddon, cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
doPlayerAddOutfit(cid, 131, 2)
doPlayerAddOutfit(cid, 139, 2)
setPlayerStorageValue(cid,knight+1,1)
end
else
selfSay(noitems, cid)
end
else
selfSay(already, cid)
end
end
end
but i dont wanna mess it all..
^^
__________________