自定义stats签名成功
需要的提供图片,想法,排版。 1000盾1个 :DD试试几个SX套用的效果
1000盾求教程 嗯嗯 不是要统一风格吗 怎么都很个性 =|HERO|=RED丶 发表于 2012-9-13 15:31 static/image/common/back.gif
嗯嗯 不是要统一风格吗 怎么都很个性
模板而已。如果有统一需求的话 会有统一版本 本帖最后由 =|HERO|=Depower 于 2012-9-13 15:43 编辑
=|HERO|=ZeRooo 发表于 2012-9-13 15:31 static/image/common/back.gif
1000盾求教程//Modified by HERO houzi
defaults.text.size=10;
defaults.text.color='ff8a00';
defaults.text.font='0oAmGAtL60NkDOrkfA/Purista-SemiBold.ttf';
//Background
image({file:'0p4cUbkIy0ufpwLvMw/hero1.png', x:0, y:0});
// Script
function secondstotime(secs)
{
var t = new Date(1970,0,1);
t.setSeconds(secs);
var s = t.toTimeString().substr(0,8);
if(secs > 86399)
s = Math.floor((t - Date.parse('1/1/70')) / 3600000) + s.substr(2);
return s;
}
// 1April's list sort script
// func(list of objects, field of objects to use for sort)
var getSortedList=function(list,field){
if(typeof(list)!='object') return list;
var slist=[];
for(var n in list) slist.push(]);
slist.sort(function(a,b){
var v1=a, v2=b;
v1=(typeof(v1)!='object' || typeof(v1)!='number')?0:v1;
v2=(typeof(v2)!='object' || typeof(v2)!='number')?0:v2;
return v2-v1;
});
if(list instanceof Array) {
var ret=[];
for(var i in slist) ret.push(slist);
return ret;
} else {
var ret={};
for(var i in slist) ret]=slist;
return ret;
}
};
//time
// Tiempo
var tiempo=p.stats.global.time/3600;
var tiempomin=p.stats.global.time/60;
var tiempom=tiempomin.toFixed(0)-tiempo.toFixed(0)*60+60
// Fav. kit
var score2kit={
assault:p.stats.scores.assault,
engineer:p.stats.scores.engineer,
recon:p.stats.scores.recon,
support:p.stats.scores.support
};
var favkit='assault';
var favkitscore=0;
for(var kit in score2kit){
if(score2kit<=favkitscore) continue;
favkitscore=score2kit;
favkit=kit;
}
var kit_sx=0;
var kit_sy=0;
if(favkit == 'assault')
{kit_sx=0;
kit_sy=0;}
else if(favkit == 'engineer')
{kit_sx=16;
kit_sy=0;}
else if(favkit == 'support')
{kit_sx=0;
kit_sy=16;}
else
{kit_sx=16;
kit_sy=16;}
kdrcolor = '';
kdr=(p.stats.global.kills/p.stats.global.deaths);
if(kdr >= 0) {kdrcolor='de0000';}
if(kdr >= 1) {kdrcolor='ff4800';}
wlrcolor = '';
wlr=(p.stats.global.wins/p.stats.global.losses);
if(wlr >= 0) {wlrcolor='de0000';}
if(wlr >= 1) {wlrcolor='ff4800';}
//MAIN SIGNATURE ******
// Rank / Country / Name
var rcnx=303;
var rcny=18;
//KIT
//Kit image
image({file:'06xhlEg8G19UvkJiy4/kits_white.png', x:rcnx-55, y:5, w:18, h:18, sx:kit_sx,sy:kit_sy,sw:16,sh:16});
// Rank image
image({file:p.stats.rank.img_tiny, x:6, y:rcny-15});
// Flag
image({file:'flags/cn.png', x:rcnx-34, y:rcny-9, w:16, h:11});
//Player Name
text({text:p.name, font:'0oAmGAtL60NkDOrkfA/Purista-Bold.ttf', x:39, y:21, size:16, color:'FFFFFF'});
//ACTUAL STATS
var firstcol=4;
var firstcolstat=118;
var secondcol=121;
var secondcolstat=222;
//FIRST COLUMN NAME
text({x:firstcol, y:39, text:'Score', color:'6a6a6a'});
text({x:firstcol, y:53, text:'Kills', color:'6a6a6a'});
text({x:firstcol, y:67, text:'Deaths', color:'6a6a6a'});
text({x:firstcol, y:81, text:'K/D', color:'6a6a6a'});
text({x:firstcol, y:95, text:'SPM', color:'6a6a6a'});
//FIRST COLUMN STAT
text({x:firstcolstat, y:39, text:p.stats.scores.score, align:'right'});
text({x:firstcolstat, y:53, text:p.stats.global.kills, align:'right'});
text({x:firstcolstat, y:67, text:p.stats.global.deaths, align:'right'});
text({x:firstcolstat, y:81, text:(p.stats.global.kills/p.stats.global.deaths).toFixed(2), align:'right', color:kdrcolor});
text({x:firstcolstat, y:95, text:(p.stats.scores.score/tiempomin).toFixed(1), align:'right'});
//SECOND COLUMN NAME
text({x:secondcol, y:39, text:'Wins', color:'6a6a6a'});
text({x:secondcol, y:53, text:'Losses', color:'6a6a6a'});
text({x:secondcol, y:67, text:'W/L', color:'6a6a6a'});
text({x:secondcol, y:81, text:'Time', color:'6a6a6a'});
text({x:secondcol, y:95, text:'Skill', color:'6a6a6a'});
//SECOND COLUMN STAT
text({x:secondcolstat, y:39, text:p.stats.global.wins, align:'right'});
text({x:secondcolstat, y:53, text:p.stats.global.losses, align:'right'});
text({x:secondcolstat, color:wlrcolor, y:67, text:(p.stats.global.wins/p.stats.global.losses).toFixed(2), align:'right'});
text({x:secondcolstat, y:81, text:secondstotime(p.stats.global.time), align:'right'});
text({x:secondcolstat, y:95, text:(p.stats.global.elo).toFixed(0), align:'right'});
// get weapons list sorted by number of kills
var bestweaps=getSortedList(p.stats.vehicles,'kills');
//bestwep
// find best gun in sorted weapons list, excluding pistols
wcount=0;
for (n in bestweaps) {
if (bestweaps.category!='Pistols' && wcount!=1) {
wcount++;
if (wcount==1) weapy=33;
image({x:224, y:weapy-3, file:bestweaps.img, w:62, h:38});
wtext='';
wtext='[ '+bestweaps.name+' ]';
text({x:224, y:weapy+3, size:7, text:wtext});
wtext=bestweaps.kills + ' kills';
text({x:325, y:weapy+28, size:7, text:wtext, align:'right'});
}
}
这个是上图所用代码。很简单的,可以控制想显示什么东西(什么都可以),字体及大小,背景图案,整体大小等等。 猴哥...要不还是给你盾你帮我弄一个吧.. ID :Mustang_CN http://g.bf3stats.com/pc/kxGhEIXn/Mustang_CN.pnghttp://g.bf3stats.com/pc/kxGhEIXn/Mustang_CN.png建议重新做底图,这个不好配色 =|HERO|=Depower 发表于 2012-9-13 16:04 static/image/common/back.gif
建议重新做底图,这个不好配色
背景图大小有要求吗~ KD 0.65 的若爆了 =|HERO|=ZeRooo 发表于 2012-9-13 16:36 static/image/common/back.gif
背景图大小有要求吗~
话说你用我做的签名多久了。回头补盾啊~ =|HERO|=ZeRooo 发表于 2012-9-13 15:47 static/image/common/back.gif
ID :Mustang_CN
http://bbs.heroclan.net/thread-391200-1-1.html =|HERO|=Ht19ES 发表于 2012-9-13 17:12 static/image/common/back.gif
话说你用我做的签名多久了。回头补盾啊~
...老总 我是良民啊昨天在论坛看到的... 跪求 =|HERO|=FeiWen8 发表于 2012-9-13 17:51 static/image/common/back.gif
跪求
医生要啥样子的?
页:
[1]
2