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-nmm6 (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-nmm6 (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-nmm6 (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
Unequip gloves, arms, and help when use archery.
Author Message
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #2
RE: Unequip gloves, arms, and help when use archery.
PHP Code:
[typedef t_weapon_bow]
on=@equip
src
.unequip_helm_gloves

[typedef t_weapon_xbow]
on=@equip
src
.unequip_helm_gloves


[function unequip_helm_gloves]
for 
6 7
if (<findlayer.<local._for>>)
   if (<
findlayer.<local._for>.isavaiblewitharchery> = 0)
        
findlayer.<local._for>.cont=<findlayer.layer_pack>
   endif
endif
endfor
  

[
typedef t_armor]
on=@equiptest
if ((<findlayer.layer_hand2.type> = t_weapon_bow) || (<findlayer.layer_hand2.type> = t_weapon_xbow))
    if (<
isavaiblewitharchery> = 0)
        return 
1
    
endif
endif
 

[function 
isavaiblewitharchery]
if <
type> != t_armor
    
return 1
else
     
local.dispidsi=<serv.itemdef.<baseid>.dispid//aganist flipping
     
if (<serv.itemdef.<local.dispidsi>.tag0.noarchery> = 1//with that line you don't need to add tag.noarchery to gold, blackrock etc. items
         
return 0
    
endif
endif
return 
1


//example item def.

[ITEMDEF 01412]
DEFNAME=i_platemail_helm
TYPE
=T_ARMOR
FLIP
=1
RESOURCES
=15 i_ingot_iron
WEIGHT
=10
ARMOR
=40
REQSTR
=60
CATEGORY
=Provisions Armor
SUBSECTION
=Platemail Armor
DESCRIPTION
=Platemail Helm
DUPELIST
=01419
SKILLMAKE
=BLACKSMITHING 62.6
TAG
.NOARCHERY=//NO ARCHERY

ON=@Create
COLOR
=color_o_iron
HITPOINTS
={50 60
(This post was last modified: 08-28-2012 02:38 AM by Shaklaban.)
08-27-2012 08:44 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Unequip gloves, arms, and help when use archery. - Shaklaban - 08-27-2012 08:44 PM

Forum Jump:


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