• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Creature Event] monsters do not attack players who have their outfit

Knight God

Member
Joined
Oct 19, 2008
Messages
1,180
Reaction score
21
Good night, well I have chosen to leave this order here in otland because I've noticed that people here are really expert in otservers.
as
Cykotitan or
LucasOlzon.


Well, let me know if it is possible to complete a quest that gives you a monster outfit.
for example a Orc outfit.
and this will allow you not being attacked by orcs, orc warlord, leaders.

Please if you can get this script will give rep + + 3 days straight.
For their dedication and assistance
thanks :)
 
In ..\creaturescripts\scripts
monsteroutfitprotection.lua:
LUA:
local monsters = {"Orc", "Orc Warlord", "Orc Leader"}
local lookType = {5}

function onTarget(cid, target)
	if(isMonster(cid) and isInArray(monsters, getCreatureName(cid))) then
		if(isPlayer(target) and isInArray(lookType, getCreatureOutfit(target).lookType))then
			return false
		end
	end

	return true
end
I only added a protection while wearing a "Orc" outfit. You can add more if you like (edit "lookType").
For a complete list of lookTypes check here: http://otland.net/f83/new-look-types-updated-8-7-monsters-112701/

In login.lua:
LUA:
	registerCreatureEvent(cid, "MonsterOutfitProtection")

In creaturescripts.xml:
XML:
	<event type="target" name="MonsterOutfitProtection" event="script" value="monsteroutfitprotection.lua"/>

Put this in the files of the creatures that appear in monsteroutfitprotection.lua just below </flags>:
XML:
	<script>
		<event name="MonsterOutfitProtection"/>
	</script>
 
Last edited:
Back
Top