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
Armor Packing
Author Message
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #9
RE: Armor Packing
In fact... let me know how this works! Untested; but should be awesome. Basically it will let you store any armor type in the deed of each piece minus the shield (look it over to add that in). It will store the info via a tag system and unpack it via the same system. Meanwhile keeping the deed in existence, changing the name on it... and color.

Updated: Switched parsing to EXPLODE and remove OCOLOR variable and now storing colors via a def.

Code:
[itemdef i_armor_packing_deed]
id=i_deed
name=armor packing deed
type=t_normal
weight=1

category=Dat System
subsection=Dem Feels about Armor Packing
description=Armor Packing Deed

on=@Create
attr=attr_blessed
color=pack_deed_color
tag0.armor=0

on=@DClick
if (<cont> != <src>)
src.smsg This item must be in your backpack to use it.
return 1
endif

if (<tag.packed> == 1)
if (<cont> != <src>)
  src.smsg This item must be in your packpack to use it.
  return 1
endif

if !(<isempty <tag.arms>>)
  armor_unpack arms
endif
if !(<isempty <tag.gloves>>)
  armor_unpack gloves
endif
if !(<isempty <tag.chest>>)
  armor_unpack chest
endif
if !(<isempty <tag.legs>>)
  armor_unpack legs
endif
if !(<isempty <tag.helm>>)
  armor_unpack helm
endif
if !(<isempty <tag.collar>>)
  armor_unpack collar
endif

if (<def.pack_deed_remove> == 1)
  remove
  return 1
else
  tag.packed=
  tag0.armor=0
  color=pack_deed_color
  name=armor packing deed
  return 1
endif
endif

src.smsg Please target each piece of armor you would like to pack.
src.smsg Cancel targetting when you are done if the set is complete and less than a full set.
target
return 1

on=@TargOn_Item
// If the target is the deed and something was added we are going to finish the deed.
if (<argo.baseid> == i_armor_packing_deed)
if (<tag0.armor> > 0)
  src.smsg You have completed the deed.
  color=pack_deed_color_complete
  name=armor packing deed [complete]
  tag.packed=1
  return 1
endif
endif

// Check to be sure it is in the backpack.
if (<argo.cont> != <src>)
src.smsg You may only pack armor that is in your backpack.
return 1
endif

// If we are not armor it is time to try again.
if (<argo.isarmor> != 1)
src.smsg You may only pack armor with this deed.
src.smsg Please choose an armor piece.
target
return 1
endif

if (<argo.layer> == layer_arms)
pack_armor arms
elif (<argo.layer> == layer_chest)
pack_armor chest
elif (<argo.layer> == layer_gloves)
pack_armor gloves
elif (<argo.layer> == layer_legs)
pack_armor legs
elif (<argo.layer> == layer_helm)
pack_armor helm
elif (<argo.layer> == layer_collar)
pack_armor collar
endif

[function unpack_armor]
args=<tag.<args>>
serv.newitem=<argv[0]>
new.color=<argv[1]>
new.more1l=<argv[2]>
new.more1h=<argv[3]>
new.attr=<argv[4]>
new.bounce

[function pack_armor]
// pack_armor legs
if (<tag.armor> &pack_<args>)
src.smsg You already have a <args> piece packed.
target
return 1
endif

tag.<args>=<argo.id>,<argo.color>,<argo.more1l>,<argo.more1h>,<argo.attr>
argo.remove
tag0.armor |pack_<args>
if (<tag0.armor> &03F)
src.smsg You have completed the deed.
color=pack_deed_color_complete
name=armor packing deed [complete]
tag.packed=1
return 1
else
src.smsg Please choose the next piece of armor to pack. Target the deed if you are done.
target
return 1
endif

[defname armor_packing_flags]
pack_arms            01
pack_chest            02
pack_gloves            04
pack_legs            08
pack_helm            010
pack_collar            020

[defname armor_packing_controls]
pack_deed_color            020    // base color.
pack_deed_color_complete    030    // completed color.
pack_deed_remove        0    // 0 dont remove, 1 remove after use.
pack_armor_strict        0    // 1 on and 0 off.





[eof]

If there is any issues let me know and I will correct it. But damn that is awesome looking. You are welcome for like an hour of my life (not really, time is accurate; but I was talking to XuN the entire time too; so really 15 minutes). lol!
(This post was last modified: 12-29-2013 08:00 AM by Khaos.)
12-29-2013 05:38 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Armor Packing - Runcuks - 12-19-2013, 09:34 PM
RE: Armor Packing - Soulless - 12-20-2013, 08:14 AM
RE: Armor Packing - Avatar - 12-20-2013, 10:23 AM
RE: Armor Packing - Runcuks - 12-20-2013, 03:45 PM
RE: Armor Packing - Anarch Cassius - 12-20-2013, 06:37 PM
RE: Armor Packing - Avatar - 12-20-2013, 06:41 PM
RE: Armor Packing - Runcuks - 12-20-2013, 08:24 PM
RE: Armor Packing - Khaos - 12-29-2013, 03:39 AM
RE: Armor Packing - Khaos - 12-29-2013 05:38 AM
RE: Armor Packing - Khaos - 12-29-2013, 06:48 AM
RE: Armor Packing - Extreme - 12-29-2013, 06:59 AM
RE: Armor Packing - Khaos - 12-29-2013, 07:06 AM

Forum Jump:


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