ProgressionEvents: Difference between revisions

From PSwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
Be sure to read also [[ProgressionEvents Objects and Variables|this page]] as it describes which objects are scriptable inside a progression event and which variables you can access.
Be sure to read also [[ProgressionEvents Objects and Variables|this page]] as it describes which objects are scriptable inside a progression event and which variables you can access.
==AnimalAffinityOp==
==AnimalAffinityOp==
TODO
<animal-affinity aim="Actor" name="reptile" value="2"/>
 
This is primarily used for character creation, as these effects are permanent.  There is no way to buff this currently.


==AnimationOp==
==AnimationOp==
Line 14: Line 16:


==ActionOp==
==ActionOp==
TODO
ActionOp activate any inactive entrance and create a key for it.
 
Activates any inactive entrance action location of the specified entrance type and places into players inventory a key for the lock instance ID defined in that action location entrance.
 
- Syntax:
 
<action sector="%s" stat="%s"/>
 
sector = "%s" sector string to qualify search for inactive entrances
 
stat = "%s" name of item type for new key to the lock of the entrance
 
- Examples:
 
<action sector="guildlaw" stat="Small Key"/>
 
This quest script activates any inactive action location for sector guildlaw and gives a "Small Key" item.


==CancelOp==
==CancelOp==
TODO
A way to cancel active spells.
 
<cancel type="all">
 
<spell type="buff" name="Defensive Wind"/>
 
<spell type="buff" name="Flame Spire"/>
 
</cancel>
 
There are three types:
 
- "all"     ... cancels all listed spells.
 
- "ordered" ... cancels the first listed spell that's actually active.
 
- "random"  ... cancels a random spell from the list (one which is active).


==DestroyOp==
==DestroyOp==
TODO
The object that is going to be destroyed must be defined in the supplied MathEnvironment.
 
Example: <destroy aim="SomeObjectName"/>
 
SomeObjectName needs to be replaced by the object name that is used to register the object in the MathEnvironment. So the name identifies the object to be destroyed.
 




Line 34: Line 73:


==CreateFamiliarOp==
==CreateFamiliarOp==
TODO
Create familiar for actor.
 
Syntax: <create-familiar aim="Actor" masterId="masterId" />
 
Examples:
 
Create a familiar near actor and send message:
 
<create-familiar aim="Actor" masterId="1001"/><msg text="Your new familiar appears nearby."/>


==FactionOp==
==FactionOp==
TODO
Example: <faction aim="Actor" name="Klyros" value="5"/>
 
This adds 5 to actor's Klyros faction.


==FxOp==
==FxOp==
Line 88: Line 137:


==HPOp==
==HPOp==
TODO
direct HP damage. Unlike other vitals, <hp> can specify an optional attacker who will be recorded in the target's damage history.
 
Examples:
 
<hp attacker="Caster" aim="Target" value="-5*Power"/>
 
<hp aim="Target" value="15"/>


==HPRateAOp==
==HPRateAOp==
Line 112: Line 167:


==KeyOp==
==KeyOp==
TODO
There are two functions of this script.  The make function will create a new master key for the specified lock.  The modify function will change existing key to work with lock.


==LootSetOp==
==LootSetOp==
Line 122: Line 177:


lootid corresponds to an entry into [[Loot rulesTable|loot_rules]] table. Can be a single ID, or a series of IDs comma-separated. If there are multiple IDs, the loot will randomize and pick one.
lootid corresponds to an entry into [[Loot rulesTable|loot_rules]] table. Can be a single ID, or a series of IDs comma-separated. If there are multiple IDs, the loot will randomize and pick one.
== MinigameOp ==
MinigameOp - starts a new minigame
Example: <minigame aim="Target" name="Dice" itemloc="righthand"/>
itemloc points to the NPC slot where we search for a minigame item to start the game.


==MechanismMsgOp==
==MechanismMsgOp==
TODO
activate a mechanism:
 
Example: <mechanism aim="Target" mesh="Mesh" move="Move" rot="Rot" />


