多选背包 » 历史记录 » 修订 3
修订 2 (tejie, 2024-02-20 18:07) → 修订 3/5 (tejie, 2025-03-30 14:31)
h4. %{color:firebrick}多选背包%
*模块说明*
对背包中的道具格,进行勾选。
对勾选结果进行批量处理。
请在非战斗地图使用该功能。
如提交时,选中格子中的道具有变更,则该单元格不会处理。
*相关命令*
_*{color:green}openChkBag*_
打开多选背包界面
_*{color:green}setBagGrid*_
设置指定背包格的选中状态
_*{color:green}sbmtBagChk*_
提交多选结果
_*{color:green}delBagGrid*_
删除指定背包格中的道具
*相关qf触发器*
_*{color:green}[@clkChkBag]*_
点击多选背包中的格子时,触发
返回以下变量值
s0-格子id
s1-物品名称
s2-物品数量
s3-选中状态
*相关系统表*
_*{color:green}sys_tbl_bagSlct*_
提交多选结果时,对应的选中结果表
key-背包格id
name字段-物品名称
num字段-物品数量
-
-
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
-
-
bq.
<notextile>[@main]</notextile>
#say
<notextile><打开多选背包/@打开多选背包>\ \</notextile>
<notextile><提交多选结果/@提交多选结果></notextile>
<notextile></notextile>
<notextile>[@打开多选背包]</notextile>
#if
#act
openChkBag
<notextile></notextile>
[@提交多选结果]
#if
#act
sbmtBagChk
<notextile></notextile>
#if tbl sys_tbl_bagSlct s0
#act
mov s$背包格 <$str(s0)>
mov s$物品名 <$tbl(sys_tbl_bagSlct,s0,name)> <$str(sys_tbl_bagSlct,s0,name)>
mov s$数量 <$tbl(sys_tbl_bagSlct,s0,num)> <$str(sys_tbl_bagSlct,s0,num)>
delBagGrid s$背包格
%{color:lightGrey};-删除勾选物品同时,可在此处给予对应货币。%
-
-
%{color:fireBrick}--..\Mir200\Envir\Market_Def\QFunction-0.txt
配置触发器%
bq. _*{color:green}<notextile>[@clkChkBag]</notextile>*_
#if
#act
%{color:lightGrey};-此处是调试信息输出%
print 格子--id:<$str(s0)>
print 物品名称:<$str(s1)>
print 物品数量:<$str(s2)>
print 选中状态:<$str(s3)>
<notextile></notextile>
#if
%{color:lightGrey};-此处可设定,满足条件才可勾选%
equal s3 0
#act
%{color:lightGrey};-满足选中条件的格子,设置为未选中%
setBagGrid s0 0
break
<notextile></notextile>
#if
equal s3 1
#act
%{color:lightGrey};-满足未选中条件的格子,设置为选中%
setBagGrid s0 1
break