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

Lua Not Attack Guild With Spell

TaurenLess

New Member
Joined
Jan 2, 2010
Messages
76
Reaction score
1
Location
Brasília / Brasil
Code:
function onAttack(cid, target)
  if isPlayer(target) and getPlayerGuildId(cid) == getPlayerGuildId(target) then
	if getPlayerStorageValue(cid, 57090) == 1 then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode atacar membros da própria guild. Para desativar use: !pvp on.")
		
		local pk = getCreatureSkullType(cid)
		if pk == 0 then
			doCreatureSetSkullType(cid, 0)
		end
		
		return false
	end
  end
  
return true
end

With this script the player does not attack players from the same guild. But attacks with spell... How not to attack with spell?

Sorry, bad english
 
Back
Top