Hello boiz and girlz!
Well, I have got a little problem in my NPC what I just wrote, I am not good yet in scripting and have no clue why it does not work like I want to:
NPC should check in this part if I got item id - 7839 if not he should say "You do not have this item.", else if I got item id 7839 he should remove me item id 7839 and add me item id 7840.
Script actually just add me item id 7840 but it's not checking if I got item id 7839:S Also how can I edit my script so NPC can just give me one time item id - 7840?
And this the code what does not work:
+ my locals
What have I wrote wrong in this script?:S Please help me as fast as possible cuz I need this script so then I can keep doing my quest
Without this NPC I have stopped doing this quest because he is not working as I wanted to work:S
Well, I have got a little problem in my NPC what I just wrote, I am not good yet in scripting and have no clue why it does not work like I want to:
NPC should check in this part if I got item id - 7839 if not he should say "You do not have this item.", else if I got item id 7839 he should remove me item id 7839 and add me item id 7840.
Script actually just add me item id 7840 but it's not checking if I got item id 7839:S Also how can I edit my script so NPC can just give me one time item id - 7840?
And this the code what does not work:
Code:
elseif msgcontains(msg, "arrow") then
itemstatus = doPlayerRemoveItem(cid,7839)
if itemstatus == -1 then
selfSay('You do not have this item...')
else
doPlayerAddItem(cid, 7840, 1)
selfSay('Thanks.')
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
+ my locals
Code:
local storage = 4325
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
What have I wrote wrong in this script?:S Please help me as fast as possible cuz I need this script so then I can keep doing my quest
Last edited: