if msgcontains(msg, 'addon') then
if getPlayerStorageValue(cid, 10000) < 1 then
selfSay("So, I\'ll give you first addon for 5 shards, okay?")
talkState = 1
elseif getPlayerStorageValue(cid, 10000) == 2 then
selfSay("You already have the first addon, why don\'t you take the second for 10 shards from me. Want it?")
talkState = 2
end
elseif msgcontains(msg, 'yes') and talkState == 1 then
if doPlayerTakeItem(cid, SHARD_ID, 5) == TRUE then
selfSay("Here is your first addon, thank you!")
doPlayerAddOutfit(cid, NORSEMAN, 1)
doPlayerAddOutfit(cid, NORSEWOMAN, 1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
setPlayerStorageValue(cid, 10000, 2)
talkState = 0
else
selfSay("You do not have 5 shard, imbecile!")
talkState = 0
end
elseif msgcontains(msg, 'yes') and talkState == 2 then
if doPlayerTakeItem(cid, SHARD_ID, 10) == TRUE then
selfSay("Here is your second addon!")
doPlayerAddOutfit(cid, NORSEMAN, 3)
doPlayerAddOutfit(cid, NORSEWOMAN, 3)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
setPlayerStorageValue(cid, 10000, 3)
talkState = 0
else
selfSay("Learn maths you idiot, you do not have 10 shards.")
talkState = 0
end
end