NexusXVI Posted November 4, 2013 Group: Members Topic Count: 61 Topics Per Day: 0.01 Content Count: 227 Reputation: 6 Joined: 01/18/12 Last Seen: May 22, 2022 Share Posted November 4, 2013 - script hourlypoints -1,{ //--Start of the Script OnPCLoginEvent: attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer30000: //Check if Vending (normal or @at) if(checkvending() >= 1 || checkchatting() == 1) { dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again."; stopnpctimer; end; } //Check if Idle getmapxy( .@map$, .@x, .@y, 0 ); if(@map$ == .@map$ && @x == .@x && @y == .@y) { set @afk, @afk + 1; } //If move timer resets else { set @afk, 0; } set @map$, .@map$; set @x, .@x; set @y, .@y; //Idle Check for 5 Minutes if(@afk == 84600) { dispbottom "The hourly points event stopped because you were idle for 1 Year. Please relog if you wish to start again."; stopnpctimer; end; } end; OnTimer60000: set @minute, @minute + 1; //Check for 1 Minute if(@minute == 60){ set @minute,0; getitem 6242,1; dispbottom "You received 1 "+getitemname( 7227 )+" by staying ingame for 1 hour"; set @consecutive_hour, @consecutive_hour + 1; } //Check for 12 hours consecutive if(@consecutive_hour == 3) { set @consecutive_hour,0; getitem 6242,5; dispbottom "You received 6 "+getitemname( 7227 )+" by staying ingame for consecutive of 6 hour"; } stopnpctimer; initnpctimer; end; } Can anyone upgrade this.. that the script will show display how long you are only per minute : ex. You are online for 1 Min You are online for 2 Min And so on... Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 4, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted November 4, 2013 set @minute, @minute + 1; dispbottom "You have online for "+@minute+" minutes."; // add this. 1 Quote Link to comment Share on other sites More sharing options...
NexusXVI Posted November 4, 2013 Group: Members Topic Count: 61 Topics Per Day: 0.01 Content Count: 227 Reputation: 6 Joined: 01/18/12 Last Seen: May 22, 2022 Author Share Posted November 4, 2013 (edited) OK thnx again Em em! Sir my hourly points is not working NO map errorsis it maybe because I already have a Daily Reward? Here is the script :DailyReward //===== 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 "You seem to be oveweight, put some stuff away and relog to claim prize"; end; } else { getitem .@p,.@q; dispbottom ""+.@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 "You have collected your daily reward, for "+#DRewardCon+" day"+((DRewardCon>1)?"s":"")+" in a row."; set #LastDailyReward,.@i; } else { dispbottom "You have "+(#LastDailyReward + .MinWait-.@i)+" hours till your next reward"; } 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+2+4+8+16+32; //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,3,45,3 // +3 Agi for 45 Mins Every 3th Day ,190,3,45,3 // +3 Vit for 45 Mins Every 3th Day ,191,3,45,3 // +3 Int for 45 Mins Every 3th Day ,192,3,45,3 // +3 Dex for 45 Mins Every 3th Day ,193,3,45,3 // +3 Luk for 45 Mins Every 3th 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,6,60,10 // +10% Hp for 60 Mins Every 10th Day ,199,6,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 ,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], 12210,3, // Day 1 12210,3, // Day 2 7852,1, // Day 3 12210,3, // Day 4 12210,3, // Day 5 7852,1, // Day 6 13607,2; // Day 7 end; } Do scripts override each other? Edited November 4, 2013 by NexusXVI Quote Link to comment Share on other sites More sharing options...
Question
NexusXVI
Can anyone upgrade this.. that the script will show display how long you are only per minute :
ex. You are online for 1 Min
You are online for 2 Min
And so on...
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.