• 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!

Lua Real outfit and addon system problem.

Triarii

New Member
Joined
Jul 27, 2010
Messages
54
Reaction score
0
Location
Jamaica
Hello ,
When I go to npc who give outfit , of course he give if I bring to him items...
But If I go to npc for example Chondur who gave first shaman addon ( I don't have an outfit ) I give him items for addon then I receive First addon and outfit too... It should tell "To get this addon you need to shaman outfit!" Look at my outfits.xml and chondur script. What's wrong?
Sorry for my english I hope you understand.
<?xml version="1.0"?>
<outfits>
<outfit id="1">
<list gender="0" lookType="136" name="Citizen"/>
<list gender="1" lookType="128" name="Citizen"/>
</outfit>

<outfit id="2">
<list gender="0" lookType="137" name="Hunter"/>
<list gender="1" lookType="129" name="Hunter"/>
</outfit>

<outfit id="3">
<list gender="0" lookType="138" name="Mage"/>
<list gender="1" lookType="130" name="Mage"/>
</outfit>

<outfit id="4">
<list gender="0" lookType="139" name="Knight"/>
<list gender="1" lookType="131" name="Knight"/>
</outfit>

<outfit id="5" premium="yes">
<list gender="0" lookType="140" name="Noblewoman"/>
<list gender="1" lookType="132" name="Nobleman"/>
</outfit>

<outfit id="6" premium="yes">
<list gender="0" lookType="141" name="Summoner"/>
<list gender="1" lookType="133" name="Summoner"/>
</outfit>

<outfit id="7" premium="yes">
<list gender="0" lookType="142" name="Warrior"/>
<list gender="1" lookType="134" name="Warrior"/>
</outfit>

<outfit id="8" premium="yes">
<list gender="0" lookType="147" name="Barbarian"/>
<list gender="1" lookType="143" name="Barbarian"/>
</outfit>

<outfit id="9" premium="yes"> default="0">
<list gender="0" lookType="148" name="Druid"/>
<list gender="1" lookType="144" name="Druid"/>
</outfit>

<outfit id="10" premium="yes">
<list gender="0" lookType="149" name="Wizard"/>
<list gender="1" lookType="145" name="Wizard"/>
</outfit>

<outfit id="11" premium="yes">
<list gender="0" lookType="150" name="Oriental"/>
<list gender="1" lookType="146" name="Oriental"/>
</outfit>

<outfit id="12" premium="yes" default="0">
<list gender="0" lookType="155" name="Pirate"/>
<list gender="1" lookType="151" name="Pirate"/>
</outfit>

<outfit id="13" premium="yes" default="0">
<list gender="0" lookType="156" name="Assassin"/>
<list gender="1" lookType="152" name="Assassin"/>
</outfit>

<outfit id="14" premium="yes" default="0">
<list gender="0" lookType="157" name="Beggar"/>
<list gender="1" lookType="153" name="Beggar"/>
</outfit>

<outfit id="15" premium="yes" default="0">
<list gender="0" lookType="158" name="Shaman"/>
<list gender="1" lookType="154" name="Shaman"/>
</outfit>

<outfit id="16" premium="yes" default="0">
<list gender="0" lookType="252" name="Norsewoman"/>
<list gender="1" lookType="251" name="Norseman"/>
</outfit>

<outfit id="17" premium="yes" default="0">
<list gender="0" lookType="269" name="Nightmare"/>
<list gender="1" lookType="268" name="Nightmare"/>
</outfit>

<outfit id="18" premium="yes" default="0">
<list gender="0" lookType="270" name="Jester"/>
<list gender="1" lookType="273" name="Jester"/>
</outfit>

<outfit id="19" premium="yes" default="0">
<list gender="0" lookType="279" name="Brotherhood"/>
<list gender="1" lookType="278" name="Brotherhood"/>
</outfit>

<outfit id="20" premium="yes" default="0">
<list gender="0" lookType="288" name="Demonhunter"/>
<list gender="1" lookType="289" name="Demonhunter"/>
</outfit>

<outfit id="21" premium="yes" default="0">
<list gender="0" lookType="324" name="Yalaharian"/>
<list gender="1" lookType="325" name="Yalaharian"/>
</outfit>

<outfit id="22" access="5" premium="yes">
<list gender="0-3" lookType="12" name="Archdemon"/>
</outfit>

<outfit id="23" access="5" premium="yes">
<list gender="0-3" lookType="159" name="Elf"/>
</outfit>

<outfit id="24" access="5" premium="yes">
<list gender="0-3" lookType="160" name="Dwarf"/>
</outfit>

<outfit id="25" access="5" premium="yes">
<list gender="0-3" lookType="226" name="Frog"/>
</outfit>

<outfit id="26" access="5" premium="yes">
<list gender="0-3" lookType="194" name="Cult"/>
</outfit>

<outfit id="27" access="5" premium="yes">
<list gender="0-3" lookType="253" name="Headsplitter"/>
</outfit>

<outfit id="28" access="5" premium="yes">
<list gender="0-3" lookType="254" name="Skullhunter"/>
</outfit>

<outfit id="29" access="5" premium="yes">
<list gender="0-3" lookType="255" name="Bloodwalker"/>
</outfit>

<outfit id="30" access="5" premium="yes">
<list gender="0-3" lookType="264" name="Brutetamer"/>
</outfit>

<outfit id="31" access="3" premium="yes">
<list gender="2;3" lookType="75" name="Gamemaster"/>
</outfit>

<outfit id="32" access="4" premium="yes">
<list gender="2;3" lookType="266" name="Community Manager"/>
</outfit>

<outfit id="33" access="5" premium="yes">
<list gender="2;3" lookType="302" name="God"/>
</outfit>
</outfits>
Chondur.lua
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 --
fshaman = 22020
sshaman = 22021

newaddon = 'Ah, right! The shaman mask! Here you go.'
noitems = 'You do not have all the required items.'
noitems2 = 'You do not have all the required items or you do not have the outfit, 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!'


function ShamanFirst(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then
return false
end

if getPlayerStorageValue(cid,fshaman) == -1 then
if getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 and getPlayerItemCount(cid,5810) >= 5 then
if doPlayerRemoveItem(cid,3955,5) and doPlayerRemoveItem(cid,5015,1) and doPlayerRemoveItem(cid,5810,5) then
npcHandler:say('Ah, right! The shaman staff! Here you go.')
doSendMagicEffect(getCreaturePosition(cid), 13)
setPlayerStorageValue(cid,fshaman,1)
if getPlayerSex(cid) == 1 then
doPlayerAddOutfit(cid, 154, 2)
elseif getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 158, 2)
end
end
else
selfSay(noitems)
end
else
selfSay(already)

end

end

function ShamanSecond(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then
return false
end

if getPlayerStorageValue(cid,sshaman) == -1 then
if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 then
if doPlayerRemoveItem(cid,3966,5) and doPlayerRemoveItem(cid,3967,5) then
npcHandler:say('Ah, right! The shaman mask! Here you go.')
doSendMagicEffect(getCreaturePosition(cid), 13)
setPlayerStorageValue(cid,sshaman,1)
if getPlayerSex(cid) == 1 then
doPlayerAddOutfit(cid, 154, 1)
elseif getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 158, 1)
end
end
else
selfSay(noitems)
end
else
selfSay(already)
end

end



node1 = keywordHandler:addKeyword({'staff'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman staff you need give me 5 Pirate Voodoo Doll, 5 Dworc Voodoo Dolls and 1 Mandrake. Do you have them with you?'})
node1:addChildKeyword({'yes'}, ShamanFirst, {})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node3 = keywordHandler:addKeyword({'first'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman staff you need give me 5 Pirate Voodoo Doll, 5 Dworc Voodoo Dolls and 1 Mandrake. Do you have them with you?'})
node3:addChildKeyword({'yes'}, ShamanFirst, {})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node2 = keywordHandler:addKeyword({'mask'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman mask you need give me 5 banana staffs and 5 tribal masks. Do you have them with you?'})
node2:addChildKeyword({'yes'}, ShamanSecond, {})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node4 = keywordHandler:addKeyword({'second'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman mask you need give me 5 banana staffs and 5 tribal masks. Do you have them with you?'})
node4:addChildKeyword({'yes'}, ShamanSecond, {})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})


npcHandler:addModule(FocusModule:new())
 
CHANGE:
Code:
<outfit id="15" premium="yes" default="0">
<list gender="0" lookType="158" name="Shaman"/>
<list gender="1" lookType="154" name="Shaman"/>
</outfit>
TO:
Code:
<outfit id="15" premium="yes" quest="22019">
<list gender="0" lookType="158" name="Shaman"/>
<list gender="1" lookType="154" name="Shaman"/>
</outfit>

LUA:
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 --
oshaman = 22019
fshaman = 22020
sshaman = 22021 

newaddon = 'Ah, right! The shaman mask! Here you go.'
noitems = 'You do not have all the required items.'
noitems2 = 'You do not have all the required items or you do not have the outfit, 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!'


function ShamanFirst(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then
return false
end

if getPlayerStorageValue(cid,fshaman) == -1 then
if getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 and getPlayerItemCount(cid,5810) >= 5 then
if doPlayerRemoveItem(cid,3955,5) and doPlayerRemoveItem(cid,5015,1) and doPlayerRemoveItem(cid,5810,5) then
npcHandler:say('Ah, right! The shaman staff! Here you go.') 
doSendMagicEffect(getCreaturePosition(cid), 13)
setPlayerStorageValue(cid,fshaman,1)
if getPlayerSex(cid) == 1 then 
doPlayerAddOutfit(cid, 154, 2)
elseif getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 158, 2)
end 
end
else
selfSay(noitems)
end
else
selfSay(already)

end

end

function ShamanSecond(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then
return false
end

if getPlayerStorageValue(cid,sshaman) == -1 then
if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 then
if doPlayerRemoveItem(cid,3966,5) and doPlayerRemoveItem(cid,3967,5) then
npcHandler:say('Ah, right! The shaman mask! Here you go.') 
doSendMagicEffect(getCreaturePosition(cid), 13)
setPlayerStorageValue(cid,sshaman,1)
if getPlayerSex(cid) == 1 then 
doPlayerAddOutfit(cid, 154, 1)
elseif getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 158, 1)
end 
end
else
selfSay(noitems)
end
else
selfSay(already)
end

end

function ShamanOutfit(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then
return false
end

if getPlayerStorageValue(cid,oshaman) == -1 then
if getPlayerItemCount(cid,ITEM ID) >= COUNT  then --EDIT THIS
if doPlayerRemoveItem(cid,ITEM ID,COUNT)  then --EDIT THIS
npcHandler:say('Ah, right! The shaman outfit! Here you go.') 
doSendMagicEffect(getCreaturePosition(cid), 13)
if getPlayerSex(cid) == 1 then 
setPlayerStorageValue(cid,oshaman,1)
elseif getPlayerSex(cid) == 0 then
setPlayerStorageValue(cid,oshaman,1)
end 
end
else
selfSay(noitems)
end
else
selfSay(already)
end

end



node1 = keywordHandler:addKeyword({'staff'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman staff you need give me 5 Pirate Voodoo Doll, 5 Dworc Voodoo Dolls and 1 Mandrake. Do you have them with you?'})
node1:addChildKeyword({'yes'}, ShamanFirst, {})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node3 = keywordHandler:addKeyword({'first'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman staff you need give me 5 Pirate Voodoo Doll, 5 Dworc Voodoo Dolls and 1 Mandrake. Do you have them with you?'})
node3:addChildKeyword({'yes'}, ShamanFirst, {})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node2 = keywordHandler:addKeyword({'mask'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman mask you need give me 5 banana staffs and 5 tribal masks. Do you have them with you?'})
node2:addChildKeyword({'yes'}, ShamanSecond, {})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node4 = keywordHandler:addKeyword({'second'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman mask you need give me 5 banana staffs and 5 tribal masks. Do you have them with you?'})
node4:addChildKeyword({'yes'}, ShamanSecond, {})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node5 = keywordHandler:addKeyword({'outfit'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman outfit you need give me [ITEMS TO NEED TO MAKE OUTFIT]. Do you have them with you?'}) --EDIT THIS
node2:addChildKeyword({'yes'}, ShamanOutfit, {})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node6 = keywordHandler:addKeyword({'shaman'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get shaman outfit you need give me [ITEMS TO NEED TO MAKE OUTFIT]. Do you have them with you?'}) --EDIT THIS
node4:addChildKeyword({'yes'}, ShamanOutfit, {})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})


npcHandler:addModule(FocusModule:new())
 
Back
Top