Может знает кто, при подборе предмета в gQuest он не засчитывается.
--[[------------------------------------------------------------------------------
* Copyright (C) Fluffy(76561197976769128 - STEAM_0:0:8251700) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
--]]------------------------------------------------------------------------------
local QUEST = {};
QUEST.ID = 3;
QUEST.NPC = 1;
QUEST.Name = "Потеряные чирнила";
QUEST.Description = "Привет, {name}, Я потеряла свои чернила. Помоги найти их, пока не украли .\n\n Я была в библиотеке, в башне, у моста хагрида, у совиной башни и у груды чемоданов!";
QUEST.Objective = "Найти 5 чернил.";
QUEST.OnCompleteDescription = "Ваааау, {name}!\n\n Спасибочки. Вот твоя награда.";
QUEST.Rewards = "ʛ 1,500 и 1500 опыта";
QUEST.LevelRequirement = 6;
QUEST.ObjectiveRequirement = 5;
QUEST.ObjectiveClass = "ent_oil";
QUEST.OneTimeQuest = false;
QUEST.Cooldown = 10800;
QUEST.Enabled = false;
---
--- OnAccept
---
function QUEST:OnAccept(ply)
return true;
end
---
--- OnCompleted
---
function QUEST:OnCompleted(ply)
return true;
end
---
--- OnObjectiveUpdated
---
function QUEST:OnObjectiveUpdated(ply)
return true;
end
---
--- OnObjectiveSpawned
---
function QUEST:OnObjectiveSpawned(obj)
return true;
end
---
--- OnDelivered
---
function QUEST:OnDelivered()
return true;
end
---
--- OnQuestDisbanded
---
function QUEST:OnQuestDisbanded(ply)
return true;
end
---
--- RewardFunction
---
function QUEST:RewardFunction(ply)
-- DarkRP add money
ply:addMoney(1500);
-- Vrondakis Give XP
ply:addXP(1500);
return true;
end
---
--- OnQuestInitialized
---
function QUEST:OnQuestInitialized()
hook.Add("PlayerUse", "gQuest.DefaultQuest_3", function(ply, ent)
if (IsValid(ply) and IsValid(ent)) then
if (type(self.ObjectiveClass) == "table" and table.HasValue(self.ObjectiveClass, ent:GetClass()) or type(self.ObjectiveClass) == "string" and self.ObjectiveClass == ent:GetClass()) then
if (ply:GQ_HasAcceptedQuest(self.ID)) then
ply:GQ_AddQuestProgress(self.ID, 1);
ent:Remove();
end
end
end
end);
return true;
end
gQuest.RegisterQuest(QUEST);
* Copyright (C) Fluffy(76561197976769128 - STEAM_0:0:8251700) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
--]]------------------------------------------------------------------------------
local QUEST = {};
QUEST.ID = 3;
QUEST.NPC = 1;
QUEST.Name = "Потеряные чирнила";
QUEST.Description = "Привет, {name}, Я потеряла свои чернила. Помоги найти их, пока не украли .\n\n Я была в библиотеке, в башне, у моста хагрида, у совиной башни и у груды чемоданов!";
QUEST.Objective = "Найти 5 чернил.";
QUEST.OnCompleteDescription = "Ваааау, {name}!\n\n Спасибочки. Вот твоя награда.";
QUEST.Rewards = "ʛ 1,500 и 1500 опыта";
QUEST.LevelRequirement = 6;
QUEST.ObjectiveRequirement = 5;
QUEST.ObjectiveClass = "ent_oil";
QUEST.OneTimeQuest = false;
QUEST.Cooldown = 10800;
QUEST.Enabled = false;
---
--- OnAccept
---
function QUEST:OnAccept(ply)
return true;
end
---
--- OnCompleted
---
function QUEST:OnCompleted(ply)
return true;
end
---
--- OnObjectiveUpdated
---
function QUEST:OnObjectiveUpdated(ply)
return true;
end
---
--- OnObjectiveSpawned
---
function QUEST:OnObjectiveSpawned(obj)
return true;
end
---
--- OnDelivered
---
function QUEST:OnDelivered()
return true;
end
---
--- OnQuestDisbanded
---
function QUEST:OnQuestDisbanded(ply)
return true;
end
---
--- RewardFunction
---
function QUEST:RewardFunction(ply)
-- DarkRP add money
ply:addMoney(1500);
-- Vrondakis Give XP
ply:addXP(1500);
return true;
end
---
--- OnQuestInitialized
---
function QUEST:OnQuestInitialized()
hook.Add("PlayerUse", "gQuest.DefaultQuest_3", function(ply, ent)
if (IsValid(ply) and IsValid(ent)) then
if (type(self.ObjectiveClass) == "table" and table.HasValue(self.ObjectiveClass, ent:GetClass()) or type(self.ObjectiveClass) == "string" and self.ObjectiveClass == ent:GetClass()) then
if (ply:GQ_HasAcceptedQuest(self.ID)) then
ply:GQ_AddQuestProgress(self.ID, 1);
ent:Remove();
end
end
end
end);
return true;
end
gQuest.RegisterQuest(QUEST);