Age4/object types: Difference between revisions
No edit summary |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
== How Scripting works == | == How Scripting works == | ||
Objects can have some code added to their action field to allow certain game actions such as buying an item or learning a skill. All objects that are clickable at all, may contain a object code script. The object code/script consists of the action name and some number of variables. Each type has its own interpretation of what these variables / values mean. | Objects can have some code added to their action field to allow certain game actions such as buying an item or learning a skill. All objects that are clickable at all, may contain a object code script. The object code/script consists of the action name and some number of variables. Each type has its own interpretation of what these variables / values mean. | ||
The following variables are available. The variables are always lowercase unless specified below: | |||
* '''type''' - What comes immediately after #type, ex: #type npc, the type is npc. | |||
* '''name''' - A string value used by scripts, if you have the name of something use name. Multi-word items need spaces replaced by underscore _. In other words "Long Item Name" should be Long_Item_Name. | |||
* '''id''' - An integer value used by scripts | |||
* '''val''' - An integer value used by scripts | |||
* '''range''' - Force a player to get close to an object to be able to use it. | |||
* '''npc''' - The name of the npc that this object will use custom messages from. Note this is different than the type npc. It is mostly used by alignment restricted actions to give the player a roleplaying reason of why they can't perform the action clicked on. | |||
* '''ali''' - Alignment requirement. Default: neutral. Must be one of the words: good, evil, or neutral. If set to good, it checks if the player alignment is greater than alv. If set to evil checks if the player alignment is less than alv. If set to neutral or otherwise not set, alignment setting is ignored. | |||
* '''alv''' - "Alignment Value" - An integer value | |||
* '''area''' - (not used) was for a feature that never made it in related to restricting usage of objects to a defined volume. This was a numeric id number that corresponded to an area system. | |||
== Player Usable == | == Player Usable == | ||
=== Banks === | |||
{{SubA|#type balance|balance}} | {{SubA|#type balance|balance}} | ||
{{SubA|#type deposit|deposit}} | |||
{{SubA|#type withdraw|withdraw}} | |||
=== Item Shops === | |||
{{SubA|#type buyitem|buyitem}} | {{SubA|#type buyitem|buyitem}} | ||
{{SubA|#type iteminfo|iteminfo}} | |||
{{SubA|#type pawn_apraise|pawn_apraise}} | |||
{{SubA|#type pawn_sell|pawn_sell}} | |||
{{SubA|#type sellitem|sellitem}} | |||
{{SubA|#type tradeitem|tradeitem}} | |||
=== Other === | |||
{{SubA|#type buyskill|buyskill}} | {{SubA|#type buyskill|buyskill}} | ||
{{SubA|#type class|class}} | {{SubA|#type class|class}} | ||
{{SubA|#type heal|heal}} | {{SubA|#type heal|heal}} | ||
{{SubA|#type loot|loot}} | {{SubA|#type loot|loot}} | ||
{{SubA|#type mheal|mheal}} | {{SubA|#type mheal|mheal}} | ||
{{SubA|#type none|none}} | {{SubA|#type none|none}} | ||
{{SubA|#type nonpc|nonpc}} | {{SubA|#type nonpc|nonpc}} | ||
{{SubA|#type npc|npc}} | {{SubA|#type npc|npc}} | ||
{{SubA|#type race|race}} | {{SubA|#type race|race}} | ||
{{SubA|#type recall|recall}} | {{SubA|#type recall|recall}} | ||
| Line 26: | Line 44: | ||
{{SubA|#type researchinfo|researchinfo}} | {{SubA|#type researchinfo|researchinfo}} | ||
{{SubA|#type researchstatus|researchstatus}} | {{SubA|#type researchstatus|researchstatus}} | ||
{{SubA|#type skillinfo|skillinfo}} | {{SubA|#type skillinfo|skillinfo}} | ||
{{SubA|#type tele|tele}} | {{SubA|#type tele|tele}} | ||
{{SubA|#type | |||
== Not Scriptable, but important == | |||
Certain commands still use object script, but even staff members attempting to create this will not be able to do so as they are either spawned objects or otherwise dynamic content and use data validation schemes. | |||
{{SubA|#type monster|monster}} | |||
{{SubA|#type unique_loot|unique_loot}} | {{SubA|#type unique_loot|unique_loot}} | ||
== Staff Usable == | == Staff Usable == | ||
The objects types are access restricted for various reasons as they tend to bypass a lot of checks and generally require minimum staff level access of 10 or higher to use | The objects types are access restricted for various reasons as they tend to bypass a lot of checks and generally require minimum staff level access of 10 or higher to use | ||
Latest revision as of 20:45, 6 June 2025
This is a listing of object types in the world that can be scripted by staff members and what they all do.
How Scripting works[edit]
Objects can have some code added to their action field to allow certain game actions such as buying an item or learning a skill. All objects that are clickable at all, may contain a object code script. The object code/script consists of the action name and some number of variables. Each type has its own interpretation of what these variables / values mean.
The following variables are available. The variables are always lowercase unless specified below:
- type - What comes immediately after #type, ex: #type npc, the type is npc.
- name - A string value used by scripts, if you have the name of something use name. Multi-word items need spaces replaced by underscore _. In other words "Long Item Name" should be Long_Item_Name.
- id - An integer value used by scripts
- val - An integer value used by scripts
- range - Force a player to get close to an object to be able to use it.
- npc - The name of the npc that this object will use custom messages from. Note this is different than the type npc. It is mostly used by alignment restricted actions to give the player a roleplaying reason of why they can't perform the action clicked on.
- ali - Alignment requirement. Default: neutral. Must be one of the words: good, evil, or neutral. If set to good, it checks if the player alignment is greater than alv. If set to evil checks if the player alignment is less than alv. If set to neutral or otherwise not set, alignment setting is ignored.
- alv - "Alignment Value" - An integer value
- area - (not used) was for a feature that never made it in related to restricting usage of objects to a defined volume. This was a numeric id number that corresponded to an area system.
Player Usable[edit]
Banks[edit]
|
|
|
Item Shops[edit]
|
|
|
|
|
|
Other[edit]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Not Scriptable, but important[edit]
Certain commands still use object script, but even staff members attempting to create this will not be able to do so as they are either spawned objects or otherwise dynamic content and use data validation schemes.
|
|
Staff Usable[edit]
The objects types are access restricted for various reasons as they tend to bypass a lot of checks and generally require minimum staff level access of 10 or higher to use
|
|
|
|