• Content Count

  • Joined

  • Last visited

  • Days Won


Nihad last won the day on January 23 2018

Nihad had the most liked content!

1 Follower

About Nihad

Profile Information

  • Github

Recent Profile Visitors

2229 profile views
  1. Nihad

    [WIP] dDelays

    Would love to see some sort of server side delay protection especially in plugin format
  2. You are using the wrong timer command. *addtimer(<ticks>, "NPC::OnLabel") *deltimer("NPC::OnLabel") *addtimercount("NPC::OnLabel", <ticks>) These commands will create, destroy, and delay a countdown timer - addtimer() to create, deltimer() to destroy and addtimercount() to delay it by the specified number of ticks. For all three cases, the event label given is the identifier of that timer. The timer runs on the character object that is attached to the script, and can have multiple instances. When the label is run, it is run as if the player that the timer runs on has clicked the NPC.
  3. I've used plenty of proxy servers, so this is just a heads up from my experience. VPS are a waste of time as far as proxy servers are concerned. I had some really expensive vps in some of the Asian and S.A. countries and they helped very little or slowed down most people. This is because most vps use a crap port speed which doesn't help anyone. But I even upgraded the port speed to 1 Gbps on some and still didn't help. Shared connection is a bish. I had the same experience with cloud servers. These all claimed 1 gbps port speeds and great connection, but same result. My positive results have been and continue to be dedicated servers as proxies. Sure it's significantly more expensive, but players that use dedicated proxies confirm that the delay and ping are noticeably better. You can slightly reduce the cost if you do not get the proxy ddos protected and just set up the ip to get nullrouted if it gets spammed. That way people can just go on your main ip in case of an attack. Location of proxies is extremely important. I'll use Brazil as an example since this is here we found this to be very important. We first got a proxy somewhere towards the middle of Brazil, since we could target the most people. Even though people there have crap connections, the ones that were further up north than the proxy ended up getting more delay by using the proxy. That's because our main server was in Canada. The people that were coming from southern Brazil had a better connection using the proxy than going directly to the main. Lastly to the people that say proxies don't help, you are right for the most part. You have to set it up properly and get proper equipment for it to make any noticeable difference. But doing it right does help quite a lot of people. We are currently running a West Coast proxy optimized for Asian connections and about 20-30% of our total players use it over the main connection. Just my own experience in the matter.
  4. Nihad

    Command @resist

    I keep similar commands in a single plugin, so here is mine with all the extra stuff removed. Pretty sure it should work.
  5. Nihad

    Command @resist

    Should work:
  6. Way to go dastgir, as always you rock. Tested and works fine. Made the limit 1500 just to test, once I had above 1200 items in storage it started to lag my client when opening storage. But yeah works like a charm, up to 1000 no issues or delays.
  7. Nihad

    Hi hercules

    What's the question?
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.