From ff6a7baa2a4ac1896980cadede3ed53dc091caee Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 1 Sep 2008 08:06:46 +0000 Subject: Removed hardcoded equip position names from getequipname (bugreport:2156). Now it's the npc's responsibility to store and display the names. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13171 54d463be-8e91-2dee-dedb-b68131a5f0ec --- doc/script_commands.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index f76176b52..8b860eb33 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -120,6 +120,8 @@ //= unitskilluseid, unitskillusepos, bonus/bonus2/bonus3/bonus4/bonus5 //= 3.22.20080622 //= Extended 'set' to return the variable reference. [FlavioJS] +//= 3.22.20080901 +//= Adjusted the 'getequipname' description to match src [ultramage] //========================================================= This document is a reference manual for all the scripting commands and functions @@ -2187,17 +2189,16 @@ armor, but also don't want them to equip if after the check, you would do this: *getequipname() -This function will return the name of the item equipped in the specified -equipment slot on the invoking character. Almost identical to 'getequipid', good -for an NPC to state what your are wearing, or maybe saving as a string variable. +Returns the jname of the item equipped in the specified equipment slot on the +invoking character, or an empty string if nothing is equipped in that position. +Does the same thing as getitemname(getequipid()). Useful for an NPC to state +what your are wearing, or maybe saving as a string variable. See 'getequipid' for a full list of valid equipment slots. - if (getequipname(EQI_HEAD_TOP)==0) goto L_No_HeadGear; - mes "So you are wearing a "+getequipname(EQI_HEAD_TOP)+" on your head"; - close; - L_No_HeadGear: - mes "You are not wearing any head gear"; - close; + if( getequipname(EQI_HEAD_TOP) != "" ) + mes "So you are wearing a "+getequipname(EQI_HEAD_TOP)+" on your head"; + else + mes "You are not wearing any head gear"; --------------------------------------- -- cgit v1.2.3-70-g09d2