实现 renttimeidx 脚本指令, 用于增加/减少指定背包序号道具的租赁时间 #51
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
*renttimeidx <背包序号>,<增减的时间秒数>{,<角色编号>};
增加/减少指定背包序号道具的租赁时间.
如果要减少租赁时间的话, 第二个参数请使用负数.
该指令与 renttime 近似, 只是 renttime 操作的是某个已穿戴的装备,
而 renttimeidx 指令可以通过背包序号来指定要调整的物品.
背包序号:
可以通过 getinventorylist 脚本指令的 @inventorylist_idx[] 数组来获得.
增减的时间秒数:
若需要减少时间的话, 请使用负数.
注意事项:
input 指令会将所有小于 0 的用户输入数值变成 0.
若您希望由玩家通过 input 指令来指定要减少的秒数, 那么需要加个负数符号.
或者修改 conf/script_athena.conf 中 input_min_value 选项的值.
返回值:
操作失败返回 0, 非 0 的正数表示成功增减后新的剩余时间秒数
若指定位置没有穿戴装备, 或指定位置的装备并非租赁道具, 函数都会返回 0