Full Version : Trigger spawns based on players skills/stats
xmlspawner >>XMLSpawner - How do I? >>Trigger spawns based on players skills/stats


<< Prev | Next >>

ArteGordon- 12-27-2005
If you would like to set up a spawner that can only be activated when a player with certain skills and/or stats comes within range, this is what you can do

1) make sure that it is set up for basic proximity triggering (ProximityRange >= 0)

2) you can set PlayerTriggerProp to test for whatever property you would like. For example, to test for the value of a skill you would use a string like
skills.lumberjacking.value > 0
Note that is skills-dot-lumberjacking-dot-value. It is the same property specification that you would use if you were using the [get or [xmlget command
e.g. "[get skills.lumberjacking.value" That is a good general diagnostic test for whether you are specifying a prop correctly. Just see what [get or [xmlget returns ([xmlget lets you see all public properties)
If you wanted a spawner that would test for the players Karma or Fame, just add a test like
karma > 1000
You can add compound tests, like
skills.spiritspeak.value > 50 & karma < 0 & fame > 2000

3) then you can either set the SpawnOnTrigger property to true, or use the min/maxdelay to set the time between triggering and spawning.

4) add the spawns that you would like to appear when the player comes into range to the spawner gump.

5) Press the 'Respawn' button on the spawner gump and the spawner should be prepared

godfood- 12-28-2005
A made a simple example of how to do this. Just extract this file into your runuo/spawns folder and type [xmlloadhere skilltriggerXSF.xml in-game.

xmlspawner/on2.gif Edit: Updated the XML file. It will now target and start attacking the player that triggered it upon spawn.

Mage-Solitaire- 01-03-2006
Si vous voulez installer un spawner qui ne peut ętre activé que quand un joueur avec une certaine skill/stats rentre dans sa zone de detection, voici comment faire:

1) vous assurez qu'il est installé pour le déclenchement de proximité (ProximityRange > = 0)

2) vous pouvez placer PlayerTriggerProp ŕ l'essai pour quelque propriété vous voudriez. Par exemple, ŕ l'essai pour la valeur d'une compétence vous emploieriez une entrée du style
skills.lumberjacking.value > 0
notez que c'est bien skill-point-lumberjacking-point-value. C'est les męmes spécifications de propriété que vous emploieriez si vous utilisiez [GET ou [xmlget

par exemple. "[ obtenez skills.lumberjacking.value" pour lequel est un bon test de diagnostic général si vous indiquez un appui vertical correctement.

Si vous vouliez un spawner qui détermine le karma des joueurs ou leur renommée, ajoutez un test du style:

karma > 1000

vous pouvez aussi ajouter les tests composés, comme :

skills.spiritspeak.value > 50 & karma < 0 & fame > 2000

3) alors vous pouvez placer la propriété de SpawnOnTrigger sur true, ou employez le min/maxdelay pour déterminer le temps entre déclenchement et spawn.

4) ajoutez les spwns qui vous voudriez voir apparaitre quand le joueur rentre dansla zone de detection du spawner.

5) appuyez sur le bouton 'Respawn 'sur le gump de spawner et le spawner est maintenant pręt

Mage-Solitaire- 02-12-2006
a question based on the playertriggerprop :

i want the spawner start to work when the trigger is young=true, but i can't make it work :/

ArteGordon- 02-12-2006
set the proximityrange, and then set the playertriggerprop to the string

young=true

if you are having trouble, post the spawner.

Vladimir- 05-18-2006
I'm having trouble triggering a spawn with the player property "Race". if i use [get race it returns "Race = Human". but if i set the PlayerTriggerProp to Race=Human it won't spawn...

I also tried to use an IF statement:

1: IF/GETONTRIGMOB,Race=Human/3/2
2: GOTO/1
3: SETONTRIGMOB/MSG/You are Human

ArteGordon- 05-18-2006
QUOTE (Vladimir @ May 18, 2006 06:24 am)
I'm having trouble triggering a spawn with the player property "Race". if i use [get race it returns "Race = Human". but if i set the PlayerTriggerProp to Race=Human it won't spawn...

I also tried to use an IF statement:

1: IF/GETONTRIGMOB,Race=Human/3/2
2: GOTO/1
3: SETONTRIGMOB/MSG/You are Human

that is probably because your Race property is an enum, so you need to test for it like

IF/GETONTRIGMOB,Race=#Human/3/2

same thing if you use it in PlayerTriggerProp. Use a test like

Race=#Human

If you dont tell the parser that that Human is an enum value by preceding it with #, it will just assume that it is a string which is why the test fails. The parser doesnt do automatic context-dependent typing in conditional tests, so it wont automatically assume that because you are testing against an enum property, that the other side of the test must be an enum.

http://xmlspawner.15.forumer.com/index.php?showtopic=399

aph- 07-17-2006
Jestliže chcete nastavit spawner, který se aktivuje pouze tehdy, má li hráč v dosahu určité skilly nebo staty, toto je pustup, jakým toho můžete docílit:

1) Ujistěte se, že je spawner nastaven pro standartní spouštění v závislosti na vzdálenosti hráče. Tedy (ProximityRange >= 0)

2) Můžete nastavit PlayerTriggerProp pro zadání podmínky, za jaké se spawner spustí. Například pro spuštění v závislosti na velikosti skillu použijte následující syntaxi:
skills.lumberjacking.value > 0

Příkaz pro spawner (skills-tečka-lumberjacking-tečka-value) je tedy stejný jako příkaz, kterým můžete zjistit skilly ve hře používáním [get nebo [xmlget. Například příkazem "[get skills.lumberjacking.value" si můžete ověřit, jestli jste správně zadali vlastnost. Jednoduše se podívejte co použitím [get nebo [xmlget získáte ([xmlget vám umožňuje zpřístupnit všechny základní vlastnosti).

Jestliže chcete vytvořir spawner, reagující na Karmu nebo Famu hráče, použijte následující syntaxi:
karma > 1000

Kterou můžete také kombinovat s podmínkou pro skilly takto:
skills.spiritspeak.value > 50 & karma < 0 & fame > 2000

3) Můžete také aktivovat SpawnOnTrigger, nebo použít Min/Max delay pro nastavení prodlevy mezi triggnutím a samotným spawnutím.

4) Nastavte do spawneru cokoliv, co chcete aby se při spuštění objevilo, když se hráč nachází na území vymezeném vámi zadanou ProximityRange.

5) Stiskněte tlačítko 'Respawn' ve spawner gumpu pro přípravu na použití xmlspawner/Checked2.gif