• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Set storage id to 1 after killing monster.

shayenek

New Member
Joined
Jun 20, 2013
Messages
40
Reaction score
1
Location
Poland
Hello. I would like to ask if someone could create me easy script. After killing monster new storageid appears with value = 1. Would be nice if there could be 3 monsters in script so I could change storages and monster names. Thanks.
 
Im really bad at scripting but I have something like this:

function onKill(cid, target, lastHit)
if isInArray(, the obliverator:lower()) then
setPlayerStorageValue(cid, 1096, 1)
end
end

if isInArray(, the obliverator:lower()) then - I dont know how to edit this line to get it working. Could you help me please?
 
Code:
creatures =
{
    ["rat"] = {EXP = ?},
}

local creature = creatures[getCreatureName(getCreatureTarget(cid)):lower()]
 
A Simple Shit:
Code:
function onKill(cid, target)
local monsters = {
    ["rat"] = {storage = 5000, value = 1},
    ["rotworm"] = {storage = 6000, value = 1}
    }
   
    for i,v in pairs(monsters) do
    if getCreatureName(target) == i then
        doPlayerSetStorageValue(cid, v.storage,v.value)
    end
    return true
    end
end
 
Back
Top