OK論壇

 找回密碼
 註冊
查看: 1520|回復: 5

關於 RA腳本使用到SEAR上面

 關閉 [複製鏈接]
  • TA的每日心情

    2021-5-15 11:39 PM
  • 簽到天數: 161 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2014-4-24 17:27:08 | 顯示全部樓層 |閱讀模式
    EA
    私服版號: SeAr_1.10.114
    問題內容: 腳本問題
    本帖最後由 jhg681291 於 2014-4-24 07:40 PM 編輯

    請問一下   這個到底是怎麼回事= =

    我從RA論壇上找了許多腳本 在SEAR上可以使用 但是這個腳本不能使用

    好像出在  explode這個指令上

    我覺得好像與標籤也有關係到   因為我在SEAR找不到   OnWhisperGlobal  跟  OnLoginCmnd


    1. -        script        LOGIN        -1,{
    2. //OnWhisperGlobal:
    3. //OnLoginCmnd:
    4. OnPCLoginEvent:
    5.         sleep2 1000 + .Rest * 60000;
    6.         set .@i, (gettime(7) * 365 * 24 * 60) + (gettime(8) * 24 * 60) + (gettime(3) * 60) +gettime(2);
    7.         if(.@i >= (#LastDailyReward + .MinWait)){
    8.                 if(.@i < #LastDailyReward + .MaxWait){
    9.                         set #DRewardCon, #DRewardCon + 1;
    10.                 } else {
    11.                         set #DRewardCon, 1;
    12.                 }
    13.                 set .@g, (#DRewardCon > getarraysize(.Rewards$)) ? getarraysize(.Rewards$) : #DRewardCon;
    14.                 explode(.@TT$,.Rewards$[.@g],"|");
    15.                 if(.Mode & 1 && .@TT$[4]){
    16.                         explode(.@XT$,.@TT$[4],":");
    17.                         
    18.                         for(set .@x,0; .@x < getarraysize(.@XT$); set .@x,.@x + 2){
    19.                                 getitem  atoi(.@XT$[.@x]),  atoi(.@XT$[.@x+1]);
    20.                                 message strcharinfo(0),"Recived "+  .@XT$[.@x+1] +" "+ getitemname( atoi(.@XT$[.@x]));
    21.                         }
    22.                 }
    23.                 if(.Mode & 2 && .@TT$[0]){
    24.                         setd getd(.@TT$[1]),getd(.@TT$[1]) + atoi(.@TT$[0]);
    25.                         message strcharinfo(0),"Recived "+ .@TT$[0] +" "+ .@TT$[1];
    26.                 }
    27.                 if(.Mode & 4 && (.@TT$[2] || .@TT$[3])) getexp atoi(.@TT$[2]),atoi(.@TT$[3]);
    28.                 if(.Mode & 8){
    29.                         for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x + 4){
    30.                                 if(#DRewardCon % .BuffInfo[.@x + 1] == 0) sc_start .BuffInfo[.@x], .BuffInfo[.@x + 2] * 60000, .BuffInfo[.@x + 3];
    31.                         }
    32.                 }
    33.                 message strcharinfo(0),"每日登入獎勵, 第 "+#DRewardCon+" 天"+((#DRewardCon > 1)?"s":"")+" in a row.";
    34.                 set #LastDailyReward, .@i;
    35.         } else {
    36.                 set .@days,(#LastDailyReward + .MinWait - .@i)/60/24;
    37.                 set .@hours,((#LastDailyReward + .MinWait - .@i)/60)%24;
    38.                 set .@mins,(#LastDailyReward + .MinWait - .@i)%60;

    39.         }
    40. end;
    41. OnInit:
    42.         //Basic Settings
    43.         //   1: Item | 2: "Points" | 4: Exp  
    44.         //   8: Gain Buffs Every X Consecutive Days logged in
    45.         // (a bit value, e.g. 3 = Items & Points from Multi)
    46.         set .Mode,1 + 2 + 4 + 8;

    47.         //To Enable @ Command '@loginreward' unslash next lines
    48.         // * Needs extra commands for typos
    49. //        bindatcmd("loginreward"        ,"LOGIN::OnLoginCmnd",0,99);

    50.         //Minimum Minuets Between Collecting Daily Reward
    51.         //   Day: 22*60 - 24*60
    52.         //   Week: 10080
    53.         set .MinWait,1320;

    54.         //Minuets Before Lose Consecutive Daily Reward
    55.         //   Day: 48*60 - 50*60
    56.         //   Week: 20160
    57.         set .MaxWait,3000;

    58.         //Number of mins after logging before collecting prize
    59.         set .Rest,0;

    60.         // Consecutive Days Buff
    61.         // Each buff contains 4 variables (32 Total Max)
    62.         // <Type>,<Days>,<Duration>,<Rate>, // Buff 1
    63.         // <Type>,<Days>,<Duration>,<Rate>, // Buff 2
    64.         //   ...;
    65.         //
    66.         //  Example: 188,7,45,3
    67.         //    -Every 7th consecutive day logged in Player gains +3 Str for 45 mins
    68.         //
    69.         //  Type is 188, which references which SC_ to use, SC_INCSTR in this example
    70.         //     -For a full list of SC_ visit the db/const.txt
    71.         //  Days is days buff is applied, in this example 7, so every 7th day, 14,21,28....
    72.         //  Duration is buff duration is Minuits, in this example 45 mins
    73.         //  Rate is buff strength, in this example player gains 3 Str
    74.         setarray .BuffInfo        ,188,7,45,3        // +3 Str for 45 Mins Every 7th Day
    75.                                 ,194,4,45,25        // +25 Hit for 45 Mins Every 4th Day
    76.                                 ,198,10,60,10        // +10% Hp for 60 Mins Every 10th Day
    77.                                 ,257,9,120,50;        // +50% Exp for 120 Mins Every 9th Day

    78.         // Daily Prize items (max 128 days):
    79.         //   "<Points>|<PointType>|<BaseExp>|<JobExp>|<itemID-1>:<amount-1>:<itemID-2>:<amount-2>...etc", // Day 1
    80.         //   "<Points>|<PointType>|<BaseExp>|<JobExp>|<itemID-1>:<amount-1>:<itemID-2>:<amount-2>...etc"  // Day 2
    81.         //   ...;
    82.         // Total length of any days string must be 255 or shorter
    83.         // * If players login longer than the last set
    84.         //   day, they will keep getting the last prize.
    85.         setarray .Rewards$,
    86.                 "0|Zeny|0|0|512:1",                        // Day 1: 1 Apple
    87.                 "0|Zeny|0|0|513:1",                        // Day 2: 2 Bananas
    88.                 "1000|Zeny",                                // Day 3: 1000 Zeny
    89.                 "0|Zeny|100|50",                        // Day 4: 100 Base 50 Job Exp
    90.                 "1|#ExamplePoint|0|0|512:1";        // Day 5: 1 Apple + 2 Bananas + 1 #ExamplePoint
    91. end;
    92. }
    複製代碼

    本帖子中包含更多資源

    您需要 登錄 才可以下載或查看,沒有帳號?註冊

    x
    回復

    使用道具 舉報

  • TA的每日心情
    開心
    2023-9-25 11:37 PM
  • 簽到天數: 1686 天

    連續簽到: 1 天

    [LV.Master]伴壇終老

    發表於 2014-4-24 17:30:16 | 顯示全部樓層
    sear有 OnWhisperGlobal

    explode  sear跟ra結構上沒差異
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情

    2021-5-15 11:39 PM
  • 簽到天數: 161 天

    連續簽到: 1 天

    [LV.7]常住居民III

     樓主| 發表於 2014-4-24 18:25:01 | 顯示全部樓層
    a91323 發表於 2014-4-24 05:30 PM
    sear有 OnWhisperGlobal

    explode  sear跟ra結構上沒差異

    有找到你說的那個標籤了

    但是不知道是哪裡還有問題..
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    擦汗
    2018-9-15 03:18 PM
  • 簽到天數: 842 天

    連續簽到: 1 天

    [LV.10]以壇為家III

    發表於 2014-4-24 19:28:31 | 顯示全部樓層
    if(.Mode & 1 && .@TT$[4]!="")

    sea可能if 不能直接判斷字串是否為空吧
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情

    2021-5-15 11:39 PM
  • 簽到天數: 161 天

    連續簽到: 1 天

    [LV.7]常住居民III

     樓主| 發表於 2014-4-24 19:40:11 | 顯示全部樓層
    o03126 發表於 2014-4-24 07:28 PM
    if(.Mode & 1 && .@TT$[4]!="")

    sea可能if 不能直接判斷字串是否為空吧

    可以了     謝謝你

    現在還有些小bug還要修復ˊˇˋ  
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    擦汗
    2014-8-7 11:27 AM
  • 簽到天數: 23 天

    連續簽到: 1 天

    [LV.4]偶爾看看III

    發表於 2014-4-25 11:43:32 | 顯示全部樓層
    jhg681291 發表於 2014-4-24 07:40 PM
    可以了     謝謝你

    現在還有些小bug還要修復ˊˇˋ

    sear版本()內只能判斷單個字串或數值是否為空
    多個無法這樣用
    回復 支持 反對

    使用道具 舉報

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

    本版積分規則

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

    GMT+8, 2024-4-25 09:46 AM , Processed in 0.057414 second(s), 22 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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