• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Npc Give storage when you say hi

Use this part in the npc:
Code:
if not npcHandler:isFocused(cid) then
     return false
end

Change it to this and change 7937 to the storage you want to set.
Code:
if not npcHandler:isFocused(cid) then
     if msg == "hi" or msg == "hello" then
         selfSay("Hello", cid)
         setPlayerStorageValue(cid, 7937, 1)
         npcHandler:addFocus(cid)
     else
         return false
     end
end

Then remove
Code:
npcHandler:addModule(FocusModule:new())

And add a part for bye.
Code:
elseif msgcontains(msg, "bye") then
     selfSay("Bye.", cid)
     npcHandler:releaseFocus(cid)
 
Back
Top