Difference between revisions of "Artifice"

From The Cleft of Dimensions Wiki
Jump to: navigation, search
m
m (Scrolls)
 
Line 15: Line 15:
  
 
Reciting a scroll that casts multiple spells only causes as much lag as the slowest spell used.
 
Reciting a scroll that casts multiple spells only causes as much lag as the slowest spell used.
 +
 +
A scroll with the eventitem flag set will not cast any spells, but instead execute the mobprog specified in its v0 value.
  
 
===Item Values===
 
===Item Values===

Latest revision as of 10:45, 3 August 2019

Try typing 'practice artifice' a few times there, buddy!

The Artifice skill governs the use of Scrolls, Wands, Staffs, Rods, and Event Items. All players receive the Artifice skill for free at level 1. It isn't hard to practice to 60%.

The chance of successfully activating an Artifice item is roughly the same as the character's Artifice skill level. If an Artifice item has the 'nochk' extra flag then it will work regardless of the character's Artifice skill.

Using a spell from an item causes the same amount of lag to the player as that spell normally causes. The Nimblehands skill can halve this lag.

Scrolls

Scrolls cast one to four spells on a single target.

To use a scroll, a player only needs to have it in their inventory (but not inside a container). Typing recite (scroll) (target) will activate the scroll. With some spells and in some situations, the target is optional.

Scrolls are consumed when activated. Failure to activate the scroll correctly will consume it anyway.

Reciting a scroll that casts multiple spells only causes as much lag as the slowest spell used.

A scroll with the eventitem flag set will not cast any spells, but instead execute the mobprog specified in its v0 value.

Item Values

  • [v0] Level: Level that the spells are cast at
  • [v1] Spell: The first spell that it casts
  • [v2] Spell: The second spell that it casts
  • [v3] Spell: The third spell that it casts
  • [v4] Spell: The fourth spell that it casts

Zappable Items Overview

Wands, Staffs, Rods, and Event Items have different properties but are all activated in the exact same way.

Zappable items must first be worn before they can be used. If the item is in the 'held' slot, then the player can type zap (target) to use it. If it's in a different slot, the player must type use (item) (target).

With some spells and in some situations, the target is optional.

When a Wand, Staff, or Event item is out of charges, it is destroyed unless it has the noexplode extra flag set.

Wands

Wands cast one spell on a single target and have finite charges.

Wands can be recharged with the Summoner class's Recharge spell. Recharge can add charges up to the wand's maximum, but always sets its maximum charges to zero.

Item Values

  • [v0] Level: Level that the spell is cast it.
  • [v1] Charges Total: Maximum charges.
  • [v2] Charges Left: Number of charges left.
  • [v3] Spell: Which spell the wand or spell casts.

Staffs

Staffs cast one spell on multiple targets and have finite charges.

A staff with an offensive spell will try to cast it on every NPC in the room. A staff with a defensive spell will cast it on everyone in the player's party. Any other type of spell (area-affect, self-only) will only be cast once.

Staffs can be created by players with the Sorceror class's Staffify ability.

Staffs can be recharged with the Summoner class's Recharge spell. Recharge can add charges up to the staff's maximum, but always sets its maximum charges to zero.

Item Values

  • [v0] Level: Level that the spell is cast it.
  • [v1] Charges Total: Maximum charges.
  • [v2] Charges Left: Number of charges left.
  • [v3] Spell: Which spell the wand or spell casts.

Rods

Rods cast one spell on a single target and have infinite charges, but also have a cooldown period before they can be used again. Rods with zero cooldown can be used rapidly.

Rods are never destroyed through use but cannot be Recharged.

Item Values

  • [v0] Level: The level that the spell is cast at.
  • [v1] Lag Time: The number of obj pulses (minutes) before you can use the item again.
  • [v2] Spell: Which spell this item casts.
  • [v3] Cooldown left: Number of obj pulses (minutes) until usable again.
    • This cannot be set on the object's template, but is set equal to v4 when the object is used and then decreased by 1 every pulse until it reaches 0, rendering the object usable again.

Event Items

Event items execute a script (mobprog), and can have finite or infinite charges, and may or may not also have a cooldown.

If an Event item has a finite number of charges, it will be destroyed when it's empty whether it also has a cooldown or not. Event items with a cooldown but infinite charges will never be destroyed through use but cannot be Recharged.

Using an Event item causes no lag to the player, whether they have the Nimblehands skill or not.

Item Values

  • [v0] Mprog number: The mprog you want this item to call goes here
  • [v1] Charges Total: Maximum charges
  • [v2] Charges Left: Charges left
  • [v3] Cooldown left: Number of obj pulses (minutes) until usable again
    • This cannot be set on the object's template, but is set equal to v4 when the object is used and then decreased by 1 every pulse until it reaches 0, rendering the object usable again.
  • [v4] Lag Time: The number of obj pulses (minutes) before you can use the item again.

Event Items and Mobprogs

The script executed by an event item is a normal mobprog, but there are some restrictions on what can or cannot be done with an event item: Players can't have a delay, counter, or remember target, so event items may need to load an intermediary mobile to do anything particularly complex.

Some variables act differently when an mprog is activated from an event item:

  • $n is a targetted mobile or player
  • $o is a targetted object
  • $i is the acting player
  • $p is the actual event item being activated

Since 'use' doesn't accept multiple targets, $n and $o cannot exist at the same time.

Note that players are considered to be vnum 0 when using a 'vnum $i' check.