Full Version : Dismount
xmlspawner >>XMLSpawner Mods and Tips >>Dismount


<< Prev | Next >>

aph- 07-14-2006
Hmm is there any possibility how to dismount a player with spawner?

aph- 07-14-2006
Ah, I've got it smile.gif

PlayerTrigProp - Mounted=True

and the spawn entry - SET,{GETONTRIGMOB,Mount.serial}/Rider/(-null-)

ArteGordon- 07-14-2006
yes, that will work. You can also simplify that as

SETONTRIGMOB/mount.rider/(-null-)

aph- 07-14-2006
Hmm yes, but I think that for my case it would be better if i use SET,{GETONTRIGMOB,Mount.serial}/.. , because i need more than dismount.
btw if I want to kill the palyer's mount after dismounting I can use DAMAGE,dmg,phys.. like in first spawner you helped me with.. but in this case I've got a little problem:

..
..
..
SET,{GETONTRIGMOB,Mount.serial}/ ..... /Rider/(-null-)/DAMAGE,5000,20,20,20,20,20/Location/(...

I don't know why, but the DAMAGE always kills a player smile.gif (if I used Hits/0/Poison/Lethal it worked (it didn't make a player poisoned), but I want to kill the Mount immediately and than moved into some location...

I've also tried something like this, but didn't work properly:

