UID68028
帖子
精華
主題
積分5709
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限20
註冊時間2008-3-13
在線時間 小時
最後登錄1970-1-1
TA的每日心情 | 開心 2022-3-25 10:24 AM |
---|
簽到天數: 259 天 連續簽到: 1 天 [LV.8]以壇為家I
|
本帖最後由 哆啦ˇ 於 2009-11-18 07:16 PM 編輯
多數內容我不太明白,
但是主要的功能都有說明。
取得指定裝備洞數、精練值、插什麼卡等等。
可以作為拍賣之用(如果不想用EA已有的拍賣系統的)。
請各位不吝嗇補充。
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequipid(<equipment slot>) - 取得身上裝備的編號
EQI_HEAD_TOP (1) - [頭上]
EQI_ARMOR (2) - [身體]
EQI_HAND_L (3) - [左手]
EQI_HAND_R (4) - [右手]
EQI_GARMENT (5) - [斗篷]
EQI_SHOES (6) - [鞋子]
EQI_ACC_L (7) - [飾品左]
EQI_ACC_R (8) - [飾品右]
EQI_HEAD_MID (9) - [頭中]
EQI_HEAD_LOW (10) - [頭下]
[getequipid - 範例]
[取得頭上的裝備編號可以用以下兩種方式]
1. getequipid(EQI_HEAD_TOP)
2. getequipid(1)
[語法應用範例]
if(getequipid(EQI_HEAD_TOP) == 2235){mes "你頭上帶著王冠";}
mes "你頭上戴著"+getitemname(getequipid(EQI_HEAD_TOP));//沒有則顯示null
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequipname(<equpment slot>) - 取得指定位置的裝備名稱
[getequipname - 範例]
mes getequipname(EQI_HEAD_TOP);
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getitemname(<item id>) - 取得指定編號的道具名稱
[getitemname - 範例]
mes getequipname(2235);//王冠
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
[待修訂]getbrokenid(<number>) - 是否擁有損壞道具
This function will search the invoking character's inventory for any broken
items, and will return their item ID numbers. Since the character may have
several broken items, 0 given as an argument will return the first one found, 1
will return the second one, etc. Will return 0 if no such item is found.
// 檢查是否有任何東西壞掉:
if (getbrokenid(0)==0){mes "你又沒有裝備壞掉,別打擾我。";close;}
// 有東西壞囉,將查到的第一件壞物名稱顯示出來:
mes "我看到你的 "+getitemname(getbrokenid(0))+" 壞掉囉!";
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequipisequiped(<equipment slot>) - 取得指定位置是否穿上裝備(0 - 沒有�1 - 有)
[getequipisequiped - 範例]
mes getequipisequiped(EQI_HEAD_TOP);
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequipisenableref(<equipment slot>) - 取得指定位置是否可以精練(0 - 不可�1 - 可)
[getequipisenableref - 範例]
mes getequipisenableref(EQI_HEAD_TOP);
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequiprefinerycnt(<equipment slot>) - 取得指定位置的精練值
[getequiprefinerycnt - 範例]
mes getequipisenableref(EQI_HEAD_TOP);
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequipweaponlv(<equipment slot>) - 取得左手或右手武器等級
[getequipweaponlv - 範例]
mes getequipweaponlv(EQI_HAND_L);
mes getequipweaponlv(EQI_HAND_R);
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequippercentrefinery(<equipment slot>) - 取得裝備的精練安定值
請見db/refine_db.txt
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
[待修訂]getareadropitem("<map name>",<x1>,<y1>,<x2>,<y2>,<item>) - 取得地面道具編號
This function will count all the items with the specified ID number lying on the
ground on the specified map within the x1/y1-x2/y2 square on it and return that
number.
This is the only function around where a parameter may be either a string or a
number! If it's a number, it means that only the items with that item ID number
will be counted. If it is a string, it is assumed to mean the 'english name'
field from the item database. If you give it an empty string, or something that
isn't found from the item database, it will count items number '512' (apples).
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequipcardcnt(<equipment slot>) - 取得指定位置裝備插了幾張卡片
[getequipcardcnt - 範例]
mes getequipcardcnt(EQI_HEAD_TOP);
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
[待修訂]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.
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
cardscnt() - 取得指定裝備裝是否能裝載卡片(0 - 可以�1 - 不可)
[cardscnt - 範例]
if(cardscnt(1201) == 0){mes getitemname(1201)+"能裝載卡片";}
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getrefine() - 取得右手武器的精練值
[getrefine - 範例]
mes "+"+getrefine()+getitemname(getequipid(EQI_HAND_R));
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
[待修訂]getnameditem(<item id>,"<name to inscribe>");
[待修訂]getnameditem("<item name>","<name to inscribe>");
This function is equivalent to using 'getitem', however, it will not just give
the character an item object, but will also inscribe it with a specified
character's name. You may not inscribe items with arbitrary strings, only with
names of characters that actually exist. While this isn't said anywhere
specifically, apparently, named items may not have cards in them, slots or no -
these data slots are taken by the character ID who's name is inscribed. Only one
remains free and it's not quite clear if a card may be there.
This function will return 1 if an item was successfully created and 0 if it
wasn't for whatever reason. Like 'getitem', this function will also accept an
'english name' from the item database as an item name and will return 0 if no
such item exists.
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getequipcardid (<equipment slot>,<card slot>) - 取得指定裝備的第幾洞插什麼卡片
第1洞(Card1): 0
第2洞(Card2): 1
第3洞(Card3): 2
第4洞(Card4): 3
[getequipcardid - 範例]
mes getequipcardid(EQI_HAND_L,0);//取得左手武器第一洞裝載什麼卡
mes getequipcardid(EQI_HAND_R,1);//取得右手武器第二洞裝載什麼卡
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
getitemslots (<item id>) - 取得指定編號道具有幾個洞
[getitemslots - 範例]
mes getitemslots(2235);
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==//
[待修訂]getiteminfo(<item ID>,<type>)
This function will look up the item with the specified ID number in the database
and return the info set by TYPE argument.
It will return -1 if there is no such item.
Check sample in nps\sample\getiteminfo.txt
0 - 買入價格
1 - 賣出價格
2 - 道具種類
3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc..
if = 0, then monsters don't drop it at all (rare or a quest item)
if = 10000, then this item is sold in NPC shops only
4 - 使用性別
5 - equip
6 - 重量
7 - 攻擊力
8 - 防禦力
9 - range
10 - slot
11 - look
12 - elv
13 - wlv
//--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==// |
評分
-
查看全部評分
|