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

CreatureEvent Cats should have 7 lifes :D

it depends on what kill it
dont think it should live if a car step on it

I do say good sir, what country are you from?

Where I come from the cars have wheels and tires.. you must be from that transformers show,

what brings you to our forums? :D
 
Lua:
function onKill(cid, target)
local monsters = {
	["Cat"] = {
		text = {"The cat lost her 7 lives! :D", "This sucker have lost his lives! :D"},
		emotes = {"MjaaaUUU1!!", "LoL sucker"},
		effect = 49,
		lives = 7
		},
	["Trainer"] = {
		text = {}, -- No message after death needed, the Trainer can't die.
		emotes = {"You can't kill me!!!??", "I'm a training monk!"},
		effect = 0, -- 0 for no effects.
		lives = 0 -- 0 for imortality
		}
}

	local select = monsters[getCreatureName(target)]
	
	if select ~= nil then
		local id = getGlobalStorageValue(target)
		if id >= select.lives and select.lives ~= 0 then
			if select.text[1] ~= nil then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, select.text[math.random[1, #select.text]])
			end
		else
			setGlobalStorageValue(target,((lives ~= nil and (id == -1 and 1) or id+1) or -1))
			doCreatureAddHealth(target, getCreatureMaxHealth(target), 1)
			doSendMagicEffect(getCreaturePosition(target), select.effect)
			if select.emotes[1] ~= nil then
				doPlayerSendTextMessage(target, select.emotes[math.random[1, #select.emotes]], TALKTYPE_ORANGE_1)
			end
			return false
		end
	end
	return true
end

Just a small update.
 
I do say good sir, what country are you from?

Where I come from the cars have wheels and tires.. you must be from that transformers show,

what brings you to our forums? :D

im from dominican republic
as a noob that i am this is the most helpful forum for otserver
"for me"

how about you ?
 
My version:
Code:
local monsters = {
	["cat"] = {lives = 9, emotes = {"Meeeow!", ":3"}, effect = CONST_ME_STUN},
	["rat"] = {emotes = {"Pff!", "Noob :("}},
	["ferumbras"] = {lives = 3, texts = {"I'm the greatest mage!", "You won't kill me, haha!"}, effect = CONST_ME_BIGCLOUDS}
}

function onKill(cid, target, lastHit)
	if (not lastHit or not isPlayer(cid) or not isMonster(target)) then
		return true
	end

	local now = monsters[getCreatureName(target):lower()]
	if (not now) then return true end
	local val = getGlobalStorageValue(target)
	setGlobalStorageValue(target, val - 1)

	if (now.emotes and type(now.emotes) == "table") then doCreatureSay(target, now.emotes[math.random(#now.emotes)], TALKTYPE_MONSTER) end
	if (now.texts and type(now.texts) == "table") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, now.texts[math.random(#now.texts)]) 
	if (now.effect and type(now.effect) == "number") then doSendMagicEffect(getCreaturePosition(target), now.effect) end
	if (val == -1) then setGlobalStorageValue(target, now.lives) else setGlobalStorageValue(target, val - 1) end

	return (val > 1 or -1) and doCreatureAddHealth(target, getCreatureMaxHealth(target), true), true or false
end

plxxx
 
@Up,
Nice :thumbup:

@Topic,
Cats have 9 lives, not 7...
 
This may be necrothreadia, but I felt it should be pointed out:

According to a myth in many cultures, cats have multiple lives. In many countries, they are believed to have nine lives, but in Germany and some Spanish-speaking regions they are said to have seven lives,[SUP][202][/SUP] while in Turkish and Arabic traditions the number of lives is six.[SUP][203][/SUP]
Wiki

So all you people insisting he was incorrect perhaps are just overlooking the possibility that you are ignorantly assuming that there is no regional variation to the myth?
 
better creature storage :p
 
Make a squirrel named Conker. Make it badass. Make it summons beefed up regular squirrels.

Now the fun part. When Conker onSteps into a square with one of the summon's corpse, he collects it's tail. Corpse decays, Conker 1UP. Because squirrels get as many lives as they think they can get away with.

Make it part of a raid called 'Bad Fur Day'

Epic.

Oh, and have a Grim Reaper named Greg, with an artifact; a Sycthe that will inflict nine simultaneous deaths when used on a cat. Cuz he fucking hates cats.
 
Back
Top