Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- huntingParty = getPartyMembers(cid)
- huntingMemberGotExp = getNumberValue(creature.experience)
- if creature then
- if (huntingParty ~= nil) then
- for i, cid in pairs(huntingParty) do
- if (huntingMemberGotExp ~= nil) then
- --This register the amount of killed creatures--
- setGlobalStorageValue(creature.counterid, getGlobalStorageValue(creature.counterid)+1)
- --For task system, adds storage when task creature is killed--
- setPlayerStorageValue(cid, creature.creatureStorage, getPlayerStorageValue(cid, creature.creatureStorage)+1)
- local currentTask = getPlayerStorageValue(cid, taskStorage)
- if (currentTask > 0 and creature.creatureStorage == currentTask) then
- local amount = getPlayerStorageValue(cid, currentTask)
- local task = getTaskByStorage(cid)
- if (amount == task.amount) then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed all the " .. task.task .. " you needed to kill. Please report back to Huntsman Chris for your reward.")
- elseif (amount > 0 and amount < task.amount) then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have currently killed " .. amount .. "/" .. task.amount .. " " .. task.task .. ".")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement