Hello, I've edited NPC Mission (Author is AVEO). For my own quest, when you talk him mission -> Inquisition quest he give you access to kill ungreez, when you kill him, he takes from you Ungreez Blood, and give access to the second part of inquisition quest and first demonhunter addon, but when you have done second part of inquisition and say rewards, he don't answer anything ;/ I don't know why, i think everything is ok. Can anyone look for it?
My lines are
Lua:
--------------------------------
------- NPC MISION 1.0 --------
------ by Aveo - Otland.net ----
--------------------------------
--------------
--- Config ---
--------------
-- item required to make the quest
local i_required = 10156
-- count of item required to make the quest
local i_required_count = 1
-- storage dont touch --
local storage = 11549
local storagei = 11544
local storagef = 11561
local soragerew = 11562
-- name of the new quest --
local questname = "inquisition quest"
-- NPC Messages --
local npc_message ={
"I need Ungreez Blood to complete this mission, procced?",
"You dont have Ungreez Blood to complete this mission.",
"Thank You for Help me, now you have access to second part of inquisition quest and to first Demonhunter addon",
"You have Already done this {mission} when you finish the second part back to me and say {rewards}.",
"The Mission {"..questname.."} is, really serius, i need your help to complete it, if you help me you can do inquisition quest?",
"You must finish all sales to get rewards.",
"Congratulations for finishing Inquisition quest, now you can go to reward room, and from me you get {second demonhunter addon}"
}
-------------------
--- End Confing ---
-------------------
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'mission')) then
selfSay(npc_message[5], cid)
setPlayerStorageValue(cid,storage,1)
end
if(msgcontains(msg, questname)) then
selfSay(npc_message[1], cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,storagei) > 0) then
selfSay(npc_message[4], cid)
else
if(doPlayerRemoveItem(cid,i_required,i_required_count)) then
setPlayerStorageValue(cid,storagei,1)
doPlayerAddOutfit(cid, 288, 1)
doPlayerAddOutfit(cid, 289, 1)
selfSay(npc_message[3], cid)
doSendMagicEffect(getCreaturePosition(cid), 10)
doCreatureSay(cid, "Quest Completed!", TALKTYPE_ORANGE_1)
else
selfSay(npc_message[2], cid)
if(msgcontains(msg, 'rewards')) then
if(getPlayerStorageValue(cid,storagef) > 0) then
selfSay(npc_message[7], cid)
doPlayerAddOutfit(cid, 288, 2)
doPlayerAddOutfit(cid, 289, 2)
setPlayerStorageValue(cid,storagerew,1)
else
selfSay(npc_message[6], cid)
end
end
end
end
return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
My lines are
if(msgcontains(msg, 'rewards')) then
if(getPlayerStorageValue(cid,storagef) > 0) then
selfSay(npc_message[7], cid)
doPlayerAddOutfit(cid, 288, 2)
doPlayerAddOutfit(cid, 289, 2)
setPlayerStorageValue(cid,storagerew,1)
else
selfSay(npc_message[6], cid)