Full Version : Spawn a mob that immediately attacks a char
xmlspawner >>XMLSpawner - How do I? >>Spawn a mob that immediately attacks a char


<< Prev | Next >>

ArteGordon- 12-29-2005
Immediately attack the triggering char:

To spawn a mob that immediately targets the triggering char and begins attacking you would set the Combatant property to point to the triggering char, and then put the mob into warmode, like this

ArcherGuard/Combatant/TRIGMOB/warmode/true

where the TRIGMOB keyword automatically refers to the triggering char.

The sphynx.npc file in xmlextras also has an example of this kind of thing for the Action field of Xmldialogs (if you get the question wrong you get immediately attacked).

Note, that the spawner must set up to be triggered by a character for this to work.

Immediately attack a named char:

If you wanted to have the mob attack a specific named char or npc, you could use the MOB keyword like this

ArcherGuard/Combatant/MOB,Slappy,playermobile/warmode/true

which would have it attack the playermobile named 'Slappy'

ArcherGuard/Combatant/MOB,Bobo,balron/warmode/true

which would have it attack the balron named 'Bobo'

This does NOT require that the spawner be triggered by a char.

Mage-Solitaire- 01-01-2006
Attaquez immédiatement la personne qui a déclenché le spawn:

Pour créer un mob qui cible immédiatement la personne qui a déclenché le spawn (TRIGMOB) et commence à l'attaquer, il vous faut placer la valeur "combatant" directement sur le TRIGMOB, puis mettre le mob créer en warmode, comme suit:

ArcherGuard/Combatant/TRIGMOB/warmode/true

où le mot-clé de TRIGMOB se rapporte automatiquement a la personne qui a déclenché le spawn.

Le fichier sphynx.npc dans les xmlextras a également un exemple de ce genre de chose pour le champ d'action de Xmldialogs (si vous donnez la mauvaise réponse a la question, vous etes directement attaqué).

Note: le spawner doit configuré pour être déclenché par un PJ pour que ceci fonctionne.


Attaquez immédiatement une personne suivant son nom:

Si vous voulez qu'un mob attaque une joueur spécifique, vous pouvez employer le mot-clé MOB, comme dans cette exemple:

ArcherGuard/Combatant/MOB,Slappy,playermobile/warmode/true

Le guarde archer attaquerait le joueur nommé 'Slappy'


ArcherGuard/Combatant/MOB, Bobo, balron/warmode/true

Le guarde archer attaquerait le balron nommé 'Bobo'

Note: dans ce cas, le spawner n'a pas FORCEMENT besoin d'etre activé par un joueur.

Erica- 01-29-2008
Question ok i got the Combatant/TRIGMOB/warmode/true working my question is this i set like on one xmlspawner 5 to pop out on that spawner but lets say player runs away the 5 will not despawn like when smartspawning is there a way so if 5 poped out and player runs and leaves for those 5 to go away or does it already do that cause i got a dungeon where theres like 8 spawners and each of those spawners got 5 creatures to trigger when player goes to it cause if player ran away after he set off all those spawners then you would have a bunch wandering around.

ArteGordon- 01-30-2008
You could set up a spawner to use the PLAYERSINRANGE keyword to check to see how many players are nearby and then despawn your other spawner when it is zero.

from xmlspawner2.txt
QUOTE

- added the PLAYERSINRANGE,range value keyword that gives you access to the number of players within the specified range (thanks to CEO for the idea).  This could be used to control what got spawned based on nearby player number, rather than just trig/notrig. So you could do things like

IF/PLAYERSINRANGE,5>2/33

or

SETONTHIS/maxcount/PLAYERSINRANGE,5


So you would have one spawner that spawned your creatures

name: OrcSpawner

subgroup 1: orc



and a second one that despawned them from the first spawner

subgroup 1: IF/PLAYERSINRANGE,15<1/33
subgroup 1: GOTO/1
subgroup 33: DESPAWN,OrcSpawner,1


configure it for sequential spawning, set the min/maxdelay for how often you want it to check for players, like maybe once a minute or so.

Thern- 05-07-2008
Hi!

We are a German UO-Freeshard and works some Month with the XML Spawner.

Since this time we have no problems with the Spawner. But ... Now ...

We want that just Members of a specific Guild will be attacked when they are in range of the NPC. So what we have to do and is it possible?

We've tried a few things:

.xmledit -> Condition line: GETONTRIGMOB,GuildFealty=#0x00 Charactername
" " " : GETONTRIGMOB/GuildFealty=#0x00 Charactername
" " " : GETONTRIGMOB/GuildFealty=#0x00 "Charactername"
" " " : GETONTRIGMOB,GuildFealty=#0x00 "Charactername"
" " " : GETONTRIGMOB/GuildFealty/0x00 "Charactername"
" " " : GETONTRIGMOB/GuildFealty/0x00 Charactername


Thern