• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC [Release] Addon npc for tfs 0.2.4

TFS 0.2.6 i noticed that if you want pay "first nobleman addon" and you got the money in crystal he dont make anything. How can i make if he accept crystal, plat too!??
 
I've noticed that not everything is complete. So here is a complete finished one. if a mod can edit this in the firsts 2 post :)

Credits: jkotni6, ricky mesny, mokerhamer, Xidaozu and Jiddo, deaths'life and me

data/npc/addon.xml
Code:
<?xml version="1.0"?>
<npc name="Varkhal" script="data/npc/scripts/addon.lua" access="5" lookdir="2" autowalk="25">
  <mana now="800" max="800" />
  <health now="200" max="200" />
  <look type="134" head="78" body="88" legs="0" feet="88" addons="3" />
  <parameters>
    <parameter key="message_greet" value="Greetings |PLAYERNAME|. Will you help me? If you do, I'll reward you with nice addons! Just say 'addons' or 'help' if you don't know what to do." />
    <parameter key="module_keywords" value="18" />
    <parameter key="keywords" value="addons;help;citizen;hunter;mage;knight;barbarian;druid;nobleman;warrior;summoner;oriental;wizard;assassin;beggar;pirate;norseman;shaman" />
    <parameter key="keyword_reply1" value="I can give you the first or the second addon for different outfits. They are Citizen, Hunter, Mage, Knight, Barbarian, Druid, Nobleman, Oriental, Summoner, Warrior, Wizard, Assassin, Beggar, Pirate, Shaman, and Norseman addons." />
    <parameter key="keyword_reply2" value="If you need help just say the name of the outfit of the addon you want, for example the 'Citizen' outfit." />
    <parameter key="keyword_reply3" value="The addons I'm currently offering for the Citizen outfit are 'feather hat' and 'backpack' for males and females." />
    <parameter key="keyword_reply4" value="The addons I'm currently offering for the Hunter outfit are 'winged tiara' and 'sniper gloves' for females and 'hooded cloak' and 'sniper gloves' for males." />
    <parameter key="keyword_reply5" value="The addons I'm currently offering for the Mage outfit are 'fluid belt' and 'tiara' for females and 'wand' and 'ferumbras hat' for males." />
    <parameter key="keyword_reply6" value="The addons I'm currently offering for the Knight outfit are 'adorned helmet' and 'sheathed sword' for females and 'horned helmet' and 'sheathed sword' for males." />
    <parameter key="keyword_reply7" value="The addons I'm currently offering for the Barbarian outfit are 'axe' and 'wig' for males and females." />
    <parameter key="keyword_reply8" value="The addons I'm currently offering for the Druid outfit are 'paws' and 'animal fur' for males and females." />
    <parameter key="keyword_reply9" value="The addons I'm currently offering for the Nobleman outfit are 'dress' and 'top hat' for females and 'coat' and 'top hat' for males." />
    <parameter key="keyword_reply10" value="The addons I'm currently offering for the Warrior outfit are 'shoulder spike' and 'legendary sword' for males and females." />
    <parameter key="keyword_reply11" value="The addons I'm currently offering for the Summoner outfit are 'wand' and 'ferumbras' hat' for females and 'fluid belt' and 'cape' for males." />
    <parameter key="keyword_reply12" value="The addons I'm currently offering for the Oriental outfit are 'jewelled belt' and 'veil' for females and 'scimitar' and 'turban' for males." />
    <parameter key="keyword_reply13" value="The addons I'm currently offering for the Wizard outfit are 'wings' and 'snake tiara' for females and 'skull shoulder pad' and 'skull mask' for males." />
    <parameter key="keyword_reply14" value="The addons I'm currently offering for the Assassin outfit are 'headpiece' and 'katana' for males and females." />
    <parameter key="keyword_reply15" value="The addons I'm currently offering for the Beggar outfit are 'necklace' and 'simons staff' for females and 'beard' and 'simons staff' for males." />
    <parameter key="keyword_reply16" value="The addons I'm currently offering for the Pirate outfit are 'sabre' and 'sea hat' for males and females." />
    <parameter key="keyword_reply17" value="The addons I'm currently offering for the Norseman outfit are 'spear' and 'earmuffs' for females and 'spear' and 'hood' for males." />
    <parameter key="keyword_reply18" value="The addons I'm currently offering for the Shaman outfit are 'voodoo mask' and 'voodoo staff' for males and females." />
  </parameters>
</npc>

and in data/npc/scripts/addon.lua

