-
Content Count
363 -
Joined
-
Days Won
46
Reputation Activity
-
meko got a reaction from Disgaea in Script doesn't work parse ln
Hercules should automatically generate constants based on the AegisName of items in your database. If Apple evaluates to 0 it means you are either using a very old version of Hercules, or you don't have an item named Apple in your item db
Simply add a mes("your message here") before the close; that is above the OnInit
-
meko got a reaction from MikZ in ZENY * #Kill
You don't need to use SQL at all for this; it can all be done in the script engine:
// this assumes the target player is online and those variables are filled: // .@char_name$ // .@account_id // .Rates mesf("Are you sure you want to bail %s out of jail?", .@char_name$); next(); if (select("Confirm", "Cancel") == 1) { .@kill_counter = getvariableofpc(KILL_COUNTER, .@account_id); .@cost = .Rates * .@kill_counter; if (Zeny < .@cost) { mes("You didn't have enough Zeny."); } else { Zeny -= .@cost; mes("Kabooom!"); } } close; OnPCKillEvent: if (readparam(BaseLevel, killedrid) < 50) { ++KILL_COUNTER; } end;
-
meko got a reaction from MikZ in ZENY * #Kill
// this assumes the target player is online and those variables are filled: // .@char_name$ // .@account_id // .Rates .@kill_counter = getvariableofpc(KILL_COUNTER, .@account_id); .@cost = .Rates * .@kill_counter; mesf("Are you sure you want to bail %s out of jail for %d zeny?", .@char_name$, .@cost); next(); if (select("Confirm", "Cancel") == 1) { if (Zeny < .@cost) { mes("You didn't have enough Zeny."); } else { Zeny -= .@cost; // remove zeny set(getvariableofpc(KILL_COUNTER, .@account_id), 0); // reset counter to zero // {{ ADD YOUR UNJAILING LOGIC HERE }} mes("Kabooom!"); } } close; OnPCKillEvent: if (readparam(BaseLevel, killedrid) < 50) { ++KILL_COUNTER; // increase the kill counter // {{ ADD YOUR JAILING LOGIC HERE }} } end;
-
meko reacted to Habilis in Problem Closed connection
Dude like..... If you speak French don't struggle!
Just
Écris le enfrancais.. Ya du monde qui comprennent la langue ici....
I'll check...
-
meko got a reaction from Quazi in Enable Vending Skill in specific area
In buyingstore.c the map flag has precedence over cell flags so if novending is true for the map it won't even bother checking the cells. A workaround would be to setcell the whole map with novending, and then using setcell to remove novending on the cells you want to allow
-
meko got a reaction from IndieRO in how to migrate server from old vps to new vps
To move your files in bulk, just use rsync. When it's done, install the dependencies and re-compile Hercules on the new server.
To move your databases, you will need to first export to a .sql file and then import it on the new server. If you need help for this step I believe @Habilis would be best suited to help you.
-
meko reacted to Habilis in How to keep emulator updated
you need to perform a Fetch / Pull (Not to mix with Pull request) and resolve conflicts.
Then have a look inside this directory
https://github.com/HerculesWS/Hercules/tree/master/sql-files/upgrades
and see if there is anything new. If there is, run those SQL files in your RO database.
That's it, That's all there is to it...
-
meko got a reaction from Echoes in Recent changes to the Hercules engine
It seems there's been no changelog since quite a while so here's one highlighting the most recent changes related to scripting. Sorry if that's not the right category, please move accordingly. New script commands: chr ord gettimer getunits getvariableofpc can_use_command has_permission addchannelhandler removechannelhandler setunitdata getunitdata getunitname setunitname getequipisenableopt getequippedoptioninfo getequipoptioninfo setequipoption navigateto Modified script commands (extra parameters): strcharinfo strnpcinfo addtimer deltimer addtimercount checkoption checkoption1 checkoption2 setoption warpparty warpguild classchange New params: BankVault
Big projects currently in development:
Implementation of the official Clan system Implementation of the official RoDEX system Implementation of the official Achievements system Complete rewrite of the map cache system -
meko got a reaction from andybe in mapreg->setreg question
It's not getting overwritten; reference_uid() is var, index. In this case "count" is the index, and it's being incremented every time (count++).
To iterate through those variables in script, a simple for() loop will do the trick just fine. See also:
-
meko got a reaction from Sephus in Date and Time functions
View File Date and Time functions
This script provides functions to easily calculate date and time. More functions might be added in the future.
now()
a shorthand function to get the current time
> returns the number of seconds elapsed since the Unix epoch
now() // => 1497119219 (example, increments every second)
time_from_ms(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> ms
time_from_ms(0) // => 1497119219 (example, increments every second) time_from_ms(+1000) // => 1497119220 time_from_ms(-1000) // => 1497119218
time_from_seconds(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> seconds
time_from_seconds(0) // => 1497119219 (example, increments every second) time_from_seconds(+1) // => 1497119220 time_from_seconds(-1) // => 1497119218
time_from_minutes(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> minutes
time_from_minutes(0) // => 1497119219 (example, increments every second) time_from_minutes(+1) // => 1497119279 time_from_minutes(-1) // => 1497119159
time_from_hours(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> hours
time_from_hours(0) // => 1497119219 (example, increments every second) time_from_hours(+1) // => 1497122819 time_from_hours(-1) // => 1497115619
time_from_days(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> days
time_from_days(0) // => 1497119219 (example, increments every second) time_from_days(+1) // => 1497205619 time_from_days(-1) // => 1497032819
FuzzyTime(<unix timestamp>)
converts a Unix timestamp to a human-readable format
> returns human-friendly relative time
FuzzyTime(0) // => 47 years, 172 days, 18 hours, 52 minutes, and 28 seconds ago FuzzyTime(time_from_hours(+28)) // => in 1 day and 4 hours
--------------------------------------------------------------------------------------
This script was made by me, for The Mana World + Evol.
License: public domain (CC0)
Submitter meko Submitted 06/10/17 Category Quest, Shops, Functions & Algorithms
-
meko got a reaction from Dastgir in Date and Time functions
View File Date and Time functions
This script provides functions to easily calculate date and time. More functions might be added in the future.
now()
a shorthand function to get the current time
> returns the number of seconds elapsed since the Unix epoch
now() // => 1497119219 (example, increments every second)
time_from_ms(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> ms
time_from_ms(0) // => 1497119219 (example, increments every second) time_from_ms(+1000) // => 1497119220 time_from_ms(-1000) // => 1497119218
time_from_seconds(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> seconds
time_from_seconds(0) // => 1497119219 (example, increments every second) time_from_seconds(+1) // => 1497119220 time_from_seconds(-1) // => 1497119218
time_from_minutes(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> minutes
time_from_minutes(0) // => 1497119219 (example, increments every second) time_from_minutes(+1) // => 1497119279 time_from_minutes(-1) // => 1497119159
time_from_hours(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> hours
time_from_hours(0) // => 1497119219 (example, increments every second) time_from_hours(+1) // => 1497122819 time_from_hours(-1) // => 1497115619
time_from_days(<delta>)
calculates a Unix timestamp relative to the current time
> returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> days
time_from_days(0) // => 1497119219 (example, increments every second) time_from_days(+1) // => 1497205619 time_from_days(-1) // => 1497032819
FuzzyTime(<unix timestamp>)
converts a Unix timestamp to a human-readable format
> returns human-friendly relative time
FuzzyTime(0) // => 47 years, 172 days, 18 hours, 52 minutes, and 28 seconds ago FuzzyTime(time_from_hours(+28)) // => in 1 day and 4 hours
--------------------------------------------------------------------------------------
This script was made by me, for The Mana World + Evol.
License: public domain (CC0)
Submitter meko Submitted 06/10/17 Category Quest, Shops, Functions & Algorithms
-
meko got a reaction from aszrool in Recent changes to the Hercules engine
Update: June 9 2017
New script commands:
add_group_command isstr getarrayindex
Modified script commands:
readparam specialeffect can_use_command
Deprecated script commands:
specialeffect2 superseded by specialeffect misceffect superseded by specialeffect pow superseded by the exponentiation operator -
meko got a reaction from Legend in Recent changes to the Hercules engine
Update: June 9 2017
New script commands:
add_group_command isstr getarrayindex
Modified script commands:
readparam specialeffect can_use_command
Deprecated script commands:
specialeffect2 superseded by specialeffect misceffect superseded by specialeffect pow superseded by the exponentiation operator -
meko got a reaction from Like it~* in Recent changes to the Hercules engine
It seems there's been no changelog since quite a while so here's one highlighting the most recent changes related to scripting. Sorry if that's not the right category, please move accordingly. New script commands: chr ord gettimer getunits getvariableofpc can_use_command has_permission addchannelhandler removechannelhandler setunitdata getunitdata getunitname setunitname getequipisenableopt getequippedoptioninfo getequipoptioninfo setequipoption navigateto Modified script commands (extra parameters): strcharinfo strnpcinfo addtimer deltimer addtimercount checkoption checkoption1 checkoption2 setoption warpparty warpguild classchange New params: BankVault
Big projects currently in development:
Implementation of the official Clan system Implementation of the official RoDEX system Implementation of the official Achievements system Complete rewrite of the map cache system -
meko got a reaction from Thyr in Monster make Aggressive
in Mode add
Assist: true
More details here: https://github.com/HerculesWS/Hercules/blob/master/doc/mob_db_mode_list.txt
-
meko reacted to bWolfie in Hercules, welcome to IPB4
Just found out I need to hold shift
to go to next line line
without skipping.
-
meko got a reaction from tedexx in Deprecated Features
List of deprecated script commands and Hercules features
(2017)
misceffect() specialeffect2() pow() useatcmd()
v2018.06.03
pcblockmove()
v2019.03.10
UDT_MAPIDXY and UDT_WALKTOXY constant
v2019.04.07
petstat()
v2019.05.05
debugmes()
v2019.11.17
getguildname() getguildmaster() getguildmasterid()
Future deprecations:
⚠️ Please avoid using those commands in new scripts
menu() -
meko got a reaction from Legend in Race condition in char server: please update
Handling of item storage has been split into a separate packet, but while this fixed a bug, it introduced a race condition, which when exploited allows to duplicate items.
A new patch has been issued and the exploit is no longer reproducible. If you are using a version between e8affc4 and f30edc7 (inclusive) make sure you update ASAP to d2af893 (stable) or later version and compile it.
Affected versions, from oldest to most recent:
e8affc41f106503b530abaa7faa20d6e63b727b8 d966a8e6860d418bb3a235e57928436127eba555 cb3e2f5f3b91d0a1f7711eff9c10ae9a655a74f2 50848cc7f79aa516351e4a4d673df53f4881eb4d 5383a14853327c123cbb037d3680aaa3d8c3e724 8c5b8ac7d87d8d4dc49d3ff1768f8884a0d75d72 7c6673e13fdd75a4137a9d7ef94e04d96e053422 d90e8ce0d8ba8677567a5a5adebb62ba97e8a0b3 b950a589e59e2bf074f67c75aaacf3f82424d4fe 4b208e41d1d5cc995c2816e8f34c1ad8b0a7327d 47a1e679cd35dc2e524fbeb31891d85e497821ce f30edc7f02fb0c290d302d9abc77d970bb05fb62
To know which version you are on:
start Hercules (login server, char server or map server) it will say something like the following: [Info]: Git revision (src): 'e6ab2a9ec6f5be8927eeca667ff477086f5e2e8e'
If any other issue is found, this post will be updated.
Want to receive email notifications about important issues in the future?
Go to Repository News and hit the follow button
Need help updating to a newer version?
You can get free support in the #Hercules channel of the Rizon network.
-
meko got a reaction from Hyroshima in Array manipulation functions
View File Array manipulation functions
This script provides various array manipulation functions, and more might be added in the future.
All of those functions (except the arithmetic ones) work with both integer and string arrays.
The start of the array is always implicitly index 0, unless an index is specified, ie @array[index]
array_pad(<array>, <size>, <value>)
pads the array left or right with <value> until it reaches <size> size. If <size> is negative it will pad left.
> returns the number of added entries
setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_pad(.@foo, 8, 69); // => 3 // array is now: 1, 2, 3, 4, 5, 69, 69, 69 setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_pad(.@foo, -8, 69); // => 3 // array is now: 69, 69, 69, 1, 2, 3, 4, 5
array_replace(<array>, <needle>, <replacement>{, <neq>})
finds every occurrence of <needle> within the array and replaces it with <replacement>. if <neq> is true, finds entries that do not match instead
> returns the number of changed entries setarray(.@foo, 1, 1, 3, 1, 5); // initialize the array array_replace(.@foo, 1, 69); // => 3 // array is now: 69, 69, 3, 69, 5
array_find(<array>, <needle>{, <neq>})
finds the first occurrence of <needle> within the array. if <neq> is true, finds entries that do not match instead
> returns the index, or if none is found returns -1 setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_find(.@foo, 3); // => 2 array_find(.@foo, 1); // => 0 array_find(.@foo, 6); // => -1
array_rfind(<array>, <needle>{, <neq>})
like array_find, but finds the last occurrence. if <neq> is true, finds entries that do not match instead
> returns the index, or if none is found returns -1 setarray(.@foo, 1, 2, 3, 4, 3); // initialize the array array_rfind(.@foo, 3); // => 4 array_rfind(.@foo, 4); // => 3 array_rfind(.@foo, 6); // => -1
array_exists(<array>, <needle>{, <neq>})
very similar to array_find() but it instead just checks if it exists or not. if <neq> is true, finds entries that do not match instead > returns true or false setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_exists(.@foo, 3); // => true array_exists(.@foo, 6); // => false
array_count(<array>, <needle>{, <neq>})
similar to array_find() but iterates through the whole array. if <neq> is true, finds entries that do not match instead
> returns the total number of occurrences of <needle> setarray(.@foo, 1, 69, 3, 69, 5); // initialize the array array_count(.@foo, 69); // => 2
array_entries(<array>)
a wrapper around array_count(). behaves similarly to getaraysize() but does not count holes
> returns the number of non-empty entries setarray(.@foo, 1, 2, 0, 0, 5); // initialize the array getarraysize(.@foo); // => 5 array_entries(.@foo); // => 3
array_remove(<array>, <needle>{, <neq>})
finds and removes every occurrence of <needle> from the array, while shifting left. if <neq> is true, finds entries that do not match instead
> returns the number of removed entries setarray(.@foo, 1, 69, 3, 69, 5); // initialize the array array_remove(.@foo, 69); // => 2 // array is now: 1, 3, 5
array_reverse(<array>)
reverses the array
> returns true setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_reverse(.@foo); // => true // array is now: 5, 4, 3, 2, 1
array_sum(<array>)
iterates through the whole array to perform an arithmetic addition
> returns the sum of every entries of the array setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_sum(.@foo); // ((((1 + 2) + 3) + 4) + 5) => 15
array_difference(<array>)
iterates through the whole array to perform an arithmetic subtraction
> returns the difference of every entries of the array setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_difference(.@foo); // ((((1 - 2) - 3) - 4) - 5) => -13
array_product(<array>)
iterates through the whole array to perform an arithmetic multiplication
> returns the product of every entries of the array setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_product(.@foo); // ((((1 * 2) * 3) * 4) * 5) => 120
array_quotient(<array>)
iterates through the whole array to perform an arithmetic division
> returns the quotient of every entries of the array setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_quotient(.@foo); // ((((1 / 2) / 3) / 4) / 5) => 0
array_shift(<array>)
removes the first entry of the array, while shifting left
> returns the value of the removed entry setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_shift(.@foo); // => 1 // array is now: 2, 3, 4, 5
array_unshift(<array>, <value>)
adds <value> to the start of the array, while shifting right
> returns the new size of the array setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_unshift(.@foo, 69); // => 6 // array is now: 69, 1, 2, 3, 4, 5
array_pop(<array>)
removes the last entry of the array
> returns the value of the removed entry setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_pop(.@foo); // => 5 // array is now: 1, 2, 3, 4
array_push(<array>, <value>)
adds <value> to the end of the array
> returns the new size of the array setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_push(.@foo, 69); // => 6 // array is now: 1, 2, 3, 4, 5, 69
array_shuffle(<array>)
shuffles the array
> returns true setarray(.@foo, 1, 2, 3, 4, 5); // initialize the array array_shuffle(.@foo); // => true // array is now: 1, 4, 2, 3, 5 (example, unpredictable)
array_unique(<array>{, <threshold>})
allows array entries to appear up to <threshold> times (1 by default) and removes the extraneous ones. useful to remove duplicate entries
> returns the number of removed entries
setarray(.@foo, 1, 3, 3, 4, 5); // initialize the array array_unique(.@foo); // => 1 // array is now: 1, 3, 4, 5
array_diff(<base array>, <array>{, <array>...}, <result array>)
compares the base array against one or more other arrays and fills the result array with the entries in base array that are not present in any of the other arrays
> returns the number of entries not found in other arrays
setarray(.@base, 1, 2, 3, 4, 5, 6, 7, 8); // initialize the base array // fill the arrays to compare with the base array: setarray(.@foo, 2, 3, 4, 5, 6, 7, 8); // missing "1" setarray(.@bar, 1, 2, 3, 4, 6, 7, 8); // missing "5" setarray(.@baz, 1, 2, 3, 4, 5, 6, 7); // missing "8" // compare foo, bar and baz against base, and fill result: array_diff(.@base, .@foo, .@bar, .@baz, .@result); // => 3 // .@result is now: 1, 5, 8
array_filter(<array>, "<function>")
filters the array using a function that is tested against every entries. if the function returns false, the relevant entry is removed and the array is shifted left
> returns the number of removed entries
function script is_prime { if (getarg(0) <= 1) return false; for (.@i = 2; .@i <= getarg(0) / 2; ++.@i) if ((getarg(0) % .@i) == 0) return false; return true; } setarray(.@foo, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); array_filter(.@foo, "is_prime"); // => 9 // array is now: 2, 3, 5, 7, 11, 13
array_sort(<array>)
sorts the array in ascending order
> returns true
setarray(.@foo, 2, 1, 8, 4, 5, 7, 6, 3); // initialize the array array_sort(.@foo); // => true // array is now: 1, 2, 3, 4, 5, 6, 7, 8
array_rsort(<array>)
sorts the array in descending order
> returns true
setarray(.@foo, 2, 1, 8, 4, 5, 7, 6, 3); // initialize the array array_rsort(.@foo); // => true // array is now: 8, 7, 6, 5, 4, 3, 2, 1
Requires Hercules of June 24 2017 or newer version
--------------------------------------------------------------------------------------
This script was made by me, for The Mana World + Evol.
License: public domain (CC0)
Submitter meko Submitted 05/29/17 Category Quest, Shops, Functions & Algorithms
-
-
meko reacted to dualityDiscretion in RO Webcomic [FIN]
Last year, I launched a RO-themed webcomic which I've been updating weekly. I've been posting it in several forums and someone told me to share it here too, so I thought why not~
This comic follows Joshua, a newb adventurer who just arrived in Rune Midgard, struggling to understand how the world works, with some helping hands guiding him... kinda...
http://tapas.io/series/PORINGS
Been goin for almost a year, 44 strips so far and going strong. Updated every Friday~
-
meko got a reaction from Mystery in Hercules, welcome to IPB4
Besides the avatar issue, here's what I noticed so far:
Newlines in code snippets for downloads seem broken. FIXED Example: ^ Clicking the download button yields "file not found" FIXED ^ The actual files of the previous versions of the file are gone FIXED for some reason version 1 and version 2 seem fine, but version 3 and 4 are not found (I re-uploaded version 4 though) FIXED It is no longer possible to remove previous versions FIXED The screenshots for ALL downloads are gone FIXED You can no longer see who gave +1 reputation on posts FIXED The reputation page is gone from profiles altogether FIXED The reputation page on profiles shows no posts at all FIXED When you edit posts, even if you don't check "Show that the message has been edited" it still shows as edited NOT A BUG When clicking the Documentation tab in the page header it says "Wiki (Achieved)" FIXED On profile pages the bar that says content count, joined, last visited partially covers the member title FIXED The ability to set a profile background is gone... but I guess this has been superseded by the cover feature NOT A BUG The nested bulleted lists are broken for Announcements; they show the [*] bbcode as plaintext FIXED Embedded downloads (ie the one embedded in this very post) show "0 comments", even though there's no way to comment on download pages FIXED The navigation links for IRC and moderation logs are gone WON'T FIX There is no margin in between the green star icon of featured topics and the title of said topics in the sidebar widget. We could give it a margin-right of ~4px but since the widget already says "featured" it's redundant, so I feel this icon should just be removed or hidden from the widget. FIXED -
meko reacted to Mystery in Hercules, welcome to IPB4
Hey everyone,
It has been long overdue to bridge over to IPB4... but we are finally here. We ran into a few issues with the transition but we got the forum running within an hour. The forum is now accessible for everyone (maintenance is over), but keep in mind that there are still batches being processed in the backend which may make your experiences in browsing / posting sluggish. Over the next few hours/days, I will be working on the forum; reorganizing a few things, fine tuning, etc.
If you run into any issues, don't hesitate to bring them to my attention!
-
meko reacted to Habilis in Antibot Killer 6 by Myzter
As of my personal experience, antibots and chat swear filters just upset the normal players
just like meko said, botters will find a way to bypass your antibot system. Because botting gives them advantage over regular players.
and swear filter will filter out word sex and ass
What happens?
1) Your event GM cannot run @sexchange command "Command @***change not found"
2) Players who want to say in chat "I want to become Assassin!" would say "I want to become ******in!"
3) Crafty rude boy would say : S_E_X , S.E.X. , etc.... and it would bypass the swear filter
Learn to trust your moderators, and rely on them... There is no better system than a human being!
-
meko reacted to Habilis in Log sql config
Read it in my
2017 hercules setup guide
in my signature
after
By default Hercules is configured to write LOGs...
Rigth now, I need to go, I don't have time to write a full answer here.
after