Moonlite Map Studio open beta release

Sevion

The DIY Ninja
These:

JASS:
include "TriggerLibs/NativeLib"
include "DLLL.galaxy"
include "CharSelect.galaxy"

//--------------------------------------------------------------------------------------------------
// Trigger: Varliable
//--------------------------------------------------------------------------------------------------
trigger gt_Init;
trigger gt_SelectOfficer;
trigger gt_SelectSpecialWeapons;
trigger gt_SelectMedic;
trigger gt_SelectEngineer;
trigger gt_SelectCovertOps;

//--------------------------------------------------------------------------------------------------
// Trigger: Initialization
//--------------------------------------------------------------------------------------------------

void InitTriggers() {
	gt_Init = TriggerCreate("CreateUI");
	TriggerAddEventMapInit(gt_Init);
	gt_SelectOfficer = TriggerCreate("SelectOfficer");
	gt_SelectSpecialWeapons = TriggerCreate("SelectSpecialWeapons");
	gt_SelectMedic = TriggerCreate("SelectMedic");
	gt_SelectEngineer = TriggerCreate("SelectEngineer");
	gt_SelectCovertOps = TriggerCreate("SelectCovertOps");
}

//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
void InitLibs () {
    libNtve_InitLib();
    libDLLL_InitLib();
}

//--------------------------------------------------------------------------------------------------
// Map Initialization
//--------------------------------------------------------------------------------------------------
void InitMap () {
    InitLibs();
    InitTriggers();
    InitCharSelectGlobals();
}


JASS:
//==================================================================================================
// 
// Character Selection UI
// 
// Name:   Alien Swarm
// Author: Sevion
// 
//==================================================================================================
include "TriggerLibs/NativeLib"
include "DLLL.galaxy"

//--------------------------------------------------------------------------------------------------
// Global Variables
//--------------------------------------------------------------------------------------------------
int gv_menuDialog;
int gv_weaponList;
int[14] gv_weaponUnlocks;
string[14] gv_weaponUnlocksIDs;
int[14] gv_weaponUnlocksRequirements;
const int gv_weaponUnlockCount = 13;
int[2] gv_equipmentUnlocks;
string[2] gv_equipmentUnlocksIDs;
int[2] gv_equipmentUnlocksRequirements;
const int gv_equipmentUnlockCount = 1;
unit[6] gv_marine;
const point gv_crashSite = PointFromInt(1);
int[6] gv_characterImage;

void InitCharSelectGlobals () {
    int init_i;
    gv_menuDialog = c_invalidDialogId;
    gv_weaponList = c_invalidDialogControlId;
    init_i = 0;
    while (init_i <= 13) {
        gv_weaponUnlocks[init_i] = c_invalidDialogControlId;
        init_i = init_i + 1;
    }
    init_i = 0;
    while (init_i <= 13) {
        gv_weaponUnlocksIDs[init_i] = "";
        init_i = init_i + 1;
    }
    init_i = 0;
    while (init_i <= 13) {
        gv_weaponUnlocksRequirements[init_i] = 0;
        init_i = init_i + 1;
    }
    init_i = 0;
    while (init_i <= 1) {
        gv_equipmentUnlocks[init_i] = c_invalidDialogControlId;
        init_i = init_i + 1;
    }
    init_i = 0;
    while (init_i <= 1) {
        gv_equipmentUnlocksIDs[init_i] = "";
        init_i = init_i + 1;
    }
    init_i = 0;
    while (init_i <= 1) {
        gv_equipmentUnlocksRequirements[init_i] = 0;
        init_i = init_i + 1;
    }
	init_i = 0;
	while (init_i <= PlayerGroupCount(PlayerGroupActive())) {
		gv_marine = null;
		gv_characterImage = c_invalidDialogControlId;
		init_i = init_i + 1;
	}
}

//--------------------------------------------------------------------------------------------------
// Trigger: SelectOfficer
//--------------------------------------------------------------------------------------------------
bool SelectOfficer(bool testConds, bool runActions) {
	if (!runActions) {
		return true;
	}
	if ( gv_marine[EventPlayer()] != null ) {
		UnitRemove(gv_marine[EventPlayer()]);
	}
	gv_marine[EventPlayer()] = UnitCreate(1, "MarineAS", 0, EventPlayer(), gv_crashSite, 270.00)
	DialogSetImage(gv_characterImage[EventPlayer()], "Images/OfficerCharacter.tga");
	return true;
}

//--------------------------------------------------------------------------------------------------
// Trigger: SelectSpecialWeapons
//--------------------------------------------------------------------------------------------------
bool SelectSpecialWeapons(bool testConds, bool runActions) {
	if (!runActions) {
		return true;
	}
	if ( gv_marine[EventPlayer()] != null ) {
		UnitRemove(gv_marine[EventPlayer()]);
	}
	gv_marine[EventPlayer()] = UnitCreate(1, "MarauderAS", 0, EventPlayer(), gv_crashSite, 270.00)
	DialogSetImage(gv_characterImage[EventPlayer()], "Images/SpecialWeaponsCharacter.tga");
	return true;
}

//--------------------------------------------------------------------------------------------------
// Trigger: SelectMedic
//--------------------------------------------------------------------------------------------------
bool SelectMedic(bool testConds, bool runActions) {
	if (!runActions) {
		return true;
	}
	if ( gv_marine[EventPlayer()] != null ) {
		UnitRemove(gv_marine[EventPlayer()]);
	}
	gv_marine[EventPlayer()] = UnitCreate(1, "MedicAS", 0, EventPlayer(), gv_crashSite, 270.00)
	DialogSetImage(gv_characterImage[EventPlayer()], "Images/MedicCharacter.tga");
	return true;
}

//--------------------------------------------------------------------------------------------------
// Trigger: SelectEngineer
//--------------------------------------------------------------------------------------------------
bool SelectEngineer(bool testConds, bool runActions) {
	if (!runActions) {
		return true;
	}
	if ( gv_marine[EventPlayer()] != null ) {
		UnitRemove(gv_marine[EventPlayer()]);
	}
	gv_marine[EventPlayer()] = UnitCreate(1, "EngineerAS", 0, EventPlayer(), gv_crashSite, 270.00)
	DialogSetImage(gv_characterImage[EventPlayer()], "Images/EngineerCharacter.tga");
	return true;
}

//--------------------------------------------------------------------------------------------------
// Trigger: SelectCovertOps
//--------------------------------------------------------------------------------------------------
bool SelectCovertOps(bool testConds, bool runActions) {
	if (!runActions) {
		return true;
	}
	if ( gv_marine[EventPlayer()] != null ) {
		UnitRemove(gv_marine[EventPlayer()]);
	}
	gv_marine[EventPlayer()] = UnitCreate(1, "GhostAS", 0, EventPlayer(), gv_crashSite, 270.00)
	DialogSetImage(gv_characterImage[EventPlayer()], "Images/CovertOpsCharacter.tga");
	return true;
}