Code:
--------------------------------------------------------------------------------------------
------------------------------------ Advanced Addon NPC ------------------------------------
--------------------------------- Script made by jkotni6 -----------------------------------
--------------- Special thanks to: mokerhamer, Xidaozu and Jiddo, deaths'life --------------
------------------------------- Thanks also to everyone else -------------------------------
-------------------------- NPC based on TFS 0.2.6 --------------------------
--------------------------------------------------------------------------------------------
------------------------------ Script edited by Ricky Mesny and michael  --------------------------------
--------------------------------------------------------------------------------------------
function getPlayerMoney(cid)
gold = getPlayerItemCount(cid,2148)
plat = getPlayerItemCount(cid,2152)*100
crys = getPlayerItemCount(cid,2160)*10000
money = gold + plat + crys
return money
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
if(npcHandler.focus ~= cid) then
return false
end
local addonItem = 'Sorry, you don\'t have the items I requested.' -- what will the NPC say if you don't have the items he wants
local addonHave = 'Sorry, you already have this addon.' -- what will the NPC say if you already have that addon
local addonPremium = 'Sorry, you need a premium account to get addons.' -- what will the NPC say if you aren't a premium player
local addonGive = 'Here you are.' -- what will the NPC say if he gives you the addon
local djinnStorage = 123456 -- djinn quest storage value
local useDjinn = false -- true/false
if msgcontains(msg, 'backpack') then
if isPremium(cid) then
if getCreatureOutfit(cid, 128) ~= 1 and getCreatureOutfit(cid, 128) ~= 3 and getCreatureOutfit(cid, 136) ~= 1 and getCreatureOutfit(cid, 136) ~= 3 then
if getPlayerItemCount(cid,5878) >= 100 then
selfSay('Did you bring me 100 minotaur leathers?')
talkState = 1
else
selfSay('Come back when you have 100 minotaur leathers.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 1 then
if getPlayerItemCount(cid,5878) >= 100 then
if doPlayerTakeItem(cid,5878,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 128, 1)
doPlayerAddOutfit(cid, 136, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'feather hat') then
if isPremium(cid) then
if getCreatureOutfit(cid, 128) ~= 2 and getCreatureOutfit(cid, 128) ~= 3 and getCreatureOutfit(cid, 136) ~= 2 and getCreatureOutfit(cid, 136) ~= 3 then
if getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1 then
selfSay('Did you bring me 100 chicken feathers, 50 honeycombs and a legion helmet?')
talkState = 2
else
selfSay('Come back when you have 100 chicken feathers, 50 honeycombs and a legion helmet.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 2 then
if getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1 then
if doPlayerTakeItem(cid,5890,100) == 0 and doPlayerTakeItem(cid,5902,50) == 0 and doPlayerTakeItem(cid,2480,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 128, 2)
doPlayerAddOutfit(cid, 136, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'winged tiara') or msgcontains(msg, 'hooded cloak') then
if isPremium(cid) then
if getCreatureOutfit(cid, 129) ~= 1 and getCreatureOutfit(cid, 129) ~= 3 and getCreatureOutfit(cid, 137) ~= 2 and getCreatureOutfit(cid, 137) ~= 3 then
if getPlayerItemCount(cid,5947) >= 1 and getPlayerItemCount(cid,5876) >= 100 and getPlayerItemCount(cid,5948) >= 100 and getPlayerItemCount(cid,5891) >= 5 and getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5888) >= 1 and getPlayerItemCount(cid,5889) >= 1 then
selfSay('Did you bring me the engraved crossbow, 100 lizard leathers, 100 red dragon leather, 5 enchanted chicken wings, royal, hell and draconian steel?')
talkState = 3
else
selfSay('Come back when you have the engraved crossbow, 100 lizard leathers, 100 red dragon leather, 5 enchanted chicken wings, royal, hell and draconian steel.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 3 then
if getPlayerItemCount(cid,5947) >= 1 and getPlayerItemCount(cid,5876) >= 100 and getPlayerItemCount(cid,5948) >= 100 and getPlayerItemCount(cid,5891) >= 5 and getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5888) >= 1 and getPlayerItemCount(cid,5889) >= 1 then
if doPlayerTakeItem(cid,5947,1) == 0 and doPlayerTakeItem(cid,5876,100) == 0 and doPlayerTakeItem(cid,5948,100) == 0 and doPlayerTakeItem(cid,5891,5) == 0 and doPlayerTakeItem(cid,5887,1) == 0 and doPlayerTakeItem(cid,5888,1) == 0 and doPlayerTakeItem(cid,5889,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 129, 1)
doPlayerAddOutfit(cid, 137, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'sniper gloves') then
if isPremium(cid) then
if getCreatureOutfit(cid, 129) ~= 2 and getCreatureOutfit(cid, 129) ~= 3 and getCreatureOutfit(cid, 137) ~= 1 and getCreatureOutfit(cid, 137) ~= 3 then
if getPlayerItemCount(cid,5875) >= 1 then
selfSay('Did you bring me the sniper gloves?')
talkState = 4
else
selfSay('Come back when you have the sniper gloves.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 4 then
if getPlayerItemCount(cid,5875) >= 1 then
if doPlayerTakeItem(cid,5875,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 129, 2)
doPlayerAddOutfit(cid, 137, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'sheathed sword') then
if isPremium(cid) then
if getCreatureOutfit(cid, 131) ~= 1 and getCreatureOutfit(cid, 131) ~= 3 and getCreatureOutfit(cid, 139) ~= 1 and getCreatureOutfit(cid, 139) ~= 3 then
if getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
selfSay('Did you bring me the chunk of crude iron and 100 iron ores?')
talkState = 5
else
selfSay('Come back when you have a chunk of crude iron and 100 iron ores.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 5 then
if getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
if doPlayerTakeItem(cid,5892,1) == 0 and doPlayerTakeItem(cid,5880,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 131, 1)
doPlayerAddOutfit(cid, 139, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'horned helmet') or msgcontains(msg, 'adorned helmet') then
if isPremium(cid) then
if getCreatureOutfit(cid, 131) ~= 2 and getCreatureOutfit(cid, 131) ~= 3 and getCreatureOutfit(cid, 139) ~= 2 and getCreatureOutfit(cid, 139) ~= 3 then
if getPlayerItemCount(cid,5893) >= 100 and getPlayerItemCount(cid,5924) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5887) >= 1 then
selfSay('Did you bring me 100 behemoth fangs, the damaged steel helmet, warrior\'s sweat and royal steel?')
talkState = 6
else
selfSay('Come back when you have 100 behemoth fangs, the damaged steel helmet, warrior\'s sweat and royal steel.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 6 then
if getPlayerItemCount(cid,5893) >= 100 and getPlayerItemCount(cid,5924) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5887) >= 1 then
if doPlayerTakeItem(cid,5893,100) == 0 and doPlayerTakeItem(cid,5924,1) == 0 and doPlayerTakeItem(cid,5885,1) == 0 and doPlayerTakeItem(cid,5887,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 131, 2)
doPlayerAddOutfit(cid, 139, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'axe') then
if isPremium(cid) then
if getCreatureOutfit(cid, 143) ~= 1 and getCreatureOutfit(cid, 143) ~= 3 and getCreatureOutfit(cid, 147) ~= 1 and getCreatureOutfit(cid, 147) ~= 3 then
if getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5893) >= 50 and getPlayerItemCount(cid,5876) >= 50 then
selfSay('Did you bring me 100 iron ores, 1 chunk of crude iron, 50 behemoth fangs and 50 lizard leathers?')
talkState = 7
else
selfSay('Come back when you have 100 iron ores, 1 chunk of crude iron, 50 behemoth fangs and 50 lizard leathers.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 7 then
if getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5893) >= 50 and getPlayerItemCount(cid,5876) >= 50 then
if doPlayerTakeItem(cid,5880,100) == 0 and doPlayerTakeItem(cid,5892,1) == 0 and doPlayerTakeItem(cid,5893,50) == 0 and doPlayerTakeItem(cid,5876,50) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 143, 1)
doPlayerAddOutfit(cid, 147, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'wig') then
if isPremium(cid) then
if getCreatureOutfit(cid, 143) ~= 2 and getCreatureOutfit(cid, 143) ~= 3 and getCreatureOutfit(cid, 147) ~= 2 and getCreatureOutfit(cid, 147) ~= 3 then
if useDjinn == true then
djinn = getPlayerStorageValue(uid,djinnStorage)
else
djinn = 1
end 
if getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5886) >= 10 and djinn == 1 then
if useDjinn == true then
djinnText = ' Also did you do the djinn quest?'
else
djinnText = ''
end
selfSay('Did you bring me the fighting spirit, the warrior\'s sweat, 50 red pieces of cloth, 50 green pieces of cloth and 10 spider silk yarns?' .. djinnText)
talkState = 8
else
if useDjinn == true then
djinnText = ' Also please make sure that you do the djinn quest.'
else
djinnText = ''
end
selfSay('Come back when you have the fighting spirit, the warrior\'s sweat, 50 red pieces of cloth, 50 green pieces of cloth and 10 spider silk yarns.' .. djinnText)
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 8 then
if getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5886) >= 10 then
if doPlayerTakeItem(cid,5884,1) == 0 and doPlayerTakeItem(cid,5885,1) == 0 and doPlayerTakeItem(cid,5911,50) == 0 and doPlayerTakeItem(cid,5910,50) == 0 and doPlayerTakeItem(cid,5886,10) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 143, 2)
doPlayerAddOutfit(cid, 147, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'bear paws') or msgcontains(msg, 'paws') or msgcontains(msg, 'paw') then
if isPremium(cid) then
if getCreatureOutfit(cid, 144) ~= 1 and getCreatureOutfit(cid, 144) ~= 3 and getCreatureOutfit(cid, 148) ~= 1 and getCreatureOutfit(cid, 148) ~= 3 then
if getPlayerItemCount(cid,5897) >= 50 and getPlayerItemCount(cid,5896) >= 50 then
selfSay('Did you bring me 50 wolf paws and 50 bear paws?')
talkState = 9
else
selfSay('Come back when you have 50 wolf paws and 50 bear paws.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 9 then
if getPlayerItemCount(cid,5897) >= 50 and getPlayerItemCount(cid,5896) >= 50 then
if doPlayerTakeItem(cid,5897,50) == 0 and doPlayerTakeItem(cid,5896,50) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 144, 1)
doPlayerAddOutfit(cid, 148, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'animal fur') then
if isPremium(cid) then
if getCreatureOutfit(cid, 144) ~= 2 and getCreatureOutfit(cid, 144) ~= 3 and getCreatureOutfit(cid, 148) ~= 2 and getCreatureOutfit(cid, 148) ~= 3 then
if getPlayerItemCount(cid,5937) >= 1 and getPlayerItemCount(cid,5938) >= 1 and getPlayerItemCount(cid,5906) >= 100 and getPlayerItemCount(cid,5942) >= 1 and getPlayerItemCount(cid,5940) >= 1 then
selfSay('Did you bring me a Griffinclaw flower sample, water from the hydra island, 100 demon dusts, a blessed wooden stake and Ceiron\'s wolf tooth chain?')
talkState = 10
else
selfSay('Come back when you have a Griffinclaw flower sample, water from the hydra island, 100 demon dusts, a blessed wooden stake and Ceiron\'s wolf tooth chain.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 10 then
if getPlayerItemCount(cid,5937) >= 1 and getPlayerItemCount(cid,5939) >= 1 and getPlayerItemCount(cid,5906) >= 100 and getPlayerItemCount(cid,5942) >= 1 and getPlayerItemCount(cid,5940) >= 1 then
if doPlayerTakeItem(cid,5937,1) == 0 and doPlayerTakeItem(cid,5939,1) == 0 and doPlayerTakeItem(cid,5906,100) == 0 and doPlayerTakeItem(cid,5942,1) == 0 and doPlayerTakeItem(cid,5940,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 144, 2)
doPlayerAddOutfit(cid, 148, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'coat') or msgcontains(msg, 'dress') then
if isPremium(cid) then
if getCreatureOutfit(cid, 132) ~= 1 and getCreatureOutfit(cid, 132) ~= 3 and getCreatureOutfit(cid, 140) ~= 1 and getCreatureOutfit(cid, 140) ~= 3 then
if getPlayerMoney(cid) >= 150000 then
selfSay('Did you bring me 150000 gold?')
talkState = 11
else
selfSay('Come back when you have 150000 gold.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 11 then
if getPlayerMoney(cid) >= 150000 then
if doPlayerRemoveMoney(cid,150000) then
selfSay(addonGive)
doPlayerAddOutfit(cid, 132, 1)
doPlayerAddOutfit(cid, 140, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'top hat') then
if isPremium(cid) then
if getCreatureOutfit(cid, 132) ~= 2 and getCreatureOutfit(cid, 132) ~= 3 and getCreatureOutfit(cid, 140) ~= 2 and getCreatureOutfit(cid, 140) ~= 3 then
if getPlayerMoney(cid) >= 150000 then
selfSay('Did you bring me 150000 gold?')
talkState = 12
else
selfSay('Come back when you have 150000 gold.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 12 then
if getPlayerMoney(cid) >= 150000 then
if doPlayerRemoveMoney(cid,150000) then
selfSay(addonGive)
doPlayerAddOutfit(cid, 132, 2)
doPlayerAddOutfit(cid, 140, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'scimitar') or msgcontains(msg, 'jewelled belt') then
if isPremium(cid) then
if getCreatureOutfit(cid, 146) ~= 1 and getCreatureOutfit(cid, 146) ~= 3 and getCreatureOutfit(cid, 150) ~= 1 and getCreatureOutfit(cid, 150) ~= 3 then
if getPlayerItemCount(cid,5945) >= 1 then
selfSay('Did you bring me the mermaid comb?')
talkState = 13
else
selfSay('Come back when you have the mermaid comb.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 13 then
if getPlayerItemCount(cid,5945) >= 1 then
if doPlayerTakeItem(cid,5945,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 146, 1)
doPlayerAddOutfit(cid, 150, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'turban') or msgcontains(msg, 'veil') then
if isPremium(cid) then
if getCreatureOutfit(cid, 146) ~= 2 and getCreatureOutfit(cid, 146) ~= 3 and getCreatureOutfit(cid, 150) ~= 2 and getCreatureOutfit(cid, 150) ~= 3 then
if getPlayerItemCount(cid,5883) >= 100 and getPlayerItemCount(cid,5895) >= 100 and getPlayerItemCount(cid,5891) >= 2 and getPlayerItemCount(cid,5912) >= 100 then
selfSay('Did you bring me 100 ape furs, 100 fish fins, 2 enchanted chicken wings and 100 blue pieces of cloth?')
talkState = 14
else
selfSay('Come back when you have 100 ape furs, 100 fish fins, 2 enchanted chicken wings and 100 blue pieces of cloth.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 14 then
if getPlayerItemCount(cid,5883) >= 100 and getPlayerItemCount(cid,5895) >= 100 and getPlayerItemCount(cid,5891) >= 2 and getPlayerItemCount(cid,5912) >= 100 then
if doPlayerTakeItem(cid,5883,100) == 0 and doPlayerTakeItem(cid,5895,100) == 0 and doPlayerTakeItem(cid,5891,2) == 0 and doPlayerTakeItem(cid,5912,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 146, 2)
doPlayerAddOutfit(cid, 150, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'shoulder spike') then
if isPremium(cid) then
if getCreatureOutfit(cid, 134) ~= 1 and getCreatureOutfit(cid, 134) ~= 3 and getCreatureOutfit(cid, 142) ~= 1 and getCreatureOutfit(cid, 142) ~= 3 then
if getPlayerItemCount(cid,5925) >= 100 and getPlayerItemCount(cid,5899) >= 100 and getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5919) >= 1 then
selfSay('Did you bring me 100 hardened bones, 100 turtle shells, fighting spirit and a dragon claw?')
talkState = 15
else
selfSay('Come back when you have 100 hardened bones, 100 turtle shells, fighting spirit and a dragon claw.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 15 then
if getPlayerItemCount(cid,5925) >= 100 and getPlayerItemCount(cid,5899) >= 100 and getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5919) >= 1 then
if doPlayerTakeItem(cid,5925,100) == 0 and doPlayerTakeItem(cid,5899,100) == 0 and doPlayerTakeItem(cid,5884,1) == 0 and doPlayerTakeItem(cid,5919,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 134, 1)
doPlayerAddOutfit(cid, 142, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'legendary sword') then
if isPremium(cid) then
if getCreatureOutfit(cid, 134) ~= 2 and getCreatureOutfit(cid, 134) ~= 3 and getCreatureOutfit(cid, 142) ~= 2 and getCreatureOutfit(cid, 142) ~= 3 then
if getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
selfSay('Did you bring me 100 iron ores and royal steel?')
talkState = 16
else
selfSay('Come back when you have 100 iron ores and royal steel.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 16 then
if getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
if doPlayerTakeItem(cid,5887,1) == 0 and doPlayerTakeItem(cid,5880,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 134, 2)
doPlayerAddOutfit(cid, 142, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'skull shoulder pad') or msgcontains(msg, 'wings') then
if isPremium(cid) then
if getCreatureOutfit(cid, 145) ~= 1 and getCreatureOutfit(cid, 145) ~= 3 and getCreatureOutfit(cid, 149) ~= 1 and getCreatureOutfit(cid, 149) ~= 3 then
if getPlayerItemCount(cid,5922) >= 50 and (getCreatureOutfit(cid, 145) == 2 or getCreatureOutfit(cid, 149) == 2) then
selfSay('Did you bring me 50 holy orchids? Also have you got the skull mask respectively snake tiara?')
talkState = 17
else
selfSay('Come back when you have 50 holy orchids and the skull mask respectively snake tiara.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 17 then
if getPlayerItemCount(cid,5922) >= 50 then
if doPlayerTakeItem(cid,5922,50) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 145, 1)
doPlayerAddOutfit(cid, 149, 1)
end
else
selfSay(addonItem)
end
talkState = 0

MORE IN THE NEXT POST
 
Last edited:
Code:
  elseif msgcontains(msg, 'skull mask') or msgcontains(msg, 'snake tiara') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 145) ~= 2 and getCreatureOutfit(cid, 145) ~= 3 and getCreatureOutfit(cid, 149) ~= 2 and getCreatureOutfit(cid, 149) ~= 3 then
                if getPlayerItemCount(cid,2488) >= 1 and getPlayerItemCount(cid,2123) >= 1 and getPlayerItemCount(cid,2492) >= 1 and getPlayerItemCount(cid,2536) >= 1 then
                    selfSay('Did you bring me a medusa shield, a dragon scale mail, a ring of the sky and crown legs?')
                    talkState = 18
                else
                    selfSay('Come back when you have a medusa shield, a dragon scale mail, a ring of the sky and crown legs.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 18 then
        if getPlayerItemCount(cid,2488) >= 1 and getPlayerItemCount(cid,2123) >= 1 and getPlayerItemCount(cid,2492) >= 1 and getPlayerItemCount(cid,2536) >= 1 then
            if doPlayerTakeItem(cid,2488,1) == 0 and doPlayerTakeItem(cid,2123,1) == 0 and doPlayerTakeItem(cid,2492,1) == 0 and doPlayerTakeItem(cid,2536,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 145, 2)
                doPlayerAddOutfit(cid, 149, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'headpiece') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 152) ~= 1 and getCreatureOutfit(cid, 152) ~= 3 and getCreatureOutfit(cid, 156) ~= 1 and getCreatureOutfit(cid, 156) ~= 3 then
                if getPlayerItemCount(cid,5909) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5912) >= 50 and getPlayerItemCount(cid,5913) >= 50 and getPlayerItemCount(cid,5914) >= 50 and getPlayerItemCount(cid,5886) >= 10 then
                    selfSay('Did you bring me 50 blue piece of cloth, 50 green piece of cloth, 50 red piece of cloth, 50 brown piece of cloth, 50 yellow piece of cloth, 50 white piece of cloth and 10 spider silk yarns?')
                    talkState = 19
                else
                    selfSay('Come back when you have 50 blue piece of cloth, 50 green piece of cloth, 50 red piece of cloth, 50 brown piece of cloth, 50 yellow piece of cloth, 50 white piece of cloth and 10 spider silk yarns.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 19 then
        if getPlayerItemCount(cid,5909) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5912) >= 50 and getPlayerItemCount(cid,5913) >= 50 and getPlayerItemCount(cid,5914) >= 50 and getPlayerItemCount(cid,5886) >= 10 then
            if doPlayerTakeItem(cid,5909,50) == 0 and doPlayerTakeItem(cid,5910,50) == 0 and doPlayerTakeItem(cid,5911,50) == 0 and doPlayerTakeItem(cid,5912,50) == 0 and doPlayerTakeItem(cid,5913,50) == 0 and doPlayerTakeItem(cid,5914,50) == 0 and doPlayerTakeItem(cid,5886,10) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 152, 1)
                doPlayerAddOutfit(cid, 156, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'katana') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 152) ~= 2 and getCreatureOutfit(cid, 152) ~= 3 and getCreatureOutfit(cid, 156) ~= 2 and getCreatureOutfit(cid, 156) ~= 3 then
                if getPlayerItemCount(cid,5804) >= 1 and getPlayerItemCount(cid,5930) >= 1 and (getCreatureOutfit(cid, 152) == 1 or getCreatureOutfit(cid, 156) == 1) then
                    selfSay('Did you bring me a nose ring, a behemoth claw and the headpiece?')
                    talkState = 20
                else
                    selfSay('Come back when you have a nose ring, a behemoth claw and the headpiece.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 20 then
        if getPlayerItemCount(cid,5804) >= 1 and getPlayerItemCount(cid,5930) >= 1 then
            if doPlayerTakeItem(cid,5804,1) == 0 and doPlayerTakeItem(cid,5930,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 152, 2)
                doPlayerAddOutfit(cid, 156, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'beard') or msgcontains(msg, 'necklace') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 153) ~= 1 and getCreatureOutfit(cid, 153) ~= 3 and getCreatureOutfit(cid, 157) ~= 2 and getCreatureOutfit(cid, 157) ~= 3 then
                if getPlayerItemCount(cid,5883) >= 100 and getPlayerMoney(cid) >= 20000 then
                    selfSay('Did you bring me 100 ape furs and 20000 gold?')
                    talkState = 21
                else
                    selfSay('Come back when you have 100 ape furs and 20000 gold.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 21 then
        if getPlayerItemCount(cid,5883) >= 100 and getPlayerMoney(cid) >= 20000 then
            if doPlayerTakeItem(cid,5883,100) == 0 and doPlayerRemoveMoney(cid,20000) then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 153, 1)
                doPlayerAddOutfit(cid, 157, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'simons staff') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 153) ~= 2 and getCreatureOutfit(cid, 153) ~= 3 and getCreatureOutfit(cid, 157) ~= 1 and getCreatureOutfit(cid, 157) ~= 3 then
                if getPlayerItemCount(cid,6107) >= 1 and (getCreatureOutfit(cid, 153) == 1 or getCreatureOutfit(cid, 157) == 2) then
                    selfSay('Did you bring me Simon\'s favourite staff and the beard respectively necklace?')
                    talkState = 22
                else
                    selfSay('Come back when you have Simon\'s favourite staff and the beard respectively necklace.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 22 then
        if getPlayerItemCount(cid,6107) >= 1 then
            if doPlayerTakeItem(cid,6107,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 153, 2)
                doPlayerAddOutfit(cid, 157, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'sabre') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 151) ~= 1 and getCreatureOutfit(cid, 151) ~= 3 and getCreatureOutfit(cid, 155) ~= 1 and getCreatureOutfit(cid, 155) ~= 3 then
                if getPlayerItemCount(cid,6126) >= 100 and getPlayerItemCount(cid,6097) >= 100 and getPlayerItemCount(cid,6098) >= 100 then
                    selfSay('Did you bring me 100 eye patches, 100 peg legs and 100 hooks?')
                    talkState = 23
                else
                    selfSay('Come back when you have 100 eye patches, 100 peg legs and 100 hooks.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 23 then
        if getPlayerItemCount(cid,6126) >= 100 and getPlayerItemCount(cid,6097) >= 100 and getPlayerItemCount(cid,6098) >= 100 then
            if doPlayerTakeItem(cid,6126,100) == 0 and doPlayerTakeItem(cid,6097,100) == 0 and doPlayerTakeItem(cid,6098,100) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 151, 1)
                doPlayerAddOutfit(cid, 155, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'sea hat') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 151) ~= 2 and getCreatureOutfit(cid, 151) ~= 3 and getCreatureOutfit(cid, 155) ~= 2 and getCreatureOutfit(cid, 155) ~= 3 then
                if getPlayerItemCount(cid,6099) >= 1 and getPlayerItemCount(cid,6100) >= 1 and getPlayerItemCount(cid,6101) >= 1 and getPlayerItemCount(cid,6102) >= 1 then
                    selfSay('Did you bring me Ron the Ripper\'s sabre, Deadeye Devious\' eye patch, Lethal Lissy\'s shirt, Brutus Bloodbeard\'s hat?')
                    talkState = 24
                else
                    selfSay('Come back when you have Ron the Ripper\'s sabre, Deadeye Devious\' eye patch, Lethal Lissy\'s shirt, Brutus Bloodbeard\'s hat.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 24 then
        if getPlayerItemCount(cid,6099) >= 1 and getPlayerItemCount(cid,6100) >= 1 and getPlayerItemCount(cid,6101) >= 1 and getPlayerItemCount(cid,6102) >= 1 then
            if doPlayerTakeItem(cid,6099,1) == 0 and doPlayerTakeItem(cid,6100,1) == 0 and doPlayerTakeItem(cid,6101,1) == 0 and doPlayerTakeItem(cid,6102,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 151, 2)
                doPlayerAddOutfit(cid, 155, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'voodoo mask') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 154) ~= 1 and getCreatureOutfit(cid, 154) ~= 3 and getCreatureOutfit(cid, 158) ~= 1 and getCreatureOutfit(cid, 158) ~= 3 then
                if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 and (getCreatureOutfit(cid, 154) == 2 or getCreatureOutfit(cid, 158) == 2) then
                    selfSay('Did you bring me 5 banana staffs and 5 tribal masks and voodoo staff?')
                    talkState = 25
                else
                    selfSay('Come back when you have 5 banana staffs and 5 tribal masks and voodoo staff.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 25 then
        if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 then
            if doPlayerTakeItem(cid,3966,5) == 0 and doPlayerTakeItem(cid,3967,5) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 154, 1)
                doPlayerAddOutfit(cid, 158, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'voodoo staff') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 154) ~= 2 and getCreatureOutfit(cid, 154) ~= 3 and getCreatureOutfit(cid, 158) ~= 2 and getCreatureOutfit(cid, 158) ~= 3 then
                if getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 then
                    selfSay('Did you bring me 5 dworc voodoo dolls and a mandrake?')
                    talkState = 26
                else
                    selfSay('Come back when you have 5 dworc voodoo dolls and a mandrake.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 26 then
        if getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 then
            if doPlayerTakeItem(cid,3955,5) == 0 and doPlayerTakeItem(cid,5015,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 154, 2)
                doPlayerAddOutfit(cid, 158, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'fluid belt') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 138) ~= 1 and getCreatureOutfit(cid, 138) ~= 3 and getCreatureOutfit(cid, 133) ~= 1 and getCreatureOutfit(cid, 133) ~= 3 then
                if getPlayerItemCount(cid,5958) >= 1 then
                    selfSay('Did you bring me a winning lottery ticket?')
                    talkState = 27
                else
                    selfSay('Come back when you have a winning lottery ticket.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 27 then
        if getPlayerItemCount(cid,5958) >= 1 then
            if doPlayerTakeItem(cid,5958,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 138, 1)
                doPlayerAddOutfit(cid, 133, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'tiara') or msgcontains(msg, 'cape') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 138) ~= 2 and getCreatureOutfit(cid, 138) ~= 3 and getCreatureOutfit(cid, 133) ~= 2 and getCreatureOutfit(cid, 133) ~= 3 then
                if getPlayerItemCount(cid,5894) >= 70 and getPlayerItemCount(cid,5911) >= 20 and getPlayerItemCount(cid,5883) >= 40 and getPlayerItemCount(cid,5922) >= 35 and getPlayerItemCount(cid,5886) >= 10 and getPlayerItemCount(cid,5881) >= 60 and getPlayerItemCount(cid,5882) >= 40 and getPlayerItemCount(cid,5904) >= 15 and getPlayerItemCount(cid,5905) >= 30 then
                    selfSay('Did you bring me 70 bat wings, 20 red pieces of cloth, 40 ape fur, 35 holy orchid, 10 spools of spider silk yarn, 60 lizard scales, 40 red dragon scales, 15 magic sulphurs and 30 vampire dusts?')
                    talkState = 28
                else
                    selfSay('Come back when you have 70 bat wings, 20 red pieces of cloth, 40 ape fur, 35 holy orchid, 10 spools of spider silk yarn, 60 lizard scales, 40 red dragon scales, 15 magic sulphurs and 30 vampire dusts.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 28 then
        if getPlayerItemCount(cid,5894) >= 70 and getPlayerItemCount(cid,5911) >= 20 and getPlayerItemCount(cid,5883) >= 40 and getPlayerItemCount(cid,5922) >= 35 and getPlayerItemCount(cid,5886) >= 10 and getPlayerItemCount(cid,5881) >= 60 and getPlayerItemCount(cid,5882) >= 40 and getPlayerItemCount(cid,5904) >= 15 and getPlayerItemCount(cid,5905) >= 30 then
            if doPlayerTakeItem(cid,5894,70) and doPlayerTakeItem(cid,5911,20) and doPlayerTakeItem(cid,5883,40) and doPlayerTakeItem(cid,5922,35) and doPlayerTakeItem(cid,5886,10) and doPlayerTakeItem(cid,5881,60) and doPlayerTakeItem(cid,5882,40) and doPlayerTakeItem(cid,5904,15) and doPlayerTakeItem(cid,5905,30) then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 138, 2)
                doPlayerAddOutfit(cid, 133, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'wand') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 141) ~= 1 and getCreatureOutfit(cid, 141) ~= 3 and getCreatureOutfit(cid, 130) ~= 1 and getCreatureOutfit(cid, 130) ~= 3 then
                if getPlayerItemCount(cid,2181) >= 1 and getPlayerItemCount(cid,2182) >= 1 and getPlayerItemCount(cid,2183) >= 1 and getPlayerItemCount(cid,2185) >= 1 and getPlayerItemCount(cid,2186) >= 1 and getPlayerItemCount(cid,2187) >= 1 and getPlayerItemCount(cid,2188) >= 1 and getPlayerItemCount(cid,2189) >= 1 and getPlayerItemCount(cid,2190) >= 1 and getPlayerItemCount(cid,2191) >= 1 and getPlayerItemCount(cid,5904) >= 10 and getPlayerItemCount(cid,2193) >= 20 and getPlayerItemCount(cid,5809) >= 1 then
                    selfSay('Did you bring me all the wands and rods, 10 magic sulphors, 20 ankhs and a soul stone?')
                    talkState = 29
                else
                    selfSay('Come back when you have all the wands and rods, 10 magic sulphors, 20 ankhs and a soul stone.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 29 then
        if getPlayerItemCount(cid,2181) >= 1 and getPlayerItemCount(cid,2182) >= 1 and getPlayerItemCount(cid,2183) >= 1 and getPlayerItemCount(cid,2185) >= 1 and getPlayerItemCount(cid,2186) >= 1 and getPlayerItemCount(cid,2187) >= 1 and getPlayerItemCount(cid,2188) >= 1 and getPlayerItemCount(cid,2189) >= 1 and getPlayerItemCount(cid,2190) >= 1 and getPlayerItemCount(cid,2191) >= 1 and getPlayerItemCount(cid,5904) >= 10 and getPlayerItemCount(cid,2193) >= 20 and getPlayerItemCount(cid,5809) >= 1 then
            if doPlayerTakeItem(cid,2181,1) == 0 and doPlayerTakeItem(cid,2182,1) == 0 and doPlayerTakeItem(cid,2183,1) == 0 and doPlayerTakeItem(cid,2185,1) == 0 and doPlayerTakeItem(cid,2186,1) == 0 and doPlayerTakeItem(cid,2187,1) == 0 and doPlayerTakeItem(cid,2188,1) == 0 and doPlayerTakeItem(cid,2189,1) == 0 and doPlayerTakeItem(cid,2190,1) == 0 and doPlayerTakeItem(cid,2191,1) == 0 and doPlayerTakeItem(cid,5904,10) == 0 and doPlayerTakeItem(cid,2193,20) == 0 and doPlayerTakeItem(cid,5809,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 141, 1)
                doPlayerAddOutfit(cid, 130, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'ferumbras') or msgcontains(msg, 'ferumbras hat') or msgcontains(msg, 'ferumbras\' hat') or msgcontains(msg, 'mage hat') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 141) ~= 2 and getCreatureOutfit(cid, 141) ~= 3 and getCreatureOutfit(cid, 130) ~= 2 and getCreatureOutfit(cid, 130) ~= 3 then
                if getPlayerItemCount(cid,5903) >= 1 then
                    selfSay('Did you bring me Ferumbrass\' hat?')
                    talkState = 30
                else
                    selfSay('Come back when you have Ferumbrass\' hat.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 30 then
        if getPlayerItemCount(cid,5903) >= 1 then
            if doPlayerTakeItem(cid,5903,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 141, 2)
                doPlayerAddOutfit(cid, 130, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
     elseif msgcontains(msg, 'spear') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 251) ~= 1 and getCreatureOutfit(cid, 251) ~= 3 and getCreatureOutfit(cid, 252) ~= 1 and getCreatureOutfit(cid, 252) ~= 3 then
                if getPlayerItemCount(cid,7290) >= 5 then
                    selfSay('Did you bring me 5 shards?')
                    talkState = 31
                else
                    selfSay('Come back when you have 5 shards.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 31 then
        if getPlayerItemCount(cid,7290) >= 5 then
            if doPlayerTakeItem(cid,7290,5) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 251, 1)
                doPlayerAddOutfit(cid, 252, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'hood') or msgcontains(msg, 'earmuffs') or msgcontains(msg, 'earmuff') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 251) ~= 2 and getCreatureOutfit(cid, 251) ~= 3 and getCreatureOutfit(cid, 252) ~= 2 and getCreatureOutfit(cid, 252) ~= 3 then
                if getPlayerItemCount(cid,7290) >= 10 then
                    selfSay('Did you bring me 10 shards?')
                    talkState = 32
                else
                    selfSay('Come back when you have 10 shards.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 32 then
        if getPlayerItemCount(cid,7290) >= 10 then
            if doPlayerTakeItem(cid,7290,10) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 251, 2)
                doPlayerAddOutfit(cid, 252, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'no') and talkState >= 1 and talkState <= 32 then
        selfSay('Ok than.')
        talkState = 0
    end
    return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
