wxyz0214 發表於 2011-6-4 13:23:24

用箱子開出時效精練物品rentitem2

/*==========================================
* Refer to getitem2 and rentitem
*------------------------------------------*/
BUILDIN_FUNC(rentitem2)
{
int nameid,amount,get_count,i,flag = 0;
int iden,ref,attr,c1,c2,c3,c4;
struct item_data *item_data;
struct item item_tmp;
TBL_PC *sd;
struct script_data *data;
int seconds = script_getnum(st,11);

if( script_hasdata(st,12) )
sd=map_id2sd(script_getnum(st,12)); //
else
sd=script_rid2sd(st); // Attached player

if( sd == NULL ) // no target
return 0;

data=script_getdata(st,2);
get_val(st,data);
if( data_isstring(data) ){
const char *name=conv_str(st,data);
struct item_data *item_data = itemdb_searchname(name);
if( item_data )
nameid=item_data->nameid;
else
nameid=UNKNOWN_ITEM_ID;
}else
nameid=conv_num(st,data);

amount=script_getnum(st,3);
iden=script_getnum(st,4);
ref=script_getnum(st,5);
attr=script_getnum(st,6);
c1=(short)script_getnum(st,7);
c2=(short)script_getnum(st,8);
c3=(short)script_getnum(st,9);
c4=(short)script_getnum(st,10);

if(nameid<0) { // ??

you0191110 發表於 2011-6-9 22:43:07

pan00017 發表於 2011-6-9 22:54:16

本帖最後由 pan00017 於 2011-6-9 11:04 PM 編輯

跟這篇功能一樣0.0?

http://www.okayro.com/thread-202168-1-1.html
-------
整理一下吧
感覺亂亂的

wxyz0214 發表於 2011-6-10 13:23:39

不一樣的@@仔細看看吧 他是指令 我是道具

喵咪 發表於 2011-6-19 20:15:13

抱著想學習的心態來回復看一下內容

fgyackl 發表於 2011-7-26 01:11:24

酷 喔 !

這 個 學 起 來 一 定 能 做 出 更 多 的 特 色 !

納歐 發表於 2012-1-12 18:40:58

謝謝,我剛好想要改有關租用指令的原瑪,有得參考真是太感謝了。

柚子柚 發表於 2012-5-4 05:29:20

開出時效精煉物品?我沒明白額- -求指教

pig671080 發表於 2012-5-27 00:57:20

我有嘗試改過,但是卻無法正確擁有效果!!
感謝大大PO的文!!
對我一定有幫助

a91323 發表於 2012-5-27 09:49:10

繼續學習源碼的使用

能用在箱子上好方便

fantasy83115 發表於 2013-4-15 15:21:57

悲劇中.. 這檔案在哪 {:soso_e132:}
頁: [1]
查看完整版本: 用箱子開出時效精練物品rentitem2