if getPlayerStorageValue(cid,1234) == 1 then
if(getPlayerItemCount(cid, 3976) >= 30) then
doPlayerRemoveItem(cid, 3976, 30)
doPlayerAddItem(cid, 2148,10)
setPlayerStorageValue(cid,1234,2)
selfSay('Thanks, you are truly one trustworthy player! I will make sure to tell about your good deeds to other merchants! If you want, keep delivering worms to me, and I have a {special bonus} for you!', cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have gained 10 golden coins.')
else
selfSay('Huh? This was not the deal, please come back with 30 worms!')
end
else
if(getPlayerItemCount(cid, 3976) >= 30) then
doPlayerRemoveItem(cid, 3976, 30)
doPlayerAddItem(cid, 2148,10)
setPlayerStorageValue(cid,1234,(getPlayerStorageValue(cid,1234)+1))
selfSay('Thank you! As always, here are your 10 gold coins!', cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have gained 10 golden coins.')
else
selfSay('You can get worms from NPCs in twinpass trading camp. Feel free to come back anytime and deliver {30 worms} to me, and you will be paid 10 gold coins! Hey! If you deliver 30 worms to me 5 times, I have a {special bonus} for you!', cid)
end
end