-
Content Count
363 -
Joined
-
Days Won
46
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by meko
-
bonus2(bHPRegenRate, ((MaxHP/100)*5), 1000); bonus2(bHPDrainRate, 10, 2);
-
use bonus instead of bonus2
-
What specs suppose to have a nice vps hosting for ragnarok?
meko replied to Derlan's question in General Server Support
If you are unsure about the resources you need, choose a scalable VPS, such as DigitalOcean Droplets or AWS Lightsail, which allows you to scale the resources up or down to meet demand -
you might want to trigger the command in OnPCLogoutEvent
-
use checkcell()
-
The ID sent by the server is hardcoded: https://github.com/HerculesWS/Hercules/blob/stable/src/map/pc.c#L6752
-
- script AutoVIP FAKE_NPC,{ OnPCLoginEvent: // save the original group @ACTUAL_GROUP = getgroupid(); // check if the player was never a VIP if (##VIP_UNTIL < 1) { // give the free VIP status ##VIP_UNTIL = gettimetick(2) + .free_vip_length; } // check if the player is currently a VIP if (##VIP_UNTIL > gettimetick(2)) { // move the player to the VIP group until logout setgroupid(.vip_group); // notify the player dispbottom("You are a VIP player."); // schedule a timer to revert the group on expiration addtimer((##VIP_UNTIL - gettimetick(2)) * 1000, strnpcinfo(0) + "::OnExpire"); } // check if the player was a VIP but it expired while away else if (##VIP_UNTIL > 1) { goto OnExpire; } end; OnExpire: if (##VIP_UNTIL <= gettimetick(2)) { // revert to the original group setgroupid(@ACTUAL_GROUP); // notify the player dispbottom("Your VIP status expired. You are now a normal player."); // update the variable ##VIP_UNTIL = 1; } end; /////////// Configuration below OnInit: .vip_group = 1; // the ID of your VIP group .free_vip_length = (((60 * 60) * 24) * 5); // the length of the free VIP period (5 days) }
-
To check on which map a player is: .@map$ = strcharinfo(PC_MAP, "%", .@account_id); if (.@map$ == "%") { // player is not on a map } else { // player is on a map // << add further checks here >> }
-
in the Script<> section, you could do something like: if (gettimetick(2) <= @ITEM_LOCK[0]) end; @ITEM_LOCK[0] = gettimetick(2) + 1; percentheal(100, 100);
-
you can find the documentation in the /doc folder, and some more on the wiki: https://github.com/HerculesWS/Hercules/wiki
-
well, it's quite easy, you are supposed to replace <tab> by an actual tab, and you should also change the location/name boilerplate with the actual info
-
attach the file, please
-
By default, all servers use the same SQL configuration. To have a different SQL configuration for login/char/map, you can make more sql_connection.conf files and change the file paths in the @import directives. To configure the log system, you need to edit conf/map/logs.conf
-
The SQL configuration is now in conf/global/sql_connection.conf
-
However you can have 1 login server with many char+map pairs https://github.com/HerculesWS/Hercules/wiki/Multi-Realm
-
multi-zone support was deprecated in 2016 and will be completely removed very soon
-
Hercules now has a proper changelog, so I am locking this. You can always find the latest release here: https://github.com/HerculesWS/Hercules/releases/latest The full changelog is in CHANGELOG.md
-
Easiest way to get offline hercs emu ragnarok?
meko replied to Promeister's question in General Server Support
Sorry, Hercules does not offer pre-built binaries. However, surely someone can hook you up if you ask nicely: https://discord.gg/ZUzbRSp -
Easiest way to get offline hercs emu ragnarok?
meko replied to Promeister's question in General Server Support
Offline as in only available on the computer you are currently using? Hercules, by default, already binds to localhost (127.0.0.1) so there's no extra configuration required: no need to open ports anywhere, no need to register a domain name, no need to get a VPS. Just follow the official instructions: README.md BTW, since you are on Windows 10, you don't have to install that oh-so-bulky Visual Studio, you can just enable the Windows Subsystem for Linux (WSL) and follow the Linux installation instructions instead of the Windows ones. -
The rAthena documentation does NOT apply to Hercules. Please refer to the Hercules documentation when using Hercules. If you seek support for rAthena instead, please use the rAthena forums. Hercules currently does not support this script command, and there is no Pull Request implementing it. Also, your syntax in Script<> is wrong
-
@nuna see also item_packages.conf
-
Try this: function script loot_crate { .@index = getarrayindex(getarg(0)); .@size = getarraysize(getarg(0)); for (.@i = .@index; .@i < .@size - .@index; .@i += 3) { for (.@e = 0; .@e < getelementofarray(getarg(0), .@i + 2); ++.@e) { .@loot[.@count++] = .@i; } } .@rand = .@loot[rand(.@count)]; getitem(getelementofarray(getarg(0), .@rand), getelementofarray(getarg(0), .@rand + 1)); announce(sprintf("Player %s obtained %ix %s from a loot crate!" strcharinfo(PC_NAME), getelementofarray(getarg(0), .@rand + 1), getitemname(getelementofarray(getarg(0), .@rand))), getarg(1, bc_all)); return true; } And in your NPC do something like this: MAP,X,Y,DIR script NAME SPRITE,{ mes("Hello"); next(); loot_crate(.rewards, bc_all); mes("Goodbye!"); close; OnInit: setarray(.rewards, // Item, Amount, Chance Yggdrasilberry, 1, 60, Portable_Furnace, 1, 10, Spectacles, 1, 10, Seed_Of_Yggdrasil, 1, 10, Poison_Bottle, 1, 5, Silver_Coin, 1, 5); }
-
the macro I posted WILL remain the same, but I added a ternary operator (if ? then : else) to it so it will check with is_boss() and have different behaviour accordingly, just like what you wanted if you want the check outside of macros, then make a 2nd one and when invoked do something like is_boss(src) ? macro1 : macro2
-
#define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, is_boss(src) ? min(max_reflect_damage, (d)) : (d)) )
-
This is unrelated to Hercules, please contact the phpMyAdmin team instead: https://www.phpmyadmin.net/support/ BTW, this is just an encoding error: make sure you set the charset in your Content-type HTTP header and use a matching charset client-side in a <meta> tag. If that's too complicated, just use a desktop SQL client: https://www.heidisql.com/ (free, open source) https://www.mysql.com/products/workbench/ (free, open source) https://dbeaver.jkiss.org/ (free, open source) https://navicat.com/en/products/navicat-for-mariadb (commercial, proprietary) https://navicat.com/en/products/navicat-for-mysql (commercial, proprietary)