• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua task message when finished

kleitonalan

New Member
Joined
Mar 21, 2013
Messages
289
Reaction score
3
my killinginthenameof.lua
Code:
local getCreatureStorage = getPlayerStorageValue

local doCreatureSetStorage = setPlayerStorageValue

function onKill(cid, target, lastHit)

local getCreatureStorage = getPlayerStorageValue

local started = getPlayerStartedTasks(cid)

if isPlayer(target) or isSummon(target) then return true end

if started and #started > 0 then

for _, id in ipairs(started) do

if isInArray(tasks[id].creatures, getCreatureName(target):lower()) then

if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < 0 then

doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0)

end

if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < tasks[id].killsRequired then

doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) + 1)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) .. "/" .. tasks[id].killsRequired .. " " .. tasks[id].raceName .. " already killed.")

end

end

end

end

return true

end


he says that the show will killing, wanted after he killed the show last appeared in local chat a message telling him to return to the npc task.
 
Back
Top