works all i only get sometimes this message in my console:

Code:
Lua Script Error: [Npc interface] 
data/npc/scripts/addon.lua:onCreatureSay

luaGetCreatureOutfit(). Creature not found
 
this not working, how to speak with he?, when i saw first citizen addon he only says:
01:02 Varkhal: The addons I'm currently offering for the Citizen outfit are 'feather hat' and 'backpack' for males and females.
 
help:
Code:
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:454: 'end' expected (to close 'if' at line 27) near '<eof>'
 
how to speak to get addons? i can not get them, plz help!!!!!!!!!!!!!!!!!!!! the npc only says:
Code:
01:02 Varkhal: The addons I'm currently offering for the Citizen outfit are 'feather hat' and 'backpack' for males and females.

nothing happens
 
how to speak to get addons? i can not get them, plz help!!!!!!!!!!!!!!!!!!!! the npc only says:
Code:
01:02 Varkhal: The addons I'm currently offering for the Citizen outfit are 'feather hat' and 'backpack' for males and females.

nothing happens

Are you blind or just stupid? He is telling you what yo say in these signs ' ' lol... And if you know just a little about scripting the npcs or w/e you would just check the lines
Code:
elseif msgcontains(msg, "x")
in the X position is written what to say -.-!
 
you can not read?
Code:
me: Hi
npc: hi x ....
me: first citizen addon
npc: The addons I'm currently offering for the Citizen outfit are 'feather hat' and 'backpack' for males and females.
me: backpack
npc: ............
me: yes
npc: ............
me: backpack addon
me: addon backpack
npc: .............
how can i speak with npc?, only say it -.-
 
23:40 Kai Longhill [8]: hi
23:40 Varkhal: Greetings Kai Longhill. Will you help me? If you do, I'll reward you with nice addons! Just say 'addons' or 'help' if you don't know what to do.
23:40 Kai Longhill [8]: help
23:40 Varkhal: If you need help just say the name of the outfit of the addon you want, for example the 'Citizen' outfit.
23:40 Kai Longhill [8]: citizen
23:40 Varkhal: The addons I'm currently offering for the Citizen outfit are 'feather hat' and 'backpack' for males and females.
23:40 Kai Longhill [8]: first citizen addon
23:40 Varkhal: The addons I'm currently offering for the Citizen outfit are 'feather hat' and 'backpack' for males and females.



Don't blame guy who couldn't buy those addons, because I can't buy them too, and i know a bit of lua, so i checked what i have to say. Are you sure, that everything is correct?

-------------

Edit, got it fixed. Just delete Keywords from npc.xml. Is it good?


Kind Regards
Pabluuz
 
Last edited:
the thing that i can not understand is because if the code is correct:
Code:
		elseif msgcontains(msg, 'second citizen addon') then
			if isPremium(cid) then
				if getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1 then
					selfSay('Did you bring me 100 chicken feathers, 50 honeycombs and the legion helmet?')
					talk_state = 2
				else
					selfSay('I need 100 chicken feathers, 50 honeycombs and a legion helmet, to give you the second citizen addon. Come back when you have them.')
					talk_state = 0
				end
			else
				selfSay(addon_need_premium)
				talk_state = 0
			end
