1function onKill(player, target)
2 local DG_MONSTER = {
3 ["Massive Fire Elemental+"] = 01;
4 ["Shaburak Prince+"] = 01;
5 ["Yielothax+"] = 01;
6 ["Nightmare+"] = 01;
7 ["Eternal Guardian+"] = 01;
8 }
9 if not target:isMonster() then
10 return true
11 end
12
13 local Name = target:getName()
14 if DG_MONSTER[Name] then
15 doRemoveCreature(target:getId())
16 local killer = Creature(player)
17 if killer and killer:isPlayer() and target:isMonster() then
18 local party = player:getParty()
19 local STORAGE_BONE_DOIS = _SYSTEM.DANGEROUS[08][01].STORAGE
20 if not party then
21 player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Monstros Skull [ 0" ..player:getStorageValue(STORAGE_BONE_DOIS).. "/05 ].")
22 if player:getStorageValue(STORAGE_BONE_DOIS) < 00 then
23 player:setStorageValue(STORAGE_BONE_DOIS, (player:getStorageValue(STORAGE_BONE_DOIS) + 2))
24 player:getPosition():sendMagicEffect(13)
25 else
26 player:setStorageValue(STORAGE_BONE_DOIS, (player:getStorageValue(STORAGE_BONE_DOIS) + 1))
27 player:getPosition():sendMagicEffect(13)
28 end
29
30 if player:getStorageValue(STORAGE_BONE_DOIS) == 06 then
31 player:setStorageValue(_SYSTEM.DANGEROUS[08][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[08][01].RECOMPENSA[02])
32 player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Todos os Monstros Skull foram eliminados.")
33 end
34 else
35 local members = party:getMembers()
36 members[#members + 1] = party:getLeader()
37 for _, member in ipairs(members) do
38 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Monstros Skull [ 0" ..member:getStorageValue(STORAGE_BONE_DOIS).. "/05 ].")
39 if member:getStorageValue(STORAGE_BONE_DOIS) < 00 then
40 member:setStorageValue(STORAGE_BONE_DOIS, (member:getStorageValue(STORAGE_BONE_DOIS) + 2))
41 member:getPosition():sendMagicEffect(13)
42 else
43 member:setStorageValue(STORAGE_BONE_DOIS, (member:getStorageValue(STORAGE_BONE_DOIS) + 1))
44 member:getPosition():sendMagicEffect(13)
45 end
46
47 if member:getStorageValue(STORAGE_BONE_DOIS) == 06 then
48 member:setStorageValue(_SYSTEM.DANGEROUS[08][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[08][01].RECOMPENSA[02])
49 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Todos os Monstros Skull foram eliminados.")
50 end
51 end
52 end
53 end
54 end
55
56 return true
57end
58