The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
typedef question
Author Message
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #17
RE: typedef question
Code:
[FUNCTION F_DESEQUIPAR]
ON=@ITEMEQUIPTEST
//Is the player equipping a bow?
IF STRMATCH(*T_BOW*,<ACT.TYPE>)
   //Player wants to equip a bow, first check if they are wearing gloves
   IF (<SRC.FINDLAYER.LAYER_GLOVES>)
      //They are wearing gloves... but what kind?
      IF STRMATCH(*T_PLATE*,<SRC.FINDLAYER.LAYER_GLOVES.TYPE>)
         //They are plate, so unequip them
         SRC.FINDLAYER.LAYER_GLOVES.UNEQUIP
      ENDIF
   ENDIF
   //Are they wearing arms?
   IF (<SRC.FINDLAYER.LAYER_ARMS>)
      //They are wearing arms... but what kind?
      IF STRMATCH(*T_PLATE*,<SRC.FINDLAYER.LAYER_ARMS.TYPE>)
         //They are plate, so unequip them
         SRC.FINDLAYER.LAYER_ARMS.UNEQUIP
      ENDIF
   ENDIF
ENDIF
//Is the player equipping arms or gloves made of plate?
IF ((<ACT.LAYER> == LAYER_ARMS) || (<ACT.LAYER> == LAYER_GLOVES)) && (STRMATCH(*T_PLATE*,<ACT.TYPE>))
   //The player wants to equip plate arms or gloves, so check if they have a weapon in their second hand
   IF (<SRC.FINDLAYER.LAYER_HAND2>)
      //They do have an item in their second hand... is it a bow?
      IF STRMATCH(*T_BOW*,<SRC.FINDLAYER.2.TYPE>)
         //They are wielding a bow, so unequip it
         SRC.FINDLAYER.2.UNEQUIP
      ENDIF
   ENDIF
ENDIF
[/quote]

On item :
TEVENTS=t_type

ON=@create
blablalba

ON=@equip
call f_desequipar

And do nothing Confused and don't give me errors. Sorry men, i don't understand.
09-05-2012 12:32 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
typedef question - daedelus - 08-31-2012, 01:07 PM
RE: typedef question - Skul - 08-31-2012, 02:34 PM
RE: typedef question - daedelus - 08-31-2012, 09:44 PM
RE: typedef question - Extreme - 09-01-2012, 02:29 AM
RE: typedef question - daedelus - 09-01-2012, 03:42 AM
RE: typedef question - Extreme - 09-01-2012, 05:48 AM
RE: typedef question - daedelus - 09-05-2012, 08:15 AM
RE: typedef question - daedelus - 09-01-2012, 07:46 AM
RE: typedef question - Extreme - 09-01-2012, 08:55 AM
RE: typedef question - Mordaunt - 09-01-2012, 11:53 AM
RE: typedef question - daedelus - 09-03-2012, 09:52 PM
RE: typedef question - Shaklaban - 09-03-2012, 10:00 PM
RE: typedef question - Mordaunt - 09-04-2012, 03:37 AM
RE: typedef question - RanXerox - 09-05-2012, 08:52 AM
RE: typedef question - daedelus - 09-05-2012 12:32 PM
RE: typedef question - daedelus - 09-05-2012, 09:27 AM
RE: typedef question - RanXerox - 09-05-2012, 09:41 AM
RE: typedef question - RanXerox - 09-05-2012, 12:48 PM
RE: typedef question - daedelus - 09-05-2012, 10:05 PM

Forum Jump:


User(s) browsing this thread: 6 Guest(s)