==MsgOp==
==MsgOp==
Line 145: Line 209:


==NPCCmdOp==
==NPCCmdOp==
TODO
NPCCmdOp - one-time npc command sending:
 
Example: <npccmd aim="Caster" cmd="spam spam spam spam...!"/>
 




Line 231: Line 298:


==TutorialMsgOp==
==TutorialMsgOp==
TODO
TutorialMsgOp activates a tutorial window on the client with the specified message. The message is taken from tips table in the database.
 
Example: <tutorialmsg aim="Target" num="TutorialTipID"/>


==VariableSetOp ==
==VariableSetOp ==
TODO
This is permanent. Note that if the variable is set already it will be overwritten.
 
Example: \<variable aim="Actor" name="LOVEDBYKLYROS" value="true"/>
 
This sets the variable LOVEDBYKLYROS and sets it's value to "true".


==VariableUnSetOp==
==VariableUnSetOp==
TODO
Example: <variable aim="Actor" name="LOVEDBYKLYROS" />


unset the variable LOVEDBYKLYROS
==VitalOp==
imperative mana & stamina, but not HP


==VitalOp==
Example: <mana aim="Caster" value="-5"/>
TODO


==VitalAOp==
==VitalAOp==

Revision as of 17:45, 10 May 2025

Progression Events Objects and Variables

Be sure to read also this page as it describes which objects are scriptable inside a progression event and which variables you can access.

AnimalAffinityOp

<animal-affinity aim="Actor" name="reptile" value="2"/>

This is primarily used for character creation, as these effects are permanent.  There is no way to buff this currently.

AnimationOp

This is a run once animation command. The animation name is not validated, only client knows if it has the animation.

Syntax:

 <animation aim="Target" name="animationX" /> 

Target = the operation's target value = the animation name, these can be: attack, craft, craft_hammer, ...

ActionOp

ActionOp activate any inactive entrance and create a key for it.

Activates any inactive entrance action location of the specified entrance type and places into players inventory a key for the lock instance ID defined in that action location entrance.

- Syntax:

<action sector="%s" stat="%s"/>

sector = "%s" sector string to qualify search for inactive entrances

stat = "%s" name of item type for new key to the lock of the entrance

- Examples:

<action sector="guildlaw" stat="Small Key"/>

This quest script activates any inactive action location for sector guildlaw and gives a "Small Key" item.

CancelOp

A way to cancel active spells.

<cancel type="all">

<spell type="buff" name="Defensive Wind"/>

<spell type="buff" name="Flame Spire"/>

</cancel>

There are three types:

- "all"     ... cancels all listed spells.

- "ordered" ... cancels the first listed spell that's actually active.

- "random"  ... cancels a random spell from the list (one which is active).

DestroyOp

The object that is going to be destroyed must be defined in the supplied MathEnvironment.

Example: <destroy aim="SomeObjectName"/>

SomeObjectName needs to be replaced by the object name that is used to register the object in the MathEnvironment. So the name identifies the object to be destroyed.


ExperienceOp

Adjust the experience of the target.

Syntax:

 <exp type="allocate_last" value="#"/>

allocate_type = "allocate_last" means allocate damage last otherwise damage is allocated

value = "#" amount of experience to give single player or share with others

CreateFamiliarOp

Create familiar for actor.

Syntax: <create-familiar aim="Actor" masterId="masterId" />

Examples:

Create a familiar near actor and send message:

<create-familiar aim="Actor" masterId="1001"/><msg text="Your new familiar appears nearby."/>

FactionOp

Example: <faction aim="Actor" name="Klyros" value="5"/>

This adds 5 to actor's Klyros faction.

FxOp

The effect is either created at the target (attached) or in front of it (unattached).

If the effect is not attached:

<fx type="unattached" name="SomeName" source="SomeSource" target=""/>
 
 or if the effect is attached:
 
<fx name="SomeName" source="SomeSource" target=""/>
 
