darkmu
Well-Known Member
This is my table: TFS 1.X
My Script OnKill:
what you're finding is that he's simply getting the name "is finding it in the creatures on the list, does anyone know how to solve it?. For those monsters that don't have the primary name repeated it works perfectly
Lua:
[120] = {
killsRequired = 210,
raceName = "Tortoises",
creatures = {"tortoise, thornback tortoise"},
rewards = {
{type = "experience", value = 15750},
{type = "money", value = 6500},
{type = "points", value = 5},
{type = "hunting", value = 35},
{type = "items", value = {5899, 5}},
},
},
[121] = {
killsRequired = 180,
raceName = "Dwarfs",
creatures = {"dwarf, dwarf geomancer, dwarf guard"},
rewards = {
{type = "experience", value = 14850},
{type = "money", value = 6500},
{type = "points", value = 3},
{type = "hunting", value = 25},
{type = "items", value = {5880, 5}},
},
},
My Script OnKill:
Code:
if(target:isMonster()) then
if (isInArray(teste.creatures, target:getName():lower())) then
for pid, _ in pairs(target:getDamageMap()) do --get damageMap from target killed
local attackerPlayer = Player(pid) --get userData of each player that damaged the target
if attackerPlayer then --if player exist
end
end
end
end
what you're finding is that he's simply getting the name "is finding it in the creatures on the list, does anyone know how to solve it?. For those monsters that don't have the primary name repeated it works perfectly