Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #library "COMMONFU"
- #include "zcommon.acs"
- global int 1:player_level;
- global int 2:player_exp;
- global int 3:player_next;
- global int 4:player_mhp;
- global int 5:ammo_bulletmax;
- global int 6:ammo_shellmax;
- global int 7:ammo_rocketmax;
- global int 8:ammo_cellmax;
- global int 9:setupscript;
- global int 10:backpackcount;
- script "firstsetup" ENTER
- {
- if(setupscript==0)
- {
- delay(1);
- player_level = 1;
- player_exp = 0;
- player_next = 120;
- player_mhp = 100;
- ammo_bulletmax = 200;
- ammo_shellmax = 50;
- ammo_rocketmax = 50;
- ammo_cellmax = 300;
- backpackcount = 0;
- setupscript++;
- hudmessage(s:"Press C to open player stats."; HUDMSG_TYPEON | HUDMSG_LOG, 0,
- CR_WHITE, 5.0, 5.0, 5.0);
- }
- else
- {
- delay(1);
- acs_terminate("firstsetup", 0);
- }}
- script "gain_xp" (int s_arg0)
- {
- player_exp += s_arg0;
- printbold(s:"+", d:s_arg0, s:"EXP");
- if(player_exp>=player_next)
- {
- delay(1);
- acs_namedexecutewithresult("gain_level", 0, 0, 0, 0);
- }
- }
- script "gain_level" (void)
- {
- int temphpgain = random(1,24);
- int tempbulgain = random(1,14);
- int tempshellgain = random(1,6);
- int temprocgain = random(1,3);
- int tempcellgain = random(1, 21);acs_terminate("firstsetup", 0);
- player_level++;
- player_next = player_next + 255 + ((player_level * 256) / 200);
- player_mhp = player_mhp + temphpgain;
- ammo_bulletmax = ammo_bulletmax + tempbulgain;
- ammo_shellmax = ammo_shellmax + tempshellgain;
- ammo_rocketmax = ammo_rocketmax + temprocgain;
- ammo_cellmax = ammo_cellmax + tempcellgain;
- SetActorProperty(0, APROP_SPAWNHEALTH, (GetActorProperty(0, APROP_SPAWNHEALTH) + temphpgain));
- SetActorProperty(0, APROP_HEALTH, (GetActorProperty(0, APROP_HEALTH) + temphpgain));
- SetAmmoCapacity("Clip", (GetAmmoCapacity("Clip") + tempbulgain));
- SetAmmoCapacity("Shell", (GetAmmoCapacity("Shell") + tempshellgain));
- SetAmmoCapacity("RocketAmmo", (GetAmmoCapacity("RocketAmmo") + temprocgain));
- SetAmmoCapacity("Cell", (GetAmmoCapacity("Cell") + tempcellgain));
- hudmessage(s:"LEVEL UP! Your level went up to ", d:player_level; HUDMSG_FADEINOUT | HUDMSG_LOG,
- 0, CR_RED, 0.25, 0.4, 5.0);
- delay(30);
- hudmessage(s:"Your Max HP is now ", d:player_mhp; HUDMSG_FADEINOUT | HUDMSG_LOG,
- 1, CR_BLUE, 0.25, 0.45, 5.0);
- delay(15);
- hudmessage(s:"Your Max Bullet Capacity is now ", d:ammo_bulletmax; HUDMSG_FADEINOUT | HUDMSG_LOG,
- 2, CR_BLUE, 0.25, 0.5, 5.0);
- delay(15);
- hudmessage(s:"Your Max Shell Capacity is now ", d:ammo_shellmax; HUDMSG_FADEINOUT | HUDMSG_LOG,
- 3, CR_BLUE, 0.25, 0.55, 5.0);
- delay(15);
- hudmessage(s:"Your Max Rocket Capacity is now ", d:ammo_rocketmax; HUDMSG_FADEINOUT | HUDMSG_LOG,
- 4, CR_BLUE, 0.25, 0.6, 5.0);
- delay(15);
- hudmessage(s:"Your Max Cell Capacity is now ", d:ammo_cellmax; HUDMSG_FADEINOUT | HUDMSG_LOG,
- 5, CR_BLUE, 0.25, 0.65, 5.0);
- }
- script "show_stats" (void)
- {
- hudmessage(s:"Stats: Level ", d:player_level; HUDMSG_FADEINOUT,
- 6, CR_RED, 0.8, 0.25, 5.0);
- hudmessage(s:"Max HP: ", d:player_mhp; HUDMSG_FADEINOUT,
- 7, CR_RED, 0.7, 0.3, 5.0);
- hudmessage(s:"Bullet Ammo: ", d:ammo_bulletmax; HUDMSG_FADEINOUT,
- 8, CR_RED, 0.7, 0.35, 5.0);
- hudmessage(s:"Shell Ammo: ", d:ammo_shellmax; HUDMSG_FADEINOUT,
- 9, CR_RED, 0.7, 0.4, 5.0);
- hudmessage(s:"Rocket Ammo: ", d:ammo_rocketmax; HUDMSG_FADEINOUT,
- 10, CR_RED, 0.7, 0.45, 5.0);
- hudmessage(s:"Cell Ammo: ", d:ammo_cellmax; HUDMSG_FADEINOUT,
- 11, CR_RED, 0.7, 0.5, 5.0);
- hudmessage(s:"EXP: ", d:player_exp, s:" / ", d:player_next; HUDMSG_FADEINOUT,
- 12, CR_RED, 0.7, 0.55, 5.0);
- }
- script "obtain_backpack" (void)
- {
- if(backpackcount==0){
- delay(5);
- ammo_bulletmax+=200;
- ammo_shellmax+=50;
- ammo_rocketmax+=50;
- ammo_cellmax+=300;
- SetAmmoCapacity("Clip", (GetAmmoCapacity("Clip") + 200));
- SetAmmoCapacity("Shell", (GetAmmoCapacity("Shell") + 50));
- SetAmmoCapacity("RocketAmmo", (GetAmmoCapacity("RocketAmmo") + 50));
- SetAmmoCapacity("Cell", (GetAmmoCapacity("Cell") + 300));
- backpackcount++;
- }
- else{
- GiveInventory("Clip", 20);
- GiveInventory("Shell", 8);
- GiveInventory("RocketAmmo", 5);
- GiveInventory("Cell", 40);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement