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

No vocation no kill

Efren

Lua Scripter
Joined
Apr 18, 2010
Messages
81
Reaction score
4
Wuts otland,

Im wonder if is there any possibilty of creating a lua script that can make this, "If you have no vocation then any other player cannot attack you nor kill you"

If so should be a creaturescript, right?

Vocation.lua
Lua:
local playerVoc = getPlayerVocation(cid)

function onAttack(cid, target)
	if (playerVoc == 0) then
		-- What should i do from here x) ??
	end
	return TRUE
end

Im using 0.2.10, If you could help me doing this thanks (rep++) :)

Ps: Here are some other functions from creaturescripts that may help.
Lua:
function onTarget(cid, target)
function onFollow(cid, target)
function onCombat(cid, target)
function onAttack(cid, target)
function onCast(cid, target) -- exevo gran mas vis will kill a none voc

Or there is another way of doin this?
thanks in advance!
 
Last edited:
Back
Top