//--------------------------------------------------------------------------------------------------
// Trigger: Init
//--------------------------------------------------------------------------------------------------
bool CreateUI (bool testConds, bool runActions) {
    playergroup auto20BFFB85_g;
    int auto20BFFB85_p;
    int auto8C1E4637_as;
    int auto8C1E4637_ae;
    int auto8C1E4637_ai;
    playergroup autoFC1E365B_g;
    int autoFC1E365B_p;
    int autoF1B99538_as;
    int autoF1B99538_ae;
    int autoF1B99538_ai;
    playergroup autoEE8900E6_g;
    int autoEE8900E6_p;

    // Variable Declarations
    int lv_i;
    int lv_ploop;

    // Variable Initialization
    lv_i = 0;
    lv_ploop = 0;
	
    // Actions
    if (!runActions) {
        return true;
    }

    libNtve_gf_HideGameUI(false, PlayerGroupAll());
    gv_menuDialog = DialogCreate(500, 400, c_anchorCenter, 0, 0, true);
	DialogSetTitle(gv_menuDialog, StringToText("Character Selection"));
    DialogSetFullscreen(gv_menuDialog, true);
    libNtve_gf_CreateDialogItemLabel(gv_menuDialog, 200, 50, c_anchorTopLeft, 50, 90, StringToText("Class:"), Color(100,100,100), false, 2.0);
    libNtve_gf_CreateDialogItemButton(gv_menuDialog, 200, 50, c_anchorTopLeft, 110, 75, StringToText("A good all-around class for beginners. Has high health and damage with medium speed."), StringToText("Officer"), "");
	TriggerAddEventDialogControl(gt_SelectOfficer, c_anyPlayer, DialogControlLastCreated(), c_triggerControlEventTypeClick);
    libNtve_gf_CreateDialogItemButton(gv_menuDialog, 210, 50, c_anchorTopLeft, 320, 75, StringToText("A tanker class that can deal high damage. Very slow mover."), StringToText("Special Weapons"), "");
	TriggerAddEventDialogControl(gt_SelectSpecialWeapons, c_anyPlayer, DialogControlLastCreated(), c_triggerControlEventTypeClick);
    libNtve_gf_CreateDialogItemButton(gv_menuDialog, 200, 50, c_anchorTopLeft, 540, 75, StringToText("A support class that can heal friendly players. A less offensive class, but highly mobile."), StringToText("Medic"), "");
	TriggerAddEventDialogControl(gt_SelectMedic, c_anyPlayer, DialogControlLastCreated(), c_triggerControlEventTypeClick);
    libNtve_gf_CreateDialogItemButton(gv_menuDialog, 200, 50, c_anchorTopLeft, 750, 75, StringToText("A support class that can deal AOE damage and use electronic devices."), StringToText("Engineer"), "");
	TriggerAddEventDialogControl(gt_SelectEngineer, c_anyPlayer, DialogControlLastCreated(), c_triggerControlEventTypeClick);
    libNtve_gf_CreateDialogItemButton(gv_menuDialog, 200, 50, c_anchorTopLeft, 960, 75, StringToText("An unlockable solo class that can cloak and deal massive damage to single units. Highly mobile."), StringToText("Covert Ops"), "");
    DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false);
    auto20BFFB85_g = PlayerGroupActive();
    auto20BFFB85_p = 1;
    while (auto20BFFB85_p <= PlayerGroupCount(auto20BFFB85_g)) {
        lv_ploop = PlayerGroupPlayer(auto20BFFB85_g, auto20BFFB85_p);
        BankLoad("AlienSwarmData", lv_ploop);
        if ((BankValueGetAsFlag(BankLastCreated(), "unlocks", "covertops") == true)) {
            DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupSingle(lv_ploop), true);
			TriggerAddEventDialogControl(gt_SelectCovertOps, lv_ploop, DialogControlLastCreated(), c_triggerControlEventTypeClick);
        }
        if (lv_ploop == PlayerGroupPlayer(auto20BFFB85_g, auto20BFFB85_p)) {
            auto20BFFB85_p = auto20BFFB85_p + 1;
        }
    }
    libNtve_gf_CreateDialogItemLabel(gv_menuDialog, 200, 50, c_anchorTopLeft, 50, 140, StringToText("Weapons:"), Color(100,100,100), false, 2.0);
    DialogControlCreate(gv_menuDialog, c_triggerControlTypeListBox);
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, 150, 125);
    libDLLL_gf_AssociateNewListbox(DialogControlLastCreated(), 0);
    DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 300, 200);
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_handgun", StringToText("Hand Gun"));
    lv_i = gv_weaponUnlockCount + 2;
    gv_weaponUnlocksRequirements[13] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_plasmarail", StringToText("Plasma Rail"));
    gv_weaponUnlocks[13] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_plasmarail";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[12] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_hvturret", StringToText("High Velocity Turret"));
    gv_weaponUnlocks[12] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_hvturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[11] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_projrail", StringToText("Projectile Rail Gun"));
    gv_weaponUnlocks[11] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_projrail";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[10] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_flameturret", StringToText("Flame Turret"));
    gv_weaponUnlocks[10] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_flameturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[9] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_rocketlauncher", StringToText("Rocket Launcher"));
    gv_weaponUnlocks[9] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_rocketlauncher";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[8] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_hcassaultrifle", StringToText("High Capacity Assault Rifle"));
    gv_weaponUnlocks[8] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_hcassaultrifle";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[7] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_freezeturret", StringToText("Freeze Turret"));
    gv_weaponUnlocks[7] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_freezeturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[6] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_smg", StringToText("Submachine Gun"));
    gv_weaponUnlocks[6] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_smg";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[5] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_pashotgun", StringToText("Pump Action Shotgun"));
    gv_weaponUnlocks[5] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_pashotgun";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[4] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_plasmarifle", StringToText("Plasma Rifle"));
    gv_weaponUnlocks[4] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_plasmarifle";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[3] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_autoturret", StringToText("Autoturret"));
    gv_weaponUnlocks[3] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_autoturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[2] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_flamethrower", StringToText("Flamethrower"));
    gv_weaponUnlocks[2] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_flamethrower";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[1] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_pdw", StringToText("Personal Defense Weapons"));
    gv_weaponUnlocks[1] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_pdw";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[0] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_teslarifle", StringToText("Tesla Rifle"));
    gv_weaponUnlocks[0] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_teslarifle";
    auto8C1E4637_ae = gv_weaponUnlockCount;
    lv_i = 0;
	while (lv_i <= auto8C1E4637_ae) {
		autoFC1E365B_g = PlayerGroupActive();
		autoFC1E365B_p = 1;
		while (autoFC1E365B_p <= PlayerGroupCount(autoFC1E365B_g)) {
			lv_ploop = PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p);
			BankLoad("AlienSwarmData", lv_ploop);
			if ((BankValueGetAsInt(BankLastCreated(), "playerData", "level") < gv_weaponUnlocksRequirements[lv_i])) {
				libDLLL_gf_ModfiyItemInListbox(DialogControlLastCreated(), gv_weaponUnlocksIDs[lv_i], StringToText("<c val=\"646464\">"), 2, PlayerGroupSingle(lv_ploop));
				libDLLL_gf_ModfiyItemInListbox(DialogControlLastCreated(), gv_weaponUnlocksIDs[lv_i], StringToText("</c>"), 1, PlayerGroupSingle(lv_ploop));
			}
			if (lv_ploop == PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p)) {
				autoFC1E365B_p = autoFC1E365B_p + 1;
			}
		}
		lv_i = lv_i + 1;
	}
	libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_ammobox", StringToText("Ammo Box"));
	libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_healthbox", StringToText("Health Box"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_sniperrifle", StringToText("Sniper Rifle"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_shotgun", StringToText("Shotgun"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_medicgun", StringToText("Medic Gun"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_minigun", StringToText("Minigun"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_assaultrifle", StringToText("Assault Rifle"));
    DialogControlCreate(gv_menuDialog, c_triggerControlTypeListBox);
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, 450, 125);
    libDLLL_gf_AssociateNewListbox(DialogControlLastCreated(), 0);
    DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 300, 200);
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_handgun", StringToText("Hand Gun"));
    lv_i = gv_weaponUnlockCount + 2;
    gv_weaponUnlocksRequirements[13] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_plasmarail", StringToText("Plasma Rail"));
    gv_weaponUnlocks[13] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_plasmarail";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[12] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_hvturret", StringToText("High Velocity Turret"));
    gv_weaponUnlocks[12] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_hvturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[11] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_projrail", StringToText("Projectile Rail Gun"));
    gv_weaponUnlocks[11] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_projrail";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[10] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_flameturret", StringToText("Flame Turret"));
    gv_weaponUnlocks[10] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_flameturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[9] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_rocketlauncher", StringToText("Rocket Launcher"));
    gv_weaponUnlocks[9] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_rocketlauncher";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[8] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_hcassaultrifle", StringToText("High Capacity Assault Rifle"));
    gv_weaponUnlocks[8] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_hcassaultrifle";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[7] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_freezeturret", StringToText("Freeze Turret"));
    gv_weaponUnlocks[7] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_freezeturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[6] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_smg", StringToText("Submachine Gun"));
    gv_weaponUnlocks[6] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_smg";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[5] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_pashotgun", StringToText("Pump Action Shotgun"));
    gv_weaponUnlocks[5] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_pashotgun";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[4] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_plasmarifle", StringToText("Plasma Rifle"));
    gv_weaponUnlocks[4] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_plasmarifle";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[3] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_autoturret", StringToText("Autoturret"));
    gv_weaponUnlocks[3] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_autoturret";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[2] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_flamethrower", StringToText("Flamethrower"));
    gv_weaponUnlocks[2] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_flamethrower";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[1] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_pdw", StringToText("Personal Defense Weapons"));
    gv_weaponUnlocks[1] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_pdw";
    lv_i = (lv_i - 1);
    gv_weaponUnlocksRequirements[0] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_teslarifle", StringToText("Tesla Rifle"));
    gv_weaponUnlocks[0] = DialogControlLastCreated();
    gv_weaponUnlocksIDs[(lv_i - 2)] = "wep_teslarifle";
    auto8C1E4637_ae = gv_weaponUnlockCount;
    lv_i = 0;
	while (lv_i <= auto8C1E4637_ae) {
		autoFC1E365B_g = PlayerGroupActive();
		autoFC1E365B_p = 1;
		while (autoFC1E365B_p <= PlayerGroupCount(autoFC1E365B_g)) {
			lv_ploop = PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p);
			BankLoad("AlienSwarmData", lv_ploop);
			if ((BankValueGetAsInt(BankLastCreated(), "playerData", "level") < gv_weaponUnlocksRequirements[lv_i])) {
				libDLLL_gf_ModfiyItemInListbox(DialogControlLastCreated(), gv_weaponUnlocksIDs[lv_i], StringToText("<c val=\"646464\">"), 2, PlayerGroupSingle(lv_ploop));
				libDLLL_gf_ModfiyItemInListbox(DialogControlLastCreated(), gv_weaponUnlocksIDs[lv_i], StringToText("</c>"), 1, PlayerGroupSingle(lv_ploop));
			}
			if (lv_ploop == PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p)) {
				autoFC1E365B_p = autoFC1E365B_p + 1;
			}
		}
		lv_i = lv_i + 1;
	}
	libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_ammobox", StringToText("Ammo Box"));
	libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_healbox", StringToText("Health Box"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_sniperrifle", StringToText("Sniper Rifle"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_shotgun", StringToText("Shotgun"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_medicgun", StringToText("Medic Gun"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_minigun", StringToText("Minigun"));
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "wep_assaultrifle", StringToText("Assault Rifle"));
    DialogControlCreate(gv_menuDialog, c_triggerControlTypeListBox);
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, 750, 125);
    libDLLL_gf_AssociateNewListbox(DialogControlLastCreated(), 0);
    DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 300, 200);
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "eqp_medkit", StringToText("Medical Kit"));
	lv_i = gv_equipmentUnlockCount + 2;
    gv_equipmentUnlocksRequirements[1] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "eqp_firemine", StringToText("Incendiary Mine"));
    gv_equipmentUnlocks[1] = DialogControlLastCreated();
    gv_equipmentUnlocksIDs[(lv_i - 2)] = "eqp_firemine";
	lv_i = lv_i - 1;
    gv_equipmentUnlocksRequirements[0] = lv_i;
    libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "eqp_proxmine", StringToText("Proximity Mine"));
    gv_equipmentUnlocks[0] = DialogControlLastCreated();
    gv_equipmentUnlocksIDs[(lv_i - 2)] = "eqp_proxmine";
    auto8C1E4637_ae = gv_equipmentUnlockCount;
    lv_i = 0;
	while (lv_i <= auto8C1E4637_ae) {
		autoFC1E365B_g = PlayerGroupActive();
		autoFC1E365B_p = 1;
		while (autoFC1E365B_p <= PlayerGroupCount(autoFC1E365B_g)) {
			lv_ploop = PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p);
			BankLoad("AlienSwarmData", lv_ploop);
			if ((BankValueGetAsInt(BankLastCreated(), "playerData", "level") < gv_equipmentUnlocksRequirements[lv_i])) {
				libDLLL_gf_ModfiyItemInListbox(DialogControlLastCreated(), gv_equipmentUnlocksIDs[lv_i], StringToText("<c val=\"646464\">"), 2, PlayerGroupSingle(lv_ploop));
				libDLLL_gf_ModfiyItemInListbox(DialogControlLastCreated(), gv_equipmentUnlocksIDs[lv_i], StringToText("</c>"), 1, PlayerGroupSingle(lv_ploop));
			}
			if (lv_ploop == PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p)) {
				autoFC1E365B_p = autoFC1E365B_p + 1;
			}
		}
		lv_i = lv_i + 1;
	}
	libDLLL_gf_AddItemToListbox(DialogControlLastCreated(), PlayerGroupAll(), "eqp_welder", StringToText("Welder"));
	libNtve_gf_CreateDialogItemImage(gv_menuDialog, 600, 330, c_anchorTopLeft, 1100, 125, StringToText("No Character Selected"), "Images/NoCharacter.tga", c_triggerImageTypeNormal, false, Color(100,100,100), c_triggerBlendModeNormal);
    lv_i = 0;
	while (lv_i <= auto8C1E4637_ae) {
		autoFC1E365B_g = PlayerGroupActive();
		autoFC1E365B_p = 1;
		while (autoFC1E365B_p <= PlayerGroupCount(autoFC1E365B_g)) {
			lv_ploop = PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p);
			gv_characterImage[lv_ploop] = DialogControlLastCreated();
			if (lv_ploop == PlayerGroupPlayer(autoFC1E365B_g, autoFC1E365B_p)) {
				autoFC1E365B_p = autoFC1E365B_p + 1;
			}
		}
		lv_i = lv_i + 1;
	}
	DialogSetVisible(gv_menuDialog, PlayerGroupAll(), true);
    return true;
}


