SHARE
TWEET

Untitled

a guest May 27th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*================================================
  2. - 腳本名稱:選擇性裝備附魔 Ver 1.3
  3. - 腳本作者:阿神ˇ(a20775689@raidcall.com.tw)
  4. - 測試環境:eAthena.rAthena.SeAr.3CeAM
  5. - 更新內容:
  6. - Ver 1.3 新增選擇洞數附魔 getarg(1) 值須>0
  7.           若>4則出現選擇洞數選單
  8. - Ver 1.2 新增case 6-10
  9. - Ver 1.1 顯示資訊(洞數、卡片)
  10. - Ver 1.0 完成架構
  11. - 使用方法:
  12. *[新增Item_db] 21600,Enchant_S,附魔精煉石,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("Enchant_S",1,2); },{},{}
  13. Enchant_S = 該腳本函數
  14. 1 = str,agi,vit,int,dex,luk 隨機+1(以此類推 1: 隨機+1 2:隨機+2 3:隨機+3 .....)
  15. 2 = 在裝備的第二洞上面嵌入附魔石(以此類推 1: 第一洞 2:第二洞 3:第三洞 4:第四洞 5:選擇你要第幾洞 無填入預設第四洞)
  16. >>>各位大哥大姐轉載請保留以上,萬分感激<<<
  17. ================================================*/
  18. function    script  Enchant_S   {
  19.     switch(getarg(0)){
  20.         case 1:
  21.             setarray .@s,4700,4710,4720,4730,4740,4750;
  22.             break;
  23.         case 2:
  24.             setarray .@s,4701,4711,4721,4731,4741,4751;
  25.             break;
  26.         case 3:
  27.             setarray .@s,4702,4712,4722,4732,4742,4752;
  28.             break;
  29.         case 4:
  30.             setarray .@s,4703,4713,4723,4733,4743,4753;
  31.             break;
  32.         case 5:
  33.             setarray .@s,4704,4714,4724,4734,4744,4754;
  34.             break;
  35.         case 6:
  36.             setarray .@s,4705,4715,4725,4735,4745,4755;
  37.             break;
  38.         case 7:
  39.             setarray .@s,4706,4716,4726,4736,4746,4756;
  40.             break;
  41.         case 8:
  42.             setarray .@s,4707,4717,4727,4737,4747,4757;
  43.             break;
  44.         case 9:
  45.             setarray .@s,4708,4718,4728,4738,4748,4758;
  46.             break;
  47.         case 10:
  48.             setarray .@s,4709,4719,4729,4739,4749,4759;
  49.             break;
  50.     }
  51.     while(set(.@i,.@i+1)&&.@i<=10) {
  52.         if(getequipweaponlv(.@i)>0) set .@color$,"^0000AA";
  53.         else set .@color$,"^006400";
  54.         set .@menu$,.@menu$+("鑲嵌 - "+.@color$+""+getitemname(getequipid(.@i))+"^000000")+":";
  55.     }
  56.     select(.@menu$);
  57.     if(getitemname(getequipid(@menu))=="null") {
  58.         mes "^888888您沒有裝備這項物品!!";
  59.         close;
  60.     }
  61.     set .@focus,@menu;
  62.     mes "^888888[訊息]";
  63.     mes "裝備: "+.@color$+""+getitemname(getequipid(.@focus))+"["+getitemslots(getequipid(.@focus))+"]";
  64.     mes "^888888洞數(1): ^A0522D"+getitemname(getequipcardid(.@focus,0));
  65.     mes "^888888洞數(2): ^2F4F4F"+getitemname(getequipcardid(.@focus,1));
  66.     mes "^888888洞數(3): ^339900"+getitemname(getequipcardid(.@focus,2));
  67.     mes "^888888洞數(4): ^0000AA"+getitemname(getequipcardid(.@focus,3));
  68.     next;
  69.     if(select("確定鑲嵌","取消")==2)
  70.         close;
  71.     if(getarg(1,0)){
  72.         if(getarg(1)<5)
  73.             set .@select,getarg(1);
  74.         else
  75.             set .@select,select("1","2","3","4");
  76.         switch(.@select){
  77.             case 1:
  78.                 getitem2 getequipid(.@focus),1,1,getequiprefinerycnt(.@focus),0,.@s[rand(getarraysize(.@s))],getequipcardid(.@focus,1),getequipcardid(.@focus,2),getequipcardid(.@focus,3);
  79.                 break;
  80.             case 2:
  81.                 getitem2 getequipid(.@focus),1,1,getequiprefinerycnt(.@focus),0,getequipcardid(.@focus,0),.@s[rand(getarraysize(.@s))],getequipcardid(.@focus,2),getequipcardid(.@focus,3);
  82.                 break;
  83.             case 3:
  84.                 getitem2 getequipid(.@focus),1,1,getequiprefinerycnt(.@focus),0,getequipcardid(.@focus,0),getequipcardid(.@focus,1),.@s[rand(getarraysize(.@s))],getequipcardid(.@focus,3);
  85.                 break;
  86.             case 4:
  87.                 getitem2 getequipid(.@focus),1,1,getequiprefinerycnt(.@focus),0,getequipcardid(.@focus,0),getequipcardid(.@focus,1),getequipcardid(.@focus,2),.@s[rand(getarraysize(.@s))];
  88.                 break;
  89.         }
  90.         delitem2 getequipid(.@focus),1,1,getequiprefinerycnt(.@focus),0,getequipcardid(.@focus,0),getequipcardid(.@focus,1),getequipcardid(.@focus,2),getequipcardid(.@focus,3);
  91.         specialeffect2 154;
  92.         close;
  93.     }
  94.     getitem2 getequipid(.@focus),1,1,getequiprefinerycnt(.@focus),0,getequipcardid(.@focus,0),getequipcardid(.@focus,1),getequipcardid(.@focus,2),.@s[rand(getarraysize(.@s))];
  95.     delitem2 getequipid(.@focus),1,1,getequiprefinerycnt(.@focus),0,getequipcardid(.@focus,0),getequipcardid(.@focus,1),getequipcardid(.@focus,2),getequipcardid(.@focus,3);
  96.     specialeffect2 154;
  97. close;
  98. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top