Age4/object types: Difference between revisions

From zoywiki.com
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 7: Line 7:
The following variables are available. The variables are always lowercase unless specified below:
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.
* '''type''' - What comes immediately after #type, ex: #type npc, the type is npc.
* '''name''' - A string value used by scripts
* '''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
* '''id''' - An integer value used by scripts
* '''val''' - An integer value used by scripts
* '''val''' - An integer value used by scripts
Line 17: Line 17:


== 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 deposit|deposit}}
{{SubA|#type heal|heal}}
{{SubA|#type heal|heal}}
{{SubA|#type iteminfo|iteminfo}}
{{SubA|#type loot|loot}}
{{SubA|#type loot|loot}}
{{SubA|#type mheal|mheal}}
{{SubA|#type mheal|mheal}}
Line 29: Line 39:
{{SubA|#type nonpc|nonpc}}
{{SubA|#type nonpc|nonpc}}
{{SubA|#type npc|npc}}
{{SubA|#type npc|npc}}
{{SubA|#type pawn_apraise|pawn_apraise}}
{{SubA|#type pawn_sell|pawn_sell}}
{{SubA|#type race|race}}
{{SubA|#type race|race}}
{{SubA|#type recall|recall}}
{{SubA|#type recall|recall}}
Line 36: Line 44:
{{SubA|#type researchinfo|researchinfo}}
{{SubA|#type researchinfo|researchinfo}}
{{SubA|#type researchstatus|researchstatus}}
{{SubA|#type researchstatus|researchstatus}}
{{SubA|#type sellitem|sellitem}}
{{SubA|#type skillinfo|skillinfo}}
{{SubA|#type skillinfo|skillinfo}}
{{SubA|#type tele|tele}}
{{SubA|#type tele|tele}}
{{SubA|#type tradeitem|tradeitem}}
{{SubA|#type withdraw|withdraw}}


== Not Scriptable, but important ==
== Not Scriptable, but important ==

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]

#type balance

This displays the players current bank balance.

Example Usage

#type balance

Required Variables none

Alignment Restrictable: Yes

#type deposit

Deposits a Percentage of the players gp into their bank gp. All bank gp is the same value and is immune to death penalty. When gp is stored in a bank it also cannot be used to purchase items.

Example Usage

Deposit 50% of a players currently held gp into the bank.

#type deposit id=50

Required Variables

id - the percentage of gp to deposit

Alignment Restrictable: Yes

#type withdraw

Withdraws a percentage of the players bank gp to their currently held gp.

Example Usage

Withdraws all of a players bank gp that is stored in the bank.

#type withdraw id=100

Required Variables

id - the percentage of gp to withdraw

Alignment Restrictable: Yes

Item Shops[edit]

#type buyitem

Allows the purchase of an item from a shop. Multiple items can be specified to buy at once. All normal restrictions such as full inventory, maximum items in a stack, etc are followed. You will always purchase as many as able if configured for more than 1.

Example Usage

Buy a single item or equipment

#type buyitem name=Sword

Buy 5 of the same item

#type buyitem name=Potion val=5

Required Variables

name - The name of the item.

Optional Variables

val - how many to buy. Default is always 1, and can never be less than 1.

Alignment Restrictable: Yes

#type iteminfo

Shows an item description of an item. If the item is an equipment also display the equipment stats relative to the player level.

Example Usage

#type iteminfo name=Potion

Required Variables

name - The name of the item.

Alignment Restrictable: Yes

#type pawn_apraise

Tells you how much the item with /sell will sell for to a pawn shop.

Example Usage

#type pawn_appraise

Required Variables

none

Optional Variables

npc

Alignment Restrictable: No

#type pawn_sell

Information on #type pawn_sell has not been input into the wiki. Please click here to add it.

#type sellitem

Information on #type sellitem has not been input into the wiki. Please click here to add it.

#type tradeitem

Information on #type tradeitem has not been input into the wiki. Please click here to add it.

Other[edit]

#type buyskill

Information on #type buyskill has not been input into the wiki. Please click here to add it.

#type class

Information on #type class has not been input into the wiki. Please click here to add it.

#type heal

Information on #type heal has not been input into the wiki. Please click here to add it.

#type loot

Information on #type loot has not been input into the wiki. Please click here to add it.

#type mheal

Information on #type mheal has not been input into the wiki. Please click here to add it.

#type none

Information on #type none has not been input into the wiki. Please click here to add it.

#type nonpc

Information on #type nonpc has not been input into the wiki. Please click here to add it.

#type npc

Information on #type npc has not been input into the wiki. Please click here to add it.

#type race

(Deprecated #type)

This type selects which race a player will have during character creation. However the character creation area has been replaced by a HUD based system. So while still technically possible to use this type it only applies to new characters which have not already otherwise selected a race using which ever method.

#type recall

Information on #type recall has not been input into the wiki. Please click here to add it.

#type researchdonate

Information on #type researchdonate has not been input into the wiki. Please click here to add it.

#type researchinfo

Information on #type researchinfo has not been input into the wiki. Please click here to add it.

#type researchstatus

Information on #type researchstatus has not been input into the wiki. Please click here to add it.

#type skillinfo

Information on #type skillinfo has not been input into the wiki. Please click here to add it.

#type tele

Information on #type tele has not been input into the wiki. Please click here to add it.

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.

#type monster

Information on #type monster has not been input into the wiki. Please click here to add it.

#type unique_loot

Information on #type unique_loot has not been input into the wiki. Please click here to add it.

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

#type aliset

Information on #type aliset has not been input into the wiki. Please click here to add it.

#type gpadd

Information on #type gpadd has not been input into the wiki. Please click here to add it.

#type expadd

Information on #type expadd has not been input into the wiki. Please click here to add it.

#type skilladd

Information on #type skilladd has not been input into the wiki. Please click here to add it.