• 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 When a player dies it says "RIP"

ghettobird

LUA newbie
Joined
Aug 17, 2013
Messages
679
Reaction score
132
Location
OTland
Hello otlanders, sorry for releasing so many scripts that maybe you have seen before but i'm just so excited that i can make scripts now... :)

so let's get started, go to creaturescripts/scripts make a file called death.lua and put this inside,
Lua:
 function onDeath(cid, corpse, deathList)
	if(isPlayer(cid) == true) then
   	for _, pos in pairs(getArea(getCreaturePosition(cid), 1, 1)) do
      	doSendMagicEffect(pos, 65)
		end
		doCreatureSay(cid, getCreatureName(cid) .. " killed by " .. getCreatureName(deathList[1]) .. " [R.I.P]", TALKTYPE_ORANGE_1)
	end
	return true
end

now you need to register it to login.lua
Lua:
registerCreatureEvent(cid, "death")

now go to creaturescripts.xml and put this
Lua:
<event type="death" name="death" event="script" value="death.lua"/>

i hope you guys like it !
 
ty would you be able to make a script so once someone "gets added to VIP" it would say VIP the same as the "tutor" script :D would be awesome thanks :D:D

also np here to help out :)
 
you mean vip effects? sure :) here you go,

Lua:
function onThink(interval, lastExecution)
	for k, v in pairs(getPlayersOnline()) do
		if(getPlayerStorage(cid, storageinyourvipscript) then
			doSendMagicEffect(getPlayerPosition(v), CONST_ME_GIFT_WRAPS)
			doSendAnimatedText(getPlayerPosition(v), "VIP", TEXTCOLOR_RED)
		end
	end
	return true
end

ps: when you want scripts from me go to the thread "Ghettobird's scripts" and post there so we don't go offtopic ^_^
 
Back
Top