JASS:
include "TriggerLibs/NativeLib"

// Structures
struct libDLLL_gs_ListItem {
    string lv_iD;
    text lv_text;
};

// Variables
int[25] libDLLL_gv_itemsListDialogItem;
libDLLL_gs_ListItem[25][101] libDLLL_gv_itemLists;

void libDLLL_InitVariables () {
    int init_i;
    int init_j;

    init_i = 0;
    while (init_i <= 24) {
        libDLLL_gv_itemsListDialogItem[init_i] = c_invalidDialogControlId;
        init_i = init_i + 1;
    }
    init_i = 0;
    while (init_i <= 24) {
        init_j = 0;
        while (init_j <= 100) {
            libDLLL_gv_itemLists[init_i][init_j].lv_iD = null;
            libDLLL_gv_itemLists[init_i][init_j].lv_text = null;
            init_j = init_j + 1;
        }
        init_i = init_i + 1;
    }
}

// Function Declarations
int libDLLL_gf_GetListbox (int lp_listbox);
int libDLLL_gf_GetNextAvalibleIndex (int lp_listboxIndex, string lp_iD);
int libDLLL_gf_GetItemIndexinListbox (int lp_dialogItem, string lp_itemID);
string libDLLL_gf_GetItemIDfromListbox (int lp_listbox, int lp_player);
void libDLLL_gf_AssociateNewListbox (int lp_dialogItem, int lp_list);
void libDLLL_gf_AssociateListbox (int lp_dialogItem, int lp_list);
void libDLLL_gf_ReassociateListbox (int lp_dialogItem, int lp_list);
void libDLLL_gf_RefreshListbox (int lp_listbox, playergroup lp_player);
void libDLLL_gf_ReorderList (int lp_list);
void libDLLL_gf_AddItemToListbox (int lp_listbox, playergroup lp_players, string lp_iD, text lp_text);
void libDLLL_gf_RemoveIteminListbox (int lp_listbox, playergroup lp_players, string lp_itemID);
void libDLLL_gf_ModfiyItemInListbox (int lp_listbox, string lp_itemID, text lp_newText, int lp_options, playergroup lp_players);
void libDLLL_gf_MoveItemFromListboxtoListbox (int lp_listboxSource, int lp_listboxDestination, string lp_iD, int lp_iDOptions, string lp_newID, playergroup lp_players);
void libDLLL_gf_ChangeListboxList (int lp_listboxSource, int lp_listboxDestination, playergroup lp_players, int lp_options);

