UID320090
帖子
精華
主題
積分723
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限10
註冊時間2013-3-7
在線時間 小時
最後登錄1970-1-1
TA的每日心情 | 怒 2014-3-7 12:00 AM |
---|
簽到天數: 80 天 連續簽到: 2 天 [LV.6]常住居民II
|
EA
私服版號: |
SeAr_1.9.98 |
問題內容: |
腳本問題 |
本帖最後由 usb810310 於 2013-5-29 12:03 AM 編輯
5%的機率比10%還要高??
在改小一點的話 .. 附魔會是空的 .. 有時還有null情況
我已經嘗試改很多次了 .. 還是無解- //著作:逸 & Chu----拜託這行請不要刪掉,當個有品的人,謝謝//
- //著作:逸 & Chu----拜託這行請不要刪掉,當個有品的人,謝謝//
- //著作:逸 & Chu----拜託這行請不要刪掉,當個有品的人,謝謝//
- //著作:逸 & Chu----拜託這行請不要刪掉,當個有品的人,謝謝//
- //著作:逸 & Chu----拜託這行請不要刪掉,當個有品的人,謝謝//
- //著作:逸 & Chu----拜託這行請不要刪掉,當個有品的人,謝謝//
- //--條件物
- spl_in01,31,315,4 script 護甲附魔精靈 436,{
- mes "[護甲附魔精靈]";
- set @n,2;
- callfunc "Magic_give";
- }
- spl_in01,33,315,4 script 鞋靴附魔精靈 436,{
- mes "[鞋靴附魔精靈]";
- set @n,6;
- callfunc "Magic_give";
- }
- spl_in01,35,315,4 script 披掛附魔精靈 436,{
- mes "[披掛附魔精靈]";
- set @n,5;
- callfunc "Magic_give";
- }
- function script Magic_give {
- if(countitem(985)<10){mes "披肩附魔需要 10 個鋁噢"; close;}
- if(getequipisequiped(@n) == 0)
- {
- mes "身上並沒有可以附魔之裝備";
- close;
- }
- if(getequipid(@n)==2629 || getequipid(@n)==2630 || getequipid(@n)==2410 || getequipid(@n)==2383 || getequipid(@n)==2541){
- mes "這...裝備...魔力太強大..我無法附魔";
- close;
- }
- if(countitem(getequipid(@n)) > 1)
- {
- mes "請勿攜帶相同裝備";
- close;
- }
- mes "你確定要附魔?";
- menu "確定附魔",-;
- close2;
-
- message strcharinfo(0),"附魔中…移動視為取消";
- specialeffect2 EF_MAPPILLAR;
- progressbar "ffff00",3;
- //-魔附機率--
- setarray .@Mg_A[1],4700,4701,4702,4710,4711,4712,
- 4720,4721,4722,4730,4731,4732,
- 4740,4741,4742,4750,4751,4752;
-
- setarray .@Mg_S[1],4703,4713,4723,4733,4743,4753;
-
- setarray .@Mg_J[1],4704,4714,4724,4734,4744,4754;
- set .@che,rand(1,100);
- if(.@che>90){ set .@n,rand(1, (getarraysize(.@Mg_S)-1));
- set .@Magic_num,.@Mg_S[.@n];}
- if(.@che<91){ set .@n,rand(1, (getarraysize(.@Mg_A)-1));
- set .@Magic_num,.@Mg_A[.@n];}
- if(.@che>95){ set .@n,rand(1, (getarraysize(.@Mg_J)-1));
- set .@Magic_num,.@Mg_J[.@n];}
- //----
- set .@card_id1,getequipcardid(@n,0); //讀取裝備卡片1資訊
- set .@card_id2,getequipcardid(@n,1); //讀取裝備卡片2資訊
- set .@card_id3,getequipcardid(@n,2); //讀取裝備卡片3資訊
- set .@ref_lv,getequiprefinerycnt(@n); //讀取裝備精鍊資訊
- set .@name_id,getequipid(@n);
- delitem getequipid(@n),1;
- delitem 985,10;
- set .@l,rand(0,100);
- if(.@l>90){
- if(countitem(22222)>0){
- delitem 22222,1;
- getitem2 .@name_id,1,1,.@ref_lv,0,.@card_id1,.@card_id2,.@card_id3,0;
- announce "["+strcharinfo(0)+"]:呼! 還好有["+getitemname(22222)+"]。",15;
- end;
- }
-
- dispbottom "附魔失敗.";
- specialeffect2 EF_SUI_EXPLOSION;
- announce "["+strcharinfo(0)+"]:鈣營養勒!!我的["+getitemname(.@name_id)+"]暴了OAO",15;
- end;
- }
- getitem2 .@name_id,1,1,.@ref_lv,0,.@card_id1,.@card_id2,.@card_id3,.@Magic_num;
- specialeffect2 EF_PHARMACY_OK;
- dispbottom "附魔成功…";
- if(.@che>95){
- announce "恭喜["+strcharinfo(0)+"]取得["+getitemname(.@Magic_num)+"]["+getitemname(.@name_id)+"]",15;}
- end;
- OnInit:
- waitingroom "請用防暴油",0;
- end;
- }
複製代碼 |
|