项目

一般

简介

跨服排行榜 » 历史记录 » 修订 2

修订 1 (yangdefeng, 2022-06-14 17:37) → 修订 2/3 (yangdefeng, 2022-06-15 13:49)

h4. %{color:firebrick}跨服排行榜% 

 *模块说明* 
 使用 [[通区数据表]] 与 [[Dlg_itemGrid_|itemGrid]] 实现跨服排行榜的效果 

 *相关模块* 
 [[自定义排行榜]] 

 - 
 - 

 h4. *%{color:deepskyblue}特戒引擎脚本示例:%* 

 - 
 - 

 bq. [<notextile>@</notextile>main] 
 #act 
 [[mov]] n$打开标记 0 
 #say 
 <保存排行数据/<notextile>@</notextile>存数据>\ \ \ 
 <显示排行/<notextile>@</notextile>显示排行>\ \ \ 
 <删除排行数据/<notextile>@</notextile>删数据>\ \ \ 
 <查看排行数据/<notextile>@</notextile>查数据>\ \ \ 
 &nbsp; 
 [<notextile>@</notextile>存数据] 
 #if 
 [[not]] [[tbl_exist]] tb_cross跨服排行 
 #act 
 [[tbl_create_cross]] tb_cross跨服排行 关键字 角色名 服务器id 战斗力 等级 
 &nbsp; 
 #if 
 #act 
 [[tbl_add]] tb_cross跨服排行 <notextile><$userName>_<$server> <$userName> <$server> <$powerValue> <$level></notextile> 
 %{color:lightGrey};--此处可根据指定字段排序,相关命令:tbl_sort--% 
 [[tbl_save]] tb_cross跨服排行 
 [[messageBox]] 数据保存完毕! 
 &nbsp; 
 [<notextile>@</notextile>查数据] 
 #if 
 [[tbl_exist]] tb_cross跨服排行 
 #act 
 [[tbl_toStr]] tb_cross跨服排行 s0 
 [[messageBox]] <$str(s0)> 
 #elseAct 
 [[messageBox]] 跨服排行数据尚不存在 
 &nbsp; 
 [<notextile>@</notextile>删数据] 
 #if 
 [[tbl_exist]] tb_cross跨服排行 
 #act 
 [[tbl_destroy]] tb_cross跨服排行 
 [[messageBox]] 跨服排行数据删除完毕 
 #elseAct 
 [[messageBox]] 跨服排行数据尚不存在 
 &nbsp; 
 [<notextile>@</notextile>显示排行] 
 %{color:lightGrey};--排行显示列表赋值--% 
 #act 
 [[mov]] s$itemList 
 [[mov]] n$idx 1 
 &nbsp; 
 #if tbl tb_cross跨服排行 s$关键字 
 #act 
 [[mov]] s$key <$str(s$关键字)> 
 [[mov]] s$角色名 <$tbl(tb_cross跨服排行,s$关键字,角色名)> 
 [[mov]] s$战斗力 <$tbl(tb_cross跨服排行,s$关键字,战斗力)> 
 [[mov]] s$等级 <$tbl(tb_cross跨服排行,s$关键字,等级)> 
 goto <notextile>@</notextile>条目模板 
 [[inc]] n$idx 1 
 &nbsp; 
 #if 
 #act 
 goto <notextile>@</notextile>点击条目 
 &nbsp; 
 [<notextile>@</notextile>条目模板] 
 #act 
 [[mov]] s$item 
 [[inc]] s$item (<itemIndex:<$str(n$idx)>> 
 [[inc]] s$item <itemToggle:huishouwupin_xuanzhongkuang:denglu_liebiao_weixuanzhong/<notextile>@</notextile>点击条目(<$str(s$key)>)> 
 [[inc]] s$item <text:<$str(s$角色名)>{scolor=150}:80:60> 
 [[inc]] s$item <text:<$str(s$战斗力)>:280:60> 
 [[inc]] s$item <text:<$str(s$等级)>:450:60> 
 [[inc]] s$item ) 
 [[inc]] s$itemList s$item 
 &nbsp; 
 [<notextile>@</notextile>点击条目] 
 %{color:lightGrey};--取出关键字--% 
 #if 
 [[equal]] n$打开标记 1 
 #act 
 [[mov]] s$关键字 <$scriptParam1> 
 #elseAct 
 %{color:lightGrey};--初始打开界面,默认点击处理--% 
 [[tbl_index_key]] tb_cross跨服排行 1 s$关键字 
 [[mov]] n$打开标记 1 
 &nbsp; 
 #if 
 #act 
 %{color:lightGrey};--根据关键字获取点击“角色名”与“所在服”--% 
 [[pgExtractString]] _ s$关键字 s$关键字拆分 n0 
 [[mov]] s$展示角色 <$str(s$关键字拆分_1)> 
 [[mov]] s$所在服 <$str(s$关键字拆分_2)> 
 %{color:lightGrey};--展示模型数据赋值--% 
 [[playUser]] s$展示角色 s$所在服 s$模型id s$性别 s$武器id s$斗笠id s$翅膀id <notextile>@</notextile>getUserInfo 
 &nbsp; 
 [<notextile>@</notextile>getUserInfo] 
 #act 
 [[openMerchantBigDlg]] ok_di 4 0 0 1 0 0 
 #say 
 <[[dlg_dontClearList_|dontClearList]]:跨服排行列表>\ 
 <[[dlg_panelSize_|panelSize]]:1800:1000>\ 
 <[[dlg_itemGrid_|itemGrid]]:<$str(s$itemList)>:跨服排行列表,1,0,1:0:0:1000,100:1,1,650,1:0>\ 
 &nbsp; 
 <[[dlg_playModel_|playModel]]:<$str(s$模型id)>:1000:0:8:1.3,5:<$str(s$性别)>:<$str(s$武器id)>:<$str(s$斗笠id)>:<$str(s$翅膀id)>:0> 
 <[[dlg_playModelEx_|playModelEx]]:<$str(s$模型id)>:1000:400:8:1.3,5:<$str(s$性别)>:<$str(s$武器id)>:<$str(s$斗笠id)>:<$str(s$翅膀id)>:0> 
 &nbsp; 
 <[[dlg_text_|text]]:查看角色信息:100:700/<notextile>@</notextile>角色信息> 
 &nbsp; 
 [<notextile>@</notextile>角色信息] 
 #act 
 [[viewPlayerEx]] <$str(s$展示角色)> <$str(s$所在服)>