Witam , potrzebuję pomocy w sprawię tego skryptu. Wszystko ładnie chodzi gdy zamiast "function onTarget" jest "function onAttack" , a ja chciałbym uzyskać efekt aby Monster w ogóle nie zaznaczał gracza , gdy gracz nie ma wyznaczonego storage. Proszę o pomoc.
Lua:
sagaMonsters = {
["rat"] = {storage = 4300, nr = 2},
["cave rat"] = {storage = 234, nr = 2},
}
function onTarget(cid, target)
registerCreatureEvent(cid, "SagaMonster")
for name, storage in pairs(sagaMonsters) do
if name == getCreatureName(cid) and getPlayerStorageValue(target, 4300) == 1 then
return true
end
end
return false
end