Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ITEMS_NAMES = {}
- local MONSTERS_NAMES = {'Askarak Demon', 'Askarak Lord', 'Askarak Prince', 'Shaburak Demon', 'Shaburak Lord', 'Shaburak Prince'}
- table.lower(ITEMS_NAMES)
- table.lower(MONSTERS_NAMES)
- _DEAD_CREATURES = _DEAD_CREATURES or {}
- foreach creature m 'mf' do
- if ((m.updated == 0 or m.hppc == 0) and table.find(MONSTERS_NAMES, m.name:lower())) then
- local POSITION_FOUND, CREATURE_FOUND = false, false
- for i, DEAD_CREATURE in ipairs(_DEAD_CREATURES) do
- if (table.find(DEAD_CREATURE.monsters, m.id)) then
- CREATURE_FOUND = true
- end
- if (ground(DEAD_CREATURE.posx, DEAD_CREATURE.posy, DEAD_CREATURE.posz) == ground(m.posx, m.posy, m.posz)) then
- POSITION_FOUND = i
- break
- end
- end
- if (POSITION_FOUND) then
- if (not CREATURE_FOUND) then
- table.insert(_DEAD_CREATURES[POSITION_FOUND].monsters, m.id)
- end
- else
- table.insert(_DEAD_CREATURES, {posx = m.posx, posy = m.posy, posz = m.posz, monsters = {m.id}})
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement