i need script who player kill monster and receive a storage
i think on that but dont work plx help me
i think on that but dont work plx help me
Code:
local m = {
["Ungreez"] = {
message = "Congratulations you are owned Ungreez now you are able to preceed to next mission!",
owned = "You already do that mission go to next mission!",
cfg = {
{
storage = 1290, -- Storage.
storagevalue = 6, -- Storage Quest Value.
},
}
},
["Koshei The Deathless"] = {
message = "You had killed Koshei The Deathless now you can get your prize!",
owned = "You already have killed Koshei The Deathless go and get your prize!",
cfg = {
{
storage = 21187, -- Storage.
storagevalue = 1, -- Storage Quest Value.
},
}
}
}
function onKill(cid, target)
if isPlayer(target) then
return true
end
local monster = m[getCreatureName(target)]
if monster then
for i = 1, #monster.cfg do
local c = monster.cfg[i]
if(storage > monster.storagevalue) then
doCreatureSay(cid, monster.owned, TALKTYPE_ORANGE_1)
else
setPlayerStorageValue(cid,monster.storage,monster.storagevalue)
doCreatureSay(cid, monster.message, TALKTYPE_ORANGE_1)
end
end
end
return true
end