the npc never saw me it, i don't know what is wrong, help plz!
 
@fokuleh:

As pabluuz stated in upper post, delete the keywords or edit second citizen addon to feather hat etc...
 
Not working for me, anyone know how to fix that?
Code:
[22/12/2007  22:08:43] luaGetCreatureOutfit(). Creature not found

[22/12/2007  22:08:43] Lua Script Error: [Npc interface] 
[22/12/2007  22:08:43] data/npc/scripts/test.lua:onCreatureSay
 
Doesn't work for 0.2.6 >.< Expected `end` near <eof> at line 424
 
Tankyou.
Really usefull.. :D
I make the citizen 1 and 2 for my server already.
Byebye fella
 
18:54 Mr addon: Greetings Dsdada. Will you help me? If you do, I'll reward you with nice addons! Just say 'addons' or 'help' if you don't know what to do.
19:15 Dsdada [17]: addons
19:15 Mr addon: I can give you the first or the second addon for different outfits. They are Citizen, Hunter, Mage, Knight, Barbarian, Druid, Nobleman, Oriental, Summoner, Warrior,Wizard, Assassin, Beggar, Pirate, Shaman, and Norseman addons.
19:15 Dsdada [17]: Norseman
19:15 Mr addon: The addons I'm currently offering for the Norseman outfit are 'spear' and 'earmuffs' for females and 'spear' and 'hood' for males.
19:15 Dsdada [17]: spear
NPC: ...... silence
19:17 Dsdada [17]: first norseman addon
19:17 Mr addon: The addons I'm currently offering for the Norseman outfit are 'spear' and 'earmuffs' for females and 'spear' and 'hood' for males.






