ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
Here is the part of the npc script where he is supposed to take item id 2320 with AID 2504
But he throws the else at me when I try to give him the skull.
Code:
if(msgcontains(msg, 'overwhelmed')) then
selfSay(npc_message[1], cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,first.storage) == 3) then
selfSay(npc_message[4], cid)
else
--getPlayerItemById and getItenNameById key.actionid == 2504 and
local skull = 2320
local key = getPlayerItemById(cid, true, skull)
if key.actionid == 2504 and doPlayerRemoveItem(cid, skull, 1) then
setPlayerStorageValue(cid,first.storage,3)
if(useExpReward) then
doPlayerAddExperience(cid,first.experience)
doPlayerAddItem(cid, 2152, 5)
else
doPlayerAddItem(cid,first.reward,first.reward_count)
doPlayerAddExp(cid, 4000)
end
But he throws the else at me when I try to give him the skull.