Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "zcommon.acs"
- struct partyMember
- {
- //stats
- int hp;
- int cur_hp;
- int cur_energy;
- int cur_adre;
- int energy;
- int adre;
- int str_stat;
- int str_scale;
- int dex_stat;
- int dex_scale;
- int int_stat;
- int int_scale;
- int fth_stat;
- int fth_scale;
- int vit_stat;
- int vit_scale;
- str class;
- str role;
- str name;
- }
- global partyMember p1;
- global partyMember p2;
- global partyMember p3;
- global partyMember p4;
- script "init_party" ENTER //initialize all this because the compiler doesnt like it doing it in global scope
- {
- SetUserCVarString(0, "pname", "");
- p1.cur_hp = 0;
- p2.cur_hp = 0;
- p3.cur_hp = 0;
- p4.cur_hp = 0;
- p1.hp = 0;
- p2.hp = 0;
- p3.hp = 0;
- p4.hp = 0;
- p1.energy = 0;
- p2.energy = 0;
- p3.energy = 0;
- p4.energy = 0;
- p1.cur_energy = 0;
- p2.cur_energy = 0;
- p3.cur_energy = 0;
- p4.cur_energy = 0;
- p1.adre = 0;
- p2.adre = 0;
- p3.adre = 0;
- p4.adre = 0;
- p1.cur_adre = 0;
- p2.cur_adre = 0;
- p3.cur_adre = 0;
- p4.cur_adre = 0;
- p1.str_stat = 0;
- p2.str_stat = 0;
- p3.str_stat = 0;
- p4.str_stat = 0;
- p1.dex_stat = 0;
- p2.dex_stat = 0;
- p3.dex_stat = 0;
- p4.dex_stat = 0;
- p1.int_stat = 0;
- p2.int_stat = 0;
- p3.int_stat = 0;
- p4.int_stat = 0;
- p1.fth_stat = 0;
- p2.fth_stat = 0;
- p3.fth_stat = 0;
- p4.fth_stat = 0;
- p1.vit_stat = 0;
- p2.vit_stat = 0;
- p3.vit_stat = 0;
- p4.vit_stat = 0;
- p1.str_scale = 0;
- p2.str_scale = 0;
- p3.str_scale = 0;
- p4.str_scale = 0;
- p1.dex_scale = 0;
- p2.dex_scale = 0;
- p3.dex_scale = 0;
- p4.dex_scale = 0;
- p1.int_scale = 0;
- p2.int_scale = 0;
- p3.int_scale = 0;
- p4.int_scale = 0;
- p1.fth_scale = 0;
- p2.fth_scale = 0;
- p3.fth_scale = 0;
- p4.fth_scale = 0;
- p1.vit_scale = 0;
- p2.vit_scale = 0;
- p3.vit_scale = 0;
- p4.vit_scale = 0;
- p1.class = "";
- p2.class = "";
- p3.class = "";
- p4.class = "";
- p1.role = "";
- p2.role = "";
- p3.role = "";
- p4.role = "";
- p1.name = "";
- p2.name = "";
- p3.name = "";
- p4.name = "";
- }
- script "name_input" (int cur_pmember)
- {
- bool ExitName = false;
- do
- {
- int buttons = GetPlayerInput(-1, INPUT_BUTTONS);
- if(buttons & BT_USE)
- {
- switch(cur_pmember)
- {
- case 0:
- p1.name = GetUserCVarString(0, "pname");
- break;
- case 1:
- p2.name = GetUserCVarString(0, "pname");
- break;
- case 2:
- p3.name = GetUserCVarString(0, "pname");
- break;
- case 3:
- p4.name = GetUserCVarString(0, "pname");
- break;
- }
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- HudMessage(s:"PRESS USE TO FINISH"; HUDMSG_PLAIN, 0, CR_GOLD, 0.5, 0.6, 0.03);
- HudMessage(s:"Press \140 and type in pname followed by your party member's name inside \"quotation marks\" then press Enter"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.13, 0.03);
- HudMessage(s:"Example: \140 pname \"test name\""; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.18, 0.03);
- delay(1);
- } while(!ExitName);
- FadeTo(0,0,0,0.0,0.0);
- }
- script "class_slots" (int cur_slot, int role)
- {
- bool ExitRosterClass = false;
- int MenuCount = 4, CurSel = 0;
- str MenuOptionsTank[4] = {"Berserker", "Tactician", "Warrior", "Back"};
- str MenuOptionsDPS[4] = {"Man At Arms", "Mage", "Duelist", "Back"};
- str MenuOptionsHealer[4] = {"Priest", "Druid", "Sage", "Back"};
- int j;
- int oldbuttons = 0;
- do
- {
- int buttons = GetPlayerInput(-1, INPUT_BUTTONS);
- if((buttons & BT_FORWARD) && (oldbuttons != buttons))
- CurSel--;
- else if((buttons & BT_BACK) && (oldbuttons != buttons))
- CurSel++;
- else if((buttons & BT_USE) && (oldbuttons != buttons))
- {
- switch(role)
- {
- case 0:
- switch(cur_slot)
- {
- case 0:
- switch(CurSel)
- {
- case 0:
- {
- p1.class = MenuOptionsTank[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p1.class = MenuOptionsTank[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p1.class = MenuOptionsTank[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 1:
- switch(CurSel)
- {
- case 0:
- {
- p2.class = MenuOptionsTank[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p2.class = MenuOptionsTank[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p2.class = MenuOptionsTank[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 2:
- switch(CurSel)
- {
- case 0:
- {
- p3.class = MenuOptionsTank[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p3.class = MenuOptionsTank[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p3.class = MenuOptionsTank[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 3:
- switch(CurSel)
- {
- case 0:
- {
- p4.class = MenuOptionsTank[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p4.class = MenuOptionsTank[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p4.class = MenuOptionsTank[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- }
- break;
- case 1:
- switch(cur_slot)
- {
- case 0:
- switch(CurSel)
- {
- case 0:
- {
- p1.class = MenuOptionsDPS[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p1.class = MenuOptionsDPS[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p1.class = MenuOptionsDPS[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 1:
- switch(CurSel)
- {
- case 0:
- {
- p2.class = MenuOptionsDPS[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p2.class = MenuOptionsDPS[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p2.class = MenuOptionsDPS[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 2:
- switch(CurSel)
- {
- case 0:
- {
- p3.class = MenuOptionsDPS[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p3.class = MenuOptionsDPS[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p3.class = MenuOptionsDPS[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 3:
- switch(CurSel)
- {
- case 0:
- {
- p4.class = MenuOptionsDPS[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p4.class = MenuOptionsDPS[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p4.class = MenuOptionsDPS[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- }
- break;
- case 2:
- switch(cur_slot)
- {
- case 0:
- switch(CurSel)
- {
- case 0:
- {
- p1.class = MenuOptionsHealer[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p1.class = MenuOptionsHealer[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p1.class = MenuOptionsHealer[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 1:
- switch(CurSel)
- {
- case 0:
- {
- p2.class = MenuOptionsHealer[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p2.class = MenuOptionsHealer[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p2.class = MenuOptionsHealer[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 2:
- switch(CurSel)
- {
- case 0:
- {
- p3.class = MenuOptionsHealer[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p3.class = MenuOptionsHealer[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p3.class = MenuOptionsHealer[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- case 3:
- {
- switch(CurSel)
- {
- case 0:
- {
- p4.class = MenuOptionsHealer[0];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 1:
- {
- p4.class = MenuOptionsHealer[1];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 2:
- {
- p4.class = MenuOptionsHealer[2];
- delay(4);
- ACS_NamedExecute("name_input", 0, cur_slot);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- }
- }
- break;
- }
- break;
- }
- else
- oldbuttons = 0;
- if(CurSel > 3)
- CurSel = 3;
- if(CurSel < 0)
- CurSel = 0;
- HudMessage(s:"Pick a class"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.1, 0.03);
- HudMessage(s:"Press F1 to check what each class does and their stats"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.15, 0.03);
- HudMessage(s:"Use UP/DOWN arrow keys to select, USE to enter"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.9, 0.03);
- oldbuttons = buttons;
- for(j=0;j<MenuCount;j++)
- {
- if(role == 0)
- {
- if (j == CurSel)
- HudMessage(s:MenuOptionsTank[j]; HUDMSG_PLAIN, 0, CR_GOLD, 0.5, 0.21+j*0.05, 0.03);
- else
- HudMessage(s:MenuOptionsTank[j]; HUDMSG_PLAIN, 0, CR_RED, 0.5, 0.21+j*0.05, 0.03);
- }
- else if(role == 1)
- {
- if (j == CurSel)
- HudMessage(s:MenuOptionsDPS[j]; HUDMSG_PLAIN, 0, CR_GOLD, 0.5, 0.21+j*0.05, 0.03);
- else
- HudMessage(s:MenuOptionsDPS[j]; HUDMSG_PLAIN, 0, CR_RED, 0.5, 0.21+j*0.05, 0.03);
- }
- else if(role == 2)
- {
- if (j == CurSel)
- HudMessage(s:MenuOptionsHealer[j]; HUDMSG_PLAIN, 0, CR_GOLD, 0.5, 0.21+j*0.05, 0.03);
- else
- HudMessage(s:MenuOptionsHealer[j]; HUDMSG_PLAIN, 0, CR_RED, 0.5, 0.21+j*0.05, 0.03);
- }
- }
- delay(1);
- }while(!ExitRosterClass);
- }
- script "roster_slots" (int slot)
- {
- bool ExitRosterSlots = false;
- int MenuCount = 4, CurSel = 0;
- str MenuOptions[4] = {"Tank", "DPS", "Healer", "Back"};
- int j;
- int oldbuttons = 0;
- do
- {
- int buttons = GetPlayerInput(-1, INPUT_BUTTONS);
- if((buttons & BT_FORWARD) && (oldbuttons != buttons))
- CurSel--;
- else if((buttons & BT_BACK) && (oldbuttons != buttons))
- CurSel++;
- else if((buttons & BT_USE) && (oldbuttons != buttons))
- {
- switch(slot)
- {
- case 0:
- {
- switch(CurSel)
- {
- case 0:
- {
- p1.role = "Tank";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 1:
- {
- p1.role = "DPS";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 2:
- {
- p1.role = "Healer";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- }
- case 1:
- {
- switch(CurSel)
- {
- case 0:
- {
- p2.role = "Tank";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 1:
- {
- p2.role = "DPS";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 2:
- {
- p2.role = "Healer";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- }
- case 2:
- {
- switch(CurSel)
- {
- case 0:
- {
- p3.role = "Tank";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 1:
- {
- p3.role = "DPS";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 2:
- {
- p3.role = "Healer";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- }
- case 3:
- {
- switch(CurSel)
- {
- case 0:
- {
- p4.role = "Tank";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 1:
- {
- p4.role = "DPS";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 2:
- {
- p4.role = "Healer";
- delay(4);
- ACS_NamedExecute("class_slots", 0, slot, CurSel);
- terminate;
- }
- case 3:
- {
- delay(4);
- ACS_NamedExecute("init_main", 0);
- terminate;
- }
- }
- break;
- }
- break;
- }
- }
- else
- oldbuttons = 0;
- if(CurSel > 3)
- CurSel = 3;
- if(CurSel < 0)
- CurSel = 0;
- HudMessage(s:"Pick a role"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.1, 0.03);
- HudMessage(s:"Use UP/DOWN arrow keys to select, USE to enter"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.9, 0.03);
- oldbuttons = buttons;
- for(j=0;j<MenuCount;j++)
- {
- if (j == CurSel)
- {
- HudMessage(s:MenuOptions[j]; HUDMSG_PLAIN, 0, CR_GOLD, 0.5, 0.21+j*0.05, 0.03);
- }
- else
- {
- HudMessage(s:MenuOptions[j]; HUDMSG_PLAIN, 0, CR_RED, 0.5, 0.21+j*0.05, 0.03);
- }
- }
- delay(1);
- }while(!ExitRosterSlots);
- }
- script "init_party_stats" (void)
- {
- if(p1.class == "Berserker")
- {
- p1.vit_stat = 10;
- p1.hp = p1.vit_stat * 10;
- p1.cur_hp = 100;
- p1.energy = 20;
- p1.cur_energy = 20;
- p1.adre = 0;
- p1.cur_adre = 0;
- p1.str_stat = 10;
- p1.str_scale = 5;
- p1.dex_stat = 2;
- p1.dex_scale = 1;
- p1.int_stat = 1;
- p1.int_scale = 0;
- p1.fth_stat = 1;
- p1.fth_scale = 0;
- p1.vit_scale = 20;
- }
- if(p2.class == "Berserker")
- {
- p2.vit_stat = 10;
- p2.hp = p2.vit_stat * 10;
- p2.cur_hp = 100;
- p2.energy = 20;
- p2.cur_energy = 20;
- p2.adre = 0;
- p2.cur_adre = 0;
- p2.str_stat = 10;
- p2.str_scale = 5;
- p2.dex_stat = 2;
- p2.dex_scale = 1;
- p2.int_stat = 1;
- p2.int_scale = 0;
- p2.fth_stat = 1;
- p2.fth_scale = 0;
- p2.vit_scale = 20;
- }
- if(p3.class == "Berserker")
- {
- p3.vit_stat = 10;
- p3.hp = p3.vit_stat * 10;
- p3.cur_hp = 100;
- p3.energy = 20;
- p3.cur_energy = 20;
- p3.adre = 0;
- p3.cur_adre = 0;
- p3.str_stat = 10;
- p3.str_scale = 5;
- p3.dex_stat = 2;
- p3.dex_scale = 1;
- p3.int_stat = 1;
- p3.int_scale = 0;
- p3.fth_stat = 1;
- p3.fth_scale = 0;
- p3.vit_scale = 20;
- }
- if(p4.class == "Berserker")
- {
- p4.vit_stat = 10;
- p4.hp = p4.vit_stat * 10;
- p4.cur_hp = 100;
- p4.energy = 10;
- p4.cur_energy = 10;
- p4.adre = 0;
- p4.cur_adre = 0;
- p4.str_stat = 10;
- p4.str_scale = 5;
- p4.dex_stat = 2;
- p4.dex_scale = 1;
- p4.int_stat = 1;
- p4.int_scale = 0;
- p4.fth_stat = 1;
- p4.fth_scale = 0;
- p4.vit_scale = 20;
- }
- if(p1.class == "Tactician")
- {
- p1.vit_stat = 5;
- p1.hp = p1.vit_stat * 10;
- p1.cur_hp = 50;
- p1.energy = 20;
- p1.cur_energy = 20;
- p1.adre = 0;
- p1.cur_adre = 0;
- p1.str_stat = 5;
- p1.str_scale = 2;
- p1.dex_stat = 4;
- p1.dex_scale = 3;
- p1.int_stat = 2;
- p1.int_scale = 0;
- p1.fth_stat = 1;
- p1.fth_scale = 0;
- p1.vit_scale = 10;
- }
- if(p2.class == "Tactician")
- {
- p2.vit_stat = 5;
- p2.hp = p2.vit_stat * 10;
- p2.cur_hp = 50;
- p2.energy = 20;
- p2.cur_energy = 20;
- p2.adre = 0;
- p2.cur_adre = 0;
- p2.str_stat = 7;
- p2.str_scale = 2;
- p2.dex_stat = 4;
- p2.dex_scale = 3;
- p2.int_stat = 2;
- p2.int_scale = 0;
- p2.fth_stat = 1;
- p2.fth_scale = 0;
- p2.vit_scale = 10;
- }
- if(p3.class == "Tactician")
- {
- p3.vit_stat = 5;
- p3.hp = p3.vit_stat * 10;
- p3.cur_hp = 50;
- p3.energy = 20;
- p3.cur_energy = 20;
- p3.adre = 0;
- p3.cur_adre = 0;
- p3.str_stat = 5;
- p3.str_scale = 2;
- p3.dex_stat = 4;
- p3.dex_scale = 3;
- p3.int_stat = 2;
- p3.int_scale = 0;
- p3.fth_stat = 1;
- p3.fth_scale = 0;
- p3.vit_scale = 10;
- }
- if(p4.class == "Tactician")
- {
- p4.vit_stat = 5;
- p4.hp = p4.vit_stat * 10;
- p4.cur_hp = 50;
- p4.energy = 20;
- p4.cur_energy = 20;
- p4.adre = 0;
- p4.cur_adre = 0;
- p4.str_stat = 5;
- p4.str_scale = 2;
- p4.dex_stat = 4;
- p4.dex_scale = 3;
- p4.int_stat = 2;
- p4.int_scale = 0;
- p4.fth_stat = 1;
- p4.fth_scale = 0;
- p4.vit_scale = 10;
- }
- if(p1.class == "Warrior")
- {
- p1.vit_stat = 8;
- p1.hp = p1.vit_stat * 10;
- p1.cur_hp = 80;
- p1.energy = 20;
- p1.cur_energy = 20;
- p1.adre = 0;
- p1.cur_adre = 0;
- p1.str_stat = 8;
- p1.str_scale = 3;
- p1.dex_stat = 3;
- p1.dex_scale = 3;
- p1.int_stat = 2;
- p1.int_scale = 0;
- p1.fth_stat = 2;
- p1.fth_scale = 0;
- p1.vit_scale = 10;
- }
- if(p2.class == "Warrior")
- {
- p2.vit_stat = 8;
- p2.hp = p2.vit_stat * 10;
- p2.cur_hp = 80;
- p2.energy = 20;
- p2.cur_energy = 20;
- p2.adre = 0;
- p2.cur_adre = 0;
- p2.str_stat = 8;
- p2.str_scale = 3;
- p2.dex_stat = 3;
- p2.dex_scale = 3;
- p2.int_stat = 2;
- p2.int_scale = 0;
- p2.fth_stat = 2;
- p2.fth_scale = 0;
- p2.vit_scale = 10;
- }
- if(p3.class == "Warrior")
- {
- p3.vit_stat = 8;
- p3.hp = p3.vit_stat * 10;
- p3.cur_hp = 80;
- p3.energy = 20;
- p3.cur_energy = 20;
- p3.adre = 0;
- p3.cur_adre = 0;
- p3.str_stat = 8;
- p3.str_scale = 3;
- p3.dex_stat = 3;
- p3.dex_scale = 3;
- p3.int_stat = 2;
- p3.int_scale = 0;
- p3.fth_stat = 2;
- p3.fth_scale = 0;
- p3.vit_scale = 10;
- }
- if(p4.class == "Warrior")
- {
- p4.vit_stat = 8;
- p4.hp = p4.vit_stat * 10;
- p4.cur_hp = 80;
- p4.energy = 20;
- p4.cur_energy = 20;
- p4.adre = 0;
- p4.cur_adre = 0;
- p4.str_stat = 8;
- p4.str_scale = 3;
- p4.dex_stat = 3;
- p4.dex_scale = 3;
- p4.int_stat = 2;
- p4.int_scale = 0;
- p4.fth_stat = 2;
- p4.fth_scale = 0;
- p4.vit_scale = 10;
- }
- }
- script "init_main" (void)
- {
- FadeTo(0,0,0,1.0,0.0); //fade to black
- bool ExitRoster = false;
- int MenuCount = 5, CurSel = 0;
- if(!p1.name)
- {
- p1.name = "Slot 1";
- }
- else if(p1.name == "")
- {
- p1.name = "Slot 1";
- }
- if(!p2.name)
- {
- p2.name = "Slot 2";
- }
- else if(p2.name == "")
- {
- p2.name = "Slot 2";
- }
- if(!p3.name)
- {
- p3.name = "Slot 3";
- }
- else if(p3.name == "")
- {
- p3.name = "Slot 3";
- }
- if(!p4.name)
- {
- p4.name = "Slot 4";
- }
- else if(p4.name == "")
- {
- p4.name = "Slot 4";
- }
- str MenuOptions[5] = {p1.name, p2.name, p3.name, p4.name, "Done"};
- int i;
- int oldbuttons = 0;
- do
- {
- int buttons = GetPlayerInput(-1, INPUT_BUTTONS);
- if((buttons & BT_FORWARD) && (oldbuttons != buttons))
- {
- CurSel--;
- }
- else if((buttons & BT_BACK) && (oldbuttons != buttons))
- {
- CurSel++;
- }
- else if((buttons & BT_USE) && (oldbuttons != buttons))
- {
- if(CurSel == 4)
- {
- if((p1.role == "") && (p2.role == "") && (p3.role == "") && (p4.role == ""))
- {
- HudMessage(s:"You must have at least one party member"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.03, 2.0);
- }
- else
- {
- ExitRoster = true;
- }
- }
- else
- {
- delay(4);
- ACS_NamedExecute("roster_slots", 0, CurSel);
- terminate;
- }
- }
- else
- {
- oldbuttons = 0;
- }
- if(CurSel > 4)
- {
- CurSel = 4;
- }
- if(CurSel < 0)
- {
- CurSel = 0;
- }
- HudMessage(s:"Create your party"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.1, 0.03);
- HudMessage(s:"Use UP/DOWN arrow keys to select, USE to enter"; HUDMSG_PLAIN, 0, CR_GREEN, 0.5, 0.9, 0.03);
- for(i=0;i<MenuCount;i++)
- {
- if (i == CurSel)
- {
- HudMessage(s:MenuOptions[i]; HUDMSG_PLAIN, 0, CR_GOLD, 0.5, 0.21+i*0.05, 0.03);
- }
- else
- {
- HudMessage(s:MenuOptions[i]; HUDMSG_PLAIN, 0, CR_RED, 0.5, 0.21+i*0.05, 0.03);
- }
- }
- oldbuttons = buttons;
- delay(1);
- } while(!ExitRoster);
- ACS_NamedExecute("init_party_stats", 0);
- FadeTo(0,0,0,0.0,0.0); //fade to normal
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement