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: #1
Question typedef question
Need to know how I can add a [typedef t_plate] only with gloves and arms platemail (in general, any mineral).

The script is to uneqeuip all the arms and gloves when you equip a bow or xbow, but I need it to be just the type platemail.

Code:
[TYPEDEF T_PLATE]

[TYPEDEF T_SACARBRAZOSYGLOVES]

ON=@EQUIP
IF ( <SRC.FINDLAYER.LAYER_GLOVES>  || <SRC.FINDLAYER.LAYER_ARMS>) && ((<SRC.FINDLAYER.LAYER_HAND2.TYPE> == T_WEAPON_BOW) || (<SRC.FINDLAYER.LAYER_HAND2.TYPE> == T_WEAPON_XBOW))
  SRC.FINDLAYER.LAYER_GLOVES.UNEQUIP
   SRC.FINDLAYER.LAYER_ARMS.UNEQUIP
    SRC.SYSMESSAGE @70 Si usas un arco no puedes usar guantes y brazos platemail!
   RETURN 1
  ELSE
ENDIF

I think something (<SRC.FINDLAYER.LAYER_GLOVES.TYPE> == T_PLATE) .

Thanks
(This post was last modified: 08-31-2012 01:11 PM by daedelus.)
08-31-2012 01:07 PM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #2
RE: typedef question
I was pretty sure this was answered yesterday. Yep, this was already requested a few days ago here: http://forum.spherecommunity.net/showthr...p?tid=1711

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
08-31-2012 02:34 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

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



Post: #3
RE: typedef question
Yes i saw, but i'm trying to make myself... The scripts works, but i like to unequip only plate parts.

Thanks
(This post was last modified: 08-31-2012 09:48 PM by daedelus.)
08-31-2012 09:44 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: typedef question
@equip
For 1 24
If strmatch(*t_plate*,<src.findlayer.<dlocal._for>>)
Src.findlayer.<dlocal._for>.unequip
Endif
Endfor

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-01-2012 02:29 AM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

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



Post: #5
RE: typedef question
(09-01-2012 02:29 AM)Extreme Wrote:  @equip
For 1 24
If strmatch(*t_plate*,<src.findlayer.<dlocal._for>>)
Src.findlayer.<dlocal._for>.unequip
Endif
Endfor

Can you explain me For 1 24?.

I think this :

Code:
[FUNCTION F_SACAR_ARMS_GLOVES]

ON=@EQUIP
IF ((<SRC.FINDLAYER(7).BASEID>==i_<ARGV[0]>_platemail_Gauntlets) || (<UID.<ARGV[1]>.BASEID>==i_<ARGV[0]>_platemail_Gauntlets) || (<SRC.FINDLAYER(19).BASEID>==i_<ARGV[0]>_platemail_arms) || (<UID.<ARGV[1]>.BASEID>==i_<ARGV[0]>_platemail_arms)) && ((<SRC.FINDLAYER.LAYER_HAND2.TYPE> == T_WEAPON_BOW) || (<SRC.FINDLAYER.LAYER_HAND2.TYPE> == T_WEAPON_XBOW))
SRC.FINDLAYER.LAYER_HAND2.TYPE == T_WEAPON_BOW.EQUIP || SRC.FINDLAYER.LAYER_HAND2.TYPE == T_WEAPON_XBOW.EQUIP
  SRC.FINDLAYER.LAYER_GLOVES.UNEQUIP
   SRC.FINDLAYER.LAYER_ARMS.UNEQUIP
    SRC.SYSMESSAGE @70 Si usas un arco no puedes usar guantes y brazos platemail!
   RETURN 1
  ELSE
ENDIF

[FUNCTION F_ARCO]

ON=@EQUIP
IF ((<SRC.FINDLAYER.LAYER_HAND2.TYPE> == T_WEAPON_BOW) || (<SRC.FINDLAYER.LAYER_HAND2.TYPE> == T_WEAPON_XBOW)) && ((<SRC.FINDLAYER(7).BASEID>==i_<ARGV[0]>_platemail_Gauntlets) || (<UID.<ARGV[1]>.BASEID>==i_<ARGV[0]>_platemail_Gauntlets) || (<SRC.FINDLAYER(19).BASEID>==i_<ARGV[0]>_platemail_arms) || (<UID.<ARGV[1]>.BASEID>==i_<ARGV[0]>_platemail_arms))
  SRC.FINDLAYER.LAYER_GLOVES.UNEQUIP
   SRC.FINDLAYER.LAYER_ARMS.UNEQUIP
    SRC.SYSMESSAGE @70 Si usas un arco no puedes usar guantes y brazos platemail!
   RETURN 1
  ELSE
ENDIF
ENDIF

Thanks
(This post was last modified: 09-01-2012 04:00 AM by daedelus.)
09-01-2012 03:42 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #6
RE: typedef question
PHP Code:
ON=@ITEMEQUIPTEST
IF STRMATCH(*T_BOW*,<ACT.TYPE>)
 IF 
STRMATCH(*T_PLATE*,<SRC.FINDLAYER.LAYER_GLOVES.TYPE>)
  
SRC.FINDLAYER.LAYER_GLOVES.UNEQUIP
 
ENDIF
 IF 
STRMATCH(*T_PLATE*,<SRC.FINDLAYER.LAYER_ARMS.TYPE>)
  
SRC.FINDLAYER.LAYER_ARMS.UNEQUIP
 
ENDIF
ENDIF
IF 
STRMATCH(*T_PLATE*,<ACT.TYPE>) && ((<ACT.LAYER> == LAYER_ARMS) || (<ACT.LAYER> == LAYER_GLOVES))
 IF 
STRMATCH(*T_BOW*,<SRC.FINDLAYER.2.TYPE>)
  
SRC.FINDLAYER.2.UNEQUIP
 
ENDIF
ENDIF 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 09-01-2012 05:50 AM by Extreme.)
09-01-2012 05:48 AM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

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



Post: #7
RE: typedef question
you can explain me this script? Smile

Thanks
09-01-2012 07:46 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #8
RE: typedef question
No. Read it and understand your self.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-01-2012 08:55 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #9
RE: typedef question
It's not hard...

When you equip this, check for that and if present unequip

[Image: 2nis46r.jpg]
09-01-2012 11:53 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

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



Post: #10
RE: typedef question
Ok, i understand this, but this For 1 24? 1 24 ?.

Thanks
09-03-2012 09:52 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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