Search the Commands

Home  All  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z 

Details for command getequipid:
 
* getequipid <slot>;
 
This function returns the item ID of the item equipped in the equipment slot
specified on the invoking character. If nothing is equpped there, it returns -1.
Valid equipment slots are:

1 - Upper head gear
2 - Armor (Where you keep your Jackets and Robes)
3 - What is in your Left hand.
4 - What is in your Right hand.
5 - The garment slot (Mufflers, Hoods, Manteaus)
6 - What foot gear the player has on.
7 - Accessory 1.
8 - Accessory 2.
9 - Middle Headgear (masks and glasses)
10 - Lower Headgear (beards, some masks)

Notice that a few items occupy several equipment slots, and if the character is
wearing such an item, 'getequipid' will return it's ID number for either slot.

Can be used to check if you have something equiped, or if you haven't got
something equiped:

if(getequipid(1)==2234) goto L_WearingTiara;
mes "Come back when you have a Tiara on";
close;
L_WearingTiara:
mes "What a lovely Tiara you have on";
close;

You can also use it to make sure people don't pass a point before removing an
item totally from them. Let's say you don't want people to wear Legion Plate
armor, but also don't want them to equip if after the check, you would do this:

if ((getequipid(2) == 2341) || (getequipid(2) == 2342) goto L_EquipedLegionPlate;
// the || is used as an or argument, there is 2341 and 2342 cause there are
// two different legion plate armors, one with a slot one without.
if ((countitem(2341) > 0) || (countitem(2432) > 0) goto L_InventoryLegionPlate;
mes "I will lets you pass";
close2;
warp "place",50,50;
end;
L_EquipedLegionPlate:
mes "You are wearing some Legion Plate Armor, please drop that in your stash before continuing";
close;
L_InventoryLegionPlate:
mes "You have some Legion Plate Armor in your inventory, please drop that in your stash before continuing";
close;

Valid XHTML 1.0 Strict Valid CSS!