Jump to content

Azirike

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Azirike

  1. Hi, Thank you for your answer @Haruka Mayumi, but sadly it's still the same. I changed LOGIN to LOGIN2 on this script I also have: //===== EinherjarRO Scripts ================================== //= Requested //===== By: ================================================== //= Stolao //===== Current Version: ===================================== //= 2.1C //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= A reward system for players who play more frequently //===== Todo ================================================= //= Make Logging out then it continue count //===== Additional Comments: ================================= //= 2.00 Origional Make //= 2.01 Fixed Logic Bug //= 2.02 Fixed Year Multiplier //= 2.03 Added an IP check //= 2.04 Split Rewards up //= 2.05 Move ip check to Daily reward collection //= 2.06 Added ability to see next day via commands/relogging //= 2.07 Added Delay //= 2.08 Moved Delay to none VIP only //= 2.09 Removed some useless lines //= 2.0A Removed Menus due to bugs //= 2.0B Fixed VIP Cutin //= 2.0C Added it showing previos day cutin //= 2.0D Added a for loop //= 2.0E Fixed Ramined logged in time calculation (visual bug) //= 2.0F Added a F_InsertPlural to "more minute" //= 2.10 Added a Mac Check //= 2.11 Changed the IP check to [Sader1992] version //= 2.12 Enable Bound Type //= 2.13 Added 'collectreward', 'dailyreward', 'collectdaily' Commands //= 2.14 Added 'nextreward' Command //= 2.15 Added Daily Buffs //= 2.16 Added Exp Rewards //= 2.17 Removed Reards for Autotraders //= 2.18 Move Buffs to Daily so VIP wont trigger twice //= 2.19 Optimized Slightly //= 2.1A Fixed a bug with VIP getting bonus rewards in normal rewards //= 2.1B Fixed some documentaion //= 2.1C Fixed extra '[' //===== Contact Info: ======================================== //= [Stolao] //= Email: [email protected] //============================================================ prontera,5,5,5 script LOGIN2 111,{ OnPCLoginEvent: if(!@logintime) @logintime = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); OnLoginCmnd: .@i = gettime(DT_YEAR) * 12 * 31 + gettime(DT_MONTH) * 31 + gettime(DT_DAYOFMONTH); if(.Reset && .@i > #LastDailyReward + 1) #DRewardCon = 0; if(.Reset && .@i > #LastVIPReward + 1) #VIPRewardCon = 0; .@VIPSize = getarraysize(.VIPRewards$); .@Size = getarraysize(.Rewards$); if(#DRewardCon >= .@Size && #VIPRewardCon >= .@VIPSize){ #LastDailyReward = .@i; #LastVIPReward = .@i; end; } sleep2 1000; for(.@k = 0; .@k < 2; .@k++){ if(!.@k){ if(!vip_status(VIP_STATUS_ACTIVE) && .VIPRewards$[#VIPRewardCon + 1] != ""){ //message strcharinfo(0),"[Daily Rewards]: Become a VIP for more rewards."; continue; } else if(#VIPRewardCon >= .@VIPSize){ message strcharinfo(0),"[Daily Rewards]: No more VIP rewards remaining this month."; continue; } else if(.@i <= #LastVIPReward){ message strcharinfo(0),"[Daily Rewards]: VIP Rewards already collected today"; continue; } } else { if(#DRewardCon >= .@Size){ message strcharinfo(0),"[Daily Rewards]: No more rewards remaining this month."; continue; } else if(.@i <= #LastDailyReward){ message strcharinfo(0),"[Daily Rewards]: Rewards already collected today."; continue; } } if(!.@k) explode(.@XT$,.VIPRewards$[#VIPRewardCon + 1],","); else { #LastDailyReward += 1; if(.IPCheck){ query_logsql("SELECT value FROM `sader_variables_log` WHERE ip = '"+getcharip()+"' AND `variable` = '#LastDailyReward'", .@s_ip); if(.@s_ip >= #LastDailyReward){ message strcharinfo(0),"[Daily Rewards]: You already got the Daily Rewards from this IP."; #LastDailyReward -= 1; end; } if(.@s_ip == 0){ query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#LastDailyReward', '0', '"+#LastDailyReward+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')"); } query_logsql("Update `sader_variables_log` SET `value` = '"+#LastDailyReward+"' WHERE `ip`= '"+getcharip()+"' AND `variable` = '#LastDailyReward'"); } if(.MacCheck == 1){ query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'", .@s_last_unique_id$); query_logsql("SELECT value FROM `sader_variables_log` WHERE unique_id = '"+.@s_last_unique_id$+"' AND `variable` = '#LastDailyReward'", .@s_GePard); if(.@s_GePard >= #LastDailyReward){ message strcharinfo(0),"[Daily Rewards]: You already got the Daily Rewards from this PC."; #LastDailyReward -= 1; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } if(.@s_GePard == 0){ query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#LastDailyReward', '0', '"+#LastDailyReward+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')"); } query_logsql("Update `sader_variables_log` SET `value` = '"+#LastDailyReward+"' WHERE `unique_id`= '"+.@s_last_unique_id$+"' AND `variable` = '#LastDailyReward'"); } //if(.MacCheck == 1){ // .@time = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); // query_sql("SELECT last_unique_id FROM `login` WHERE `account_id` = "+getcharid(3)+"", .@last_unique_id$); // query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@last_unique_id$+"'", .@AccountId2); // .@Size = getarraysize(.@AccountId2); // for(.@i=0; .@i < .@Size; .@i++){ // query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId2[.@i]+"' AND `key` = '#LastDailyReward'",.@MacCheck2); // if(.@i <= .@MacCheck2){ // message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per computer, sorry."; // end; // } //if(.@MacCheck2 == 0){ // query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#LastDailyReward', '0', '"+#LastDailyReward+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')"); //} // query_logsql("Update `sader_variables_log` SET `value` = '"+#LastDailyReward+"' WHERE `unique_id`= '"+.@s_last_unique_id$+"' AND `variable` = '#LastDailyReward'"); // continue; // } //} if(.Rest){ .@time = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); if(.@time < @logintime + .Rest){ .@delay = @logintime + .Rest - .@time; message strcharinfo(0),"[Daily Rewards]: to collect your reward, you must remain logged in for "+callfunc("F_InsertPlural",.@delay,"more minute")+"."; continue; } } deletearray .@XT$[0],getarraysize(.@XT$); .@NextDay = #DRewardCon + 1; explode(.@XT$,.Rewards$[.@NextDay],","); } if(checkvending() & 2 && .Mode & 256){ message strcharinfo(0),"[Daily Rewards]: Venders cannot receive rewards."; end; } .@Size = getarraysize(.@XT$); deletearray .@TT[0],getarraysize(.@TT); deletearray .@itms[0],getarraysize(.@itms); deletearray .@qnts[0],getarraysize(.@qnts); for(.@x = y = 0; .@x < .@Size; .@x++) .@TT[.@x] = atoi(.@XT$[.@x]); if(.Mode & 1 && (.@TT[4] > 0 || .@vip[4] > 0)){ .@Size = getarraysize(.@TT); for(.@x = 4; .@x <= .@Size - 1 ; .@x += 2){ .@itms[.@y] = .@TT[.@x]; .@qnts[.@y] = .@TT[.@x + 1]; .@y++; } if(checkweight2(.@itms,.@qnts)){ for(.@x = 0; .@x < .@y; .@x++){ if(.Mode & 128) getitembound .@itms[.@x], .@qnts[.@x], .Bound_Mode; else getitem .@itms[.@x], .@qnts[.@x]; } } else { message strcharinfo(0),"[Daily Rewards]: You cannot carry the prizes, please use your storage and relog."; continue; } } if(.Mode & 2 && (.@TT[1])){ #Loyalty += .@TT[1]; message strcharinfo(0),"[Daily Rewards]: Recieved "+ .@TT[1] +" "+.Points$; } if(.Mode & 4 && (.@TT[0])){ zeny += .@TT[0]; message strcharinfo(0),"[Daily Rewards]: Recieved "+ .@TT[0] +"z"; } if(.Mode & 8 && (.@TT[3] || .@TT[4])) getexp .@TT[3], .@TT[4]; if(!.@k){ if(.Mode & 32) cutin .VIPCutins$[#VIPRewardCon],4; #VIPRewardCon++; #LastVIPReward = .@i; sleep2 1000; if(.Mode & 64) cutin .VIPCutins$[#VIPRewardCon],4; message strcharinfo(0),"[Daily Rewards]: You have collected your VIP rewards for today"; // "+callfunc("F_InsertPlural",#VIPRewardCon,"day")+" this month."; } else { if(.Mode & 16){ .@Size = getarraysize(.BuffInfo); for(.@x = 0; .@x < .@Size; .@x += 4){ if(.@NextDay == .BuffInfo[.@x + 1]) sc_start .BuffInfo[.@x], .BuffInfo[.@x + 2] * 60000, .BuffInfo[.@x + 3]; } } if(.Mode & 32) cutin .Cutins$[#DRewardCon],4; #DRewardCon++; #LastDailyReward = .@i; sleep2 1000; if(.Mode & 64) cutin .Cutins$[#DRewardCon],4; message strcharinfo(0),"[Daily Rewards]: You have collected your daily rewards for today"; announce ""+strcharinfo(0)+", you have collected your daily rewards for today, check it out!",bc_self; //"+callfunc("F_InsertPlural",#DRewardCon,"day")+" this month."; } if(.Mode & 32 || .Mode & 64){ sleep2 15000; cutin "",255; } } end; OnNextCmnd: .@time = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); if(.@time >= @logintime + .Rest){ message strcharinfo(0),"[Daily Rewards]: your next reward is available."; } else { .@i = gettime(DT_YEAR) * 12 * 31 + gettime(DT_MONTH) * 31 + gettime(DT_DAYOFMONTH); if(.@i <= #LastDailyReward) message strcharinfo(0),"[Daily Rewards]: Your next reward will be available tomorrow."; else { .@days = (.@time >= @logintime + .Rest) / 60 / 24; .@hours = ((.@time >= @logintime + .Rest) / 60) % 24; .@mins = (.@time >= @logintime + .Rest) % 60; message strcharinfo(0),"[Daily Rewards]: You have "+ ((.@days) ? .@days +" Days " : "") + ((.@hours) ? .@hours +" Hours " : "") + ((.@mins) ? .@mins +" Minutes " : "") +"till your next reward."; } if(.Mode & 32 || .Mode & 64){ if(.@NextDay >= getarraysize(.Rewards$)) .@g = 0; else .@g = #DRewardCon + 1; cutin .Cutins$[.@g],4; } } end; OnDailyCmnd: cutin .Cutins$[#DRewardCon],4; OnHour00: if(gettime(DT_DAYOFMONTH) == 1){ query_sql("DELETE FROM `acc_reg_num` WHERE `key` = '#DRewardCon' OR `key` = '#VIPRewardCon' OR `key` = '#LastVIPReward' OR `key` = '#LastDailyReward'"); addrid(0); #DRewardCon = #VIPRewardCon = #LastVIPReward = #LastDailyReward = 0; } end; OnInit: // Basic Settings // 1: Item | 2: Points | 4: Zeny | 8: Exp // 16: Gain Buffs // 32: Show Cutins | 64: Show Next Day Cutin // 128: Item Rewards Bound // 256: No Rewards for Autotraders // (a bit value, e.g. 3 = Items & Points from Multi) .Mode = 1|4|16|32|64|128|256; // Item Binding Mode // Bound_Account : Account Bound item // Bound_Guild : Guild Bound item // Bound_Party : Party Bound item // Bound_Char : Character Bound item .Bound_Mode = Bound_Account; // To disable the command '@loginreward' comment the next lines // * Needs extra commands for typos bindatcmd("relog","LOGIN::OnLoginCmnd",0,99); bindatcmd("collectreward",strnpcinfo(3)+"::OnLoginCmnd",0,99); bindatcmd("dailyreward",strnpcinfo(3)+"::OnLoginCmnd",0,99); bindatcmd("collectdaily",strnpcinfo(3)+"::OnLoginCmnd",0,99); bindatcmd("nextreward",strnpcinfo(3)+"::OnNextCmnd",0,99); bindatcmd("dailylogin",strnpcinfo(3)+"::OnDailyCmnd",0,99); // Reset days back to 0 on a skipped day. // Toggle // [0] = Off // [1] = On .Reset = 1; // .Rest // Delay after login to collect rewards // In Minutes .Rest = 0; // Point Name .Points$ = "Loyalty Points"; // Ip check to prevent multi accounts // Toggle // [0] = Off // [1] = On .IPCheck = 0; // Unique ID check to prevent multi accounts // Toggle // [0] = Off // [1] = On .MacCheck = 1; // Consecutive Days Buff // Each buff contains 4 variables // <Type>,<Days>,<Duration>,<Rate>, // Buff 1 // <Type>,<Days>,<Duration>,<Rate>, // Buff 2 // ...; // // Example: 188,7,45,3 // -On the 7th 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 val1, in this example player gains 3 Str setarray .BuffInfo ,260,2,30,1 // Life Insurance for 30 on 2nd Day ,198,3,30,5 // +5% Hp for 30 Mins on 3rd Day ,260,4,60,1 // Life Insurance for 60 on 4th Day ,196,5,30,5 // +5 Flee for 30 Mins on 5th Day ,198,6,30,10 // +10% Hp for 30 Mins on 6th Day ,257,7,60,10 // +10% Exp for 60 Mins on 7th Day ,260,8,120,1 // Life Insurance for 120 on 8th Day ,198,9,60,10 // +10% Hp for 60 Mins on 9th Day ,196,10,60,10 // +10 Flee for 60 Mins on 10th Day ,198,12,120,10 // +10% Hp for 120 Mins on 12th Day ,257,14,240,20 // +20% Exp for 120 Mins on 14th Day ,196,15,120,10 // +10 Flee for 120 Mins on 15th Day ,260,16,360,1 // Life Insurance for 360 on 16th Day ,198,18,120,10 // +10% Hp for 120 Mins on 18th Day ,196,20,120,10 // +10 Flee for 360 Mins on 20th Day ,257,21,240,25 // +25% Exp for 120 Mins on 21st Day ,260,22,360,1 // Life Insurance for 360 on 22nd Day ,198,24,120,10 // +10% Hp for 120 Mins on 24th Day ,196,25,120,25 // +25 Flee for 120 Mins on 25th Day ,260,26,360,1 // Life Insurance for 360 on 26th Day ,198,27,120,10 // +10% Hp for 120 Mins on 27th Day ,257,28,240,50 // +50% Exp for 240 Mins on 28th Day ,196,30,120,20; // +20 Flee for 120 Mins on 30th Day // Daily Prize items: // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc", // Day 1 // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc" // Day 2 // ...; // Total length of any days string must be 255 or shorter setarray .Rewards$[1], "0,0,0,0,7059,5", // Day 1: 5 Free Ticket for Kafra Storage "0,0,0,0,7060,5", // Day 2: 5 Free Ticket for Kafra Transportation "0,0,0,0,12016,3", // Day 3: 3 Speed Potion "0,0,0,0,12216,5", // Day 4: 5 LV10 Agi Scroll "0,0,0,0,12215,5", // Day 5: 5 LV10 Bless Scroll "0,0,0,0,12211,5", // Day 6: 3 Kafra Card "0,0,0,0,7539,20", // Day 7: ######### 20 Poring Coin ########## "0,0,0,0,504,75", // Day 8: 75 White Potions "0,0,0,0,505,50", // Day 9: 50 Blue Potions "0,0,0,0,12208,1", // Day 10: 1 Battle Manual "0,0,0,0,14592,1", // Day 11: 1 JOB Battle Manual "0,0,0,0,12411,1", // Day 12: 1 HE Battle Manual "0,0,0,0,12210,1", // Day 13: 1 Bubble Gum "0,0,0,0,7539,40", // Day 14: ######### 40 Poring Coin ########## "0,0,0,0,12209,3", // Day 15: 3 Life Insurance "0,0,0,0,12214,2", // Day 16: 2 Convex Mirror "0,0,0,0,12103,1", // Day 17: 1 Bloody Branch "0,0,0,0,7620,1", // Day 18: 1 Enriched Oridecon "0,0,0,0,7619,1", // Day 19: 1 Enriched Eluminium "0,0,0,0,14003,3", // Day 20: 3 Elite Siege Supply Box "0,0,0,0,23383,1", // Day 21: ######### 1 Random Costume Box ########## "0,0,0,0,7776,1", // Day 22: 1 Gym Pass "0,0,0,0,12535,1", // Day 23: 1 Yggdrasil Berry "0,0,0,0,616,1", // Day 24: 3 Old Card Album "0,0,0,0,7621,10", // Day 25: 10 Token of Ziegfried "0,0,0,0,12261,2", // Day 26: 2 Miracle Medicine "0,0,0,0,23033,1", // Day 27: 100x Cash Point Bag "0,0,0,0,23382,1"; // Day 28: ######### 1 Random Box ########## // VIP Prize items: // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc", // Day 1 // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc" // Day 2 // ...; // Total length of any days string must be 255 or shorter // // Note VIPs Collect both VIP and Normal Player rewards setarray .VIPRewards$[1], "1000", // Day 1: 1000 Zeny "0,0,0,0,501,5", // Day 2: 5 Red Potion "0,0,0,0,506,5", // Day 3: 5 Green Potion "2000", // Day 4: 2000 Zeny "2000", // Day 5: 2000 Zeny "0,0,0,0,502,5", // Day 6: 5 Orange Potion "0,0,0,0,12208,1", // Day 7: 1 Battle Manual "2500", // Day 8: 2500 Zeny "2500", // Day 8: 2500 Zeny "2500", // Day 9: 2500 Zeny "0,0,0,0,503,5", // Day 10: 5 White Potion "2500", // Day 11: 2500 Zeny "2500", // Day 12: 2500 Zeny "2500", // Day 13: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 14: 5 White Potion + 3 Green Potion "2500", // Day 15: 2500 Zeny "2500", // Day 16: 2500 Zeny "2500", // Day 17: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 18: 5 White Potion + 3 Green Potion "2500", // Day 19: 2500 Zeny "2500", // Day 20: 2500 Zeny "0,0,0,0,604,3", // Day 21: 1 Dead Branch "2500", // Day 22: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 23: 5 White Potion + 3 Green Potion "2500", // Day 24: 2500 Zeny "2500", // Day 25: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 26: 5 White Potion + 3 Green Potion "2500", // Day 27: 2500 Zeny "2500"; // Day 28: 2500 Zeny // Cutin Array // Shows a cutin before collecting for each date // Start at 0 if showing next day setarray .Cutins$, "Daily_00", //pic with day1 highlighted "Daily_01", //pic with day1 highlighted "Daily_02", //pic with day2 highlighted "Daily_03", //pic with day3 highlighted "Daily_04", //pic with day4 highlighted "Daily_05", //pic with day5 highlighted "Daily_06", //pic with day6 highlighted "Daily_07", //pic with day7 highlighted "Daily_08", //pic with day8 highlighted "Daily_09", //pic with day8 highlighted "Daily_10", //pic with day8 highlighted "Daily_11", //pic with day8 highlighted "Daily_12", //pic with day8 highlighted "Daily_13", //pic with day8 highlighted "Daily_14", //pic with day8 highlighted "Daily_15", //pic with day8 highlighted "Daily_16", //pic with day8 highlighted "Daily_17", //pic with day8 highlighted "Daily_18", //pic with day8 highlighted "Daily_19", //pic with day8 highlighted "Daily_20", //pic with day8 highlighted "Daily_21", //pic with day8 highlighted "Daily_22", //pic with day8 highlighted "Daily_23", //pic with day8 highlighted "Daily_24", //pic with day8 highlighted "Daily_25", //pic with day8 highlighted "Daily_26", //pic with day8 highlighted "Daily_27", //pic with day8 highlighted "Daily_28"; //pic with day8 highlighted // Cutin Array // Shows a cutin on collecting for each date setarray .VIPCutins$, "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_08", "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_08", "kafra_09", "kafra_01", "kafra_02", "kafra_03"; end; } and the error then becomes sader variables, I guess?! [Error]: npc_event: event not found [LOGIN2::OnHourlyRewards] So they seems to be connected since they both use Edit: I guess we did modifications and we used some coding from the hourly one into the daily one. I removed the following line and it doesn't show anymore. addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; Thank you for your time.
  2. Hi everyone, hopefully someone will be able to guide me through this. Everytime a player login, we get this error on our map server. [Error]: npc_event: event not found [LOGIN::OnHourlyRewards] I suspect this part of the script: OnPCLogoutEvent: if(.s_GePard_ip){ query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'"); } if(#Hourly_Ban == 1){ #Hourly_Ban = 0; } #Hourly_Rewads_Check = 1; end; OnPCLoginEvent: addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; But personally, I don't see anything wrong with it. Here's the full script just in case: //===== rAthena Script ======================================= //= saders Hourly Rewards //===== By: ================================================== //= Sader1992 //https://rathena.org/board/profile/30766-sader1992/ //===== Current Version: ===================================== //= 1.2 //===== Compatible With: ===================================== //= rAthena Project //https://rathena.org/board/files/file/3647-saders-hourly-rewards/ //https://github.com/sader1992/sader_scripts //===== Description: ========================================= //==== all the configuration are in the last //==== support gepard / ip / or without them //==== if you use ip/gepard sql will be used for that //==== can add minimem level to get the rewards //==== can change the time //==== can ban the vending from the rewards (it will reset after relogin) //==== can add rewards else then variable //==== there is a shop npc for the variable //==== you can make it only for vip //==== can ban idle players for X time from the Hourly Rewards //==== player can ban his char from getting the reward by @HourlyBan (it will reset after relogin) //============================================================ //==== please send me a message if you find error //==== if you like my work maybe consider support me at paypal //==== [email protected] //============================================================ //==== 1.1 FIX Critical issue with gepard/ip and compatibility with my other scripts //==== 1.2 FIX GrPard Variable //============================================================ - script sader_Hourly_Rewards -1,{ OnHourlyRewards: if(#Hourly_Ban){ message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards, Relogin to change that."; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } if(.s_idle){ if(checkidle() > .s_idle_time){ message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for IDLE Players!."; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } } if(.s_vip){ if(!vip_status(VIP_STATUS_ACTIVE)){ message strcharinfo(0),"[Hourly Rewards]: if you are a VIP you will get Hourly Rewards!."; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } } if(BaseLevel < .s_hourly_level){ message strcharinfo(0),"[Hourly Rewards]: if you are level "+.s_hourly_level+" and more you will get Hourly Rewards!."; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } if(.s_vinding){ if(checkvending() & .s_vinding){ message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that ."; if(.s_GePard_ip){ query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'"); } #Hourly_Rewads_Check = 1; #Hourly_Ban = 1; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } } #Hourly_Rewads_Check += 1; if(.s_GePard_ip == 1){ query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'", .@s_last_unique_id$); query_logsql("SELECT value FROM `sader_variables_log` WHERE unique_id = '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_GePard); if(.@s_GePard >= #Hourly_Rewads_Check){ message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this PC"; #Hourly_Rewads_Check -= 1; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } if(.@s_GePard == 0){ query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')"); } query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `unique_id`= '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'"); }else if(.s_GePard_ip == 2){ query_logsql("SELECT value FROM `sader_variables_log` WHERE ip = '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_ip); if(.@s_ip >= #Hourly_Rewads_Check){ message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this IP"; #Hourly_Rewads_Check -= 1; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } if(.@s_ip == 0){ query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')"); } query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `ip`= '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'"); } message strcharinfo(0),"[Hourly Rewards]: you Gain your Reward, 1 CashPoint."; callsub Hourly_Rewads; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; OnHourlyBan: if(!#Hourly_Ban){ message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards , Relogin to change that ."; if(.s_GePard_ip){ query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'"); } #Hourly_Rewads_Check = 1; #Hourly_Ban = 1; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; } end; OnMyHourlyPoints: message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points."; end; OnUnHourlyBan: #Hourly_Ban = 0; end; OnPCLogoutEvent: if(.s_GePard_ip){ query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'"); } if(#Hourly_Ban == 1){ #Hourly_Ban = 0; } #Hourly_Rewads_Check = 1; end; OnPCLoginEvent: addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; OnInit: .s_idle = 1; // ban hourly rewards from idle players ? 0 no / 1 yes {if player didn't move for x time he wont get hourly reward} , DEFAULT = 0 .s_idle_time = 1800; // this the time for idle in secend , DEFAULT = 1800 (30 min) .s_vip = 0; // 1 = only for VIP / 0 = for everyone , DEFAULT = 0 .s_time = 3600000; // 1000 = 1 secend | 60000 = 1 min | 3600000 = 1 hour , DEFAULT = 3600000 (1 hr) .s_hourly_level = 0; // Minimal level to get the Hourly rewards / 0 = no minimem level , DEFAULT 0 .s_GePard_ip = 1; // 0 = no Gepard / 1 = Gepard / 2 = IP , DEFAULT 0 .s_vinding = 7; // DEFAULT 7 / 0 = will give the reward even if vending / 1 = no normal vending / 2 = no @autotrade / 4 = no buyingstore | Example: if you want to ban normal vend and buying store you add the numbers 1+4=5 query_logsql("CREATE TABLE IF NOT EXISTS `sader_variables_log` (`unique_id` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',`ip` VARCHAR(100) NOT NULL,`variable` VARCHAR(32) NOT NULL, `index` INT NOT NULL, `value` INT NOT NULL,`account_id` INT NOT NULL,`char_id` INT NOT NULL,`char_name` VARCHAR(30) NOT NULL) ENGINE=MyISAM"); bindatcmd("UnHourlyBan",strnpcinfo(3)+"::OnUnHourlyBan",99,99); bindatcmd("HourlyBan",strnpcinfo(3)+"::OnHourlyBan",0,99); bindatcmd("MyHourlyPoints",strnpcinfo(3)+"::OnMyHourlyPoints",0,99); bindatcmd("MHP",strnpcinfo(3)+"::OnMyHourlyPoints",0,99); end; Hourly_Rewads: //put the Hourly Rewards here #HourlyRewards += 1; //getitem 7539,1; // if you want to add items as reward you can add them here like that //getexp 10000,5000; // if you wanna add exp as reward add them here like that if(#Hourly_Rewads_Check == 1){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 2){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} // if(#Hourly_Rewads_Check == 3){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 4){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 5){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 6){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 7){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 8){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 9){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 10){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 11){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 12){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} // like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr if(#Hourly_Rewads_Check == 13){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 14){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 15){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 16){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 17){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 18){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 19){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 20){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 21){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 22){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 23){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} if(#Hourly_Rewads_Check == 24){set #CASHPOINTS,#CASHPOINTS+rand( 1,1 );} //if(#Hourly_Rewads_Check >= 5){getitem 905,1;} // like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr or more return; } //prontera,151,171,5 pointshop Hourly Rewards Shop 667,#HourlyRewards,901:1,902:10,903:15,904:1,905:200 //<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE> Thank you
  3. Hi everyone, I'm using the following script: prontera,170,181,3 script ROTD 436,{ set .@gmlevel,getgmlevel(); do{ set .@menu,select("^4EEE94ROTD Information^000000", ( .@gmlevel < .gm_level )?"":"^FF0000[GM]^000000Set a New Monster's Race", ( .@gmlevel < .gm_level )?"":"^FF0000[GM]^000000Set EXP Bonus", ( .@gmlevel < .gm_level )?"":"^FF0000[GM]^000000Set Item / Zeny Bonus", "Close" ); switch( .@menu ) { Case 1: mes "^FF0000ROTD^000000 refer to ^0000FFRace of the Day^000000"; mes "In another word, it mean that the ^FF0000Monster's Race^000000 that you killed by day will grant you ^FF0000Extra Bonus EXP / Item / Zeny ^000000."; next; mes "[ ^FF0000Today's ROTD^000000 ]"; mes "^0000FF"+.rotd$[.today_rotd]+"^000000 Race"; if ( .rotd_exp_bonus ) mes " ~ ^777777"+.rotd_exp_bonus+"% more exp^000000"; if ( ( .rotd_item_amount && .rotd_item_rate ) || .rotd_zeny || .rotd_exp_bonus ) { mes " "; mes "Reward : "+( ( .rotd_item_rate )? .rotd_item_rate+"%":"" )+" : "; if ( .rotd_item_amount && .rotd_item_rate ) mes " ~ ^777777"+.rotd_item_amount+" x "+getitemname( .rotd_item_id )+"^000000"; if ( .rotd_zeny ) mes " ~ ^777777"+.rotd_zeny+" Zeny^000000"; mes " "; mes "Amount are random..."; } break; Case 2: mes "Select new race."; set .today_rotd,select( .rotd_menu$ ) - 1; if ( .today_rotd >= .rotd_size ) set .today_rotd,rand( .rotd_size ); mes "New Race : ^777777"+.rotd$[.today_rotd]+"^000000"; delwaitingroom; waitingroom "[ROTD]:"+.rotd$[.today_rotd]+" ",0; break; Case 3: mes "Set new exp bonus. (%)"; input .rotd_exp_bonus,0,100; if ( .rotd_exp_bonus ) mes "ROTD EXP : "+.rotd_exp_bonus+" %"; break; Case 4: mes "Set Rotd bonus"; mes "Inset Zeny Bonus"; input .@zeny; mes "Insert Item ID"; do{ input .@item,0,32767; if ( !.@item ) close; }while( getitemname( .@item ) == "null" ); mes "Enter amount."; input .@amount,0,30000; mes "Enter Rate to gain."; input .@rate,0,100; if ( .@amount && .@rate ) { next; mes "Updated item bonus : ( "+.@rate+"% )"; mes "^777777"+.@amount+" x "+getitemname( .@item )+"^000000"; mes "^777777"+.@zeny+" Zeny^000000"; if ( select( "Confirm","Cancel" ) == 1 ) { set .rotd_item_id,.@item; set .rotd_item_amount,.@amount; set .rotd_item_rate,.@rate; set .rotd_zeny,.@zeny; mes "Updated."; } } default: close; } next; }while( .@menu != 5 ); close; OnInfo: if(.today_rotd) dispbottom "Race of the day is: "+.rotd$[.today_rotd]+" ~ "+.rotd_exp_bonus+" % more exp"; end; OnInit: // min gm level set .gm_level,80; // monster race list setarray .rotd$[0], "Formless", "Undead", "Brute", "Plant", "Insect", "Fish", "Demon"; //"Demi Human", //"Angel", //"Dragon", //"Boss", //"Non-Boss"; set .rotd_size,getarraysize( .rotd$ ); for( set .@i,0; .@i < .rotd_size; set .@i,.@i + 1 ) set .rotd_menu$,.rotd_menu$ + .rotd$[.@i] +":"; set .rotd_menu$,.rotd_menu$ + "^0055FFRandom Race^000000"; // min party member lv to gain exp set .party_level_range,15; //command bindatcmd "rotd",strnpcinfo(3)+"::OnInfo",0,99; // daily reset OnClock0000: set .today_rotd,rand( .rotd_size ); set .rotd_exp_bonus,rand( 10,50 ); delwaitingroom; waitingroom "[ROTD]:"+.rotd$[.today_rotd]+" ",0; end; OnNPCKillEvent: if ( getmonsterinfo( killedrid,MOB_RACE ) == .today_rotd ) { set .@partyid,getcharid(1); set .@mob_base_exp,(( getmonsterinfo( killedrid,MOB_BASEEXP ) / 100 ) * .rotd_exp_bonus ); set .@mob_job_exp,(( getmonsterinfo( killedrid,MOB_JOBEXP ) / 100 ) * .rotd_exp_bonus ); if ( .@partyid ) { set .@aid,getcharid(3); set .@baselevel,BaseLevel; set .@map$,strcharinfo(3); getpartymember .@partyid,1; getpartymember .@partyid,2; while( .@i < $@partymembercount ) { if ( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) if ( attachrid( $@partymemberaid[.@i] ) ) if ( strcharinfo(3) == .@map$ && ( BaseLevel - .@baselevel ) <= .party_level_range && ( BaseLevel - .@baselevel ) >= ~.party_level_range && Hp >= 1 ) { set BaseExp,( BaseExp + .@mob_base_exp ); set JobExp,( JobExp + .@mob_job_exp ); dispbottom "[ROTD Party] : "+.@mob_base_exp+" EXP"; } set .@i,.@i + 1; } attachrid( .@aid ); } else { set BaseExp,( BaseExp + .@mob_base_exp ); set JobExp,( JobExp + .@mob_job_exp ); dispbottom "[ROTD SOLO] : "+.@mob_base_exp+" EXP"; } if ( rand( 100 ) < .rotd_item_rate && .rotd_zeny ) set Zeny,Zeny + rand( .rotd_zeny ); if ( rand( 100 ) < .rotd_item_rate && .rotd_item_amount ) getitem .rotd_item_id,rand( .rotd_item_amount ),.@aid; } end; } The problem we're having is that when players are within a party, each individual member receive the full bonus % instead of receiving the shared bonus %. Also, even if the party exp sharing is set to "Each Take", all of the players still receive the full bonus %. We tried many modifications to this part of the script, but to no avail: OnNPCKillEvent: if ( getmonsterinfo( killedrid,MOB_RACE ) == .today_rotd ) { set .@partyid,getcharid(1); set .@mob_base_exp,(( getmonsterinfo( killedrid,MOB_BASEEXP ) / 100 ) * .rotd_exp_bonus ); set .@mob_job_exp,(( getmonsterinfo( killedrid,MOB_JOBEXP ) / 100 ) * .rotd_exp_bonus ); if ( .@partyid ) { set .@aid,getcharid(3); set .@baselevel,BaseLevel; set .@map$,strcharinfo(3); getpartymember .@partyid,1; getpartymember .@partyid,2; while( .@i < $@partymembercount ) { if ( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) if ( attachrid( $@partymemberaid[.@i] ) ) if ( strcharinfo(3) == .@map$ && ( BaseLevel - .@baselevel ) <= .party_level_range && ( BaseLevel - .@baselevel ) >= ~.party_level_range && Hp >= 1 ) { set BaseExp,( BaseExp + .@mob_base_exp ); set JobExp,( JobExp + .@mob_job_exp ); dispbottom "[ROTD Party] : "+.@mob_base_exp+" EXP"; } set .@i,.@i + 1; } attachrid( .@aid ); } else { set BaseExp,( BaseExp + .@mob_base_exp ); set JobExp,( JobExp + .@mob_job_exp ); dispbottom "[ROTD SOLO] : "+.@mob_base_exp+" EXP"; } if ( rand( 100 ) < .rotd_item_rate && .rotd_zeny ) set Zeny,Zeny + rand( .rotd_zeny ); if ( rand( 100 ) < .rotd_item_rate && .rotd_item_amount ) getitem .rotd_item_id,rand( .rotd_item_amount ),.@aid; } end; } Hopefully someone has an idea about how we could fix this. Kind regards
  4. Hello everyone, Hopefully someone will be able to help me out. When enabling this on Stolao Daily Login script version 2.1C: // Ip check to prevent multi accounts // Toggle // [0] = Off // [1] = On .IPCheck = 1; // Unique ID check to prevent multi accounts // Toggle // [0] = Off // [1] = On .MacCheck = 1; Which should trigger: if(!.@k) explode(.@XT$,.VIPRewards$[#VIPRewardCon + 1],","); else { if(.IPCheck){ query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+getcharip()+"'", .@AccountId); .@Size = getarraysize(.@AccountId); for(.@i=0; .@i < .@Size; .@i++){ query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId[.@i]+"' AND `key` = '#LastDailyReward'",.@LastIp2); if(.@i <= .@LastIp2){ message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per IP sorry."; continue; } } } if(.MacCheck){ query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@last_unique_id$); query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@last_unique_id$+"'", .@AccountId2); .@Size = getarraysize(.@AccountId2); for(.@i=0; .@i < .@Size; .@i++){ query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId2[.@i]+"' AND `key` = '#LastDailyReward'",.@MacCheck2); if(.@i <= .@MacCheck2){ message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per computer sorry."; continue; } } } Nothing happens, I can still receive rewards on multiple accounts using the same IP and Mac Adress. I tried to disable: //OnPCLoginEvent: if(!@logintime) @logintime = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); So it only uses @collectreward: OnLoginCmnd: .@i = gettime(DT_YEAR) * 12 * 31 + gettime(DT_MONTH) * 31 + gettime(DT_DAYOFMONTH); if(.Reset && .@i > #LastDailyReward + 1) #DRewardCon = 0; if(.Reset && .@i > #LastVIPReward + 1) #VIPRewardCon = 0; .@VIPSize = getarraysize(.VIPRewards$); .@Size = getarraysize(.Rewards$); if(#DRewardCon >= .@Size && #VIPRewardCon >= .@VIPSize){ #LastDailyReward = .@i; #LastVIPReward = .@i; end; } But I can still receive the daily reward on multiple accounts. If anyone could help me out it would be really appreciated, here's the full script: //===== EinherjarRO Scripts ================================== //= Requested //===== By: ================================================== //= Stolao //===== Current Version: ===================================== //= 2.1C //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= A reward system for players who play more frequently //===== Todo ================================================= //= Make Logging out then it continue count //===== Additional Comments: ================================= //= 2.00 Origional Make //= 2.01 Fixed Logic Bug //= 2.02 Fixed Year Multiplier //= 2.03 Added an IP check //= 2.04 Split Rewards up //= 2.05 Move ip check to Daily reward collection //= 2.06 Added ability to see next day via commands/relogging //= 2.07 Added Delay //= 2.08 Moved Delay to none VIP only //= 2.09 Removed some useless lines //= 2.0A Removed Menus due to bugs //= 2.0B Fixed VIP Cutin //= 2.0C Added it showing previos day cutin //= 2.0D Added a for loop //= 2.0E Fixed Ramined logged in time calculation (visual bug) //= 2.0F Added a F_InsertPlural to "more minute" //= 2.10 Added a Mac Check //= 2.11 Changed the IP check to [Sader1992] version //= 2.12 Enable Bound Type //= 2.13 Added 'collectreward', 'dailyreward', 'collectdaily' Commands //= 2.14 Added 'nextreward' Command //= 2.15 Added Daily Buffs //= 2.16 Added Exp Rewards //= 2.17 Removed Reards for Autotraders //= 2.18 Move Buffs to Daily so VIP wont trigger twice //= 2.19 Optimized Slightly //= 2.1A Fixed a bug with VIP getting bonus rewards in normal rewards //= 2.1B Fixed some documentaion //= 2.1C Fixed extra '[' //===== Contact Info: ======================================== //= [Stolao] //= Email: [email protected] //============================================================ prontera,5,5,5 script LOGIN 111,{ //OnPCLoginEvent: if(!@logintime) @logintime = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); OnLoginCmnd: .@i = gettime(DT_YEAR) * 12 * 31 + gettime(DT_MONTH) * 31 + gettime(DT_DAYOFMONTH); if(.Reset && .@i > #LastDailyReward + 1) #DRewardCon = 0; if(.Reset && .@i > #LastVIPReward + 1) #VIPRewardCon = 0; .@VIPSize = getarraysize(.VIPRewards$); .@Size = getarraysize(.Rewards$); if(#DRewardCon >= .@Size && #VIPRewardCon >= .@VIPSize){ #LastDailyReward = .@i; #LastVIPReward = .@i; end; } sleep2 1000; for(.@k = 0; .@k < 2; .@k++){ if(!.@k){ if(!vip_status(VIP_STATUS_ACTIVE) && .VIPRewards$[#VIPRewardCon + 1] != ""){ //message strcharinfo(0),"[Daily Rewards]: Become a VIP for more rewards."; continue; } else if(#VIPRewardCon >= .@VIPSize){ message strcharinfo(0),"[Daily Rewards]: No more VIP rewards remaining this month."; continue; } else if(.@i <= #LastVIPReward){ message strcharinfo(0),"[Daily Rewards]: VIP Rewards already collected today"; continue; } } else { if(#DRewardCon >= .@Size){ message strcharinfo(0),"[Daily Rewards]: No more rewards remaining this month."; continue; } else if(.@i <= #LastDailyReward){ message strcharinfo(0),"[Daily Rewards]: Rewards already collected today."; continue; } } if(!.@k) explode(.@XT$,.VIPRewards$[#VIPRewardCon + 1],","); else { if(.IPCheck){ query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+getcharip()+"'", .@AccountId); .@Size = getarraysize(.@AccountId); for(.@i=0; .@i < .@Size; .@i++){ query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId[.@i]+"' AND `key` = '#LastDailyReward'",.@LastIp2); if(.@i <= .@LastIp2){ message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per IP, sorry."; continue; } } } if(.MacCheck){ query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@last_unique_id$); query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@last_unique_id$+"'", .@AccountId2); .@Size = getarraysize(.@AccountId2); for(.@i=0; .@i < .@Size; .@i++){ query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId2[.@i]+"' AND `key` = '#LastDailyReward'",.@MacCheck2); if(.@i <= .@MacCheck2){ message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per computer, sorry."; continue; } } } if(.Rest){ .@time = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); if(.@time < @logintime + .Rest){ .@delay = @logintime + .Rest - .@time; message strcharinfo(0),"[Daily Rewards]: to collect your reward, you must remain logged in for "+callfunc("F_InsertPlural",.@delay,"more minute")+"."; continue; } } deletearray .@XT$[0],getarraysize(.@XT$); .@NextDay = #DRewardCon + 1; explode(.@XT$,.Rewards$[.@NextDay],","); } if(checkvending() & 2 && .Mode & 256){ message strcharinfo(0),"[Daily Rewards]: Venders cannot receive rewards."; end; } .@Size = getarraysize(.@XT$); deletearray .@TT[0],getarraysize(.@TT); deletearray .@itms[0],getarraysize(.@itms); deletearray .@qnts[0],getarraysize(.@qnts); for(.@x = y = 0; .@x < .@Size; .@x++) .@TT[.@x] = atoi(.@XT$[.@x]); if(.Mode & 1 && (.@TT[4] > 0 || .@vip[4] > 0)){ .@Size = getarraysize(.@TT); for(.@x = 4; .@x <= .@Size - 1 ; .@x += 2){ .@itms[.@y] = .@TT[.@x]; .@qnts[.@y] = .@TT[.@x + 1]; .@y++; } if(checkweight2(.@itms,.@qnts)){ for(.@x = 0; .@x < .@y; .@x++){ if(.Mode & 128) getitembound .@itms[.@x], .@qnts[.@x], .Bound_Mode; else getitem .@itms[.@x], .@qnts[.@x]; } } else { message strcharinfo(0),"[Daily Rewards]: You cannot carry the prizes, please use your storage and relog."; continue; } } if(.Mode & 2 && (.@TT[1])){ #Loyalty += .@TT[1]; message strcharinfo(0),"[Daily Rewards]: Recieved "+ .@TT[1] +" "+.Points$; } if(.Mode & 4 && (.@TT[0])){ zeny += .@TT[0]; message strcharinfo(0),"[Daily Rewards]: Recieved "+ .@TT[0] +"z"; } if(.Mode & 8 && (.@TT[3] || .@TT[4])) getexp .@TT[3], .@TT[4]; if(!.@k){ if(.Mode & 32) cutin .VIPCutins$[#VIPRewardCon],4; #VIPRewardCon++; #LastVIPReward = .@i; sleep2 1000; if(.Mode & 64) cutin .VIPCutins$[#VIPRewardCon],4; message strcharinfo(0),"[Daily Rewards]: You have collected your VIP rewards for today"; // "+callfunc("F_InsertPlural",#VIPRewardCon,"day")+" this month."; } else { if(.Mode & 16){ .@Size = getarraysize(.BuffInfo); for(.@x = 0; .@x < .@Size; .@x += 4){ if(.@NextDay == .BuffInfo[.@x + 1]) sc_start .BuffInfo[.@x], .BuffInfo[.@x + 2] * 60000, .BuffInfo[.@x + 3]; } } if(.Mode & 32) cutin .Cutins$[#DRewardCon],4; #DRewardCon++; #LastDailyReward = .@i; sleep2 1000; if(.Mode & 64) cutin .Cutins$[#DRewardCon],4; message strcharinfo(0),"[Daily Rewards]: You have collected your daily rewards for today"; announce ""+strcharinfo(0)+", you have collected your daily rewards for today, check it out!",bc_self; //"+callfunc("F_InsertPlural",#DRewardCon,"day")+" this month."; } if(.Mode & 32 || .Mode & 64){ sleep2 15000; cutin "",255; } } end; OnNextCmnd: .@time = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE); if(.@time >= @logintime + .Rest){ message strcharinfo(0),"[Daily Rewards]: your next reward is available."; } else { .@i = gettime(DT_YEAR) * 12 * 31 + gettime(DT_MONTH) * 31 + gettime(DT_DAYOFMONTH); if(.@i <= #LastDailyReward) message strcharinfo(0),"[Daily Rewards]: Your next reward will be available tomorrow."; else { .@days = (.@time >= @logintime + .Rest) / 60 / 24; .@hours = ((.@time >= @logintime + .Rest) / 60) % 24; .@mins = (.@time >= @logintime + .Rest) % 60; message strcharinfo(0),"[Daily Rewards]: You have "+ ((.@days) ? .@days +" Days " : "") + ((.@hours) ? .@hours +" Hours " : "") + ((.@mins) ? .@mins +" Minutes " : "") +"till your next reward."; } if(.Mode & 32 || .Mode & 64){ if(.@NextDay >= getarraysize(.Rewards$)) .@g = 0; else .@g = #DRewardCon + 1; cutin .Cutins$[.@g],4; } } end; OnDailyCmnd: cutin .Cutins$[#DRewardCon],4; OnHour00: if(gettime(DT_DAYOFMONTH) == 1){ query_sql("DELETE FROM `acc_reg_num` WHERE `key` = '#DRewardCon' OR `key` = '#VIPRewardCon' OR `key` = '#LastVIPReward' OR `key` = '#LastDailyReward'"); addrid(0); #DRewardCon = #VIPRewardCon = #LastVIPReward = #LastDailyReward = 0; } end; OnInit: // Basic Settings // 1: Item | 2: Points | 4: Zeny | 8: Exp // 16: Gain Buffs // 32: Show Cutins | 64: Show Next Day Cutin // 128: Item Rewards Bound // 256: No Rewards for Autotraders // (a bit value, e.g. 3 = Items & Points from Multi) .Mode = 1|4|16|32|64|128|256; // Item Binding Mode // Bound_Account : Account Bound item // Bound_Guild : Guild Bound item // Bound_Party : Party Bound item // Bound_Char : Character Bound item .Bound_Mode = Bound_Account; // To disable the command '@loginreward' comment the next lines // * Needs extra commands for typos bindatcmd("relog","LOGIN::OnLoginCmnd",0,99); bindatcmd("collectreward",strnpcinfo(3)+"::OnLoginCmnd",0,99); bindatcmd("dailyreward",strnpcinfo(3)+"::OnLoginCmnd",0,99); bindatcmd("collectdaily",strnpcinfo(3)+"::OnLoginCmnd",0,99); bindatcmd("nextreward",strnpcinfo(3)+"::OnNextCmnd",0,99); bindatcmd("dailylogin",strnpcinfo(3)+"::OnDailyCmnd",0,99); // Reset days back to 0 on a skipped day. // Toggle // [0] = Off // [1] = On .Reset = 1; // .Rest // Delay after login to collect rewards // In Minutes .Rest = 0; // Point Name .Points$ = "Loyalty Points"; // Ip check to prevent multi accounts // Toggle // [0] = Off // [1] = On .IPCheck = 1; // Unique ID check to prevent multi accounts // Toggle // [0] = Off // [1] = On .MacCheck = 1; // Consecutive Days Buff // Each buff contains 4 variables // <Type>,<Days>,<Duration>,<Rate>, // Buff 1 // <Type>,<Days>,<Duration>,<Rate>, // Buff 2 // ...; // // Example: 188,7,45,3 // -On the 7th 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 val1, in this example player gains 3 Str setarray .BuffInfo ,260,2,30,1 // Life Insurance for 30 on 2nd Day ,198,3,30,5 // +5% Hp for 30 Mins on 3rd Day ,260,4,60,1 // Life Insurance for 60 on 4th Day ,196,5,30,5 // +5 Flee for 30 Mins on 5th Day ,198,6,30,10 // +10% Hp for 30 Mins on 6th Day ,257,7,60,10 // +10% Exp for 60 Mins on 7th Day ,260,8,120,1 // Life Insurance for 120 on 8th Day ,198,9,60,10 // +10% Hp for 60 Mins on 9th Day ,196,10,60,10 // +10 Flee for 60 Mins on 10th Day ,198,12,120,10 // +10% Hp for 120 Mins on 12th Day ,257,14,240,20 // +20% Exp for 120 Mins on 14th Day ,196,15,120,10 // +10 Flee for 120 Mins on 15th Day ,260,16,360,1 // Life Insurance for 360 on 16th Day ,198,18,120,10 // +10% Hp for 120 Mins on 18th Day ,196,20,120,10 // +10 Flee for 360 Mins on 20th Day ,257,21,240,25 // +25% Exp for 120 Mins on 21st Day ,260,22,360,1 // Life Insurance for 360 on 22nd Day ,198,24,120,10 // +10% Hp for 120 Mins on 24th Day ,196,25,120,25 // +25 Flee for 120 Mins on 25th Day ,260,26,360,1 // Life Insurance for 360 on 26th Day ,198,27,120,10 // +10% Hp for 120 Mins on 27th Day ,257,28,240,50 // +50% Exp for 240 Mins on 28th Day ,196,30,120,20; // +20 Flee for 120 Mins on 30th Day // Daily Prize items: // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc", // Day 1 // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc" // Day 2 // ...; // Total length of any days string must be 255 or shorter setarray .Rewards$[1], "0,0,0,0,7059,5", // Day 1: 5 Free Ticket for Kafra Storage "0,0,0,0,7060,5", // Day 2: 5 Free Ticket for Kafra Transportation "0,0,0,0,12016,3", // Day 3: 3 Speed Potion "0,0,0,0,12216,5", // Day 4: 5 LV10 Agi Scroll "0,0,0,0,12215,5", // Day 5: 5 LV10 Bless Scroll "0,0,0,0,12211,5", // Day 6: 3 Kafra Card "0,0,0,0,7539,20", // Day 7: ######### 20 Poring Coin ########## "0,0,0,0,504,75", // Day 8: 75 White Potions "0,0,0,0,505,50", // Day 9: 50 Blue Potions "0,0,0,0,12208,1", // Day 10: 1 Battle Manual "0,0,0,0,14592,1", // Day 11: 1 JOB Battle Manual "0,0,0,0,12411,1", // Day 12: 1 HE Battle Manual "0,0,0,0,12210,1", // Day 13: 1 Bubble Gum "0,0,0,0,7539,40", // Day 14: ######### 40 Poring Coin ########## "0,0,0,0,12209,3", // Day 15: 3 Life Insurance "0,0,0,0,12214,2", // Day 16: 2 Convex Mirror "0,0,0,0,12103,1", // Day 17: 1 Bloody Branch "0,0,0,0,7620,1", // Day 18: 1 Enriched Oridecon "0,0,0,0,7619,1", // Day 19: 1 Enriched Eluminium "0,0,0,0,14003,3", // Day 20: 3 Elite Siege Supply Box "0,0,0,0,601,1", // Day 21: ######### 1 Random Costume Box ########## "0,0,0,0,6286,1", // Day 22: 1 Gym Pass "0,0,0,0,12535,1", // Day 23: 1 Yggdrasil Berry "0,0,0,0,12817,3", // Day 24: 3 Old Card Album "0,0,0,0,7621,10", // Day 25: 10 Token of Ziegfried "0,0,0,0,12261,2", // Day 26: 2 Miracle Medicine "0,0,0,0,601,1", // Day 27: ######### 1 Random Costume Box ########## "0,0,0,0,23382,1"; // Day 28: ######### 1 Random Box ########## // VIP Prize items: // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc", // Day 1 // "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc" // Day 2 // ...; // Total length of any days string must be 255 or shorter // // Note VIPs Collect both VIP and Normal Player rewards setarray .VIPRewards$[1], "1000", // Day 1: 1000 Zeny "0,0,0,0,501,5", // Day 2: 5 Red Potion "0,0,0,0,506,5", // Day 3: 5 Green Potion "2000", // Day 4: 2000 Zeny "2000", // Day 5: 2000 Zeny "0,0,0,0,502,5", // Day 6: 5 Orange Potion "0,0,0,0,12208,1", // Day 7: 1 Battle Manual "2500", // Day 8: 2500 Zeny "2500", // Day 8: 2500 Zeny "2500", // Day 9: 2500 Zeny "0,0,0,0,503,5", // Day 10: 5 White Potion "2500", // Day 11: 2500 Zeny "2500", // Day 12: 2500 Zeny "2500", // Day 13: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 14: 5 White Potion + 3 Green Potion "2500", // Day 15: 2500 Zeny "2500", // Day 16: 2500 Zeny "2500", // Day 17: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 18: 5 White Potion + 3 Green Potion "2500", // Day 19: 2500 Zeny "2500", // Day 20: 2500 Zeny "0,0,0,0,604,3", // Day 21: 1 Dead Branch "2500", // Day 22: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 23: 5 White Potion + 3 Green Potion "2500", // Day 24: 2500 Zeny "2500", // Day 25: 2500 Zeny "0,0,0,0,503,5,506,3", // Day 26: 5 White Potion + 3 Green Potion "2500", // Day 27: 2500 Zeny "2500"; // Day 28: 2500 Zeny // Cutin Array // Shows a cutin before collecting for each date // Start at 0 if showing next day setarray .Cutins$, "Daily_00", //pic with day1 highlighted "Daily_01", //pic with day1 highlighted "Daily_02", //pic with day2 highlighted "Daily_03", //pic with day3 highlighted "Daily_04", //pic with day4 highlighted "Daily_05", //pic with day5 highlighted "Daily_06", //pic with day6 highlighted "Daily_07", //pic with day7 highlighted "Daily_08", //pic with day8 highlighted "Daily_09", //pic with day8 highlighted "Daily_10", //pic with day8 highlighted "Daily_11", //pic with day8 highlighted "Daily_12", //pic with day8 highlighted "Daily_13", //pic with day8 highlighted "Daily_14", //pic with day8 highlighted "Daily_15", //pic with day8 highlighted "Daily_16", //pic with day8 highlighted "Daily_17", //pic with day8 highlighted "Daily_18", //pic with day8 highlighted "Daily_19", //pic with day8 highlighted "Daily_20", //pic with day8 highlighted "Daily_21", //pic with day8 highlighted "Daily_22", //pic with day8 highlighted "Daily_23", //pic with day8 highlighted "Daily_24", //pic with day8 highlighted "Daily_25", //pic with day8 highlighted "Daily_26", //pic with day8 highlighted "Daily_27", //pic with day8 highlighted "Daily_28"; //pic with day8 highlighted // Cutin Array // Shows a cutin on collecting for each date setarray .VIPCutins$, "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_08", "kafra_01", "kafra_02", "kafra_03", "kafra_04", "kafra_05", "kafra_06", "kafra_07", "kafra_08", "kafra_09", "kafra_01", "kafra_02", "kafra_03"; end; } Kind regards, ADec Edit: I successfully fixed the script with: if(!.@k) explode(.@XT$,.VIPRewards$[#VIPRewardCon + 1],","); else { if(.IPCheck == 1){ query_sql("SELECT account_id FROM `login` WHERE `last_ip` = '"+getcharip()+"'", .@AccountId); .@Size = getarraysize(.@AccountId); for(.@i=0; .@i < .@Size; .@i++){ query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId[.@i]+"' AND `key` = '#LastDailyReward'",.@LastIp2); if(.@i <= .@LastIp2){ message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per IP, sorry."; end; } if(.@LastIp2 == 0){ query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#LastDailyReward', '0', '"+#LastDailyReward+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')"); } query_logsql("Update `sader_variables_log` SET `value` = '"+#LastDailyReward+"' WHERE `ip`= '"+getcharip()+"' AND `variable` = '#LastDailyReward'"); continue; } } if(.MacCheck == 1){ query_sql("SELECT last_unique_id FROM `login` WHERE `account_id` = "+getcharid(3)+"", .@last_unique_id$); query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@last_unique_id$+"'", .@AccountId2); .@Size = getarraysize(.@AccountId2); for(.@i=0; .@i < .@Size; .@i++){ query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId2[.@i]+"' AND `key` = '#LastDailyReward'",.@MacCheck2); if(.@i <= .@MacCheck2){ message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per computer, sorry."; end; } if(.@MacCheck2 == 0){ query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#LastDailyReward', '0', '"+#LastDailyReward+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')"); } query_logsql("Update `sader_variables_log` SET `value` = '"+#LastDailyReward+"' WHERE `unique_id`= '"+.@s_last_unique_id$+"' AND `variable` = '#LastDailyReward'"); continue; } }
  5. Hi, I've been testing your FluxCP and so far it works really well! I was wondering if you intend of modifying the password reset? If you ever consider it, it would be nice if players could choose to create their own new password instead of having a new one created for them. I already know some players will complain about it haha. But don't see my suggestion as a negative one, you did a really good job and I appreciate your efforts! Thank you, Xan.
  6. Awesome, as you said there's so many people that have been requesting this! I'm glad there's still people like you working on maintaining some of the most popular RO tools. Keep up the great work mate.
  7. I know it was declared as a "bug" when most of the skills that used to stack damages were changed to one single hit. But most players expect to have the old school trap stacking damage like shown on this video: The old school formula is: Damage Formula: Skill Level * (75 + [ DEX / 2]) * {1 + (INT / 100)} * Number of stacked monster as seen on IRO Wiki Classic. and Damage = [DEX × (3 + Base_Lv ÷ 85) × (1.1 + INT ÷ 35)] × Skill_Lv ± 10% + (Trap_Research_Lv × 40) on IRO WIKI There's this post that gives some information but it's for Hecules: https://herc.ws/board/topic/533-how-to-enable-multiple-hits-for-claymore-trap/ Would it be possible for anyone to help me out on how to reproduce that skill formula for both the source and maybe the skill db. Kind regards, Xan
  8. Bump: I have the same issue, only with the 1-1 jobs as well. I tried different diffs like the shared body type 1 or 2 ones and Use Official Cloth Palettes, but it doesn't fix it. I use the same files as well. Edit: This is the palettes for archer as an example, it's simply a file problem it seems. Everything after palette 489 is just a black .pal file that's why.
×
×
  • Create New...