// Functions
int libDLLL_gf_GetListbox (int lp_listbox) {
    int autoD816812D_as;
    int autoD816812D_ae;
    int autoD816812D_ai;

    // Variable Declarations
    int lv_tmpNum;

    // Variable Initialization
    lv_tmpNum = 0;

    // Implementation
    autoD816812D_as = 0;
    autoD816812D_ae = 24;
    autoD816812D_ai = 1;
    lv_tmpNum = autoD816812D_as;
    if (autoD816812D_ai > 0 || (autoD816812D_ai == 0 && autoD816812D_as < autoD816812D_ae)) {
        while (lv_tmpNum <= autoD816812D_ae) {
            if ((libDLLL_gv_itemsListDialogItem[lv_tmpNum] == lp_listbox)) {
                return lv_tmpNum;
            }
            else {
            }
            lv_tmpNum = lv_tmpNum + autoD816812D_ai;
        }
    }
    else if (autoD816812D_ai < 0 || (autoD816812D_ai == 0 && autoD816812D_ae < autoD816812D_as)) {
        while (lv_tmpNum >= autoD816812D_ae) {
            if ((libDLLL_gv_itemsListDialogItem[lv_tmpNum] == lp_listbox)) {
                return lv_tmpNum;
            }
            else {
            }
            lv_tmpNum = lv_tmpNum + autoD816812D_ai;
        }
    }
    return -1;
}

int libDLLL_gf_GetNextAvalibleIndex (int lp_listboxIndex, string lp_iD) {
    int autoDCB10F99_as;
    int autoDCB10F99_ae;
    int autoDCB10F99_ai;
    int auto3460F2ED_as;
    int auto3460F2ED_ae;
    int auto3460F2ED_ai;

    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpTotal;

    // Variable Initialization
    lv_tmpNum = 0;
    lv_tmpTotal = 0;

    // Implementation
    if ((lp_listboxIndex != -1)) {
        autoDCB10F99_as = 1;
        autoDCB10F99_ae = 100;
        autoDCB10F99_ai = 1;
        lv_tmpNum = autoDCB10F99_as;
        if (autoDCB10F99_ai > 0 || (autoDCB10F99_ai == 0 && autoDCB10F99_as < autoDCB10F99_ae)) {
            while (lv_tmpNum <= autoDCB10F99_ae) {
                if ((libDLLL_gv_itemLists[lp_listboxIndex][lv_tmpNum].lv_iD != lp_iD)) {
                    lv_tmpTotal=lv_tmpTotal + 1;
                }
                else {
                }
                lv_tmpNum = lv_tmpNum + autoDCB10F99_ai;
            }
        }
        else if (autoDCB10F99_ai < 0 || (autoDCB10F99_ai == 0 && autoDCB10F99_ae < autoDCB10F99_as)) {
            while (lv_tmpNum >= autoDCB10F99_ae) {
                if ((libDLLL_gv_itemLists[lp_listboxIndex][lv_tmpNum].lv_iD != lp_iD)) {
                    lv_tmpTotal=lv_tmpTotal + 1;
                }
                else {
                }
                lv_tmpNum = lv_tmpNum + autoDCB10F99_ai;
            }
        }
        lv_tmpNum = 0;
        if ((lv_tmpTotal == 100)) {
            auto3460F2ED_as = 1;
            auto3460F2ED_ae = 100;
            auto3460F2ED_ai = 1;
            lv_tmpNum = auto3460F2ED_as;
            if (auto3460F2ED_ai > 0 || (auto3460F2ED_ai == 0 && auto3460F2ED_as < auto3460F2ED_ae)) {
                while (lv_tmpNum <= auto3460F2ED_ae) {
                    if ((libDLLL_gv_itemLists[lp_listboxIndex][lv_tmpNum].lv_iD == null)) {
                        return lv_tmpNum;
                    }
                    else {
                    }
                    lv_tmpNum = lv_tmpNum + auto3460F2ED_ai;
                }
            }
            else if (auto3460F2ED_ai < 0 || (auto3460F2ED_ai == 0 && auto3460F2ED_ae < auto3460F2ED_as)) {
                while (lv_tmpNum >= auto3460F2ED_ae) {
                    if ((libDLLL_gv_itemLists[lp_listboxIndex][lv_tmpNum].lv_iD == null)) {
                        return lv_tmpNum;
                    }
                    else {
                    }
                    lv_tmpNum = lv_tmpNum + auto3460F2ED_ai;
                }
            }
            return -1;
        }
        else {
            return -1;
        }
    }
    else {
        return -1;
    }
}

