Euphy Posted January 16, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted January 16, 2013 It's impractical to force users to type in 127 reward IDs. I suggest something more like this: // 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], 512,1, // Day 1 513,2, // Day 2 514,3; // Day 3 I really don't understand .Reminder[1] at all. I think you should remove it. // What does this even do? if( ( LOGINCOUNT + #LOGINCOUNT + $LOGINCOUNT )%.Reminder[1] == 0 ... .Wipe -- This is really not a good feature how it's currently written. Perhaps allow whispering "wipe" execute an SQL query to delete the values, or just let users do it manually.OnWhisperGlobal: if (getgmlevel() >= 99 && @whispervar0$ == "wipe") { query_sql("DELETE FROM `global_reg_value` WHERE `str` = 'LOGINCOUNT'"); query_sql("DELETE FROM `global_reg_value` WHERE `str` = '#LOGINCOUNT'"); query_sql("DELETE FROM `mapreg` WHERE `str` = '$LOGINCOUNT'"); dispbottom "Cleared all login count data."; } end; Your config section is a little confusing, could be formatted better, and needs spell check. Example of an easier-to-read format:// ----------------------------------------------------------- // Login Count & Welcome Message // ----------------------------------------------------------- // Login types to track. // 1: Character | 2: Account | 4: Server // (a bit value, e.g. 5 = character + server) set .LogCount,0; // Number of logins to display welcome message. set .Reminder,3; // Server name to display. set .Servername$,"Server"; // Login message set .Message$,"Before playing, make sure you've read the rules, located in our forum at ^0000FF~TBA~^000000"; Tab properly. In particular, 'else' should always be in-line with 'if'. You don't need to include empty strings in script lines.setd ""+.PointType$+"" --> setd .PointType$ 1 Quote Link to comment Share on other sites More sharing options...
Stolao Posted January 16, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted January 16, 2013 (edited) Thank you very much Euphy ill get right on updating as for Reminder[1], if the server, account and character login combined are equal to a multiple of Reminder[1] it will message the player with a .Message$ again, kinda pointless but i figured I'd add another option Edited January 19, 2013 by Stolao 1 Quote Link to comment Share on other sites More sharing options...
Stolao Posted January 19, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted January 19, 2013 Update v1.17 Quote Link to comment Share on other sites More sharing options...
icabit Posted January 20, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 353 Reputation: 70 Joined: 07/14/12 Last Seen: February 12, 2023 Share Posted January 20, 2013 KEWL thx for this Quote Link to comment Share on other sites More sharing options...
Stolao Posted January 20, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted January 20, 2013 Update, again 1.19 realized had no checkweight in script, added and fixed a small typo Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 31, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 31, 2013 query_sql("DELETE FROM `mapreg` WHERE `str` = '$LOGINCOUNT'"); [sql]: DB error - Unknown column 'str' in 'where clause' [Debug]: at d:\eathena\rathena sql 16819\src\map\script.c:14509 - DELETE FROM `m apreg` WHERE `str` = '$LOGINCOUNT' [Debug]: Source (NPC): LOGIN (invisible/not on a map) you didn't even test this, I doubt it and all query_sql executing like this probably not going to work out for online players perhaps using attachrid on all accounts method for online players and for mapreg, do set $LOGINCOUNT, 0; [Error]: buildin_checkweight: Invalid item '0'. [Debug]: Source (NPC): LOGIN (invisible/not on a map) if(#DRewardCon*2 > getarraysize(.Rewards)){ set .@p,.Reward[getarraysize(.Reward)-1]; set .@q,.Reward[getarraysize(.Reward)]; } else { set .@p,.Reward[#DRewardCon*2]; set .@q,.Reward[#DRewardCon*2+1]; } if(.@p && !checkweight(.@p,.@q)){ dispbottom "You cant carry your daily reward, put some items away and log in again"; if #DRewardCon is less than getarraysize(.Rewards), .@p is not set wrong logic also hmm, but nice try though Quote Link to comment Share on other sites More sharing options...
Stolao Posted February 2, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted February 2, 2013 (edited) name='AnnieRuru' timestamp='1359649420' post='176306'] query_sql("DELETE FROM `mapreg` WHERE `str` = '$LOGINCOUNT'"); [sql]: DB error - Unknown column 'str' in 'where clause' [Debug]: at d:\eathena\rathena sql 16819\src\map\script.c:14509 - DELETE FROM `m apreg` WHERE `str` = '$LOGINCOUNT' [Debug]: Source (NPC): LOGIN (invisible/not on a map) you didn't even test this, I doubt it and all query_sql executing like this probably not going to work out for online players perhaps using attachrid on all accounts method for online players and for mapreg, do set $LOGINCOUNT, 0; [Error]: buildin_checkweight: Invalid item '0'. [Debug]: Source (NPC): LOGIN (invisible/not on a map) if(#DRewardCon*2 > getarraysize(.Rewards)){ set .@p,.Reward[getarraysize(.Reward)-1]; set .@q,.Reward[getarraysize(.Reward)]; } else { set .@p,.Reward[#DRewardCon*2]; set .@q,.Reward[#DRewardCon*2+1]; } if(.@p && !checkweight(.@p,.@q)){ dispbottom "You cant carry your daily reward, put some items away and log in again"; if #DRewardCon is less than getarraysize(.Rewards), .@p is not set wrong logic also hmm, but nice try though I believe Ive fix the logic issue with #DRewardCon is greater then getarraysize(.Rewards) if(#DRewardCon*2 >= getarraysize(.Rewards)){ set .@p,.Reward[getarraysize(.Reward)-2]; set .@q,.Reward[getarraysize(.Reward)-1]; } else { set .@p,.Reward[#DRewardCon*2]; set .@q,.Reward[#DRewardCon*2+1]; } However Im having trouble with the online players info being removed, im obviously missing something with this code OnWhisperGlobal: if (getgmlevel() >= 99 && @whispervar0$ == "wipe") { query_sql("DELETE FROM `global_reg_value` WHERE `str` = 'LOGINCOUNT'"); query_sql("DELETE FROM `global_reg_value` WHERE `str` = '#LOGINCOUNT'"); set $LOGINCOUNT,0; set .@self, getcharid(3); set .@size, query_sql("select account_id from `char` where online = 1", .@aid); for(set .@i,0; .@i<.@size; set .@i,.@i+1) { if(attachrid(.@aid[.@i])){ set LOGINCOUNT,0; set #LOGINCOUNT,0; } } attachrid(.@self); dispbottom "Cleared all login count data."; } end; [/s] solved Edited February 5, 2013 by Stolao Quote Link to comment Share on other sites More sharing options...
Stolao Posted February 5, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted February 5, 2013 (edited) Updated 1.1C fixed issues AnnieRuru found Updated 1.1F should have all bugs fixed Edited February 7, 2013 by Stolao Quote Link to comment Share on other sites More sharing options...
arzzzae Posted February 22, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 83 Reputation: 8 Joined: 12/27/11 Last Seen: March 7, 2018 Share Posted February 22, 2013 (edited) Thank you for your release! Anyways I have a suggestion. How about letting the players whisper the said npc to let them know the remaining time for their next reward? or use a custom @command for checking the remaining time? Edited February 22, 2013 by arzzzae Quote Link to comment Share on other sites More sharing options...
Stolao Posted February 22, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted February 22, 2013 Thanks for suggestion. Quote Link to comment Share on other sites More sharing options...
arzzzae Posted February 23, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 83 Reputation: 8 Joined: 12/27/11 Last Seen: March 7, 2018 Share Posted February 23, 2013 Thanks for suggestion.No problem man. I still have several suggestions in my mind, but I guess it will be a hassle for you. Quote Link to comment Share on other sites More sharing options...
Stolao Posted February 25, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted February 25, 2013 (edited) Thanks for suggestion.No problem man. I still have several suggestions in my mind, but I guess it will be a hassle for you.No please hassle me, I plan on working on Ragnarok stuff all weekend ( weds Thurs for me) and want something for my release.Edit: typo lol Edited February 25, 2013 by Stolao Quote Link to comment Share on other sites More sharing options...
fang Posted March 11, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 03/10/13 Last Seen: February 16, 2020 Share Posted March 11, 2013 it didn't work.. but no errors..how to activate it?sorry, I'm still noob here.. Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted March 11, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted March 11, 2013 it didn't work.. but no errors.. how to activate it? sorry, I'm still noob here.. please load the script bro refer wiki how to add script Quote Link to comment Share on other sites More sharing options...
fang Posted March 11, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 03/10/13 Last Seen: February 16, 2020 Share Posted March 11, 2013 it didn't work.. but no errors.. how to activate it? sorry, I'm still noob here.. please load the script bro refer wiki how to add script the script still same as 1.1F version.. already add that npc to scripts_custom but nothing happen... Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted March 11, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted March 11, 2013 try reload script. what exactly u want sir ? dont understand. Quote Link to comment Share on other sites More sharing options...
Stolao Posted March 19, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted March 19, 2013 it didn't work.. but no errors.. how to activate it? sorry, I'm still noob here.. make sure you have configured and installed correctly, if it still doesn't work with no debug message, post your config here for me. sorry for slow response/updates irl has been bust Quote Link to comment Share on other sites More sharing options...
arzzzae Posted March 22, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 83 Reputation: 8 Joined: 12/27/11 Last Seen: March 7, 2018 Share Posted March 22, 2013 Hi, I am using your latest script. 1.17 and lately, I am having problems. Here is my errors with my console. [Debug]: Function: set (2 parameters): [Debug]: Data: variable name='.PointType$' index=0 [Debug]: Data: param name='Zeny' type=20 [Debug]: Source (NPC): LOGIN (invisible/not on a map) And here is my config: // ----------------------------------------------------------- // Login Count & Welcome Message // ----------------------------------------------------------- // Login types to track. // 1: Character | 2: Account | 4: Server // (a bit value, e.g. 5 = character + server) set .LogCount,2; // Number of logins to display welcome message. set .Reminder,1; // Server name to display. set .Servername$,"Ragnarok Online"; // Login message set .Message$,"Before playing, make sure you've read the rules."; // ----------------------------------------------------------- // Daily Reward // ----------------------------------------------------------- //Daily Prize //Toggle // 0: Off | 1: On set .DailyPrize,1; //Minimum Hours Between Collecting Daily Reward // Day: 22-24 // Week: 168 set .MinWait,24; //Hours Before Lose Consecutive Daily Rewar // Day: 48-50 // Week: 336 set .MaxWait,48; //Number of mins after logging before collecting prize set .Rest,5; //Variable of Points/Zeny earned // eg: CASHPOINTS, Zeny, LoginPoints set .PointType$,Zeny; //Name of Points/Zeny earned // eg: Cashpoints, Zeny, Login Points set .PointName$,Zeny; //Toggle // 0: Gain Zeny Only When ID = 0 // 1: Gain Zeny Every Loging regardless of prize ID set .Mode,0; //Consecutive Day Points/Zeny Multiplier // * If players login longer than the last set // day, they will keep a larger Multiplier. set .ZMulti,0; // 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], 617,1, // Day 1 end; } I don't want the zeny rewards, etc. I just want to give 1 item to the players. Quote Link to comment Share on other sites More sharing options...
Stolao Posted March 29, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted March 29, 2013 (edited) //Variable of Points/Zeny earned // eg: CASHPOINTS, Zeny, LoginPoints set .PointType$,Zeny; //Name of Points/Zeny earned // eg: Cashpoints, Zeny, Login Points set .PointName$,Zeny; Try putting "Zeny" with quotes sorry for slow response irl is busy Edited March 29, 2013 by Stolao Quote Link to comment Share on other sites More sharing options...
fang Posted April 3, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 03/10/13 Last Seen: February 16, 2020 Share Posted April 3, 2013 haha.. thanks guys.. it's working now.. really nice script.. Quote Link to comment Share on other sites More sharing options...
Stolao Posted April 4, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted April 4, 2013 Welcome, and thank you. I plan to update sometime when i get a chance, real life's hectic but YAY~ bought my 1st car Quote Link to comment Share on other sites More sharing options...
Start_ Posted April 14, 2013 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: 2 hours ago Share Posted April 14, 2013 Very nice script!! love it. Quote Link to comment Share on other sites More sharing options...
Stolao Posted May 6, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted May 6, 2013 (edited) Update 1.1F -> 1.2F 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 1.26 Made Whisper commands configurable 1.27 Made GmLvl for wipe Configurable 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 reviving rewards 1.2C Optimize a little more 1.2D Added server xp rate to config 1.2F Re-added Checkweight Edited May 6, 2013 by Stolao Quote Link to comment Share on other sites More sharing options...
Dev iAmMar Posted May 29, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 51 Reputation: 2 Joined: 02/18/12 Last Seen: May 26, 2015 Share Posted May 29, 2013 Thank you ! Good Job Quote Link to comment Share on other sites More sharing options...
Stolao Posted May 29, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Author Share Posted May 29, 2013 Your welcome, if have any suggestions let me know Quote Link to comment Share on other sites More sharing options...
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.