viewing paste Unknown #9451 | Athena

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393
//===== EinherjarRO Scripts ================================== 
//= Daily Prize, OnPCLoginEvent
//===== By: ================================================== 
//= Stolao
//===== Current Version: ===================================== 
//= 1.48
//===== Compatible With: ===================================== 
//= rAthena SVN
//===== Description: ========================================= 
//= A reward system for players who play more frequently
//===== Comments: ============================================
//= Todo:
//= Revamp Exp and Points System, its kinda meh
//===== Additional Comments: =================================
//= 1.00 Daily Prize
//= 1.01 Fixed Typo
//= 1.02 Removed unessisary calculation
//= 1.03 Added a sleep2 for delayed reward
//= 1.04 Added dispbottom
//= 1.05 Made Clearer
//= 1.06 Made Disbutton Dynamic
//= 1.07 Added .RewardQnt for configable Reward Quantity
//= 1.08 Fixed Typo
//= 1.09 Seperated .ZMulti into .Mode and .ZMulti
//= 1.0A Changed zeny formula for .Mode 0
//= 1.0B Changed Variable Names, More detailed exsplanations
//= 1.0C Fixed typo again lol
//= 1.0D Added in .PointType$, can now configure zeny into any point types
//= 1.0E Added LoginCount
//= 1.0F Made LoginCount Customisable
//= 1.10 Changed Variable Names, More detailed exsplanations
//= 1.11 Added Wipe feature
//= 1.12 Fixed bug, changed "close;" to "close2;"
//= 1.13 Changed .LogCount to bitwise
//= 1.14 Changed .wipe to a whisper event, per Euphys Suggestion
//= 1.15 Changed Formatting of config, per Euphys Suggestion
//= 1.16 Added Login Reward Countdown, on each login
//= 1.17 Added .PointName$
//= 1.18 Fixed Typo
//= 1.19 Added Checkweight
//= 1.1A Changed query_sql for $LOGINCOUNT to set
//= 1.1B Fixed bug with #DRewardCon, arraysize compersison (Thanks AnnieRuru)
//= 1.1C Added meathod for characters online for attachrid
//= 1.1D Actually Fixed the 1.1B Bug
//= 1.1F Changed zeny formula to remove .ZMulti from mode 0
//= 1.20 Changed .Reminder to .Welcome
//= 1.21 Fixed missing details in Welcome Message
//= 1.22 Changed .Mode to be bitwise
//= 1.23 Added Item enable disable to .Mode
//= 1.24 Changed whisper to allow for player Whispers
//= 1.25 Added "time" Whisper Command for players, Thanks arzzae for suggestion
//= 1.26 Made Whisper commands configable
//= 1.27 Made GmLvl for wipe Configable
//= 1.28 Fixed "Points" bitwise
//= 1.29 Added Exp to .Mode
//= 1.2A Optimized Rewards Script a little
//= 1.2B Bug Fix with Display message on reciving rewards
//= 1.2C Optimize a little more
//= 1.2D Added server xp rate to config
//= 1.2F Re-added checkweight
//= 1.30 Move Checkweight up higher in script, makes more since
//= 1.31 Removed XP Dispbutton
//= 1.32 Added Buffer
//= 1.33 Made BUffer Toggle-able
//= 1.34 Made Buffer Dynamic
//= 1.35 Optimized Buffer a little
//= 1.36 Made Buffer More Dynamic
//= 1.37 Optimized Buffer a little more
//= 1.38 Fixed a typo in "seem" was "see"
//= 1.39 removed "typo" bindatcmds
//= 1.3A Fixed bug with sc_, didnt support names had to switch to ids
//= 1.3B Fixed bug in buff bonus (time and rate)
//= 1.3C Revamped buffs to take only 1 variable (now can only be 32 buffs)
//= 1.3D Made Day(s) dynamic
//= 1.3E Removed "Time" reqirement from players to check there Next Login Bonus
//= 1.3F Added an Else after checkweight
//= 1.40 Fixed typo in .BuffInfo
//= 1.41 Reorganized rewards script
//= 1.42 changed .@i -> .@x in Option & 32 (bug report by rakuzas)
//= 1.43 Removed Login Count related scripts, as its not really part of rewards system
//= 1.44 Made @loginreward do whole script, instead of relogging,
//= 1.45 Removed Disable/Enable for whole script (just remove npc)
//= 1.46 Changed A few Description, for easier understanding
//= 1.47 Move sleep2 up to prevent possible multi rewards bug
//= 1.48 Deleted unnecessary line "if( #DRewardCon == 0 ) set #DRewardCon,1;"
//===== Contact Ifo: =========================================
//= [Stolao] 
//= Email: [email protected]
//============================================================
-   script  LOGIN   -1,{
OnWhisperGlobal:
OnLoginCmnd:
OnPCLoginEvent:
    sleep2 1000+.Rest*60000;
    set .@i,(gettime(7)*365*24)+(gettime(8)*24)+gettime(3);
    set .@g,getarraysize(.Rewards);
    if(.@i >= (#LastDailyReward + .MinWait)){
        if(.@i < #LastDailyReward + .MaxWait){ set #DRewardCon,#DRewardCon+1;
         } else { set #DRewardCon,1; }
        if(#DRewardCon*2 > .@g-1){ set .@p,.Rewards[.@g-2]; set .@q,.Rewards[.@g-1];
        } else { set .@p,.Rewards[#DRewardCon*2-2];  set .@q,.Rewards[#DRewardCon*2-1]; }
        if(.Mode&1&&.@p){ 
            if(!checkweight(.@p,.@q)){ dispbottom "Creo que estas en sobre peso, quitate algo de peso y vuelve a logear para reclamar el premio"; end;
            } else { getitem .@p,.@q; dispbottom "Aqui esta tu regalo de navidad "+.@q+" "+getitemname(.@p)+""; }
        }
        if(.Mode&2) set .@A,#DRewardCon*.ZMulti;
        if(.Mode&8) set .@A,.@A+.@q;
        if(.Mode&2||.Mode&8){  setd .PointType$,getd(.PointType$)+.@A; dispbottom ""+.@A+" "+.PointType$+""; }
        if(.Mode&4){ set .@B,#DRewardCon*.XPMulti[0]; set .@C,#DRewardCon*.XPMulti[1]; }
        if(.Mode&16){ set .@B,.@B+.@q; set .@C,.@C+.@q; }
        if(.Mode&4||.Mode&16){ getexp .@B,.@C; }
        if(.Mode&32){
            for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x+4){
                if(#DRewardCon % .BuffInfo[.@x+1] == 0) sc_start .BuffInfo[.@x], .BuffInfo[.@x+2]*60000, .BuffInfo[.@x+3];
            }
        }
        dispbottom "Has obtenido tu regalo de navidad, por  "+#DRewardCon+" dias "+((DRewardCon>1)?"s":"")+" consecutivos.";
        set #LastDailyReward,.@i;
    } else { dispbottom "Tienes "+(#LastDailyReward + .MinWait-.@i)+" horas para tu proximo regalo"; }
end;
OnInit:
// -----------------------------------------------------------
//  Daily Reward
// -----------------------------------------------------------
 
    //To Enable @ Command '@LoginReward' unslash next lines
    // * Needs extra commands for typos
//  bindatcmd("loginreward" ,"LOGIN::OnLoginCmnd",0,99);
 
    //Minimum Hours Between Collecting Daily Reward
    //   Day: 22-24
    //   Week: 168
    set .MinWait,22;
 
    //Hours Before Lose Consecutive Daily Rewar
    //   Day: 48-50
    //   Week: 336
    set .MaxWait,50;
 
    //Number of mins after logging before collecting prize
    set .Rest,0;
 
    //Type of Points/Zeny earned 
    //   eg: CASHPOINTS, Zeny, LoginPoints
    set .PointType$,"Zeny";
 
    //Toggle 
    //   1: Item | 2: "Points" from Multi | 4: Exp from Multi 
    //   8: "Points" from Days with ItemID of 0 |16: Exp from Days with ItemID of 0
    //   32: Gain Buffs Every X Consecutive Days logged in
    // (a bit value, e.g. 3 = Items & Points from Multi)
    set .Mode,1;
 
    //Consecutive Day Points Multiplier
    // * If players login longer than the last set day,
    //   they will keep getting a larger Multiplier
    set .ZMulti,100;
 
    //Consecutive Day Exp Multiplier
    //  <Base Exp>,<Job Exp>;
    // * If players login longer than the last set day,
    //   they will keep getting a larger Multiplier.
    setarray .XPMulti,10,10;
 
    // Consecutive Days Buff
    // Each buff contains 4 variables (32 Total Max)
    // <Type>,<Days>,<Duration>,<Rate>, // Buff 1
    // <Type>,<Days>,<Duration>,<Rate>, // Buff 2
    //   ...;
    //
    //  Example: 188,7,45,3
    //    -Every 7th consecutive day logged in Player gains +3 Str for 45 mins
    //
    //  Type is 188, which references which SC_ to use, SC_INCSTR in this example
    //     -For a full list of SC_ visit the db/const.txt
    //  Days is days buff is applied, in this example 7, so every 7th day, 14,21,28....
    //  Duration is buff duration is Minuits, in this example 45 mins
    //  Rate is buff strength, in this example player gains 3 Str
    setarray .BuffInfo  ,188,7,45,3 // +3 Str for 45 Mins Every 7th Day
                ,189,7,45,3 // +3 Agi for 45 Mins Every 7th Day
                ,190,7,45,3 // +3 Vit for 45 Mins Every 7th Day
                ,191,7,45,3 // +3 Int for 45 Mins Every 7th Day
                ,192,7,45,3 // +3 Dex for 45 Mins Every 7th Day
                ,193,7,45,3 // +3 Luk for 45 Mins Every 7th Day
                ,194,4,45,25    // +25 Hit for 45 Mins Every 4th Day
                ,196,4,45,25    // +25 Flee for 45 Mins Every 4th Day
                ,198,10,60,10   // +10% Hp for 60 Mins Every 10th Day
                ,199,10,60,10   // +10% Sp for 60 Mins Every 10th Day
                ,200,13,30,10   // +10% Atk for 30 Mins Every 10th Day
                ,201,13,30,10   // +10% Matk for 30 Mins Every 10th Day
                ,257,9,120,50   // +50% Exp for 120 Mins Every 9th Day
                ,258,9,120,50;  // +50% Item Drops for 120 Mins Every 9th Day
 
    // Daily Prize items (max 64 days):
    //   <itemID>,<amount>, // Day 1
    //   <itemID>,<amount>, // Day 2
    //   ...;
    // * If players login longer than the last set
    //   day, they will keep getting the last prize.
    setarray .Rewards[0],
        12355,1,      // Day 1
        12244,1,      // Day 2
        14259,1,     // Day 3
      6302,1,     // Day 4
        13606,1,     // Day 5
        14215,1,     // Day 6
        14375,1,     // Day 7
        14234,1,     // Day 8
        14103,1,     // Day 9
        13745,1;     // Day 10
 
           
end;
 
/*12355. premios disparatosos
12244  algunos gorros
12477 30 pociones blancas 2 yggseed y un tiket para intercambio
14259 un anillo qu da max exp de demi human por 15 dias
13606 trae un item que aumenta la exp 200% por 30 min
14215 trae un item que aumenta la exp 100% por 30min
14375 trae un hacha para merchant
14234 25 death brach
14103 un gym pass
13745 holy armor enchan por 30 min
6302 tiket de intercambio*/
}
 
//Jakk xmas 1244 hp: 2054 - 30000
//Santa poring 1064 hp: 69 - 30000
//Gobline xmas 1245 hp: 1176 - 30000
//Cookie Xmas  1246 hp 733 - 30000
//ORC_XMAS  1588 hp 1400 - 30000
 
prt_fild01,0,0,0,0  monster Poring Navideño    1062, 20, 0,0,Santa::On_kill
prt_fild02,0,0,0,0  monster Jakk Navideño  1244, 50, 0,0,Santa::On_kill
prt_fild03,0,0,0,0  monster ORC Navideño   1588, 50, 0,0,Santa::On_kill
prt_fild04,0,0,0,0  monster Poring Navideño    1062, 20, 0,0,Santa::On_kill
prt_fild07,0,0,0,0  monster Gobline Navideño   1245, 10, 0,0,Santa::On_kill
prt_fild09,0,0,0,0  monster Poring Navideño    1064, 50, 0,0,Santa::On_kill
prt_fild09,0,0,0,0  monster ORC Navideño   1588, 10, 0,0,Santa::On_kill
prt_fild05,0,0,0,0  monster Cookie Navideño    1246, 50, 0,0,Santa::On_kill
prt_fild05,0,0,0,0  monster Gobline Navideño   1245, 30, 0,0,Santa::On_kill
prt_fild06,0,0,0,0  monster Jakk Navideño  1244, 100, 0,0,Santa::On_kill
prt_fild06,0,0,0,0  monster ORC Navideño   1588, 10, 0,0,Santa::On_kill
prt_fild08,0,0,0,0  monster Poring Navideño    1062, 50, 0,0,Santa::On_kill
prt_fild08,0,0,0,0  monster Cookie Navideño    1246, 100, 0,0,Santa::On_kill
 
prontera,156,176,5  script  Santa   718,{
 
If (#premio >= 1){
    mes "[Santa Claus]";
    mes "Ya no hay mas regalos para ti";
    close;
}
    if ( merrychristmas != 14 ) {
        mes "[Santa Claus]";
        mes "Ve a prt_fild01 - 08 Caza a los:";
        mes "Jakk Navideño";
        mes "Santa Navideño";
        mes "Gobline Navideño";
        mes "Cookie Navideño";
        mes "Orc Navideño";
        next;
        mes "[Santa Claus]";
        mes "Cada ves que mates aun  tendras la posibilidad de ganar una letra";
        next;
        mes "[Santa Claus]";
        mes "Junta todas las letras y forma la palabra";
        mes "[M E R R Y C H R I S T M A S]";
        next;
        mes "[Santa Claus]";
        mes "Ve!";
        close;
    }
mes "[Santa Claus]";
    mes "M E R R Y C H R I S T M A S";
    mes "Ahora viene la ruleta!";
    next;
    mes "[Santa Claus]";    
    mes "Tendras un 50% de posibilidad de ganar uno de estos premios:";
    next;
    mes "[Santa Claus]";
    mes " ["+getitemname(2236)+"] + Cast -30%";
    mes " ["+getitemname(5136)+"] + Cast -30%";
    mes " ["+getitemname(5381)+"] + Cast -30%";
    mes " ["+getitemname(5384)+"] + Cast -30%";
    mes " ["+getitemname(5742)+"] + Cast -30%";
    next;
    mes "[Santa Claus]";
    mes "Aqui vamos!";
    next;
    set .@rand2,rand(1,10);
    delitem .@ItemID,1;
if (.@rand2 == 1) {
    mes "Huehuehuehue!";
    mes "Lo siento chiquitin no ganaste nada!";
    merrychristmas = 0;
    close;
}else if (.@rand2 == 2) {
    mes "Huehuehuehue!";
    mes "Lo siento chiquitin no ganaste nada!";
    merrychristmas = 0;
    close;
}else if (.@rand2 == 3) {//Win!
    mes "[M E R R Y C H R I S T M A S]";
    getitem 2236, 1; // Santa_Hat
    set #premio,1;
    merrychristmas = 0;
    close;
}else if (.@rand2 == 4) {//Loss
    mes "Huehuehuehue!";
    mes "Lo siento chiquitin no ganaste nada!";
    merrychristmas = 0;
    close;
}else if (.@rand2 == 5) {//Win!
    mes "[M E R R Y C H R I S T M A S]";
    getitem 5136, 1; // Santa_Hat
    set #premio,1;
    merrychristmas = 0;
    close;
}else if (.@rand2 == 6) {//Loss
    mes "Huehuehuehue!";
    mes "Lo siento chiquitin no ganaste nada!";
    merrychristmas = 0;
    close;
}else if (.@rand2 == 7) {//Loss
    mes "Huehuehuehue!";
    mes "Lo siento chiquitin no ganaste nada!";
    merrychristmas = 0;
    close;
}else if (.@rand2 == 8) {//Win!
    mes "[M E R R Y C H R I S T M A S]";
    getitem 5381, 1; // Santa_Hat
    set #premio,1;
    merrychristmas = 0;
    close;
}else if (.@rand2 == 9) {//Win!
    mes "[M E R R Y C H R I S T M A S]";
    getitem 5384, 1; // Santa_Hat
    set #premio,1;
    merrychristmas = 0;
    close;
}else if (.@rand2 == 10) {//Win!
    mes "[M E R R Y C H R I S T M A S]";
    getitem 5742, 1; // Santa_Hat
    set #premio,1;
    merrychristmas = 0;
    close;
}
 
On_kill:
if (#premio >= 1){
dispbottom "Ya has ganado un premio";
end;
}
    if ( rand(10) ) { // 10% chance
        if ( merrychristmas < 14 )
            merrychristmas++;
        for ( .@i = 0; .@i < merrychristmas; .@i++ )
            .@form$ = .@form$ + .word$[.@i] +" ";
        for ( .@i = merrychristmas; .@i < 14; .@i++ )
            .@form$ = .@form$ +"_ ";
        message strcharinfo(0), "Palabra formada : "+ .@form$;
    }
    end;
OnInit:
    setarray .word$, "M", "E", "R", "R", "Y", "C", "H", "R", "I", "S", "T", "M", "A", "S";
    setarray .@m0$[0], "M","E","R","R","Y"," ","C","H","R","I","S","T","M","A","S";
    setarray .@m1$[0], "F","E","L","I","Z"," ","N","A","V","I","D","A","D";
    do {
        if (.@i == 2) set .@i, 0;
        for (set .@c, 0; .@c < getarraysize(getd(".@m" + .@i + "$")); set .@c, .@c + 1) {
            set .@f$, .@f$ + getd(".@m" + .@i + "$[" + .@c + "]");
            waitingroom .@f$,0;
            sleep 350;
            delwaitingroom;
        }
        for (set .@c, 0; .@c < 6; set .@c, .@c + 1) {
            waitingroom "",0;
            sleep 250;
            delwaitingroom;
            waitingroom .@f$,0;
            sleep 250;
            delwaitingroom;
        }
        waitingroom .@f$,0;
        sleep 3000;
        set .@f$, "";
        delwaitingroom;
        set .@i, .@i + 1;
    } while(1);
end;
}
Viewed 1454 times, submitted by Dynasty.