• 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!

Need NPC that sets storage

arturhaddad

Member
Joined
Aug 14, 2010
Messages
217
Reaction score
8
I need a NPC that only talks to who has storage 9345.
Also it will set storage 9345 if player gives him a "comb" (id: 5946).

I have the script in the point that NPC doesn't talk to who hasn't storage 9345, and talks normally to who has storage 9345:

LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)		npcHandler:onCreatureSay(cid, type, msg)		end
function onThink()				npcHandler:onThink()					end

npcHandler:addModule(FocusModule:new())

function greetCallback(cid)
if (getPlayerStorageValue(cid,9345) == 1) then
		return true
	end
	npcHandler:say('To talk with me you must find my {comb}.', cid)
end
npcHandler:setCallback(CALLBACK_GREET, greetCallback)

Now i need to add the function that allows the npc set storage to who gives him the comb.

Help please,
thanks
 
Back
Top