int libDLLL_gf_GetItemIndexinListbox (int lp_dialogItem, string lp_itemID) {
    int auto6484690F_as;
    int auto6484690F_ae;
    int auto6484690F_ai;

    // Variable Declarations
    int lv_tmpIndex;
    int lv_tmpNum;

    // Variable Initialization
    lv_tmpIndex = libDLLL_gf_GetListbox(lp_dialogItem);
    lv_tmpNum = 0;

    // Implementation
    if ((lv_tmpIndex != -1)) {
        auto6484690F_as = 1;
        auto6484690F_ae = 100;
        auto6484690F_ai = 1;
        lv_tmpNum = auto6484690F_as;
        if (auto6484690F_ai > 0 || (auto6484690F_ai == 0 && auto6484690F_as < auto6484690F_ae)) {
            while (lv_tmpNum <= auto6484690F_ae) {
                if ((lp_itemID == libDLLL_gv_itemLists[lv_tmpIndex][lv_tmpNum].lv_iD)) {
                    return lv_tmpNum;
                }
                else {
                }
                lv_tmpNum = lv_tmpNum + auto6484690F_ai;
            }
        }
        else if (auto6484690F_ai < 0 || (auto6484690F_ai == 0 && auto6484690F_ae < auto6484690F_as)) {
            while (lv_tmpNum >= auto6484690F_ae) {
                if ((lp_itemID == libDLLL_gv_itemLists[lv_tmpIndex][lv_tmpNum].lv_iD)) {
                    return lv_tmpNum;
                }
                else {
                }
                lv_tmpNum = lv_tmpNum + auto6484690F_ai;
            }
        }
        return -1;
    }
    else {
        return -1;
    }
}

string libDLLL_gf_GetItemIDfromListbox (int lp_listbox, int lp_player) {
    // Variable Declarations
    int lv_tmpIndex;
    int lv_tmpSelectedNum;

    // Variable Initialization
    lv_tmpIndex = libDLLL_gf_GetListbox(lp_listbox);
    lv_tmpSelectedNum = DialogControlGetSelectedItem(lp_listbox, lp_player);

    // Implementation
    if (((lv_tmpIndex != -1) && (lv_tmpSelectedNum > 0))) {
        return libDLLL_gv_itemLists[lv_tmpIndex][lv_tmpSelectedNum].lv_iD;
    }
    else {
        return null;
    }
}

void libDLLL_gf_AssociateNewListbox (int lp_dialogItem, int lp_list) {
    int auto99F86F04_as;
    int auto99F86F04_ae;
    int auto99F86F04_ai;

    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpNum2;

    // Variable Initialization
    lv_tmpNum = (lp_list);
    lv_tmpNum2 = 0;

    // Implementation
    libDLLL_gv_itemsListDialogItem[lv_tmpNum] = lp_dialogItem;
    DialogControlRemoveAllItems(lp_dialogItem, PlayerGroupAll());
    auto99F86F04_as = 1;
    auto99F86F04_ae = 100;
    auto99F86F04_ai = 1;
    lv_tmpNum2 = auto99F86F04_as;
    if (auto99F86F04_ai > 0 || (auto99F86F04_ai == 0 && auto99F86F04_as < auto99F86F04_ae)) {
        while (lv_tmpNum2 <= auto99F86F04_ae) {
            libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_iD = null;
            libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_text = null;
            lv_tmpNum2 = lv_tmpNum2 + auto99F86F04_ai;
        }
    }
    else if (auto99F86F04_ai < 0 || (auto99F86F04_ai == 0 && auto99F86F04_ae < auto99F86F04_as)) {
        while (lv_tmpNum2 >= auto99F86F04_ae) {
            libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_iD = null;
            libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_text = null;
            lv_tmpNum2 = lv_tmpNum2 + auto99F86F04_ai;
        }
    }
}

void libDLLL_gf_AssociateListbox (int lp_dialogItem, int lp_list) {
    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpNum2;

    // Variable Initialization
    lv_tmpNum = (lp_list);
    lv_tmpNum2 = 0;

    // Implementation
    libDLLL_gv_itemsListDialogItem[lv_tmpNum] = lp_dialogItem;
}

void libDLLL_gf_ReassociateListbox (int lp_dialogItem, int lp_list) {
    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpOldNum;

    // Variable Initialization
    lv_tmpNum = (lp_list);
    lv_tmpOldNum = libDLLL_gf_GetListbox(lp_dialogItem);

    // Implementation
    libDLLL_gv_itemsListDialogItem[lv_tmpOldNum] = c_invalidDialogControlId;
    libDLLL_gv_itemsListDialogItem[lv_tmpNum] = lp_dialogItem;
}

void libDLLL_gf_RefreshListbox (int lp_listbox, playergroup lp_player) {
    int auto54600FC6_as;
    int auto54600FC6_ae;
    int auto54600FC6_ai;
    int autoF7A97D3C_as;
    int autoF7A97D3C_ae;
    int autoF7A97D3C_ai;
    int auto6CC8F1D0_as;
    int auto6CC8F1D0_ae;
    int auto6CC8F1D0_ai;

    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpNum2;
    int lv_tmpMax;
    text lv_tmpText;

    // Variable Initialization
    lv_tmpNum = libDLLL_gf_GetListbox(lp_listbox);
    lv_tmpNum2 = 0;
    lv_tmpMax = 0;
    lv_tmpText = null;

    // Implementation
    if ((lv_tmpNum >= 0)) {
        DialogControlSetVisible(lp_listbox, PlayerGroupAll(), false);
        DialogControlRemoveAllItems(lp_listbox, lp_player);
        auto54600FC6_as = 1;
        auto54600FC6_ae = 100;
        auto54600FC6_ai = 1;
        lv_tmpNum2 = auto54600FC6_as;
        if (auto54600FC6_ai > 0 || (auto54600FC6_ai == 0 && auto54600FC6_as < auto54600FC6_ae)) {
            while (lv_tmpNum2 <= auto54600FC6_ae) {
                if ((libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_iD == null)) {
                    lv_tmpMax = lv_tmpNum2;
                    break;
                }
                else {
                }
                lv_tmpNum2 = lv_tmpNum2 + auto54600FC6_ai;
            }
        }
        else if (auto54600FC6_ai < 0 || (auto54600FC6_ai == 0 && auto54600FC6_ae < auto54600FC6_as)) {
            while (lv_tmpNum2 >= auto54600FC6_ae) {
                if ((libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_iD == null)) {
                    lv_tmpMax = lv_tmpNum2;
                    break;
                }
                else {
                }
                lv_tmpNum2 = lv_tmpNum2 + auto54600FC6_ai;
            }
        }
        if ((lv_tmpMax > 2)) {
            lv_tmpText = libDLLL_gv_itemLists[lv_tmpNum][1].lv_text;
            DialogControlAddItem(lp_listbox, lp_player, lv_tmpText);
            lv_tmpText = libDLLL_gv_itemLists[lv_tmpNum][lv_tmpMax].lv_text;
            DialogControlAddItem(lp_listbox, lp_player, lv_tmpText);
            auto6CC8F1D0_as = (lv_tmpMax - 1);
            auto6CC8F1D0_ae = 2;
            auto6CC8F1D0_ai = -1;
            lv_tmpNum2 = auto6CC8F1D0_as;
            if (auto6CC8F1D0_ai > 0 || (auto6CC8F1D0_ai == 0 && auto6CC8F1D0_as < auto6CC8F1D0_ae)) {
                while (lv_tmpNum2 <= auto6CC8F1D0_ae) {
                    lv_tmpText = libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_text;
                    DialogControlAddItem(lp_listbox, lp_player, lv_tmpText);
                    DialogControlSelectItem(lp_listbox, lp_player, lv_tmpNum2);
                    lv_tmpNum2 = lv_tmpNum2 + auto6CC8F1D0_ai;
                }
            }
            else if (auto6CC8F1D0_ai < 0 || (auto6CC8F1D0_ai == 0 && auto6CC8F1D0_ae < auto6CC8F1D0_as)) {
                while (lv_tmpNum2 >= auto6CC8F1D0_ae) {
                    lv_tmpText = libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_text;
                    DialogControlAddItem(lp_listbox, lp_player, lv_tmpText);
                    DialogControlSelectItem(lp_listbox, lp_player, lv_tmpNum2);
                    lv_tmpNum2 = lv_tmpNum2 + auto6CC8F1D0_ai;
                }
            }
        }
        else {
            autoF7A97D3C_as = 1;
            autoF7A97D3C_ae = lv_tmpMax;
            autoF7A97D3C_ai = 1;
            lv_tmpNum2 = autoF7A97D3C_as;
            if (autoF7A97D3C_ai > 0 || (autoF7A97D3C_ai == 0 && autoF7A97D3C_as < autoF7A97D3C_ae)) {
                while (lv_tmpNum2 <= autoF7A97D3C_ae) {
                    lv_tmpText = libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_text;
                    DialogControlAddItem(lp_listbox, lp_player, lv_tmpText);
                    DialogControlSelectItem(lp_listbox, lp_player, lv_tmpNum2);
                    lv_tmpNum2 = lv_tmpNum2 + autoF7A97D3C_ai;
                }
            }
            else if (autoF7A97D3C_ai < 0 || (autoF7A97D3C_ai == 0 && autoF7A97D3C_ae < autoF7A97D3C_as)) {
                while (lv_tmpNum2 >= autoF7A97D3C_ae) {
                    lv_tmpText = libDLLL_gv_itemLists[lv_tmpNum][lv_tmpNum2].lv_text;
                    DialogControlAddItem(lp_listbox, lp_player, lv_tmpText);
                    DialogControlSelectItem(lp_listbox, lp_player, lv_tmpNum2);
                    lv_tmpNum2 = lv_tmpNum2 + autoF7A97D3C_ai;
                }
            }
        }
        DialogControlSetVisible(lp_listbox, PlayerGroupAll(), true);
    }
    else {
    }
}

