To slot: Difference between revisions
Jump to navigation
Jump to search
imported>Heeheehee m Oh no, this page broke the wiki's formatting! (Fixed, hopefully) |
imported>Heeheehee m Erm, meant the code sample comment to be here. :P |
||
Line 21: | Line 21: | ||
* Non-equipment items return $slot[none]. | * Non-equipment items return $slot[none]. | ||
* Ranged and melee weapons return $slot[weapon], even if you have double fisted skull-smashing. | * Ranged and melee weapons return $slot[weapon], even if you have double fisted skull-smashing. | ||
* All accessories return $slot[acc1]. | * All accessories return $slot[acc1]. | ||
| | | ||
code1={{CodeSample| | code1={{CodeSample| | ||
title=Code Samples| | title=Code Samples| |
Revision as of 06:11, 28 April 2010
Function Syntax
- equip is any item where you want to know which slot it is equipped to.
This function will return the slot that any item is equipped to.
Note:
- Non-equipment items return $slot[none].
- Ranged and melee weapons return $slot[weapon], even if you have double fisted skull-smashing.
- All accessories return $slot[acc1].
Code Samples
This code will equip a star sword if the slot it goes in is empty.
if(have_equipped(to_slot($item[star sword]) == $item[none]) {
equip($item[star sword]);
}