3 SET,{GETONTRIGMOB,Mount.serial}/.../Hits/0/Poison/Lethal... (without Rider/(-null-) )
3 WAITUNTIL/<GET,{GETONTRIGMOB,Mount.serial},Stam=0 & GET,{GETONTRIGMOB,Mount.serial},Mana=0>
3 GOTO/4
4 (damn I don't know how I wanted to get serial, when player was dismounted..) however.. I think that there is else way how to do that I want to.

(stam and mana are perhaps the only values that are changed together when a mobile is dead or alive)

ArteGordon- 07-14-2006
yes, unfortunately the DAMAGE keyword automatically applies to the triggering mob.

You could temporarily set the TriggerMob property to the mount and then apply the damage. So something like this should work

SET,{GETONTRIGMOB,Mount.serial}/ ..... /Rider/(-null-)
SETONTHIS/triggermob/GETONTRIGMOB,Mount.serial/DAMAGE,5000,20,20,20,20,20
SETONTRIGMOB/location/(x,y,z)

I'll take a look at the DAMAGE keyword and think about possibly modifying the way it works.

aph- 07-14-2006
hmm it unfortunately doesn't work properly, I've also inspired with your idea of saving serial:

(I used unused (I know.. it sounds terribly biggrin.gif) entry in props, in this case was unused MobTriggerName)

SETONTHIS/MobTriggerName/{GETONTRIGMOB,Mount.serial}
SET,{GETONTHIS,MobTriggerName}/Rider/(-null-)/DAMAGE,5000,20,20,20,20,20


... this syntax works, but it still deals dmg to rider... curious...

QUOTE
I'll take a look at the DAMAGE keyword and think about possibly modifying the way it works.


hmm, if it would be possilble it could be like

DAMAGE,dmg,phys,fire,cold,pois,energy[,range][,playeronly][,npconly]

... or simply KILL,delay the delay means delay before KILL.. only suggestion biggrin.gif

ArteGordon- 07-15-2006
ah, yeah. It doesnt work because it first dismounts them and then tries to refer to the mount which is now null.

I have added a modified version of basexmlspawner.cs to the beta_314.zip file that changes the way that DAMAGE and POISON keywords word when used as value type keywords.
Now, if they are used to modify a spawn object, then their effects will be applied to the spawn object, and if a range argument is used, then things within that range from the spawn object will be affected.
So now the entry that you tried initially should work

SET,{GETONTRIGMOB,Mount.serial}/ ..... /Rider/(-null-)/DAMAGE,5000,20,20,20,20,20/Location/(...


Their behavior when used as standalone keywords was not changed.

Gembone- 08-13-2006
just ran across this and I have a question. can this be used to keep players from riding mounts into buildings also. what is the range of the dismount property or is it settable? I have an RP shard and some people never learn the no riding mounts in buildings. so this could be a very nice addition.

ArteGordon- 08-13-2006
QUOTE (Gembone @ August 13, 2006 11:38 am)
just ran across this and I have a question. can this be used to keep players from riding mounts into buildings also. what is the range of the dismount property or is it settable? I have an RP shard and some people never learn the no riding mounts in buildings. so this could be a very nice addition.

you can set the triggering range for a spawner up to about 25 tiles.

Gembone- 08-13-2006
ok I am trying to make this work.
I have
max delay 0
PlayerTriggerProp Mounted=True
Spawn Range 1

and spawn set as SETONTRIGMOB/mount.rider/(-null-)

and nothing happens
could you let me know what I have missed? this is the first time I have used commands in the spawn set. so I am not real informed on how to do this

ArteGordon- 08-13-2006
QUOTE (Gembone @ August 13, 2006 02:49 pm)
ok I am trying to make this work.
I have
max delay 0
PlayerTriggerProp Mounted=True
Spawn Range 1

and spawn set as SETONTRIGMOB/mount.rider/(-null-)

and nothing happens
could you let me know what I have missed? this is the first time I have used commands in the spawn set. so I am not real informed on how to do this

You need to set the ProximityRange property to the triggering range value that you want. This will enable triggering.

The SpawnRange wont matter.

I would set the SpawnOnTrigger to true instead of setting MaxDelay to zero - it is more efficient.

Gembone- 08-13-2006
ok I set proximity range 1 and Spawn on trigger true but it is still not dismounting the player. also I am using the cloak to change myself to player.

ArteGordon- 08-13-2006
QUOTE (Gembone @ August 13, 2006 03:10 pm)
ok I set proximity range 1 and Spawn on trigger true but it is still not dismounting the player. also I am using the cloak to change myself to player.

with a proximityrange of 1, you will need to be right next to it to trigger.

Gembone- 08-13-2006
yes I want to place it in a doorway to keep players from riding mounts into buildings. so range only needs to cover a very small area. and I am walking right over the top of it to try and activate it. no effect

ArteGordon- 08-13-2006
You may need to reset it. Just hit the respawn button on the spawner gump.

If you still have trouble, take a look at this spawner definition that does it.

QUOTE

<Spawns>
  <Points>
    <Name>Dismounter</Name>
    <UniqueId>770e0e41-7728-4471-92da-9427cbd7cae8</UniqueId>
    <Map>Felucca</Map>
    <X>5445</X>
    <Y>1157</Y>
    <Width>10</Width>
    <Height>10</Height>
    <CentreX>5450</CentreX>
    <CentreY>1162</CentreY>
    <CentreZ>0</CentreZ>
    <Range>5</Range>
    <MaxCount>1</MaxCount>
    <MinDelay>5</MinDelay>
    <MaxDelay>10</MaxDelay>
    <DelayInSec>False</DelayInSec>
    <Duration>0</Duration>
    <DespawnTime>0</DespawnTime>
    <ProximityRange>3</ProximityRange>
    <ProximityTriggerSound>500</ProximityTriggerSound>
    <ProximityTriggerMessage>No mounts allowed!</ProximityTriggerMessage>
    <PlayerPropertyName>mounted=true</PlayerPropertyName>
    <TriggerProbability>1</TriggerProbability>
    <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>
    <AllowNPCTriggering>False</AllowNPCTriggering>
    <SpawnOnTrigger>True</SpawnOnTrigger>
    <SmartSpawning>False</SmartSpawning>
    <Team>0</Team>
    <Amount>1</Amount>
    <IsGroup>False</IsGroup>
    <IsRunning>True</IsRunning>
    <IsHomeRangeRelative>True</IsHomeRangeRelative>
    <Objects2>SETONTRIGMOB/mount.rider/(-null-):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>