OK論壇

 找回密碼
 註冊
查看: 2566|回復: 6

[Sea]紀錄身上所有物品及編號

 關閉 [複製鏈接]
  • TA的每日心情
    慵懶
    2020-7-2 07:05 PM
  • 簽到天數: 71 天

    連續簽到: 1 天

    [LV.6]常住居民II

    發表於 2009-11-24 23:03:32 | 顯示全部樓層 |閱讀模式
    1000積分
    本帖最後由 sb66665112 於 2009-11-24 11:37 PM 編輯


    版本:[SeAr_1.2.94]
    請求:可否請大大們寫出將身上所有物品紀錄的SETD? ((非陣列

    ((我寫都出現:無限循環~.~

    最佳答案

    查看完整內容

    不 需 要 那 麼 麻 煩 *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. @in ...
    回復

    使用道具 舉報

  • TA的每日心情
    開心
    2021-12-17 05:30 AM
  • 簽到天數: 237 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2009-11-24 23:03:33 | 顯示全部樓層
    不 需 要 那 麼 麻 煩

    *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_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 local and numeric.
    回復

    使用道具 舉報

  • TA的每日心情
    慵懶
    2020-7-2 07:05 PM
  • 簽到天數: 71 天

    連續簽到: 1 天

    [LV.6]常住居民II

     樓主| 發表於 2009-11-24 23:24:56 | 顯示全部樓層
    =3=
    原來我一直再發瘋=v="
    回復

    使用道具 舉報

  • TA的每日心情
    開心
    2021-12-17 05:30 AM
  • 簽到天數: 237 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2009-11-24 23:27:33 | 顯示全部樓層
    =3=
    原來我一直再發瘋=v="
    sb66665112 發表於 2009-11-24 11:24 PM

    -.-

    如 果 你 還 要 作 setd 轉 換

    在 用 迴 圈 取 得 陣 列 內 容 就 可 以 了 =  =
    回復

    使用道具 舉報

  • TA的每日心情
    奮斗
    2020-10-3 11:40 PM
  • 簽到天數: 64 天

    連續簽到: 1 天

    [LV.6]常住居民II

    發表於 2009-11-24 23:28:45 | 顯示全部樓層
    不~~~~~積分阿.....
    我錯過了囧RZ
    回復

    使用道具 舉報

  • TA的每日心情
    慵懶
    2020-7-2 07:05 PM
  • 簽到天數: 71 天

    連續簽到: 1 天

    [LV.6]常住居民II

     樓主| 發表於 2009-11-24 23:35:29 | 顯示全部樓層
    等測試成功後再用成已經解決?
    #5
    可惜=v=!
    回復

    使用道具 舉報

  • TA的每日心情
    慵懶
    2020-7-2 07:05 PM
  • 簽到天數: 71 天

    連續簽到: 1 天

    [LV.6]常住居民II

     樓主| 發表於 2009-11-24 23:37:23 | 顯示全部樓層
    -        script        item        -1,{
    OnWhisperGlobal:
    set $@item,getinventorylist;
    mes $@item;
    for( set .@i, 1; .@i <= @inventorylist_count; set .@i, .@i +1 ){
    if(@inventorylist_id[.@i]!=0){
    if(countitem(@inventorylist_id[.@i])>=1){
    mes "物品編號"+@inventorylist_id[.@i]+"";
    }
    }
    }
    close;
    }
    成功︿v︿
    回復

    使用道具 舉報

    您需要登錄後才可以回帖 登錄 | 註冊

    本版積分規則

    Archiver|手機版|小黑屋|OK討論區

    GMT+8, 2024-5-7 09:07 PM , Processed in 0.118625 second(s), 18 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回復 返回頂部 返回列表