void libDLLL_gf_ReorderList (int lp_list) {
    int init_i;

    int auto0E0122AF_as;
    int auto0E0122AF_ae;
    int auto0E0122AF_ai;
    int auto00F1C591_as;
    int auto00F1C591_ae;
    int auto00F1C591_ai;
    int autoB32E3A0A_as;
    int autoB32E3A0A_ae;
    int autoB32E3A0A_ai;

    // Variable Declarations
    string[101] lv_tmpIDs;
    text[101] lv_tmpTexts;
    int lv_tmpNum;
    int lv_tmpNum2;

    // Variable Initialization
    init_i = 0;
    while (init_i <= 100) {
        lv_tmpIDs[init_i] = "";
        init_i = init_i + 1;
    }
    init_i = 0;
    while (init_i <= 100) {
        lv_tmpTexts[init_i] = null;
        init_i = init_i + 1;
    }
    lv_tmpNum = 0;
    lv_tmpNum2 = 0;

    // Implementation
    auto0E0122AF_as = 1;
    auto0E0122AF_ae = 100;
    auto0E0122AF_ai = 1;
    lv_tmpNum = auto0E0122AF_as;
    if (auto0E0122AF_ai > 0 || (auto0E0122AF_ai == 0 && auto0E0122AF_as < auto0E0122AF_ae)) {
        while (lv_tmpNum <= auto0E0122AF_ae) {
            lv_tmpIDs[lv_tmpNum] = libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_iD;
            lv_tmpTexts[lv_tmpNum] = libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_text;
            lv_tmpNum = lv_tmpNum + auto0E0122AF_ai;
        }
    }
    else if (auto0E0122AF_ai < 0 || (auto0E0122AF_ai == 0 && auto0E0122AF_ae < auto0E0122AF_as)) {
        while (lv_tmpNum >= auto0E0122AF_ae) {
            lv_tmpIDs[lv_tmpNum] = libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_iD;
            lv_tmpTexts[lv_tmpNum] = libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_text;
            lv_tmpNum = lv_tmpNum + auto0E0122AF_ai;
        }
    }
    auto00F1C591_as = 1;
    auto00F1C591_ae = 100;
    auto00F1C591_ai = 1;
    lv_tmpNum = auto00F1C591_as;
    if (auto00F1C591_ai > 0 || (auto00F1C591_ai == 0 && auto00F1C591_as < auto00F1C591_ae)) {
        while (lv_tmpNum <= auto00F1C591_ae) {
            libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_iD = null;
            libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_text = null;
            lv_tmpNum = lv_tmpNum + auto00F1C591_ai;
        }
    }
    else if (auto00F1C591_ai < 0 || (auto00F1C591_ai == 0 && auto00F1C591_ae < auto00F1C591_as)) {
        while (lv_tmpNum >= auto00F1C591_ae) {
            libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_iD = null;
            libDLLL_gv_itemLists[lp_list][lv_tmpNum].lv_text = null;
            lv_tmpNum = lv_tmpNum + auto00F1C591_ai;
        }
    }
    autoB32E3A0A_as = 1;
    autoB32E3A0A_ae = 100;
    autoB32E3A0A_ai = 1;
    lv_tmpNum = autoB32E3A0A_as;
    if (autoB32E3A0A_ai > 0 || (autoB32E3A0A_ai == 0 && autoB32E3A0A_as < autoB32E3A0A_ae)) {
        while (lv_tmpNum <= autoB32E3A0A_ae) {
            if ((lv_tmpIDs[lv_tmpNum] != null)) {
                lv_tmpNum2 = libDLLL_gf_GetNextAvalibleIndex(lp_list, lv_tmpIDs[lv_tmpNum]);
                if ((StringToInt(lv_tmpIDs[lv_tmpNum]) > 0)) {
                    libDLLL_gv_itemLists[lp_list][lv_tmpNum2].lv_iD = IntToString(lv_tmpNum2);
                }
                else {
                    libDLLL_gv_itemLists[lp_list][lv_tmpNum2].lv_iD = lv_tmpIDs[lv_tmpNum];
                }
                libDLLL_gv_itemLists[lp_list][lv_tmpNum2].lv_text = lv_tmpTexts[lv_tmpNum];
            }
            else {
            }
            lv_tmpNum = lv_tmpNum + autoB32E3A0A_ai;
        }
    }
    else if (autoB32E3A0A_ai < 0 || (autoB32E3A0A_ai == 0 && autoB32E3A0A_ae < autoB32E3A0A_as)) {
        while (lv_tmpNum >= autoB32E3A0A_ae) {
            if ((lv_tmpIDs[lv_tmpNum] != null)) {
                lv_tmpNum2 = libDLLL_gf_GetNextAvalibleIndex(lp_list, lv_tmpIDs[lv_tmpNum]);
                if ((StringToInt(lv_tmpIDs[lv_tmpNum]) > 0)) {
                    libDLLL_gv_itemLists[lp_list][lv_tmpNum2].lv_iD = IntToString(lv_tmpNum2);
                }
                else {
                    libDLLL_gv_itemLists[lp_list][lv_tmpNum2].lv_iD = lv_tmpIDs[lv_tmpNum];
                }
                libDLLL_gv_itemLists[lp_list][lv_tmpNum2].lv_text = lv_tmpTexts[lv_tmpNum];
            }
            else {
            }
            lv_tmpNum = lv_tmpNum + autoB32E3A0A_ai;
        }
    }
}

