Full Version : How Do I -Trigger spawns when players use skills:
xmlspawner >>XMLSpawner - How do I? >>How Do I -Trigger spawns when players use skills:


<< Prev | Next >>

ArteGordon- 12-27-2005
to set up spawners that will be triggered when nearby players use a skill, first make sure that you perform installation step 5 which enables this feature.

Then you would do the following

1) Set the spawner up for proximity triggering by setting the ProximityRange to something > 0
2) Set the SkillTrigger property to a string with the following form
3) set either the Min/MaxDelay properties to the delay until the spawn occurs after triggering, or set the SpawnOnTrigger property to true for immediate spawning.

The syntax for specifying skill triggering is

skillname[,+/-][,minval,maxval]

So to trigger on any use of the Tinkering skill, just use

Tinkering

To trigger on use of Tinkering skill that is between 50 and 100

Tinkering,50,100

To trigger on successful use of Tinkering skill

Tinkering,+

To trigger on successful use of Tinkering skill between 50 and 100

Tinkering,+,50,100

You could also check some of the skill triggering, skill testing examples like skilltrigger1-5.xml or dracondarquest.xml

If you havent already tried it, I would recommend using the StaffCloak that is included in the support package when you want to test spawner triggering out, or anything else that requires player access. It allows you to quickly change to PlayerAccess and then return to your original staff access just by equipping/removing the cloak.

Note that you can combine skill triggering with other types of triggering such as speech or property triggering. Just set each of them and the spawner will require all of the specified conditions to be met.

godfood- 05-25-2006
I tried setting this up using the mining skill, Doesn't mining count as "Using" the mining skill?

*Edit, just tried it with tinkering.. Nothing*

Min/Max Delay set to 1,
ProxRange set to 10
Skilltrigger set to tinkering
triggeraccesslevel set to admin

I even tried setting spawnontrigger to true

ArteGordon- 05-25-2006
QUOTE (godfood @ May 25, 2006 07:56 am)
I tried setting this up using the mining skill, Doesn't mining count as "Using" the mining skill?

*Edit, just tried it with tinkering.. Nothing*

Min/Max Delay set to 1,
ProxRange set to 10
Skilltrigger set to tinkering
triggeraccesslevel set to admin

I even tried setting spawnontrigger to true

make sure you spell the skill names exactly. They need to be capitalized, like Mining or Tinkering

Vladimir- 05-25-2006
I got mine to work... here is an example if you want to have a look/test it ingame

