自己改了一个中文签名标签
我把人家的BC2签名标签改了改把几个数据都集合一起,并改成中文了
我的那个标签ID:22009
有喜欢的就用吧
code:
//jeepyang
//please don't bag me if the coding is poor - I'm not trained in this...
//enjoy, distribute, modify, but please give me credit
//==============ChangeLog===============================================
//20100526 - right justified main kit stats
// Vars
font_n=font(name: "fzytk", ownerid: 26494);
col1=5;
col2=70;
col3=130;
col4=310;
col5=380;
col6=540;
col7=600;
line1_y=27;
line2_y=39;
line3_y=51;
line4_y=62;
line5_y=75;
line6_y=87;
line7_y=99;
line8_y=115;
line9_y=127;
defaults.size=8;
HeaderBld="VeraBd";
green.color="006600";
red.color="C80000";
defaults.color="000000";
// Background image
bestkit="Assault";
bestkit_score=0;
foreach(p.kits as kitname => kitd)
{
if(kitd.score>bestkit_score)
{bestkit_score=kitd.score;
bestkit=kitd.name;}
}
if(bestkit == "Medic")
{bg_img="bg_medic.gif";}
elseif(bestkit == "Engineer")
{bg_img="bg_engineer.gif";}
elseif(bestkit == "Assault")
{bg_img="bg_assault.gif";}
else
{bg_img="bg_recon.gif";}
image(file: bg_img, ownerid: 1525);
// Kit Script
kit_row=line4_y;
kit_c1=col2+107;
kit_c2=col2+154;
kit_c3=col2+203;
kit_c4=col2+235;
text(x:col2, y:kit_row-10, text: "装备", font:font_n,);
text(x:kit_c1, y:kit_row-10, text: "得分", align:"right", font:font_n);
text(x:kit_c2, y:kit_row-10, text: "击杀", align:"right", font:font_n);
text(x:kit_c3, y:kit_row-10, text: "被杀", align:"right", font:font_n);
text(x:kit_c4, y:kit_row-10, text: "K/D", align:"right", font:font_n);
foreach(p.kits as kitname => kitd)
{
kkd_ratio=kitd.kills/kitd.deaths;
kkd_color="";
if(kkd_ratio >= 1) {kkd_color=green.color;}
else {kkd_color=red.color;}
if(bestkit==kitd.name)
{text(x:col2, y:kit_row, text:kitd.name, font:HeaderBld, color:"660000");}
else
{text(x:col2, y:kit_row, text:kitd.name);}
text(x:kit_c1, y:kit_row, text:kitd.score, align:"right");
text(x:kit_c2, y:kit_row, text:kitd.kills, align:"right");
text(x:kit_c3, y:kit_row, text:kitd.deaths, align:"right");
text(x:kit_c4, y:kit_row, text:round(kkd_ratio,2), align:"right", color:kkd_color);
kit_row=kit_row+10;
}
kit_row=kit_row+1;
text(x:col2, y:kit_row, text:"综合", font:font_n);
text(x:kit_c1, y:kit_row, text:p.score, align:"right", font:HeaderBld);
text(x:kit_c2, y:kit_row, text:p.kills, align:"right", font:HeaderBld);
text(x:kit_c3, y:kit_row, text:p.deaths, align:"right", font:HeaderBld);
kdr=p.kills/p.deaths;
if(kdr>= 1) {kdr_color=green.color;}
else {kdr_color=red.color;}
text(x:kit_c4, y:kit_row, text:round(kdr,2), align:"right", color:kdr_color, font:HeaderBld);
text(x:col2, y:line8_y, text: "治愈:", font:font_n);
text(x:col3, y:line8_y, text: p.gadgets.medk.heals);
text(x:col3+50, y:line8_y, text: "使复苏:",font:font_n);
text(x:col3+110, y:line8_y, text: p.gadgets.defi.revives);
text(x:col2, y:line9_y, text: "补给:", font:font_n);
text(x:col3, y:line9_y, text: p.gadgets.ammb.resupplies);
// Best Weapon Script
bestwp_kills=0;
bestwp_name="No Data";
bestwp_hs=0;
bestwp_time=0;
bestwp_img="";
bestwp_bron=0;
bestwp_silv=0;
bestwp_gold=0;
bestwp_plat=0;
bestwp_shots=0;
bestwp_hits=0;
wp_shots=0;
wp_hits=0;
foreach(p.weapons as wp_name => wpd) {
if(wpd.kills>bestwp_kills) {
bestwp_kills=wpd.kills;
bestwp_name=wpd.name;
bestwp_hs=wpd.headshots;
bestwp_time=wpd.seconds;
bestwp_img=wpd.img;
bestwp_bron=wpd.stars.bron;
bestwp_silv=wpd.stars.silv;
bestwp_gold=wpd.stars.gold;
bestwp_plat=wpd.stars.plat;
bestwp_shots=wpd.shots_fired;
bestwp_hits=wpd.shots_hit;
}
wp_shots=wp_shots+wpd.shots_fired;
wp_hits=wp_hits+wpd.shots_hit;
}
// Best Gadget Script
foreach(p.gadgets as gd_name => ggt) {
if(ggt.kills>bestwp_kills) {
bestwp_kills=ggt.kills;
bestwp_name=ggt.name;
bestwp_hs=ggt.headshots;
bestwp_time=ggt.seconds;
bestwp_img=ggt.img;
bestwp_bron=ggt.stars.bron;
bestwp_silv=ggt.stars.silv;
bestwp_gold=ggt.stars.gold;
bestwp_plat=ggt.stars.plat;
bestwp_shots=ggt.shots_fired;
bestwp_hits=ggt.shots_hit;
}
//work out if this gadget contributes to calculated accuracy
ggt_acc_incl="false";
if(ggt.name=="40MM Grenade"){ggt_acc_incl="True";}
elseif(ggt.name=="40MM Shotgun"){ggt_acc_incl="True";}
elseif(ggt.name=="RPG-7 AT"){ggt_acc_incl="True";}
elseif(ggt.name=="M2 Carl Gustav AT"){ggt_acc_incl="True";}
elseif(ggt.name=="M136 AT4"){ggt_acc_incl="True";}
elseif(ggt.name=="Combat Knife"){ggt_acc_incl="True";}
elseif(ggt.name=="Hand Grenade"){ggt_acc_incl="True";}
elseif(ggt.name=="Tracer Dart Gun"){ggt_acc_incl="True";}
elseif(ggt.name=="M1 Bayonette"){ggt_acc_incl="True";}
if(ggt_acc_incl=="True") {
wp_shots=wp_shots+ggt.shots_fired;
wp_hits=wp_hits+ggt.shots_hit;
}
}
//calculate weapon accuracy
wp_acc=wp_hits/wp_shots*100;
text(x: col3+50, y:line9_y, text: "命中率:", font:font_n);
text(x: col3+110, y:line9_y, text: concat(round(wp_acc,2),"%"));
// Best Vehicle Script
bestveh_kills=0;
bestveh_time=0;
bestveh_name="No Data";
bestveh_img="";
bestveh_bron=0;
bestveh_silv=0;
bestveh_gold=0;
bestveh_plat=0;
bestveh_dist=0;
foreach(p.vehicles as veh_name => vehd) {
if(vehd.kills>bestveh_kills) {
bestveh_kills=vehd.kills;
bestveh_time=vehd.seconds;
bestveh_name=vehd.name;
bestveh_roadkills=vehd.roadkills;
bestveh_img=vehd.img;
bestveh_bron=vehd.stars.bron;
bestveh_silv=vehd.stars.silv;
bestveh_gold=vehd.stars.gold;
bestveh_plat=vehd.stars.plat;
bestveh_dist=vehd.distance;
}
}
// Rankimage
image(file:img_rank(p.rank), x:0, y:0, w:70, h:70);
// Progressbar
if(p.rank<50)
{
progr = progress(type:"rank", curr:p.score, w:60);
progr_deb = rectangle(x:5, y: 70, w:progr.currw, h:10, fill: green.color);
progr_bd = rectangle(x:5, y:70, w:60, h:10, color:"ffffff");
}
//Dogtags
dt_x=2;
dt_y=line5_y+2;
image(file:"dogtagbron.gif", ownerid:1525, x:dt_x, y:dt_y, w:14, h:20);
image(file:"dogtagsilv.gif", ownerid:1525, x:dt_x, y:dt_y+16, w:14, h:20);
image(file:"dogtaggold.gif", ownerid:1525, x:dt_x, y:dt_y+32, w:14, h:20);
dogt=dogtags(name:p.name, platform:p.platform);
txt_bron1=dogt.dogt_bron;
txt_bron2=dogt.dogt_bron_u;
txt_bron=concat(txt_bron1,"u",txt_bron2);
txt_silv1=dogt.dogt_silv;
txt_silv2=dogt.dogt_silv_u;
txt_silv=concat(txt_silv1,"u",txt_silv2);
txt_gold1=dogt.dogt_gold;
txt_gold2=dogt.dogt_gold_u;
txt_gold=concat(txt_gold1,"u",txt_gold2);
if (dogt.dogt_bron>999) {dt_x=0;} //move left a bit to make more room
text(x:dt_x+15, y:dt_y+15, text:txt_bron, size:7);
text(x:dt_x+15, y:dt_y+15+16, text:txt_silv, size:7);
text(x:dt_x+15, y:dt_y+15+32, text:txt_gold, size:7);
// Name, Rankname, Veteran
p_name=text(x:col2, y:20, text:p.name, font:"VeraBd", size:16, color:"660000");
text(x:col2, y:40, text:p.rank_name, font:"VeraBd", size:15, color:"3300CC");
vet_x=col2+p_name.w+3;
if (p.veteran>0) {
rectangle(x:vet_x, y:2, w:22, h:22, fill:"000000");
rectangle(x:vet_x+2, y:4, w:18, h:18, fill:"ffffff");
text(x:vet_x+6, y:19, text:p.veteran, size:12, font:"VeraMoBd");}
//Platform
plat.img="";
if(p.platform=="pc") {plat.img="pc.png";}
elseif(p.platform=="360") {plat.img="360.png";}
elseif(p.platform=="ps3") {plat.img="ps3.png";}
image(file:plat.img, x:320, y:0, w:25, h:25);
//Show pins
pinx1=344;
pinx=pinx1;
piny=0;
pinsize=19;
foreach(p.pins as pl_pins => pin) {
if(pin.count>0) {
image(file:pin.img, x:pinx, y:piny, w:pinsize, h:pinsize);
text(x:pinx+pinsize, y:piny+pinsize, text:pin.count, align:"right", size:5);}
pinx=pinx+pinsize;
if(pinx>(800-pinsize)) {
piny=piny+pinsize;
pinx=pinx1;}
}
//PLAYTIME
text(x: 205, y:20, text: "游戏时间:", font:font_n, color:txl_color);
text(x: 315, y:20, text: thetime(p.time,"d h:i"), color:txr_color, align:"right");
// -------------------------------------------------------------------- SIDEGUN
// Searching Pistol by kills
fav_handgun = p.weapons.m9;
text(x:330, y:100, text:"附武器",font:font_n, size:10, color:"0000FF", angle:90);
if (p.weapons.mp443['kills'] > fav_handgun['kills']) {fav_handgun = p.weapons.mp443;}
if (p.weapons.m1911['kills'] > fav_handgun['kills']) {fav_handgun = p.weapons.m1911;}
if (p.weapons.mp412['kills'] > fav_handgun['kills']) {fav_handgun = p.weapons.mp412;}
if (p.weapons.m93r['kills'] > fav_handgun['kills']) {fav_handgun = p.weapons.m93r;}
// Drawing Handgun & stats
sidewp_na = text(x:360, y:48, text:fav_handgun['name'], size:5, align: "center");
sidewp_im = image(file: fav_handgun['img'], x:sidewp_na.x+(sidewp_na.w/2)-58, y:sidewp_na.y+11, w:120, h:30);
sidewp_ki = text(x:360, y:sidewp_im.y+40, text:concat(fav_handgun['kills'], " kills"), size:6, align: "center");
sidewp_ac = text(x:360, y:sidewp_ki.y+18, text:concat(nf(fav_handgun['shots_hit']/fav_handgun['shots_fired']*100, 1), "% 命中率"),font:font_n, size:6, color: "666666", align: "center");
// ------------------------------------------------------------------- WEAPONRY
// Searching best 3 weapon/vehicle by kills
// (excluding the favourite handgun)
dogt = dogtags(name:p.name, platform:p.platform);
weap.a = p.weapons.m9;
weap.b = p.wepaons.m9;
weap.c = p.weapons.m9;
text(x:396, y:100, text:"主武器", font:font_n,size:10, color:"0000FF", angle:90);
//First
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;
}
}
foreach(p.vehicles as veh_id) {
if (veh_id['kills'] > weap.a['kills']) {
weap.a = veh_id;
}
}
//Second
foreach(p.weapons as weap_id) {
if (weap_id != fav_handgun && weap_id['kills'] > weap.b['kills'] && weap.a['kills'] > weap_id['kills']) {
weap.b = weap_id;
}
}
foreach(p.gadgets as gadgt_id) {
if (gadgt_id['kills'] > weap.b['kills'] && weap.a['kills'] > gadgt_id['kills']) {
weap.b = gadgt_id;
}
}
foreach(p.vehicles as veh_id) {
if (veh_id['kills'] > weap.b['kills'] && weap.a['kills'] > veh_id['kills']) {
weap.b = veh_id;
}
}
//Third
foreach(p.weapons as weap_id) {
if (weap_id != fav_handgun && weap_id['kills'] > weap.c['kills'] && weap.b['kills'] > weap_id['kills']) {
weap.c = weap_id;
}
}
foreach(p.gadgets as gadgt_id) {
if (gadgt_id['kills'] > weap.c['kills'] && weap.b['kills'] > gadgt_id['kills']) {
weap.c = gadgt_id;
}
}
foreach(p.vehicles as veh_id) {
if (veh_id['kills'] > weap.c['kills'] && weap.b['kills'] > veh_id['kills']) {
weap.c = veh_id;
}
}
// Drawing Weapons & stats
weap_ox=400;
weap_oy=44;
wp1_na = text(x:weap_ox, y:weap_oy, text:concat("1. ", weap.a['name']), size:7);
wp1_im = image(file: weap.a['img'], x:weap_ox, y:weap_oy+2, w:90, h:22);
wp1_ki = text(x:wp1_im.x+wp1_im.w, y:wp1_im.y+10, text:concat(weap.a['kills'], " kills"), size:6);
wp1_ac = text(x:wp1_im.x+wp1_im.w, y:wp1_ki.y+18, text:concat(nf(weap.a['shots_hit']/weap.a['shots_fired']*100, 1),"% 命中率"),font:font_n,size:6, color: "666666");
if (wp1_na.w <= 125) {rectangle(x:wp1_na.x+wp1_na.w+4, y:wp1_na.y+6, w:130-wp1_na.w, h:1, fill: "666666");}
wp2_na = text(x:weap_ox, y:weap_oy+32, text:concat("2. ", weap.b['name']), size:7);
wp2_im = image(file: weap.b['img'], x:weap_ox, y:weap_oy+34, w:90, h:22);
wp2_ki = text(x:wp2_im.x+wp2_im.w, y:wp2_im.y+10, text:concat(weap.b['kills'], " kills"), size:6);
wp2_ac = text(x:wp2_im.x+wp2_im.w, y:wp2_ki.y+18, text:concat(nf(weap.b['shots_hit']/weap.b['shots_fired']*100, 1), "% 命中率"),font:font_n, size:6, color: "666666");
if (wp2_na.w <= 125) {rectangle(x:wp2_na.x+wp2_na.w+4, y:wp2_na.y+6, w:130-wp2_na.w, h:1, fill: "999999");}
wp3_na = text(x:weap_ox, y:weap_oy+64, text:concat("3. ", weap.c['name']), size:7);
wp3_im = image(file: weap.c['img'], x:weap_ox, y:weap_oy+66, w:90, h:22);
wp3_ki = text(x:wp3_im.x+wp3_im.w, y:wp3_im.y+10, text:concat(weap.c['kills'], " kills"), size:6);
wp3_ac = text(x:wp3_im.x+wp3_im.w, y:wp3_ki.y+18, text:concat(nf(weap.c['shots_hit']/weap.c['shots_fired']*100, 1), "% 命中率"),font:font_n, size:6, color: "666666");
if (wp3_na.w <= 125) {rectangle(x:wp3_na.x+wp3_na.w+4, y:wp3_na.y+6, w:130-wp3_na.w, h:1, fill: "999999");}
//Best Vehicle
text(x: col6, y:line3_y, text: "最佳载具:",font:font_n, size:10, color:"0000FF");
text(x: col7+30, y:line3_y, text: bestveh_name, align:"left");
image(file: bestveh_img, x:col6, y: line3_y, w:180, h:45);
text(x: col6, y:line8_y, text: "击杀:", font:font_n);
text(x: col7, y:line8_y, text: bestveh_kills, align:"left");
text(x: col6, y:line9_y, text: "撞杀:", font:font_n);
text(x: col7, y:line9_y, text: bestveh_roadkills, align:"left");
text(x: col7+40, y:line8_y, text: "里程:", font:font_n);
text(x: col7+100, y:line8_y, text: round(bestveh_dist,0), align:"left");
bestveh_time=bestveh_time/60;
text(x: col7+40, y:line9_y, text: "驾驶分钟:", font:font_n);
text(x: col7+100, y:line9_y, text: round(bestveh_time,2), align:"left");
if(bestveh_bron>0)
{image(file: "vhbron.gif", ownerid: 1525, x:col7+35, y: line5_y, w:20, h:20);}
if(bestveh_silv>0)
{image(file: "vhsilv.gif", ownerid: 1525, x:col7+55, y: line5_y, w:20, h:20);}
if(bestveh_gold>0)
{image(file: "vhgold.gif", ownerid: 1525, x:col7+75, y: line5_y, w:20, h:20);
text(x: col7+90, y:line6_y+5, text: nf(bestveh_gold), align:"left", size:5);}
if(bestveh_plat>0)
{image(file: "vhplat.gif", ownerid: 1525, x:col7+95, y: line5_y, w:20, h:20);}
//credits bit
text(x:796, y:129, text:"design by", size:6, angle:90);
text(x:796, y:86, text:"JEEPYANG", size:6, color:"0000FF", angle:90);
上面就是代码
望高手指点一下
怎么把兵种改为中文
谢谢 副武器。。。。不是附武器。好大的错别字 改了
谢谢
页:
[1]