-
Content Count
363 -
Joined
-
Days Won
46
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by meko
-
Cant connect to MySQL server on 127.0.0.1
meko replied to khenma09's question in General Server Support
well, do you actually have an sql server running, and did you edit sql_connection.conf accordingly? you can get mariadb on https://downloads.mariadb.org/mariadb/ -
there's no reason you should be using an old version from last year. the newer versions have all of the features of older versions, better compatibility, less bugs and better stability You should always use the latest release, but please don't download a .zip of the release, use git clone git://github.com/HerculesWS/Hercules.git
-
Contribute to open source and get a free limited-edition T-shirt What's Hacktoberfest? Hacktoberfest — brought to you by DigitalOcean in partnership with GitHub and Twilio — is a month-long celebration of open source software. Maintainers are invited to guide would-be contributors towards issues that will help move the project forward, and contributors get the opportunity to give back to both projects they like, and ones they've just discovered. No contribution is too small—bug fixes and documentation updates are valid ways of participating. From October 1 to October 31, contribute to any open source project (Hercules included) on GitHub to get a free T-shirt! 5 pull requests are required. (Pull requests do not have to be merged and accepted; as long as they've been opened between the very start of October 1 and the very end of October 31, they count towards a free T-shirt.) We will be marking easy-to-tackle issues with the Hacktoberfest tag so that first time contributors can more easily find them. >> Register on hacktoberfest.digitalocean.com Resources GitHub Learning Lab How to create a Pull Request on GitHub Understanding the GitHub Flow Open source 101 Hercules documentation Hercules wiki FAQ It is free to participate? Yes! Is shipping included? Yes. DigitalOcean offers free worldwide shipping. What shirt sizes are available for Hacktoberfest 2018? DigitalOcean have not yet made public the size chart for 2018, but we know they at least offer S to 4XL sizes, for both male and female. What's included in the package? A thank you letter. A T-Shirt. A bunch of cool stickers. Do I need to register for Hacktoberfest before starting to open Pull Requests? No. You may register at any time during the month of October and DigitalOcean will count your pull requests retroactively from October 1 onwards. Do all of my Pull Requests have to be sent to the same repository? No. You may send PRs to any number of repositories you like, and as long as they are public and have an OSI-approved license they will count towards the 5+ PRs objective. Do I have to wait for the start of October to open Pull Requests? You may contribute all year long, but only PRs that are opened during the month of October will be counted.
-
Custom Map added via MapCache.so but cannot @go
meko replied to ShaneAbara's question in General Server Support
the list of maps in atcommand_go is hardcoded in src/map/atcommand.c you'll want to use @warp instead -
in the second skill, lookup for nearby BL_SKILL units (with map->foreachinarea) and then you will get a struct block_list so cast it to a struct skill_unit (with BL_UCAST) and check that su->group->skill_id matches the id of the first skill and then you can get the location with su->bl.x and su->bl.y
-
conf/messages.conf ...good luck
-
in groups.conf in the commands{} section add command_name: [true, true] for the groups you want to allow you can also do this programmatically in the script engine by doing add_group_command("command_name", group_id, true, true);
-
If you want more bandwidth try RamNode and choose NYC or ATL as location since you want it on the east coast. Both OVH and RamNode are very reliable.
-
This function does not check whether or not map->list contains map m before using it which can cause out-of-bounds read; but something else is weird here: your y0 is overflowed and your x0 is very high. Could you please provide a full backtrace? just write "bt full" when you see the (gdb) prompt Also it would help to know your git revision commit hash or tag
-
Script command execute for all players in the server?
meko replied to luizragna's question in Script Support
@luizragna in Hercules v2018.06.03 we added support for global lookups with getunits() so there is no need to supply a map. Just update your Hercules installation to v2018.06.03 or a newer version. -
Script command execute for all players in the server?
meko replied to luizragna's question in Script Support
.@count = getunits(BL_PC, .@units, false); for (.@i = 0; .@i < .@count; ++.@i) { addtimer(0, "MyNPC::OnMyEvent", .@units[.@i]); } end; OnMyEvent: command(); // <= here buf if you only want to revive everyone you can simply do this: recovery(); -
those are reserved for future use, but feel free to use anything that is free between 400 and 1000, or between 10001 and 10248 currently the only free ID within this range is 10204 but you could manually change src/map/npc.h on line 147 (currently the max is 10248)
-
this is because 126 is not in the valid range of NPC ids: it has to be between 45 and 125, or between 400 and 1000, or between 10001 and 10248 reference: https://github.com/HerculesWS/Hercules/blob/stable/src/map/npc.c#L108
-
from the screenshot I see you are using reloadscript, but the const db doesn't get reloaded when using this command
-
the list of NPC ids is in db/constants.conf around line 2630 (search for FAKE_NPC)
-
if you absolutely must use your script, then: if (.@reward[.@i] <= 3) { announce(sprintf("Player %s obtained a %s (%02i%% chance)", strcharinfo(PC_NAME), getitemname(.@reward[.@i - 1]), .@reward[.@i]), bc_all); }
-
Anyone can help me configure conf files
meko replied to ThyroDree's question in General Server Support
just run "make import" from the root of the repo and then edit the files in conf/import to suit your needs -
Duplicate npcs do share variables but this is legacy code that we can't change without breaking backward-compatibility. What we could do however is add a config flag so you can manually choose the desired behaviour. The problem is that in npc_duplicate_script_sub the function does npc->script = source->script, so it creates a pointer to the parent script_code struct instead of creating its own and variables are stored in this struct. The Evol plugin fixes this by creating its own struct but since I see other people want this change I will move it to Hercules directly instead.
-
you could manually check the day from your script with gettime(GETTIME_DAYOFYEAR)
-
If it can't find login- char- or map-server and manually doing ls {login,char,map}-server shows nothing then either the build failed or you forgot to build altogether. Make sure you have the required dependencies installed and then follow the build instructions
-
I can't reproduce your bug locally and npc_event_do_clock() seems to be working just fine. Most likely you have made changes to the source code and that broke this function
-
Give rewards to player below certain account id
meko replied to Harmony's question in Script Requests
if you only want to compare account ID then there is no need to use SQL at all if (!(#REG_REWARD & (1 << 0)) && getcharid(CHAR_ID_ACCOUNT) < 3000000) { getitem(TIER_1_ITEM, 1); #REG_REWARD |= 1 << 0; } if (!(#REG_REWARD & (1 << 1)) && getcharid(CHAR_ID_ACCOUNT) < 2800000) { getitem(TIER_2_ITEM, 1); #REG_REWARD |= 1 << 1; } if (!(#REG_REWARD & (1 << 2)) && getcharid(CHAR_ID_ACCOUNT) < 2500000) { getitem(TIER_3_ITEM, 1); #REG_REWARD |= 1 << 2; } if (!(#REG_REWARD & (1 << 3)) && getcharid(CHAR_ID_ACCOUNT) < 2200000) { getitem(TIER_4_ITEM, 1); #REG_REWARD |= 1 << 3; } if (!(#REG_REWARD & (1 << 4)) && getcharid(CHAR_ID_ACCOUNT) < 2050000) { getitem(TIER_5_ITEM, 1); #REG_REWARD |= 1 << 4; } if (!(#REG_REWARD & (1 << 5)) && getcharid(CHAR_ID_ACCOUNT) < 2005000) { getitem(TIER_6_ITEM, 1); #REG_REWARD |= 1 << 5; } if (!(#REG_REWARD & (1 << 6)) && getcharid(CHAR_ID_ACCOUNT) < 2001000) { getitem(TIER_7_ITEM, 1); #REG_REWARD |= 1 << 6; } if (!(#REG_REWARD & (1 << 7)) && getcharid(CHAR_ID_ACCOUNT) < 2000300) { getitem(TIER_8_ITEM, 1); #REG_REWARD |= 1 << 7; } Just change TIER_X_ITEM to whatever item you want to give. This script uses the first 8 bits (1 byte) of the #REG_REWARD integer variable so you can use the last 3 bytes to store other data if you wish. -
Git hub is not updating even if i commited well...
meko replied to InFiNiTe's question in General Server Support
if your upstream remote is named "origin" (most likely if you didn't rename it) you can do git fetch origin, followed by git rebase origin/stable this should grab the latest stable revision and re-apply your commits on top you might want to check the git documentation on git-scm.com Keep in mind that there hasn't been any commits in stable for 24 days, so if you want the very latest revision you should use origin/master instead of origin/stable. The next release is coming to stable on July 1 -
change end; to return; on lines 96 and 111