Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实现 renttimeidx 脚本指令, 用于增加/减少指定背包序号道具的租赁时间 #51

Merged
merged 2 commits into from
Mar 16, 2019

Conversation

CairoLee
Copy link
Contributor

*renttimeidx <背包序号>,<增减的时间秒数>{,<角色编号>};

增加/减少指定背包序号道具的租赁时间.
如果要减少租赁时间的话, 第二个参数请使用负数.

该指令与 renttime 近似, 只是 renttime 操作的是某个已穿戴的装备,
而 renttimeidx 指令可以通过背包序号来指定要调整的物品.

背包序号:
可以通过 getinventorylist 脚本指令的 @inventorylist_idx[] 数组来获得.

增减的时间秒数:
若需要减少时间的话, 请使用负数.

注意事项:
input 指令会将所有小于 0 的用户输入数值变成 0.
若您希望由玩家通过 input 指令来指定要减少的秒数, 那么需要加个负数符号.
或者修改 conf/script_athena.conf 中 input_min_value 选项的值.

返回值:
操作失败返回 0, 非 0 的正数表示成功增减后新的剩余时间秒数
若指定位置没有穿戴装备, 或指定位置的装备并非租赁道具, 函数都会返回 0

@CairoLee CairoLee merged commit c06f7bb into master Mar 16, 2019
@CairoLee CairoLee deleted the script_renttimeidx branch March 16, 2019 05:56
@CairoLee CairoLee added this to the v1.0.0 milestone Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant