Aeronx
Intermediate OT User
- Joined
- Dec 17, 2015
- Messages
- 746
- Solutions
- 9
- Reaction score
- 125
Hello everyone! I've been searching around, but i can't really find the answer.
Its easy to find onKill, but that only works for the one who lasthited the monster. Like this one:
How do i change this to check everyone who attacked get the storage, say to open a quest door? My coding skills are nearly 0 >.<
Sorry for asking that much guys and very big thanks guys for your time and efforts!
Its easy to find onKill, but that only works for the one who lasthited the monster. Like this one:
Code:
function onKill(cid, target)
local player = Player(cid)
local monsters = {
["rat"] = {storage = 5000, value = 1},
["rotworm"] = {storage = 6000, value = 1}
}
for i,v in pairs(monsters) do
if getCreatureName(target) == i then
player:SetStorageValue(v.storage,v.value)
end
return true
end
end
How do i change this to check everyone who attacked get the storage, say to open a quest door? My coding skills are nearly 0 >.<
Sorry for asking that much guys and very big thanks guys for your time and efforts!