ond
Veteran OT User
Hello, I wonder if someone could help me with my lua function. The NPC is supposed to take bones(id 2230) and when the NPC have collected 20 bones, he will say:
But if the player only have collected, let's say 14 bones, the NPC should tell him:
And then, when the NPC got 6 more bones, the NPC should say:
Would be awesome if someone could help me out with this! Thanks in advance!
Here is how far I got before I got stuck (below)
Code:
You have collected all the 20 bones needed. Excellent! Now let\'s talk about further missions if you are interested.
But if the player only have collected, let's say 14 bones, the NPC should tell him:
Code:
Excellent! You have collected 14 bones. Just report about your mission again if you find more.
And then, when the NPC got 6 more bones, the NPC should say:
Code:
You have collected all the 20 bones needed. Excellent! Now let\'s talk about further missions if you are interested.
Would be awesome if someone could help me out with this! Thanks in advance!
Here is how far I got before I got stuck (below)
Lua:
elseif talk_state == 14 and msgcontains(msg, 'mission') and getPlayerStorageValue(cid, 5212) == 1 then
BONES = getPlayerItemCount(cid,2230)
if BONES >= 1
if doPlayerRemoveItem(cid, 2813, BONES) == TRUE then
selfSay('You have collected all the 20 bones needed. Excellent! Now let\'s talk about further missions if you are interested.')
talk_state == 15
end
else
selfSay('')
end