Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/30/24 in all areas

  1. Here's my own version of an Hourly Point System Simple and easy to configure Makes use of Account Variable to track time Records player's playtime every 5 minutes, allowing continuous tracking even if they log off in between* Provides detailed time when they last received their reward/bonus/hourly point Removes Vendors from the system automatically No support will be provided, unless it's a bug issue. /* Author: Nyani Version 1.0 ---------------------------------------------- Playtime System ---------------------------------------------- Changelogs 1.0 - Initial Release */ - script PlaytimeCount -1,{ end; OnPCLoginEvent: //if(BaseLevel < 30) end; @starttime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21); message strcharinfo(0),"Playtime Point System is now enabled. Please note that vending will disqualify you from gaining points."; addtimer 300000,"PlaytimeCount::OnPointUpdate"; // 5 minutes dispbottom "Play Point System start time: "+@starttime$; dispbottom "[ "+#playtimepts+"0/60 ] minutes completed."; end; OnPointUpdate: if ( checkvending(strcharinfo(0)) == 2 ){ dispbottom "You have been removed from the Playtime Point System. Please re-log to opt-in again."; deltimer strnpcinfo(3)+"::OnPointUpdate"; end; } @playtime += 1; if(@playtime == 2){ @playtime = 0; #playtimepts += 1; if(#playtimepts == 6){ #playtimepts = 0; #YourPtsHere += 1; @playtime = 0; message strcharinfo(0),"[Playtime Points]: You have received your Playtime Reward at "+gettimestr("%Y-%m-%d %H:%M:%S", 21)+"."; @prevtime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21); } } deltimer "PlaytimeCount::OnPointUpdate"; addtimer 300000,"PlaytimeCount::OnPointUpdate"; end; OnPlaytimeCheck: dispbottom "Last Reward: "+@prevtime$; dispbottom "Minutes: "+#playtimepts+"0/60"; dispbottom "Current points: "+#YourPtsHere; end; OnInit: bindatcmd "playtime",strnpcinfo(0)+"::OnPlaytimeCheck"; end; }
    1 point
  2. script - script RateSelect -1,{ OnPCLoginEvent: switch (individual_rate) { case 1: .@exp_rate_multiplier = 100; .@jexp_rate_multiplier = 100; set .@rate_description$, "x1 (Low Rate)"; break; case 2: .@exp_rate_multiplier = 2500; .@jexp_rate_multiplier = 2500; set .@rate_description$, "x25 (Mid Rate)"; break; case 3: .@exp_rate_multiplier = 5000; .@jexp_rate_multiplier = 5000; set .@rate_description$, "x50 (High Rate)"; break; case 4: .@exp_rate_multiplier = 10000; .@jexp_rate_multiplier = 10000; set .@rate_description$, "x100 (Super High Rate)"; break; default: mes "[Rate Selector]"; mes "Select your preferred server rate for this character."; mes "BE CAREFUL: YOU CAN'T CHANGE IT AFTERWARD!"; individual_rate = select("Low Rate:Mid Rate:High Rate:Super High Rate"); close2; goto OnPCLoginEvent; // Return to case evaluation after selection } // Save the multipliers to the player variables set #exp_rate_multiplier, .@exp_rate_multiplier; set #jexp_rate_multiplier, .@jexp_rate_multiplier; fakeIcon(getcharid(0),2002,0,1); dispbottom "You have chosen the " + .@rate_description$ + " for your character."; end; OnNPCKillEvent: // Retrieve the stored multipliers .@exp_rate_multiplier = #exp_rate_multiplier; .@jexp_rate_multiplier = #jexp_rate_multiplier; .@base_exp = getmonsterinfo(killedrid, MOB_BASEEXP) * .@exp_rate_multiplier; .@job_exp = getmonsterinfo(killedrid, MOB_JOBEXP) * .@jexp_rate_multiplier; // Debug messages to track values dispbottom "[Debug] Base EXP: " + .@base_exp; dispbottom "[Debug] Job EXP: " + .@job_exp; if (.@base_exp > 0 || .@job_exp > 0) { // Use getcharid(0) to specify the character ID getexp2(.@base_exp, .@job_exp); } else { dispbottom "[Error] Experience values are zero."; } end; } stateiconinfo.lub StateIconList[EFST_IDs.EFST_RATE_UP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { { "RATE UP", COLOR_TITLE_BUFF }, { "%s", COLOR_TIME }, { "Increases your Bonus EXP and Job Exp" }, { "x1 / x25 / x50 / x100" }, { "Grants players different rewards" }, { "depending on what they choose." } } } efstids.lub EFST_VIPSTATE1 = 2000, EFST_VIPSTATE2 = 2001, EFST_RATE_UP = 2002, __newindex = function() error("unknown state") end } setmetatable(EFST_IDs, EFST_IDs) stateiconimginfo.lub -- Other official effects [EFST_IDs.EFST_VIPSTATE1] = "SI_VIP.tga", [EFST_IDs.EFST_VIPSTATE2] = "SI_VIP2.tga", [EFST_IDs.EFST_RATE_UP] = "RATE_UP.tga", [EFST_IDs.EFST_YGGDRASIL_BLESS] = "vitata500.tga", [EFST_IDs.EFST_PERIOD_RECEIVEITEM_2ND] = "ITEM_G.tga", [EFST_IDs.EFST_PERIOD_PLUSEXP_2ND] = "EXP_G.tga" } } status.hpp /// @APIHOOK_END /// Do not modify code above this, since it will be automatically generated by the API again EFST_VIPSTATE1 = 2000, EFST_VIPSTATE2 = 2001, EFST_RATE_UP = 2002, EFST_MAX, script_constants.hpp /// @APIHOOK_END /// Do not modify code above this, since it will be automatically generated by the API again export_constant(EFST_VIPSTATE1); export_constant(EFST_VIPSTATE2); export_constant(EFST_RATE_UP); export_constant(EFST_MAX); Install fakeicon: https://rathena.org/board/files/file/4034-fake-icon-stats/ RATE_UP.tga RATE_UP.tga
    1 point
×
×
  • Create New...