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
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #1
Armor Packing
Hi, could someone please share Armor Packing script ?
12-19-2013 09:34 PM
Find all posts by this user Like Post Quote this message in a reply
Soulless
Super Moderator
****

Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12

Ye Olde Sphere

Post: #2
RE: Armor Packing
What is armor packing?

What am I working on?
12-20-2013 08:14 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #3
RE: Armor Packing
I suppose he just mentions about armor store or whatever like that ? Like assembling each item of armor set into one peace as deed or so ?

What do you really mean my friend Big Grin
12-20-2013 10:23 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #4
RE: Armor Packing
I mean , for example if have player full iron platemail armor, he can pack it into one peace bag,deed etc, and dclick that bag or deed player will get the same Iron Platemail armor.
Just like Avatar wrote.

And ofcourse sorry for my bad english Sad
(This post was last modified: 12-20-2013 03:47 PM by Runcuks.)
12-20-2013 03:45 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #5
RE: Armor Packing
Umm, hate to be a smart ass, but what about a bag?

I'm honestly trying to see what you couldn't do with a normal container. Player vendors can sell containers and they are easy in the trade window. I suppose you can't see the bag CONTENTS in the trade window. Really you need to get a bit clearer on desired features, I'm not sure something like this exists but you may be able to modify something.

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
12-20-2013 06:37 PM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #6
RE: Armor Packing
Why dont you make this with tagging.

For instance, create an item ad deed ,

[itemdef i_deed_store_set]
id i_deed
type t_script /or whatever you want
name
color
etc..

on=@create
tag.glove
tag.gorget
tag.etc etc etc.... // You donot need to put tags at the beginning but i just show you how you gonna do.

Then

on=@dclick
target Which set item you would like to store ?

on=@targot_item
if <argo.type> = t_armor_etc etc ec // arrange here.
argo.remove
tag.<argo.id> 1 // for instance.
tag.set_total ++
return 1
endif

if <tag0.set_total> == 5 // for instance
// here just put serv.newitem from tags to create sets you stored.
endif


Only thing you need targeting items that you want to store and remove them, tag them to deed and once you store all item you want to store , limit # of items that set should have by tagging. That's all.

You can make like that. I saw your post befor i go to colleage therefore, I'm writing too fast and just try to get the analogy.
(This post was last modified: 12-20-2013 06:43 PM by Avatar.)
12-20-2013 06:41 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #7
RE: Armor Packing
Ok ty guys i will do my best Smile
12-20-2013 08:24 PM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

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



Post: #8
RE: Armor Packing
Code:
[template loot_platemail_armor]
category=Whatever
subsection=Whatever
description=Platemail Armor Set
CONTAINER=i_bag
item=i_platemail_gorget
item=i_platemail_helm
item=i_platemail_tunic
item=i_platemail_legs
item=i_platemail_arms
item=i_platemail_gloves

or

Code:
[itemdef i_deed_for_a_platemail_armor_set]
id=i_deed
name=deed for a platemail armor set
type=t_normal
weight=1

category=whatever
subsection=whatever
description=Deed for a Platemail Armor Set

on=@DClick
serv.newitem i_platemail_gorget,,<src>
serv.newitem i_platemail_tunic,,<src>
serv.newitem i_platemail_helm,,<src>
serv.newitem i_platemail_gloves,,<src>
serv.newitem i_platemail_legs,,<src>
serv.newitem i_platemail_arms,,<src>
remove
12-29-2013 03:39 AM
Find all posts by this user Like Post Quote this message in a reply
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
Khaos
Master
**

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



Post: #10
RE: Armor Packing
Updated a bit.
12-29-2013 06:48 AM
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)