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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
easier way to type / layer shield?
Author Message
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #1
easier way to type / layer shield?
im looking for an easier way to find if its a shield...
in 51a amor and shields are both type 10, so i used baseid, but look how long this is... i need to add every shield in the game
IF ITS A SHIELD ONLY +9
IF ITS ARMS,GAUNTLETS,LEGS,CHEST,GORGET,HELM +25


Code:
IF (<SRC.TARG.BASEID>=01b72) || (<SRC.TARG.BASEID>=01b73) || (<SRC.TARG.BASEID>=01b74) || (<SRC.TARG.BASEID>=01b75) || (<SRC.TARG.BASEID>=04724) || (<SRC.TARG.BASEID>=01b77) || (<SRC.TARG.BASEID>=01b78) || (<SRC.TARG.BASEID>=01b79) || (<SRC.TARG.BASEID>=01b7a) || (<SRC.TARG.BASEID>=01b7b) || (<SRC.TARG.BASEID>=01bc3) || (<SRC.TARG.BASEID>=01bc4) || (<SRC.TARG.BASEID>=01bc5) || (<SRC.TARG.BASEID>=06006) || (<SRC.TARG.BASEID>=06007) || (<SRC.TARG.BASEID>=06346) || (<SRC.TARG.BASEID>=06356) || (<SRC.TARG.BASEID>=06336) || (<SRC.TARG.BASEID>=06326) || (<SRC.TARG.BASEID>=06386) || (<SRC.TARG.BASEID>=06316) || (<SRC.TARG.BASEID>=06366) || (<SRC.TARG.BASEID>=06376) || (<SRC.TARG.BASEID>=0478e) || (<SRC.TARG.BASEID>=0478f) || (<SRC.TARG.BASEID>=04790) || (<SRC.TARG.BASEID>=06137) || (<SRC.TARG.BASEID>=07467) || (<SRC.TARG.BASEID>=07437) || (<SRC.TARG.BASEID>=04723) || (<SRC.TARG.BASEID>=04724) || (<SRC.TARG.BASEID>=04725) || (<SRC.TARG.BASEID>=0470e) || (<SRC.TARG.BASEID>=0470f) || (<SRC.TARG.BASEID>=04710) || (<SRC.TARG.BASEID>=04815) || (<SRC.TARG.BASEID>=04816) || (<SRC.TARG.BASEID>=04817) || (<SRC.TARG.BASEID>=06167) || (<SRC.TARG.BASEID>=06147) || (<SRC.TARG.BASEID>=0457e) || (<SRC.TARG.BASEID>=0457f) || (<SRC.TARG.BASEID>=04580) || (<SRC.TARG.BASEID>=045ce) || (<SRC.TARG.BASEID>=045cf) || (<SRC.TARG.BASEID>=045d0) || (<SRC.TARG.BASEID>=06127) || (<SRC.TARG.BASEID>=06607) || (<SRC.TARG.BASEID>=0455e) || (<SRC.TARG.BASEID>=0455f) || (<SRC.TARG.BASEID>=04576) || (<SRC.TARG.BASEID>=06617) || (<SRC.TARG.BASEID>=04738) || (<SRC.TARG.BASEID>=04739) || (<SRC.TARG.BASEID>=0473a) || (<SRC.TARG.BASEID>=07447) || (<SRC.TARG.BASEID>=07457) || (<SRC.TARG.BASEID>=045a3) || (<SRC.TARG.BASEID>=045a4) || (<SRC.TARG.BASEID>=045a5) || (<SRC.TARG.BASEID>=04727) || (<SRC.TARG.BASEID>=04717) || (<SRC.TARG.BASEID>=04707) || (<SRC.TARG.BASEID>=0474e) || (<SRC.TARG.BASEID>=0474f) || (<SRC.TARG.BASEID>=04750) || (<SRC.TARG.BASEID>=06117) || (<SRC.TARG.BASEID>=045b8) || (<SRC.TARG.BASEID>=045b9) || (<SRC.TARG.BASEID>=045ba) || (<SRC.TARG.BASEID>=04763) || (<SRC.TARG.BASEID>=04764) || (<SRC.TARG.BASEID>=04765) || (<SRC.TARG.BASEID>=04586) || (<SRC.TARG.BASEID>=0456e) || (<SRC.TARG.BASEID>=0456f) || (<SRC.TARG.BASEID>=06157) || (<SRC.TARG.BASEID>=047a3) || (<SRC.TARG.BASEID>=047a4) || (<SRC.TARG.BASEID>=047a5) || (<SRC.TARG.BASEID>=04778) || (<SRC.TARG.BASEID>=04779) || (<SRC.TARG.BASEID>=0477a) || (<SRC.TARG.BASEID>=07306) || (<SRC.TARG.BASEID>=07301) || (<SRC.TARG.BASEID>=07305) || (<SRC.TARG.BASEID>=0600f) || (<SRC.TARG.BASEID>=07200) || (<SRC.TARG.BASEID>=07213) || (<SRC.TARG.BASEID>=07067) || (<SRC.TARG.BASEID>=0456f)//ALL BASE,ORE,HIDE,AGEIS,AZA,SPANK,RENZ,HOCKEYMASK,TAMEMASK,WIZHAT,ARMY - no boxingstuff,nadeball
  IF (<SRC.TARG.MOREY>>=9)
        SRC.SYSMESSAGE=This is the same or a more powerful shield!
        RETURN 1
  ELSE
    IF  (<SRC.TARG.ATTR>==04)
       SRC.TARG.ATTR=025
    ELSEIF (<SRC.TARG.ATTR>==0)
       SRC.TARG.ATTR=021
ENDIF
        SRC.TARG.MOREY=9
        SRC.CONSUME=1 06524
        SRC.SFX=32
        SRC.EFFECT=3,0375a,6,15,1
        SRC.SFX=0214
        SRC.SYSMESSAGE #0033,3, You have successfully upgraded your armor!
        RETURN 1
    ENDIF
ELSE
IF (<SRC.TARG.TYPE>==10)
  IF (<SRC.TARG.MOREY>>=25)
        SRC.SYSMESSAGE=This is the same or a more powerful piece of armor!
        RETURN 1
  ELSE
    IF  (<SRC.TARG.ATTR>==04)
       SRC.TARG.ATTR=025
    ELSEIF (<SRC.TARG.ATTR>==0)
       SRC.TARG.ATTR=021
ENDIF
        SRC.TARG.MOREY=25
        SRC.CONSUME=1 06524
        SRC.SFX=32
        SRC.EFFECT=3,0375a,6,15,1
        SRC.SFX=0214
        SRC.SYSMESSAGE #0033,3, You have successfully upgraded your armor!
        RETURN 1
    ENDIF
ELSE
    SRC.SYSMESSAGE=This is not a piece of armor!
    RETURN 1
ENDIF

crazy long... check for layer instead perhaps?

on a side note...
how do you do a range?

Code:
IF (<SRC.TARG.BASEID>={04905 04909 1}) || (<SRC.TARG.BASEID>={04910 04919 1}) || (<SRC.TARG.BASEID>={04920 04929 1}) || (<SRC.TARG.BASEID>={04930 04939 1})//DEF MAGITEMS
SRC.SYSMESSAGE=This armor is already magic and cannot be enhanced!
RETURN 1

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 02-10-2014 01:01 AM by x77x.)
02-10-2014 12:45 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
easier way to type / layer shield? - x77x - 02-10-2014 12:45 AM

Forum Jump:


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