scale="value" is optional and gives the scaling factor for the effect.

Example: <fx source="Caster" target="Target" name="summon_missile" type="unattached"/>

IfOp

This operation allow to asses a condition and execute other operations if the result return true or false. It's a classic if/then/else operation.

Syntax:

 <if t="..."> 
   <then>...</then> 
   <else>...</else>
 </if> 

t = "..." a mathscript condition to verify.

Examples: Check if 'Water Barrier' spell is active on the target and send a message based on that:

 <if t="Target:ActiveSpellCount('Water Barrier') < 1">
   <then>
     <msg aim="Target" text="${Target} is not under Water Barrier spell."/>
   </then>
   <else>
     <msg aim="Target" text="${Target} is under Water Barrier spell."/>
   </else>
 </if>

LetOp

This operation allow to setup one or more variable which can be used inside the let operation block.

Syntax:

 <let vars="..."/> or <let vars="...">...</let> 

vars = "..." define a mathscript environment.

Examples: Setup Roll (random 0-100), Will and Power variables:

 <let vars="Roll=rnd(100);Will=Target:GetSkillValue(51); Power=0.8^(0.1*Will)*Roll;">
 ...
 </let>

HPOp

direct HP damage. Unlike other vitals, <hp> can specify an optional attacker who will be recorded in the target's damage history.

Examples:

<hp attacker="Caster" aim="Target" value="-5*Power"/>

<hp aim="Target" value="15"/>

HPRateAOp

Change the HP statistics of a character in Applied mode.

Syntax:

 <hp-rate value="..."/>

value = "..." a mathscript defined value.


Examples: Increase the Actor HP rate by 10 points:

 <hp-rate value="10"/>

ItemOp

Creates an item in the player inventory

Syntax:

 <item aim="Actor" name="Tria" location="inventory" count="23" />
 <item aim="Actor" name="Ruby Crystal" location="inventory" count="5" />

KeyOp

There are two functions of this script.  The make function will create a new master key for the specified lock.  The modify function will change existing key to work with lock.

LootSetOp

Based on the a loot rule ID, generates all the items needed and add those into the player inventory or drops to the ground

Syntax:

<loot aim="Actor" lootid="<lootid1,lootid2,lootid3>" location="inventory|ground" />

lootid corresponds to an entry into loot_rules table. Can be a single ID, or a series of IDs comma-separated. If there are multiple IDs, the loot will randomize and pick one.

MinigameOp

MinigameOp - starts a new minigame

Example: <minigame aim="Target" name="Dice" itemloc="righthand"/>

itemloc points to the NPC slot where we search for a minigame item to start the game.

MechanismMsgOp

activate a mechanism:

Example: <mechanism aim="Target" mesh="Mesh" move="Move" rot="Rot" />

MsgOp

Used to send a system message to the user client. Variables ($variable_name) con be used inside the text.

Syntax:

 <msg aim="..."  text="..." type="ok|error" />

aim = "..." the operation's target, depending on the environment can be Actor or Target, inside a spell script Caster is a valid target.

text = "..." the text to display.

type = "ok|error" the type field is optional and tell the server if the message is an ordinary message or if an error or confirmation message to display on screen. Without this option the message is diplayed in the system message chat tab.


Examples: Raise the Actor's strength by 10 points and send a message to the user:

 <str aim="Actor" value="10"/>
 <msg aim="Actor" text="$Actor's strength has been increased by 10 points."/>

NPCCmdOp

NPCCmdOp - one-time npc command sending:

Example: <npccmd aim="Caster" cmd="spam spam spam spam...!"/>


StatsOp

Used to affect a character stat (agility, intelligence, ...). This is used to change a character's stats live in game. StatsAOp are buffable (see ApplicativeScript).

Syntax:

 <agi aim="..."  value="..."/> or
 <end aim="..."  value="..."/> or
 <str aim="..."  value="..."/> or
 <cha aim="..."  value="..."/> or
 <int aim="..."  value="..."/> or
 <wil aim="..."  value="..."/> or

