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

Dont attack non Skulled Players

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,901
Reaction score
26
Location
Canada
Well heres sort of a attempt to copy the soon to be Update on RL tibia where Black Skulls cant attack non skulled players.

Right now its set so Red Skulls cant attack Non skulled players.

Code:
function onPlayerAttack(cid, target)
	if getCreatureSkullType(cid) == 4 and getCreatureSkullType(target) == 0 then
		doPlayerSendCancel(cid, "You cannot attack non skulled players.")
		return FALSE
	end
	return TRUE
end

And heres an example of a creaturescript.

Code:
<event type="combat" name="SkullAttack" event="script" value="skullAttack.lua"/

Code:
function onCombat(cid, target)
	return onPlayerAttack(cid, target)
end

and on Login.lua

Code:
registerCreatureEvent(cid, "SkullAttack")
 
Last edited:
i get this error:
[20/06/2009 00:20:07] Error: [CreatureEvent::configureEvent] No valid type for creature event.combat
[20/06/2009 00:20:07] Warning: [BaseEvents::loadFromXml] Can not configure event
 
omg noobi bec when no one has ws no one can war lol then youre server will be fucked all will quit bec they cant pk if it is an pvp-e it will get fucked up after 1 day omg...
 
red skulls can not atack non white skulled player... why should that fuck up the server? not everybody have rs...
 
It was based for the Update in 8.5 i just released it earlier, u can change the skulls to black now
 
@UP:
Mmmm? :D

Code:
function onPlayerAttack(cid, target)
	local attackerSkulls = {4, 5}
	local victimSkulls = {0}
	if (isInArray(attackerSkulls, getCreatureSkullType(cid)) and isInArray(victimSkulls, getCreatureSkullType(target)) then
		doPlayerSendCancel(cid, "You cannot attack non skulled players.")
		return FALSE
	end
	return TRUE
end
 
Back
Top