• 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!

Counting monster kills

selenir

New Member
Joined
Mar 10, 2012
Messages
7
Reaction score
0
Hi!
I'm trying to make a script counting how many times i killed for example Rotworm
I was trying to remake few task scripts from forums but unsuccesfully

Here's my script, hope u can help me

Code:
function onKill(cid, target)

local StorageValue = 40001
local Creature = "Rotworm" 
local CreaturesKilled = getPlayerStorageValue(cid, StorageValue)

    if CreaturesKilled < 0 then
		setPlayerStorageValue(cid, StorageValue, 0)
	end
	if getCreatureName(target) == Creature then
        setPlayerStorageValue(cid, StorageValue, CreaturesKilled + 1)
    else
		return false
    end

return true
end
 

Similar threads

Back
Top