X
Xikini
Guest
* Want *
- To be able to set the start/end of quest in the "local t" as 45005,3 instead of just 45005
- Send the player a message every 5 kills over the kills limit telling them to go see the npc.
This is the current semi working script.
As it is now, it counts to 30/30 monsters killed, but does not tell you to go see the npc,
Also I have to currently edit this line to make 'started quests' in the middle of a storyline.
My objective is to be able to add all kill monster quests to this script.
as far as I can tell, this part and below does not currently work.
If anyone needs more information please ask me for it, and I'll post when I get a chance.
Crying Damson Forgotten Server 0.3.7
- To be able to set the start/end of quest in the "local t" as 45005,3 instead of just 45005
- Send the player a message every 5 kills over the kills limit telling them to go see the npc.
This is the current semi working script.
As it is now, it counts to 30/30 monsters killed, but does not tell you to go see the npc,
Also I have to currently edit this line to make 'started quests' in the middle of a storyline.
My objective is to be able to add all kill monster quests to this script.
LUA:
if(getCreatureStorage(cid, k.started) == 3) then
LUA:
local t = {
[{"rat", "cave rat"}] = {started = 45005, storage = 45006, kills = 30, raceName = "Rats", npcName = "Monk Tonir",}
}
function onKill(cid, target, damage, flags)
for v, k in pairs(t) do
local master = getCreatureMaster(target)
if(master and master ~= target) then return true end
if(bit.band(flags, 1) == 1 and isMonster(target) and isInArray(v, getCreatureName(target))) then
if(getCreatureStorage(cid, k.started) == 3) then
if(getCreatureStorage(cid, k.storage) < 0) then
doCreatureSetStorage(cid, k.storage, 0)
end
if(getCreatureStorage(cid, k.storage) < k.kills) then
doCreatureSetStorage(cid, k.storage, getCreatureStorage(cid, k.storage) + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have defeated " .. getCreatureStorage(cid, k.storage) .. " out of " .. k.kills .. " " .. k.raceName .. "!")
elseif getCreatureStorage(cid, k.storage) >= k.kills then
local mr = math.random(5)
if (mr == 5) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have defeated enough " .. k.raceName .. "!\n" .. npcName .. " is waiting to hear the results of your mission!")
end
end
end
end
end
return true
end
LUA:
elseif getCreatureStorage(cid, k.storage) >= k.kills then
Crying Damson Forgotten Server 0.3.7
Last edited by a moderator: