GHI_GenerateExportCode

Pilus edited this page Aug 11, 2015 · 3 revisions

Syntax:

GHI GenerateExportCode(itemGuid, amount, scriptBefore, req, scriptAfter, containerGuid, containerSlot)

Arguments:

GHI GenerateExportCode(itemGuid, amount, scriptBefore, req, scriptAfter, containerGuid, containerSlot) has 7 arguments.

itemGuid
''String''
The GUID of the item you wish to count.
amount
''number''
the amount to produce on import (such as a stack of 5)
scriptBefore
''string''
script to do before import, handling requirement
req
''string''
if the import should have limitations/requirements
scriptAfter
''number''
a script to do after import
containerGUID (optional)
''string''
container guid to import to, main ghi bag defualt.
containerSlot (optional)
''string''
container slot to import to, main ghi bag defualt.

Returns:

exportCode
''string''
the export code for the item

Example:

local scriptBefore = "IMPORT_REQ = true;";

local req = "IMPORT_REQ == true";

local scriptAfter = "";

--change the creator to importing user

scriptAfter = scriptAfter .. " G_Import.item.creater = UnitName(\"player\");"

-- also change ID

scriptAfter = scriptAfter .. " G_Import.ID = GHI_GUID().MakeGUID();"

GHI_GenerateExportCode("12346xc0", 1, scriptBefore, req, scriptAfter)

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.