aim = "..." the operation's target, depending on the environment can be Actor or Target, inside a spell script Caster is a valid target.

value = "..." a mathscript defined value.


Examples: Reduce Actor's physical stats by 10% and raise mental stats by 10 points:

 <str aim="Actor" value="-0.1*Actor:GetSkillValue(50)"/>
 <agi aim="Actor" value="-0.1*Actor:GetSkillValue(46)"/>
 <end aim="Actor" value="-0.1*Actor:GetSkillValue(48)"/>
 <cha aim="Actor" value="10"/>
 <int aim="Actor" value="10"/>
 <wil aim="Actor" value="10"/>

StatsAOp

Used to affect a character stat (agility, intelligence, ...) in Applied Mode.

This command works like a Stats Operation. No aim or Target needs to be declared.

Example:

 <str value="-0.1*Actor:GetSkillValue(50)"/>
 <agi value="-0.1*Actor:GetSkillValue(46)"/>
 <end value="-0.1*Actor:GetSkillValue(48)"/>
 <cha value="10"/>
 <int value="10"/>
 <wil value="10"/>

SkillOp

Used to affect a character skill (Alchemy, Melee, Herbal, ...). This is used to change a character's skill live in game. SkillAOp are buffable (see ApplicativeScript).

Used to affect in Applied Mode.

Syntax:

 <skill aim="..."  value="..."/>

aim = "..." the operation's target, depending on the environment can be Actor or Target, inside a spell script Caster is a valid target.

value = "..." a mathscript defined value.

Example:

 <skill aim="Actor" name="Red Way" value="-10"/>
 <skill aim="Actor" name="Brown Way" value="10"/>

SkillAOp

Used to affect a character skill (Alchemy, Melee, Herbal, ...) in Applied Mode.

This command works like a Skill Operation. No aim or Target needs to be declared.

Example:

 <skill name="Red Way" value="-10"/>
 <skill name="Brown Way" value="10"/>

TeleportOp

Example:

<teleport aim="Target" sector="bdroad2" x="-178.17" y="48.19" z="551.82" instance="0" />

TraitChangeOp

Used to create a change in character traits. This is used to change a character's appearance live in game. It takes the trait ID number and sends a broadcast out to all the players in range about the change.

Syntax:

 <trait value="#"/>
 value = "#" index id key into traits table

Examples: You apply trait 100 (grey hair) to actor and send message:

 <trait value="100" /><msg aim="actor" text="You drop the liquid on your hair."/>

TutorialMsgOp

TutorialMsgOp activates a tutorial window on the client with the specified message. The message is taken from tips table in the database.

Example: <tutorialmsg aim="Target" num="TutorialTipID"/>

VariableSetOp

This is permanent. Note that if the variable is set already it will be overwritten.

Example: \<variable aim="Actor" name="LOVEDBYKLYROS" value="true"/>

This sets the variable LOVEDBYKLYROS and sets it's value to "true".

VariableUnSetOp

Example: <variable aim="Actor" name="LOVEDBYKLYROS" />

unset the variable LOVEDBYKLYROS

VitalOp

imperative mana & stamina, but not HP

Example: <mana aim="Caster" value="-5"/>

VitalAOp

Change the vital statistics (HP, Mana, ... but not Hit Points) of a character in Applied mode.

Syntax:

 <mana-rate     value="..."/> or
 <pstamina-rate value="..."/> or
 <mstamina-rate value="..."/> or
 <hp-max        value="..."/> or
 <mana-max      value="..."/> or
 <pstamina-max  value="..."/> or
 <mstamina-max  value="..."/> or

value = "..." a mathscript defined value.

Examples: Increase the Actor vitals by 10 points:

 <mana-rate     value="10"/>
 <pstamina-rate value="10"/>
 <mstamina-rate value="10"/>
 <hp-max        value="10"/>
 <mana-max      value="10"/>
 <pstamina-max  value="10"/>
 <mstamina-max  value="10"/>