99Max综合娱乐网站(旧版)

 找回密码
 立即注册
查看: 981|回复: 3

[脚本求助] 如何获取装备上卡片的信息?

[复制链接]

升级   87.95%

发表于 2012-8-23 16:03:15 | 显示全部楼层 |阅读模式
在装备经过附魔和其他的强化之后,我想保留精炼值和卡片。这里我用getequiprefinerycnt获取精炼值正确吗?另外如何获取原装备卡槽上卡片的信息呢?
温馨提示:
1. 本站模拟器源于网络,经 99Max.mE 二次开发,仅供个人学习娱乐使用,切勿用于商业用途,否则后果自负!
2. 如需更好体验游戏内容,请前往官方游戏!不具备合法的运营模式,都是强盗,请勿擅自搭建私服!
3. 如本站内容有侵犯您的权益,请发送信息至QQ:372607220 或 EMAIL:372607220@qq.com ,我们会及时删除。

升级   87.95%

 楼主| 发表于 2012-8-24 09:16:42 | 显示全部楼层
谢谢版主!这个函数应该只能返回装备是否插有卡片或者查询装备(包括物品栏)上指定的卡片吧。之前也找到这个函数了。
我是想查询装备上查的是什么卡片,例如:厚刃剑[4]的4个卡槽分别插了纸妖卡、玩具士兵卡、德古拉伯爵卡、乌龟将军卡。要获取这4种卡片的ID。
后来找到了getequipcardid函数,解决了这个问题。呵呵~
getequipcardid  函数
getequipcardid(<n>,<x>);
n   数值
获取n指定的id的装备x卡槽上卡片的id,x范围为0~3,分别对应装备卡槽1~4的位置。

这个函数我是这么理解的。

升级   0%

发表于 2012-8-24 14:26:49 | 显示全部楼层
本帖最后由 一生一叹一痕沙 于 2012-8-24 14:27 编辑

*getinventorylist;

This command sets a bunch of arrays with a complete list of whatever the
invoking character has in their inventory, including all the data needed to
recreate these items perfectly if they are destroyed. Here's what you get:

@inventorylist_id[]        - array of item ids.
@inventorylist_amount[]    - their corresponding item amounts.
@inventorylist_equip[]     - whether the item is equipped or not.
@inventorylist_refine[]    - for how much it is refined.
@inventorylist_identify[]  - whether it is identified.
@inventorylist_attribute[] - whether it is broken.
@inventorylist_card1[]     - These four arrays contain card data for the items.
@inventorylist_card2[]       These data slots are also used to store names
@inventorylist_card3[]       inscribed on the items, so you can explicitly check
@inventorylist_card4[]       if the character owns an item made by a specific
                             craftsman.
@inventorylist_expire[]    - expire time (Unix time stamp). 0 means never expires.
@inventorylist_count       - the number of items in these lists.

This could be handy to save/restore a character's inventory, since no other
command returns such a complete set of data, and could also be the only way to
correctly handle an NPC trader for carded and named items who could resell them
- since NPC objects cannot own items, so they have to store item data in
variables and recreate the items.

Notice that the variables this command generates are all temporary, attached to
the character, and integer.

Be sure to use @inventorylist_count to go through these arrays, and not
'getarraysize', because the arrays are not automatically cleared between runs
of 'getinventorylist'.

这个应该可以,怎么用自己研究下吧,我也没用过

升级   6.33%

发表于 2012-8-24 16:07:35 | 显示全部楼层
论效能上还是getequipcardid更直接点
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|99Max综合娱乐网站(旧版) ( 沪ICP备11024206号-1 )

GMT+8, 2025-6-16 00:22 , Processed in 0.218688 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表