void libDLLL_gf_AddItemToListbox (int lp_listbox, playergroup lp_players, string lp_iD, text lp_text) {
    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpIndex;

    // Variable Initialization
    lv_tmpNum = libDLLL_gf_GetListbox(lp_listbox);
    lv_tmpIndex = 0;

    // Implementation
    if ((lp_iD == "")) {
        lv_tmpIndex = libDLLL_gf_GetNextAvalibleIndex(lv_tmpNum, "<!IGNORE!>");
        lp_iD = IntToString(lv_tmpIndex);
    }
    else {
        lv_tmpIndex = libDLLL_gf_GetNextAvalibleIndex(lv_tmpNum, lp_iD);
    }
    if ((lv_tmpIndex >= 0)) {
        libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_iD = lp_iD;
        libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_text = lp_text;
        libDLLL_gf_ReorderList(lv_tmpNum);
        libDLLL_gf_RefreshListbox(lp_listbox, lp_players);
    }
    else {
    }
}

void libDLLL_gf_RemoveIteminListbox (int lp_listbox, playergroup lp_players, string lp_itemID) {
    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpIndex;

    // Variable Initialization
    lv_tmpNum = libDLLL_gf_GetListbox(lp_listbox);
    lv_tmpIndex = libDLLL_gf_GetItemIndexinListbox(lp_listbox, lp_itemID);

    // Implementation
    if ((lv_tmpIndex >= 0)) {
        libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_iD = null;
        libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_text = null;
        libDLLL_gf_ReorderList(lv_tmpNum);
        libDLLL_gf_RefreshListbox(lp_listbox, lp_players);
    }
    else {
    }
}

void libDLLL_gf_ModfiyItemInListbox (int lp_listbox, string lp_itemID, text lp_newText, int lp_options, playergroup lp_players) {
    int auto26B95B00_val;

    // Variable Declarations
    int lv_tmpNum;
    int lv_tmpIndex;
    text lv_tmpText;

    // Variable Initialization
    lv_tmpNum = libDLLL_gf_GetListbox(lp_listbox);
    lv_tmpIndex = libDLLL_gf_GetItemIndexinListbox(lp_listbox, lp_itemID);
    lv_tmpText = null;

    // Implementation
    if ((lv_tmpIndex >= 0)) {
        auto26B95B00_val = lp_options;
        if (auto26B95B00_val == 0) {
            libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_text = lp_newText;
            libDLLL_gf_RefreshListbox(lp_listbox, lp_players);
        }
        else if (auto26B95B00_val == 2) {
            lv_tmpText = (lp_newText + libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_text);
            libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_text = lv_tmpText;
            libDLLL_gf_RefreshListbox(lp_listbox, lp_players);
        }
        else if (auto26B95B00_val == 1) {
            lv_tmpText = (libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_text + lp_newText);
            libDLLL_gv_itemLists[lv_tmpNum][lv_tmpIndex].lv_text = lv_tmpText;
            libDLLL_gf_RefreshListbox(lp_listbox, lp_players);
        }
        else {
        }
    }
    else {
    }
}

void libDLLL_gf_MoveItemFromListboxtoListbox (int lp_listboxSource, int lp_listboxDestination, string lp_iD, int lp_iDOptions, string lp_newID, playergroup lp_players) {
    int auto8B8B548D_val;

    // Variable Declarations
    int lv_tmpNum1;
    int lv_tmpNum2;
    int lv_tmpIndexSource;
    int lv_tmpIndexDestination;

    // Variable Initialization
    lv_tmpNum1 = libDLLL_gf_GetListbox(lp_listboxSource);
    lv_tmpNum2 = libDLLL_gf_GetListbox(lp_listboxDestination);
    lv_tmpIndexSource = libDLLL_gf_GetItemIndexinListbox(lp_listboxSource, lp_iD);
    lv_tmpIndexDestination = 0;

    // Implementation
    auto8B8B548D_val = lp_iDOptions;
    if (auto8B8B548D_val == 0) {
        lv_tmpIndexDestination = libDLLL_gf_GetNextAvalibleIndex(lv_tmpNum2, lp_iD);
        if (((lv_tmpIndexSource >= 0) && (lv_tmpIndexDestination >= 0))) {
            libDLLL_gf_AddItemToListbox(lp_listboxDestination, lp_players, lp_iD, libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpIndexSource].lv_text);
            libDLLL_gf_RemoveIteminListbox(lp_listboxSource, lp_players, lp_iD);
            libDLLL_gf_ReorderList(lv_tmpNum1);
            libDLLL_gf_ReorderList(lv_tmpNum2);
            libDLLL_gf_RefreshListbox(lp_listboxSource, lp_players);
            libDLLL_gf_RefreshListbox(lp_listboxDestination, lp_players);
        }
        else {
        }
    }
    else if (auto8B8B548D_val == 1) {
        if ((lp_newID == "")) {
            lv_tmpIndexDestination = libDLLL_gf_GetNextAvalibleIndex(lv_tmpNum2, "<!IGNORE!>");
            lp_newID = IntToString(lv_tmpIndexDestination);
        }
        else {
            lv_tmpIndexDestination = libDLLL_gf_GetNextAvalibleIndex(lv_tmpNum2, lp_newID);
        }
        if (((lv_tmpIndexSource >= 0) && (lv_tmpIndexDestination >= 0))) {
            libDLLL_gf_AddItemToListbox(lp_listboxDestination, lp_players, lp_newID, libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpIndexSource].lv_text);
            libDLLL_gf_RemoveIteminListbox(lp_listboxSource, lp_players, lp_iD);
            libDLLL_gf_ReorderList(lv_tmpNum1);
            libDLLL_gf_ReorderList(lv_tmpNum2);
            libDLLL_gf_RefreshListbox(lp_listboxSource, lp_players);
            libDLLL_gf_RefreshListbox(lp_listboxDestination, lp_players);
        }
        else {
        }
    }
    else {
    }
}

void libDLLL_gf_ChangeListboxList (int lp_listboxSource, int lp_listboxDestination, playergroup lp_players, int lp_options) {
    int auto1E2E8A80_val;
    int auto26DF6CDE_as;
    int auto26DF6CDE_ae;
    int auto26DF6CDE_ai;
    int auto69FF94B5_as;
    int auto69FF94B5_ae;
    int auto69FF94B5_ai;
    int auto7F694486_as;
    int auto7F694486_ae;
    int auto7F694486_ai;

    // Variable Declarations
    int lv_tmpNum1;
    int lv_tmpNum2;
    int lv_tmpCounter;

    // Variable Initialization
    lv_tmpNum1 = libDLLL_gf_GetListbox(lp_listboxSource);
    lv_tmpNum2 = libDLLL_gf_GetListbox(lp_listboxDestination);
    lv_tmpCounter = 0;

    // Implementation
    if (((lv_tmpNum1 >= 0) && (lv_tmpNum2 >= 0))) {
        auto1E2E8A80_val = lp_options;
        if (auto1E2E8A80_val == 0) {
            libDLLL_gf_ReassociateListbox(lp_listboxSource, (lv_tmpNum2));
            libDLLL_gf_AssociateListbox(lp_listboxDestination, (lv_tmpNum1));
            libDLLL_gf_RefreshListbox(lp_listboxSource, lp_players);
            libDLLL_gf_RefreshListbox(lp_listboxDestination, lp_players);
        }
        else if (auto1E2E8A80_val == 1) {
            auto26DF6CDE_as = 1;
            auto26DF6CDE_ae = 100;
            auto26DF6CDE_ai = 1;
            lv_tmpCounter = auto26DF6CDE_as;
            if (auto26DF6CDE_ai > 0 || (auto26DF6CDE_ai == 0 && auto26DF6CDE_as < auto26DF6CDE_ae)) {
                while (lv_tmpCounter <= auto26DF6CDE_ae) {
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_iD = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_iD;
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_text = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_text;
                    lv_tmpCounter = lv_tmpCounter + auto26DF6CDE_ai;
                }
            }
            else if (auto26DF6CDE_ai < 0 || (auto26DF6CDE_ai == 0 && auto26DF6CDE_ae < auto26DF6CDE_as)) {
                while (lv_tmpCounter >= auto26DF6CDE_ae) {
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_iD = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_iD;
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_text = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_text;
                    lv_tmpCounter = lv_tmpCounter + auto26DF6CDE_ai;
                }
            }
            libDLLL_gf_RefreshListbox(lp_listboxDestination, lp_players);
        }
        else if (auto1E2E8A80_val == 2) {
            auto69FF94B5_as = 1;
            auto69FF94B5_ae = 100;
            auto69FF94B5_ai = 1;
            lv_tmpCounter = auto69FF94B5_as;
            if (auto69FF94B5_ai > 0 || (auto69FF94B5_ai == 0 && auto69FF94B5_as < auto69FF94B5_ae)) {
                while (lv_tmpCounter <= auto69FF94B5_ae) {
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_iD = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_iD;
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_text = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_text;
                    lv_tmpCounter = lv_tmpCounter + auto69FF94B5_ai;
                }
            }
            else if (auto69FF94B5_ai < 0 || (auto69FF94B5_ai == 0 && auto69FF94B5_ae < auto69FF94B5_as)) {
                while (lv_tmpCounter >= auto69FF94B5_ae) {
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_iD = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_iD;
                    libDLLL_gv_itemLists[lv_tmpNum2][lv_tmpCounter].lv_text = libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_text;
                    lv_tmpCounter = lv_tmpCounter + auto69FF94B5_ai;
                }
            }
            auto7F694486_as = 1;
            auto7F694486_ae = 100;
            auto7F694486_ai = 1;
            lv_tmpCounter = auto7F694486_as;
            if (auto7F694486_ai > 0 || (auto7F694486_ai == 0 && auto7F694486_as < auto7F694486_ae)) {
                while (lv_tmpCounter <= auto7F694486_ae) {
                    libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_iD = null;
                    libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_text = null;
                    lv_tmpCounter = lv_tmpCounter + auto7F694486_ai;
                }
            }
            else if (auto7F694486_ai < 0 || (auto7F694486_ai == 0 && auto7F694486_ae < auto7F694486_as)) {
                while (lv_tmpCounter >= auto7F694486_ae) {
                    libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_iD = null;
                    libDLLL_gv_itemLists[lv_tmpNum1][lv_tmpCounter].lv_text = null;
                    lv_tmpCounter = lv_tmpCounter + auto7F694486_ai;
                }
            }
            libDLLL_gf_RefreshListbox(lp_listboxSource, lp_players);
            libDLLL_gf_RefreshListbox(lp_listboxDestination, lp_players);
        }
        else {
        }
    }
    else {
    }
}

//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
bool libDLLL_InitLib_completed = false;

void libDLLL_InitLib () {
    if (libDLLL_InitLib_completed) {
        return;
    }

    libDLLL_InitVariables();

    libDLLL_InitLib_completed = true;
}
 

Vestras

Retired
Well of course it doesn't get executed, there are no initialization blocks. Try putting initialization code into static { } blocks.
I suggest you also convert it to Andromeda code.
 

Sevion

The DIY Ninja
I don't think you understand what I'm talking about. It works ingame. It just doesn't get put INTO the map by Moonlite...
 

Sevion

The DIY Ninja
Question first: Does Moonlite come packaged with Andromeda? If not, how do I add it... (I thought I had this on one of my other posts, but TH has been messed up lately and didn't want to have my edit in there.)
 

Vestras

Retired
Question first: Does Moonlite come packaged with Andromeda? If not, how do I add it... (I thought I had this on one of my other posts, but TH has been messed up lately and didn't want to have my edit in there.)
Yes, it does. Not always the latest version though.
 

Vestras

Retired
Is it already setup to work right off the bat?
Yes, and it does work. It is solely Andromeda that isn't injecting code. If you want to be 100% sure you can open up the task manager and see if java is there when you hit build and then dissappears.
 

Vestras

Retired
Then either Andromeda isn't injecting right, or Andromeda isn't setup right with Moonlite.
Most likely the first, actually 100% sure on the first.
But that's the "minus" on using beta software. You should report it on SC2Mod so Gex can fix it. Or maybe try upgrading Andromeda to the latest version. (Andromeda is in %MOONLITEINSTALLDIR%\Compilers\Andromeda)
 

Sevion

The DIY Ninja
Actually... When I tried updating windows told me that the one Moonlite comes with is newer... >_>

I can try again.

Actually I posted on SC2Mod, and the entire thread turned into when Andromeda 1.5 is going to be released... Within the first 3 posts... >_<

OT ftl.

Anyhow, I posted another thread in the Bug Reports.
 

rover2341

Is riding a roller coaster...Wee!
Hmm, Mine Wont work. It Says Its missing a registry file. I cant find the exe for starcraft 2. Any Idea? I worked with the beta but not with the normal game it self.

How to fix?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Test!
  • tom_mai78101 tom_mai78101:
    I must be in a test server.
  • tom_mai78101 tom_mai78101:
    Nice, Twitter tweets embedding now works
  • Wizard Wizard:
    Yup.
  • Ghan Ghan:
    Excellent.
  • Ghan Ghan:
    @tom_mai78101 Hello there.
  • Ghan Ghan:
    Tagging works in the chat too.
  • tom_mai78101 tom_mai78101:
    @Ghan Missed it.
  • Wizard Wizard:
    Still fixing things here and there. Added widgets to the portal, will make it match the ones here on the forum index tomorrow.
  • Ghan Ghan:
    The venerable World Editor Tutorials site has been converted to HTTPS at last.
  • jonas jonas:
    cool
  • jonas jonas:
    and I can even edit my messages, nice
  • seph ir oth seph ir oth:
    GENERAL CHIT CHAT, YOU ARE A BOLD ONE
  • Ghan Ghan:
    Hello there
  • The Helper The Helper:
    this new chatbox is great and the forum software update is great too
    +1
  • The Helper The Helper:
    upgrade has fixed forum registration spam problem
  • tom_mai78101 tom_mai78101:
    Something tells me we might be able to customize the chatbox a bit, considering that there's a gap under every message.
  • Wizard Wizard:
    Going to deploy a fix soon, just had to take some time for myself this weekend.
  • Varine Varine:
    Unbelievable. Time for yourself? How dare you!
  • Wizard Wizard:
    xD
  • tom_mai78101 tom_mai78101:
    Hm, it is now harder to type anything on an Android phone. Pressing Backspace or Enter keys will dismiss the Android keyboard for some reasons.
  • tom_mai78101 tom_mai78101:
    Just noticed there's a delay of at least 2 minutes before each post. Guess I can't post Headline News quickly as I used to.
  • tom_mai78101 tom_mai78101:
    As far as I can tell, there are definitely things I need to get accustomed to first.
  • Varine Varine:
    FCC is cracking down recently

    Members online

    No members online now.

    Affiliates

    Hive Workshop
    Top