跨服排行榜 » 历史记录 » 版本 2
yangdefeng, 2022-06-15 13:49
| 1 | 1 | yangdefeng | h4. %{color:firebrick}跨服排行榜% |
|---|---|---|---|
| 2 | |||
| 3 | *模块说明* |
||
| 4 | 使用 [[通区数据表]] 与 [[Dlg_itemGrid_|itemGrid]] 实现跨服排行榜的效果 |
||
| 5 | |||
| 6 | 2 | yangdefeng | *相关模块* |
| 7 | [[自定义排行榜]] |
||
| 8 | |||
| 9 | 1 | yangdefeng | - |
| 10 | - |
||
| 11 | |||
| 12 | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
||
| 13 | |||
| 14 | - |
||
| 15 | - |
||
| 16 | |||
| 17 | bq. [<notextile>@</notextile>main] |
||
| 18 | #act |
||
| 19 | [[mov]] n$打开标记 0 |
||
| 20 | #say |
||
| 21 | <保存排行数据/<notextile>@</notextile>存数据>\ \ \ |
||
| 22 | <显示排行/<notextile>@</notextile>显示排行>\ \ \ |
||
| 23 | <删除排行数据/<notextile>@</notextile>删数据>\ \ \ |
||
| 24 | <查看排行数据/<notextile>@</notextile>查数据>\ \ \ |
||
| 25 | |
||
| 26 | [<notextile>@</notextile>存数据] |
||
| 27 | #if |
||
| 28 | [[not]] [[tbl_exist]] tb_cross跨服排行 |
||
| 29 | #act |
||
| 30 | [[tbl_create_cross]] tb_cross跨服排行 关键字 角色名 服务器id 战斗力 等级 |
||
| 31 | |
||
| 32 | #if |
||
| 33 | #act |
||
| 34 | [[tbl_add]] tb_cross跨服排行 <notextile><$userName>_<$server> <$userName> <$server> <$powerValue> <$level></notextile> |
||
| 35 | %{color:lightGrey};--此处可根据指定字段排序,相关命令:tbl_sort--% |
||
| 36 | [[tbl_save]] tb_cross跨服排行 |
||
| 37 | [[messageBox]] 数据保存完毕! |
||
| 38 | |
||
| 39 | [<notextile>@</notextile>查数据] |
||
| 40 | #if |
||
| 41 | [[tbl_exist]] tb_cross跨服排行 |
||
| 42 | #act |
||
| 43 | [[tbl_toStr]] tb_cross跨服排行 s0 |
||
| 44 | [[messageBox]] <$str(s0)> |
||
| 45 | #elseAct |
||
| 46 | [[messageBox]] 跨服排行数据尚不存在 |
||
| 47 | |
||
| 48 | [<notextile>@</notextile>删数据] |
||
| 49 | #if |
||
| 50 | [[tbl_exist]] tb_cross跨服排行 |
||
| 51 | #act |
||
| 52 | [[tbl_destroy]] tb_cross跨服排行 |
||
| 53 | [[messageBox]] 跨服排行数据删除完毕 |
||
| 54 | #elseAct |
||
| 55 | [[messageBox]] 跨服排行数据尚不存在 |
||
| 56 | |
||
| 57 | [<notextile>@</notextile>显示排行] |
||
| 58 | %{color:lightGrey};--排行显示列表赋值--% |
||
| 59 | #act |
||
| 60 | [[mov]] s$itemList |
||
| 61 | [[mov]] n$idx 1 |
||
| 62 | |
||
| 63 | #if tbl tb_cross跨服排行 s$关键字 |
||
| 64 | #act |
||
| 65 | [[mov]] s$key <$str(s$关键字)> |
||
| 66 | [[mov]] s$角色名 <$tbl(tb_cross跨服排行,s$关键字,角色名)> |
||
| 67 | [[mov]] s$战斗力 <$tbl(tb_cross跨服排行,s$关键字,战斗力)> |
||
| 68 | [[mov]] s$等级 <$tbl(tb_cross跨服排行,s$关键字,等级)> |
||
| 69 | goto <notextile>@</notextile>条目模板 |
||
| 70 | [[inc]] n$idx 1 |
||
| 71 | |
||
| 72 | #if |
||
| 73 | #act |
||
| 74 | goto <notextile>@</notextile>点击条目 |
||
| 75 | |
||
| 76 | [<notextile>@</notextile>条目模板] |
||
| 77 | #act |
||
| 78 | [[mov]] s$item |
||
| 79 | [[inc]] s$item (<itemIndex:<$str(n$idx)>> |
||
| 80 | [[inc]] s$item <itemToggle:huishouwupin_xuanzhongkuang:denglu_liebiao_weixuanzhong/<notextile>@</notextile>点击条目(<$str(s$key)>)> |
||
| 81 | [[inc]] s$item <text:<$str(s$角色名)>{scolor=150}:80:60> |
||
| 82 | [[inc]] s$item <text:<$str(s$战斗力)>:280:60> |
||
| 83 | [[inc]] s$item <text:<$str(s$等级)>:450:60> |
||
| 84 | [[inc]] s$item ) |
||
| 85 | [[inc]] s$itemList s$item |
||
| 86 | |
||
| 87 | [<notextile>@</notextile>点击条目] |
||
| 88 | %{color:lightGrey};--取出关键字--% |
||
| 89 | #if |
||
| 90 | [[equal]] n$打开标记 1 |
||
| 91 | #act |
||
| 92 | [[mov]] s$关键字 <$scriptParam1> |
||
| 93 | #elseAct |
||
| 94 | %{color:lightGrey};--初始打开界面,默认点击处理--% |
||
| 95 | [[tbl_index_key]] tb_cross跨服排行 1 s$关键字 |
||
| 96 | [[mov]] n$打开标记 1 |
||
| 97 | |
||
| 98 | #if |
||
| 99 | #act |
||
| 100 | %{color:lightGrey};--根据关键字获取点击“角色名”与“所在服”--% |
||
| 101 | [[pgExtractString]] _ s$关键字 s$关键字拆分 n0 |
||
| 102 | [[mov]] s$展示角色 <$str(s$关键字拆分_1)> |
||
| 103 | [[mov]] s$所在服 <$str(s$关键字拆分_2)> |
||
| 104 | %{color:lightGrey};--展示模型数据赋值--% |
||
| 105 | [[playUser]] s$展示角色 s$所在服 s$模型id s$性别 s$武器id s$斗笠id s$翅膀id <notextile>@</notextile>getUserInfo |
||
| 106 | |
||
| 107 | [<notextile>@</notextile>getUserInfo] |
||
| 108 | #act |
||
| 109 | [[openMerchantBigDlg]] ok_di 4 0 0 1 0 0 |
||
| 110 | #say |
||
| 111 | <[[dlg_dontClearList_|dontClearList]]:跨服排行列表>\ |
||
| 112 | <[[dlg_panelSize_|panelSize]]:1800:1000>\ |
||
| 113 | <[[dlg_itemGrid_|itemGrid]]:<$str(s$itemList)>:跨服排行列表,1,0,1:0:0:1000,100:1,1,650,1:0>\ |
||
| 114 | |
||
| 115 | <[[dlg_playModel_|playModel]]:<$str(s$模型id)>:1000:0:8:1.3,5:<$str(s$性别)>:<$str(s$武器id)>:<$str(s$斗笠id)>:<$str(s$翅膀id)>:0> |
||
| 116 | <[[dlg_playModelEx_|playModelEx]]:<$str(s$模型id)>:1000:400:8:1.3,5:<$str(s$性别)>:<$str(s$武器id)>:<$str(s$斗笠id)>:<$str(s$翅膀id)>:0> |
||
| 117 | |
||
| 118 | <[[dlg_text_|text]]:查看角色信息:100:700/<notextile>@</notextile>角色信息> |
||
| 119 | |
||
| 120 | [<notextile>@</notextile>角色信息] |
||
| 121 | #act |
||
| 122 | [[viewPlayerEx]] <$str(s$展示角色)> <$str(s$所在服)> |