SPOILER! Inhalt einblenden
code]
// Background image-------------------------------------------------------
image(file: "banner.stats.png", ownerid: 4417, x:0, y:0);
defaults.size=7;
defaults.color="000000";
eurostile = font(name: "00069_eurostid", ownerid: 4417);
// Fav. Kit Script--------------------------------------------------------
favkit="assault";
favkit_score=0;
fav_kit_n="No Data";
foreach(p.kits as kitname => kitd) {
if(kitd.score>favkit_score) {
favkit=kitname;
favkit_score=kitd.score;
fav_kit_n=kitd.name;
}
}
if(favkit == "assault")
{kit_sx=0;
kit_sy=0;}
elseif(favkit == "demo")
{kit_sx=0;
kit_sy=45;}
elseif(favkit == "support")
{kit_sx=45;
kit_sy=0;}
else
{kit_sx=45;
kit_sy=45;}
// Searching Weapon ----------------------------------------------------------
// Fav. Weapon
foreach(p.weapons as weap_id) {
if (weap_id != fav_handgun && weap_id['kills'] > weap.a['kills']) {
weap.a = weap_id;
}
}
foreach(p.gadgets as gadgt_id) {
if (gadgt_id['kills'] > weap.a['kills']) {
weap.a = gadgt_id;
}
}
// Favourite Images/Stats------------------------------------------------------
//Weapon
text( x:132, y:53, text: concat("Weapon: ", weap.a['name']), size:8);
image(file:weap.a['img'], x:133, y:57, w:180, h:45);
text (x:319, y:105, text: concat(weap.a['kills'], " kills"), size:8, align:"right");
//Dogtags
dogt=dogtags(name:p.name, platform:p.platform);
text(x:132, y:119, text:concat("Dogtags Total: ",dogt.dogt_total), size:8);
dt_x=149;
dt_y=120;
image(file:"dog_bronze.png", ownerid: 407, x:dt_x, y:dt_y, w:46, h:46);
image(file:"dog_silver.png", ownerid: 407, x:dt_x+50, y:dt_y, w:46, h:46);
image(file:"dog_gold.png", ownerid: 407, x:dt_x+100, y:dt_y, w:46, h:46);
dogt = dogtags(name:p.name, platform:p.platform);
text(x: dt_x+11, y:dt_y+51, text:dogt.dogt_bron);
text(x: dt_x+10+52, y:dt_y+51, text:dogt.dogt_silv);
text(x: dt_x+10+105, y:dt_y+51, text:dogt.dogt_gold);
// K/D + W/L + SquadPlay Attitude Script---------------------------------------
kd_ratio=p.kills/p.deaths;
wl_ratio=p.general.wins/p.general.losses;
squadattpts = (p.general.sc_squad+p.general.sc_team)/(p.general.sc_bonus+p.general.sc_objective);
squadatt = nf(squadattpts*100, 0);
kd_color="";
wl_color="";
squadatt_color = "ffffff";
if(kd_ratio >= 1) {kd_color="339933";}
else {kd_color="cc0000";}
if(wl_ratio >= 1) {wl_color="339933";}
else {wl_color="cc0000";}
if(squadatt >= 50) {squadatt_color = "339933";}
else {squadatt_color = "cc0000";}
// Rankimage + Progressbar + global score ------------------------------------
image(file:img_rank(p.rank), x:14, y:10, w:100, h:100);
// Progressbar
progr = progress(type:"rank", curr:p.score, w:92);
rectangle(x: 17, y: 116, w: 94, h: 6, fill: "666666");
progr_deb = rectangle(x: 18, y: 118, w:progr.currw, h:4, fill: "ff6600");
//Scoring
gl_sc_sp.ox = 18;
gl_sc_sp.oy = 136;
gl_sc_sp.y = 13;
gl_sc_sp.rx = 128 - gl_sc_sp.ox;
text(x: gl_sc_sp.ox, y: gl_sc_sp.oy, text:"Score:", color: "333333");
text(x: gl_sc_sp.ox, y: gl_sc_sp.oy + gl_sc_sp.y, text:"Ingame:", color: "333333");
text(x: gl_sc_sp.ox, y: gl_sc_sp.oy + (gl_sc_sp.y*2), text:"Points/min:", color: "333333");
text(x: gl_sc_sp.rx, y: gl_sc_sp.oy, text: nf(p.score), align:"right");
text(x: gl_sc_sp.rx, y: gl_sc_sp.oy + gl_sc_sp.y, text: concat(thetime(p.time, "h"), "h"), align:"right");
text(x: gl_sc_sp.rx, y: gl_sc_sp.oy + (gl_sc_sp.y*2), text: nf(p.score/(p.time/60)), align:"right");
// Veterans rank + Name e Rankname-------------------------------
//Veteran
ver_bg = image(file: "veteran.png", ownerid: 1475, x:137, y:12, w:15, h:15);
text(x:146, y:25, text:p.veteran, size:10, font: eurostile, align: "center");
// Name and Rankname-------------------------------------------------------
text (x:198, y:26, text:"[BLU]", font: eurostile, size:15, align: "center", color:"ffffff");
nick = text(x:228, y:26, text:p.name, font: eurostile, size:15, color:"ffffff");
// Calculated stars------------------------------------------------------------
bron_stars = 0;
silv_stars = 0;
gold_stars = 0;
plat_stars = 0;
foreach(p.weapons as wep) {
bron_stars = bron_stars + wep.stars.bron;
silv_stars = silv_stars + wep.stars.silv;
gold_stars = gold_stars + wep.stars.gold;
plat_stars = plat_stars + wep.stars.plat;
}
foreach(p.gadgets as wep) {
bron_stars = bron_stars + wep.stars.bron;
silv_stars = silv_stars + wep.stars.silv;
gold_stars = gold_stars + wep.stars.gold;
plat_stars = plat_stars + wep.stars.plat;
}
foreach(p.vehicle_class as wep) {
bron_stars = bron_stars + wep.stars.bron;
silv_stars = silv_stars + wep.stars.silv;
gold_stars = gold_stars + wep.stars.gold;
plat_stars = plat_stars + wep.stars.plat;
}
//Drawing Stars/Pins------------------------------------------------------------
star_origin = 398;
star_space = 23;
star_rowy = 8;
bronze = image(file: "j4ff_br.png", ownerid: 1094, x:star_origin, y:star_rowy, w:22, h:22);
text(x: bronze.x+22, y: bronze.y+25, text:nf(bron_stars), size:5, color:"ffffff", align:"right");
silver = image(file: "j4ff_si.png", ownerid: 1094, x:star_origin+star_space, y:star_rowy, w:22, h:22);
text(x: silver.x+22, y: silver.y+25, text:nf(silv_stars), size:5, color:"ffffff", align:"right");
gold = image(file: "j4ff_go.png", ownerid: 1094, x:star_origin+(star_space*2), y:star_rowy, w:22, h:22);
text(x: gold.x+22, y: gold.y+25, text:nf(gold_stars), size:5, color:"ffffff", align:"right");
platinum = image(file: "j4ff_pl.png", ownerid: 1094, x:star_origin+(star_space*3), y:star_rowy, w:22, h:22);
text(x: platinum.x+22, y:platinum.y+25, text:nf(plat_stars), size:5, color:"ffffff", align:"right");
// Performance Stats----------------------------------------------------------
text (x:411, y:52, text:"P E R F O R M A N C E", font: eurostile, size:6, align: "center", color:"ffffff");
stats_ox = 335;
stats_oy = 76;
stats_rows = 15;
stats_border = 489;
rectangle( x: stats_ox + 2, y: stats_oy + 2, w: stats_border - stats_ox - 4, h:1, fill: "999999");
rectangle( x: stats_ox + 2, y: stats_oy + stats_rows + 2, w: stats_border - stats_ox - 4, h:1, fill: "999999");
rectangle( x: stats_ox + 2, y: stats_oy + (stats_rows*4) + 2, w: stats_border - stats_ox - 4, h:1, fill: "999999");
rectangle( x: stats_ox + 2, y: stats_oy + (stats_rows*3) + 2, w: stats_border - stats_ox - 4, h:1, fill: "999999");
rectangle( x: stats_ox + 2, y: stats_oy + (stats_rows*2) + 2, w: stats_border - stats_ox - 4, h:1, fill: "999999");
rectangle( x: stats_ox + 2, y: stats_oy + (stats_rows*5) + 2, w: stats_border - stats_ox - 4, h:1, fill: "999999");
rectangle( x: stats_ox + 2, y: stats_oy + (stats_rows*6) + 2, w: stats_border - stats_ox - 4, h:1, fill: "999999");
text (x:stats_ox, y:stats_oy, text:"K/D ratio", size:8);
text (x:stats_ox, y:stats_oy+stats_rows, text:"Global kills", size:8);
text (x:stats_ox, y:stats_oy+(stats_rows*4), text:"W/L ratio", size:8);
text (x:stats_ox, y:stats_oy+(stats_rows*3), text:"Total matches", size:8);
text (x:stats_ox, y:stats_oy+(stats_rows*2), text:"Global deaths", size:8);
text (x:stats_ox, y:stats_oy+(stats_rows*5), text:"Avg. lifetime", size:8);
text (x:stats_ox, y:stats_oy+(stats_rows*6), text:"Teamkills", size:8);
text (x:stats_border, y:stats_oy, text:nf(kd_ratio, 2), size:8, align: "right", color: kd_color);
text (x:stats_border, y:stats_oy+stats_rows, text:p.kills, size:8, align: "right", color: "ffffff");
text (x:stats_border, y:stats_oy+(stats_rows*4), text:nf(wl_ratio, 2), size:8, align: "right", color: wl_color);
text (x:stats_border, y:stats_oy+(stats_rows*3), text:p.general.games, size:8, align: "right", color: "ffffff");
text (x:stats_border, y:stats_oy+(stats_rows*2), text:p.deaths, size:8, align: "right", color: "ffffff");
text (x:stats_border, y:stats_oy+(stats_rows*5), text:concat(round(p.time/p.deaths, 0),"sec"), size:8, align: "right", color: "ffffff");
text (x:stats_border, y:stats_oy+(stats_rows*6), text:p.general.teamkills, size:8, align: "right", color: "cc0000");
[/code]