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 getequipweaponlv:
 
* getequipweaponlv <slot>;
 
This function returns the weapon level for the weapon equipped in the specified
equipment slot on the invoking character. For a list of equipment slots see
'getequipid'.

Only 3 (Left hand) and 4 (Right hand) normally make sense, since only weapons
have a weapon level. You can, however, probably, use this field for other
equippable custom items as a flag or something.
If no item is equipped in this slot, or if it doesn't have a weapon level
according to the database, 0 will be returned.

if(getequipweaponlv(4)==0) mes "Seems you don't have a weapon on";
if(getequipweaponlv(4)==1) mes "You are holding a lvl 1 weapon";
if(getequipweaponlv(4)==2) mes "You are holding a lvl 2 weapon";
if(getequipweaponlv(4)==3) mes "You are holding a lvl 3 weapon";
if(getequipweaponlv(4)==4) mes "You are holding a lvl 4 weapon";
if(getequipweaponlv(4)==5) mes "You are holding a lvl 5 weapon, hm, must be a custom design";

Or for the left hand, cause it can hold a weapon or a shield:

if(getequipid(3)==0) goto L_NothingEquiped;
if(getequipweaponlv(3)==0) mes "You are holding a shield, so it doesnt have a level";
if(getequipweaponlv(3)==1) mes "You are holding a lvl 1 weapon";
if(getequipweaponlv(3)==2) mes "You are holding a lvl 2 weapon";
if(getequipweaponlv(3)==3) mes "You are holding a lvl 3 weapon";
if(getequipweaponlv(3)==4) mes "You are holding a lvl 4 weapon";
if(getequipweaponlv(3)==5) mes "You are holding a lvl 5 weapon, hm, must be a custom design";
close;
L_NothingEquiped:
mes "Seems you have nothing equiped";
close;

Valid XHTML 1.0 Strict Valid CSS!