Its not working :/ any clue why?


edit: Ive made something like this but its not working at all xDDD so anyone who know something about scripts to new TFS can tell me what I need to fix?

PHP:
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

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return FALSE
	end

	if msgcontains(msg, 'addons') or msgcontains(msg, 'addon') or msgcontains(msg, 'help') or 

msgcontains(msg, 'offer') then
		npcHandler:say("I can provide u first citizen addon", cid)
		talkState = 0
	elseif msgcontains(msg, 'citizen') then
		npcHandler:say("Do you want to buy the citizen addon for 10000 gold?", cid)
		talkState = 1
elseif talkState > 0 then
				if msgcontains(msg, 'yes') then
			if getPlayerStorageValue(cid,101999) then
				npcHandler:say("u have already this addon.", cid)
			elseif isPremium(cid) == TRUE then
				if doPlayerRemoveMoney(cid, 10000) == TRUE then
					doPlayerAddOutfit(cid, 128, 1)
					doPlayerAddOutfit(cid, 136, 1)
					setPlayerStorageValue(cid,101999,1)
					npcHandler:say("Here u are", 

cid)
				else
					npcHandler:say("You don't have enough money.")
				end
			else
				npcHandler:say("You need a premium account to buy addons.", cid)
			end
			talkState = 0
		elseif msgcontains(msg, 'no') then
			npcHandler:say("Then not.")
			talkState = 0
		end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())




come on, if someone will help me to do this one working I will make rl addoner for all outfit addons. Just need an example - working example :p
 
Last edited:
Back
Top