[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Gryphonheart AddOns :: View topic - Associate Item Data in Script?
Gryphonheart AddOns
http://www.pilus.info/cms/phpbb/

Associate Item Data in Script?
http://www.pilus.info/cms/phpbb/viewtopic.php?f=24&t=6386
Page 1 of 1

Author:  Doronamo [ Mon Sep 05, 2016 9:29 pm ]
Post subject:  Associate Item Data in Script?

I don't know if this is already a thing, but I was wondering if there was API to Associate Item Data inside script, without having to use the GUI tree? (to help keep my tree clean)

Thanks in advance for any answers.

Author:  Flid [ Mon Sep 12, 2016 6:52 pm ]
Post subject:  Re: Associate Item Data in Script?

I tried to trace this down too just to learn about it, but it's very complicated actually.

All the dynamic actions are stored in a table (GHI_ProvidedDynamicActions), which is loaded by a class instance in "GHI_DynamicActionList()" I think, and then I couldn't figure out how the actions were being called from there.

What exactly are you looking for your item to do?

Author:  Doronamo [ Thu Sep 29, 2016 1:13 am ]
Post subject:  Re: Associate Item Data in Script?

Quite simply, for the sake of keeping stuff in my scripts and trying to not create a very large tree, I want to do the same action as from the Dynamic Actions (Item and Container > Associate Item Data) but instead through my custom Script action if possible.

Much like how there's a GHI_Message("hi") and a (Actions and Effects > Message). I'm wanting to associate multiple items with this one item so I can spawn items from it. Basically a profession system I'm doing in my free time.

Author:  Flid [ Fri Sep 30, 2016 5:29 am ]
Post subject:  Re: Associate Item Data in Script?

I have to confess I'm not sure what associate item data does - I tried it but am not finding any data from the associated item?

anyhow have you looked at this section of the API?

https://github.com/Pilus/Gryphonheart/w ... odify-item

Author:  Doronamo [ Wed Oct 05, 2016 2:34 am ]
Post subject:  Re: Associate Item Data in Script?

Yeah, I've looked through the API and from what I can see there is nothing on it.

What it does, from my knowledge, is allows the item to carry the information of another item. If you try to GHI_ProduceItem an item that has not first been accounted for by Associate Item Data, it will not recognize the GUID. It will work for you, the creator, since you have seen the items and don't have to associate the item data, but others will not be able to produce the item because their client has no idea what the item GUID refers to.

Originally I had no idea what associate did, but it's crucial when trying to produce items with an item from what I've encountered. It's fine though, I can keep doing it outside of the scripts for the time being, since it's not that big of a deal.

Author:  Flid [ Thu Oct 06, 2016 3:29 am ]
Post subject:  Re: Associate Item Data in Script?

It actually looks like all the functions are there in the API (.GetGUID, .GetItemInfo etc), but they would only happen upon running the item, unlike Associate Item Data which must execute as soon as you select the item from the editor.

If you're only doing a few, you could just be sure to run them once before trading them to people, but yea, doesn't really save you any hassle.

Author:  Flid [ Thu Oct 06, 2016 3:34 am ]
Post subject:  Re: Associate Item Data in Script?

by the way I have a toon on WrA, Hulain (ally), if you send me a post in game I'd love to catch up with that realm... I know GHI is big there but I'm hardly there anymore.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/