• Content count

  • Joined

  • Last visited

  • Days Won


Nihad last won the day on September 1 2016

Nihad had the most liked content!

1 Follower

About Nihad

  • Rank
    Advanced Member

Profile Information

  • Github

Recent Profile Visitors

1830 profile views
  1. What's the question?
  2. Doesn't have to be anything complicated. You could use the birthday field is you aren't already using it and just instead of giving players the option to put in their own birthrate, just auto write in today's date. Here is a little guide from rathena. If you are already using it, then you can simply add another row, or create a new table entirely just for storing registration dates.
  3. I recently did an event regarding account creation dates. There is nothing solid as of right now but all is not lost. You have the login log, and unless you cleared it, you can do a sql command to figure out when they first time someone loged in is, which is basically their creation date. [email protected] = getcharid(3); query_sql("SELECT `userid` FROM `login` WHERE `account_id` = "[email protected], [email protected]$); query_sql("SELECT * FROM `loginlog` WHERE `user` LIKE '"[email protected]$+"' AND `time` < '2017-12-28 00:00:00' ORDER BY `loginlog`.`TIME` ASC LIMIT 1", [email protected], [email protected], [email protected]$, [email protected], [email protected], [email protected]$); The first query finds the username since loginlogs are stored by username and not by account id. The second query finds their login dates earlier than the specified date since I needed this for my event. It sorts it by ascending, so first log is their oldest log. And then stored the log info in the specified variables. I did not need the exact date so this worked for me, but [email protected] will only return the year, since date format uses - and : as a result that may not work for you. I have not tested this but you should be able to use [email protected]$ and it will return the full date, again not sure since I did not need the full date. If you do not need this to be automated, you can just run the sql queries your self or do a search in the phpmyadmin and sort after. Also you may not use unique ids so you may need to remove [email protected] from the above list. Hope this helps.
  4. Looking good so far my man.
  5. Thanks meko, that answers my question. I wanted to know if you can build checks like that into macros. Just tested this and confirmed it works.
  6. See I thought of that too. But as you can see in my quote above that I found while doing some research, macros are determined prior to compiling. So technically only one of those macros will count, it should not change the value once the server is live. Or have macros changed over time and are now flexible? Thanks meko, can you clarify if macros can change once the server is compiled. Here is a link explaining a bit of what I'm talking about. If my understanding is correct, even what meko posted should technically not work. Once the server gets compiled normalize damage would be set in stone and would not change based on anything the server does.
  7. So I have been playing around with this a bit today and I'm trying to figure out the best way to do this. I need to convert the macro NORMALIZE_RDAMAGE to a function because I need it to offer 2 different options. For example to have capped max reflect damage on MvPs but not on normal monsters and players. Right now herc has #ifdef RENEWAL #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, min(max_reflect_damage, (d))) ) #else #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, (d)) ) #endif I want to change this to be if the target is an MvP or not. Doing if ( is_boss(src) ) { #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, min(max_reflect_damage, (d))) ) } else { #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, (d)) ) } This seems to work but it's wrong. "Preprocessor directives are interpreted before the results of the preprocessing step are compiled." I don't understand enough about source to explain why this edit works, but I know that it's not the right way to go about making this edit. VS and GCC throw out warnings about macro redefinition. Any help would be much appreciated.
  8. Or you can simply edit the Dracula mobskill and have him not summon so many familiars so it's not worth it. One of the problems with dracula is that he summons so many and so fast, you get a crazy amount of items. You could also remove his familiars entirely and avoid the issue, it's not like they contribute anything to his fighting power or to the strategy of fighting him.
  9. Not sure if you knew but github has this nifty feature called "History". When you click on a file, you can select several options at the top right of the file. For example morocc: This displays all the commits made to that file, and you can click on a specific date and view the changes made then and the file as it was at that point by clicking "view". You can browse the entire herc repo as it was at that point by clicking "browse files". You will also need to find an older grf and extract the old city map and replace the new one and update your mapcache. Hop that helps a tiny bit.
  10. I agree with what was said above but to an extent. Would be neat if we could have some sort of reward system for people that contribute. There are a number of people here like Dastgir that have given so much back to the community. Not entirely sure what kind of reward system can be put in place though. But it might be worth it to consider encouraging contribution.
  11. Very nice, haven't updated my herc files in a while, glad to see some awesome changes. Thanks for the summary.
  12. Try using a clean player.conf from herc git. And see if you still get the issue. Also check console see what errors it's giving you, it will make figuring the bug out much easier.
  13. Ah didn't realize this was a custom shield, my bad. Second half of this post.
  14. *rentitem(<item id>, <time>) *rentitem("<item name>", <time>) Creates a rental item in the attached character's inventory. The item will expire in <time> seconds and be automatically deleted. When receiving a rental item, the character will receive a message in their chat window. The character will also receive warning messages in their chat window before the item disappears. This command can not be used to rent stackable items. Rental items cannot be dropped, traded, sold to NPCs, or placed in guild storage (i.e. trade mask 75). Note: delitem() in an NPC script can still remove rental items. I believe the rent command already accomplishes what you are trying to.
  15. Check your iteminfo, and see what the classnum says It should be ClassNum = 6