xardas33
New Member
- Joined
- Jan 28, 2010
- Messages
- 83
- Reaction score
- 0
Hello guys. I have problem with my script, first look at script part with error:
First problem is when I ask about "humble" NPC saying two things:
09:35 Fitula [900]: humble
09:35 Cipfried: To become humble you need to kill 50 skeletons and bring me 6 skulls, 2 big bones, 2 bones. Back when you do all.
09:35 Cipfried: Do you killed skeletons and bring me items?
I want to change it - when I say "humble" i get first message, and after if I say "humble" next time I have second message.
Second problem is when I say "humble -> yes", it's work as it should, but I have error messages in console:
[12/09/2014 09:38:10] [Error - Npc interface]
[12/09/2014 09:38:10] data/npc/scripts/Cipfried.luanCreatureSay
[12/09/2014 09:38:10] Description:
[12/09/2014 09:38:10] (luaGetCreatureStorage) Creature not found
Anybody can fix it?
Code:
if msgcontains(msg, 'humble') then
if getPlayerStorageValue(cid,50021) == 3 and getPlayerStorageValue(cid,50022) <= 0 and talkState[talkUser] == 1 then
selfSay("To become humble you need to kill 50 {skeletons} and bring me 6 {skulls}, 2 {big} {bones}, 2 {bones}. Back when you do all.",cid)
setPlayerStorageValue(cid,50021,4)
setPlayerStorageValue(cid,50022,1)
talkState[talkUser] = 0
end
end
if msgcontains(msg, 'humble') then
if getPlayerStorageValue(cid,50021) == 4 then
selfSay("Do you killed skeletons and bring me items?",cid)
talkState[talkUser] = 1
end
end
if msgcontains(msg, 'yes') then
if getPlayerStorageValue(cid,60000) == 50 and getPlayerItemCount(cid,2229) >= 6 and getPlayerItemCount(cid,2230) >= 2 and getPlayerItemCount(cid,2231) >= 2 then
if doPlayerRemoveItem(cid,2229,6) and doPlayerRemoveItem(cid,2230,2) and doPlayerRemoveItem(cid,2231,2) then
selfSay("Great, it's your reward, you will need these skulls later. Now Tom must tell you all what he know about {Golden} {Key}! Go, meet him.",cid)
doPlayerAddItem(cid,2320,6)
setPlayerStorageValue(50021,5)
talkState[talkUser] = 0
end
else
getPlayerStorageValue(cid,60000,0-49)
getPlayerItemCount(cid,2229,0-5)
getPlayerItemCount(cid,2230,0-1)
getPlayerItemCount(cid,2231,0-1)
selfSay("You must do all what I told you to become humble.", cid)
talkState[talkUser] = 0
end
elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then
selfSay("So don't lose your time, do all.",cid)
talkState[talkUser] = 0
end
return true
end
First problem is when I ask about "humble" NPC saying two things:
09:35 Fitula [900]: humble
09:35 Cipfried: To become humble you need to kill 50 skeletons and bring me 6 skulls, 2 big bones, 2 bones. Back when you do all.
09:35 Cipfried: Do you killed skeletons and bring me items?
I want to change it - when I say "humble" i get first message, and after if I say "humble" next time I have second message.
Second problem is when I say "humble -> yes", it's work as it should, but I have error messages in console:
[12/09/2014 09:38:10] [Error - Npc interface]
[12/09/2014 09:38:10] data/npc/scripts/Cipfried.luanCreatureSay
[12/09/2014 09:38:10] Description:
[12/09/2014 09:38:10] (luaGetCreatureStorage) Creature not found
Anybody can fix it?