QUOTE
<Spawns>
  <Points>
    <Name>MiningSpawn</Name>
    <UniqueId>3974aa05-6687-4968-a3e2-19ae40eefffd</UniqueId>
    <Map>Felucca</Map>
    <X>2586</X>
    <Y>470</Y>
    <Width>2</Width>
    <Height>2</Height>
    <CentreX>2587</CentreX>
    <CentreY>471</CentreY>
    <CentreZ>60</CentreZ>
    <Range>5</Range>
    <MaxCount>1</MaxCount>
    <MinDelay>5</MinDelay>
    <MaxDelay>10</MaxDelay>
    <DelayInSec>False</DelayInSec>
    <Duration>0</Duration>
    <DespawnTime>0</DespawnTime>
    <ProximityRange>5</ProximityRange>
    <ProximityTriggerSound>-1</ProximityTriggerSound>
    <NoItemTriggerName>A Sample of Ore</NoItemTriggerName>
    <TriggerProbability>1</TriggerProbability>
    <SkillTrigger>mining,+,60,140</SkillTrigger>
    <InContainer>False</InContainer>
    <MinRefractory>0</MinRefractory>
    <MaxRefractory>0</MaxRefractory>
    <TODStart>0</TODStart>
    <TODEnd>0</TODEnd>
    <TODMode>0</TODMode>
    <KillReset>1</KillReset>
    <ExternalTriggering>False</ExternalTriggering>
    <SequentialSpawning>-1</SequentialSpawning>
    <AllowGhostTriggering>False</AllowGhostTriggering>
    <SpawnOnTrigger>True</SpawnOnTrigger>
    <SmartSpawning>False</SmartSpawning>
    <Team>0</Team>
    <Amount>1</Amount>
    <IsGroup>False</IsGroup>
    <IsRunning>True</IsRunning>
    <IsHomeRangeRelative>True</IsHomeRangeRelative>
    <Objects2>static,6585/hue/85/weight/1/movable/true/name/A Sample of Ore/MSG/*Some coloured ore rises out of the ground as you mine*:MX=1:SB=0:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2>
  </Points>
</Spawns>

ArteGordon- 05-25-2006
or maybe not smile.gif It looks like I relaxed the case requirement. It might be an issue of the xmlspawner version you are using.

(edit)

also, make sure you performed installation step #5

QUOTE

STEP 5: (recommended but not required)
To take advantage of spawner triggering on skill use you must change 4 lines in Scripts/Misc/SkillCheck.cs (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the SkillTriggering features simply wont do anything). Near the beginning of the file at line 73 change these lines.

public static void Initialize()
{
Mobile.SkillCheckLocationHandler = new SkillCheckLocationHandler( Mobile_SkillCheckLocation );
Mobile.SkillCheckDirectLocationHandler = new SkillCheckDirectLocationHandler( Mobile_SkillCheckDirectLocation );

Mobile.SkillCheckTargetHandler = new SkillCheckTargetHandler( Mobile_SkillCheckTarget );
Mobile.SkillCheckDirectTargetHandler = new SkillCheckDirectTargetHandler( Mobile_SkillCheckDirectTarget );
}

to this

public static void Initialize()
{
// Begin mod to enable XmlSpawner skill triggering
Mobile.SkillCheckLocationHandler = new SkillCheckLocationHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckLocation );
Mobile.SkillCheckDirectLocationHandler = new SkillCheckDirectLocationHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckDirectLocation );

Mobile.SkillCheckTargetHandler = new SkillCheckTargetHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckTarget );
Mobile.SkillCheckDirectTargetHandler = new SkillCheckDirectTargetHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckDirectTarget );
// End mod to enable XmlSpawner skill triggering
}



godfood- 05-25-2006
QUOTE
also, make sure you performed installation step #5


Ahhh.....That would be why. The admin for the shard I staff on hasn't done the optional step's. We're getting ready for a big update changing a lot of the script's n such and I guess I'll just have to wait till then. Once he's got all the script's done, then he'll add in the optional steps. Thanks Arte smile.gif.


Lara- 06-27-2006
Hello, We have installed the required step, and I am using this:

Fishing,+,50,60

I am also using the staff cloak. The spawner does go off correctly on the sucessful use of fishing, however it goes off with my skill at 30 and at 70, which if I read it correctly, it shouldn't be.

Lara

ArteGordon- 06-28-2006
QUOTE (Lara @ June 27, 2006 10:32 pm)
Hello, We have installed the required step, and I am using this:

Fishing,+,50,60

I am also using the staff cloak. The spawner does go off correctly on the sucessful use of fishing, however it goes off with my skill at 30 and at 70, which if I read it correctly, it shouldn't be.

Lara

I'll have to check that out.

ArteGordon- 06-28-2006
QUOTE (Lara @ June 27, 2006 10:32 pm)
Hello, We have installed the required step, and I am using this:

Fishing,+,50,60

I am also using the staff cloak. The spawner does go off correctly on the sucessful use of fishing, however it goes off with my skill at 30 and at 70, which if I read it correctly, it shouldn't be.

Lara

fixed for v3.13

aph- 07-15-2006
pro nastavení spawneru, který se bude spouštět po použití libovolného skillu playerem nacházajícím se v dosahu se zaprvé ujistěte, že jste podstoupili 5. krok instalace, která umožňuje tuto vlastnost.

Poté udělejte následující:

1) Nastavte spawner pro spouštěním proximitou nastavením ProximityRange na hodnotu vetší než 0.
2) Poté nastavte SkillTrigger následujícím způsobem.
3) Nastavte Min/MaxDelay pro nastavení prodlevy reakce spawneru po spuštění (triggnutí), nebo nastavte SpawnOnTrigger na hodnotu True pro okamžitý spawn po spuštění (triggnutí).

Pro specifikaci triggovaciho skillu použijte syntaxi:

skillname[,+/-][,minval,maxval]


Pro spuštění jakýmkoliv použitím skillu Tinkering použijte následující syntaxi:

Tinkering

Pro spuštění jakýmkoliv použitím skillu Tinkering s hodnotou mezi 50 a 100 použijte následující syntaxi:

Tinkering,50,100

Pro spuštění pouze úspěšným použitím skillu Tinkering použijte následující syntaxi:

Tinkering,+

Pro spuštění pouze úspěšným použitím skillu Tinkering s hodnotou mezi 50 a 100 použijte následující syntaxi:

Tinkering,+,50,100

Můžete také zkusit některé z příkladů jako jsou skilltrigger1-5.xml nebo dracondarquest.xml

Jestli jste je ještě nezkusili a chcete spouštění zkusit sami (a máte tedy accesslevel vyšší jak Player), nebo když potřebujete udělat cokoliv jiného při čemž je pořeba mít accesslevel playera, mohu vám doporučit používání StaffCloaku obsaženého v support balíčku, který vám umožňuje rychle změnit accesslevel na palyera. Pouhým oblečením/svlečením tedy měníte svůj accesslevel.

Poznámka: můžete také kombinovat skill trigger s ostatními typy triggování jako třeba SpeechTrigger nebo PlayerTriggerProp. Prostě nastavte tyto vlastnosti a spawner bude požadovat všechny specifikované podmínky, které zadáte.