|
|
//福布斯排行 GA0 71 73 福布斯排行榜 0 13 0 600
- program Mir2;
- //初始化设置
- Const FBS_GetCount = 8;//显示最多条数10
- Const FBS_GetNum = 10;//获取多少元宝以上数据
- var
- FBS_YBNum : array [1..10] of string;
- FBS_UserName : array [1..10] of string;
- PaiHangStr : string;
- num : Integer;
- procedure OnInitialize; //初始化操作
- var i:integer;
- begin
- PaiHangStr := '';
- num := 0;
- for i = 1 to 10 do
- begin
- FBS_YBNum := '';
- FBS_UserName := '';
- end;
- end;
- procedure Execute;//自动执行
- var
- i : integer;
- begin
- This_DB.ExecuteQuery('select ChrName,YBNum from gamedata.yb_user_data where YBNum > '+IntToStr(FBS_GetNum)+' order by YBNum desc limit 10;');//查询前十
- for i := 1 to FBS_GetCount do
- begin
- if This_DB.PsEof() then
- begin
- break;
- end else
- begin
- FBS_UserName := This_DB.PsFieldByName('ChrName');
- FBS_YBNum := This_DB.PsFieldByName('YBNum');
- This_DB.PsNext();
- end;
- end;
- end;
- begin
- for Num := 1 to FBS_GetCount do
- begin
- if This_DB.PsEof() then
- begin
- break;
- end else
- begin
- PaiHangStr := PaiHangStr +'|第'+IntToStr(Num)+'名:'+ FBS_UserName[Num] + '^资产:' + FBS_YBNum[Num];
- This_DB.PsNext();
- end;
- end;
- IF PaiHangStr = '' then
- begin
- PaiHangStr := '| |还没有人能上到排行榜';
- end;
- This_Npc.NpcDialog(This_Player,'只有前'+IntToStr(FBS_GetCount)+'名'+IntToStr(FBS_GetNum)+'元宝以上才有资格上榜!'+PaiHangStr);
- end.
复制代码
|
上一篇:战神引擎获取当前升级经验脚本下一篇:战神引擎沙城捐献脚本加百分比攻击
|