fatelord
New Member
- Joined
- Aug 7, 2007
- Messages
- 56
- Reaction score
- 1
Hello!
I'm trying to do a RaceWar System (Will be posted when its fully functional) but ive got the following problem:
I want some monster to ignore certain players, due to its sex. In the test i've done the following:
Creatureevents.xml
Racewar2.lua
login.lua (Dunno if i really need to set here, since its a monster only condition)
and on the monster i've tested, in case Orc.xml, after the <flags> and before the <attacks>
What happens? Bom! The monster does not attack the player! Exactly what I want, but it follows the player :/ I wanted them to ignore the players and just walk around, like when invisible players walk by.
To that null i've also tested 0, but no idea actually.
Anyone please
I'm trying to do a RaceWar System (Will be posted when its fully functional) but ive got the following problem:
I want some monster to ignore certain players, due to its sex. In the test i've done the following:
Creatureevents.xml
PHP:
<event type="combat" name="Racewar2" event="script" value="racewar2.lua"/>
PHP:
local config = {
racewars = 1, -- 1 = ON/ any other number = OFF
}
function onCombat(cid, target)
if isPlayer(target) ~= TRUE then
return TRUE
end
if config. racewars == 1 then -- if NORMAL
if getPlayerSex(target) == 1 then
doMonsterSetTarget(cid, [B]null[/B])
return FALSE
end
else
return TRUE
end
end
PHP:
registerCreatureEvent(cid, "Racewar2")
PHP:
<script>
<event name="Racewar2"/>
</script>
What happens? Bom! The monster does not attack the player! Exactly what I want, but it follows the player :/ I wanted them to ignore the players and just walk around, like when invisible players walk by.
To that null i've also tested 0, but no idea actually.
Anyone please