Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Browse files Browse the repository at this point in the history
  • Loading branch information
shennetsind committed May 4, 2013
2 parents 416cc5c + bedb124 commit 6731a64
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 40 deletions.
5 changes: 0 additions & 5 deletions conf/groups.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ Syntax
------
This config file uses libconfig syntax:
http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files


Upgrading from revisions before r15572
-------------------------------------
http://rathena.org/board/index.php?showtopic=58877
*/

groups: (
Expand Down
10 changes: 7 additions & 3 deletions doc/sample/npc_test_skill.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//===== Hercules Script =======================================
//= Sample: Skill
//===== By: ==================================================
//= rAthena Dev Team
//= Hercules Dev Team
//===== Current Version: =====================================
//= 20121003
//= 20130426
//===== Description: =========================================
//= Demonstrates the 'skill' command.
//============================================================
Expand All @@ -12,12 +12,13 @@
// flag=0 Grants the skill permanently
// flag=1 Grants the skill temporarily
// flag=2 Level bonus, stackable
// flag=3 Grants the skill permanently even after skill resets/job changes
// If flag is undefined, it defaults to 1
// View db/(pre-)re/skill_db.txt for skill IDs

prontera,157,182,0 script Skills 116,{
mes "What skill would you like?";
switch(select("First Aid:Play Dead:Heal:None")) {
switch(select("First Aid:Play Dead:Heal:Sight:None")) {
case 1:
skill 142,1,0; // Permanently gives player level 1 First Aid
close;
Expand All @@ -28,6 +29,9 @@ prontera,157,182,0 script Skills 116,{
skill 28,3,1; // Temporarily gives player level 3 Heal
close;
case 4:
skill 10,1,3; // Permanently gives player level 1 Sight, even after skill resets/job changes
close;
case 5:
close;
}
}
54 changes: 24 additions & 30 deletions doc/script_commands.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Hercules Documentation ================================
//===== Hercules Documentation ================================
//= Hercules Script Commands
//===== By: ==================================================
//= Hercules Dev Team
Expand Down Expand Up @@ -282,9 +282,9 @@ to -1, the 'buy price' given in the item database will be used. Otherwise, the
price you gave will be used for this item, which is how you create differing
prices for items in different shops.

Since trunk r12264 you can alternatively use "cashshop" in place of "shop"
to use the Cash Shop interface, allowing you to buy items with special points
(Currently stored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS.)
You can alternatively use "cashshop" in place of "shop" to use the Cash Shop
interface, allowing you to buy items with special points (Currently stored as
account vars in global_reg #CASHPOINTS and #KAFRAPOINTS).
This type of shop will not allow you to sell items at it, you may only
purchase items here. The layout used to define sale items still count, and
"<price>" refers to how many points will be spent purchasing the them.
Expand Down Expand Up @@ -540,9 +540,9 @@ If you try to set Zeny to a negative number, the script will be terminated with
Assigning variables
--------- ---------

As of rAthena revision 15982, variables can be accessed and assigned values directly
without the use of the built-in 'set' function. This means that variables can be
accessed and modified much like other programming languages.
Variables can be accessed and assigned values directly without the use of the built-in
'set' function. This means that variables can be accessed and modified much like other
programming languages.

@x = 100;
@x = @y = 100;
Expand Down Expand Up @@ -1139,7 +1139,7 @@ will make @x equal 100.
will compute 1+5/8+9 (which is, surprisingly, 10 - remember, all numbers are
integer in this language) and make @x equal it.

Returns the variable reference (since trunk r12870).
Returns the variable reference.

---------------------------------------

Expand Down Expand Up @@ -1423,7 +1423,7 @@ This is done to prevent exploits in badly written scripts, which would
let people, for example, put negative amounts of Zeny into a bank script and
receive free Zeny as a result.

Since trunk r12192 the command has two optional arguments and a return value.
The command has two optional arguments and a return value.
The default value of 'min' and 'max' can be set with 'input_min_value' and
'input_max_value' in script.conf.
For numeric inputs the value is capped to the range [min,max]. Returns 1 if
Expand Down Expand Up @@ -1475,8 +1475,8 @@ generally cleaner:
return 1;// it's odd
}

Alternately, as of rAthena revision 15979 and 15981, user-defined functions
may be called directly without the use of the 'callfunc' script command.
Alternately, user-defined functions may be called directly without the use of
the 'callfunc' script command.

function<TAB>script<TAB>SayHello<TAB>{
mes "Hello " + getarg(0);
Expand Down Expand Up @@ -1599,7 +1599,7 @@ You can pass multiple arguments in a function call:

getarg(0) would be 5, getarg(1) would be 4 and getarg(2) would be 3.

Getarg has an optional argument since trunk r10773 and stable r10958.
Getarg has an optional argument:
If the target argument exists, it is returned.
Otherwise, if <default_value> is present it is returned instead,
if not the script terminates immediately.
Expand Down Expand Up @@ -4125,12 +4125,13 @@ wall), the character is pushed only up to the obstacle.

---------------------------------------

*get_revision()
*get_version()

This command will return the SVN revision number that the server is
currently running on.
This command will return the SVN revision number or Git SHA-1 hash that the server
is currently running on (depends on whether you used a SVN or Git client for
getting Hercules.

if ( get_revision() >= 15000 )
if ( get_version() >= 15000 )
mes "Welcome Hercules!";

---------------------------------------
Expand Down Expand Up @@ -5331,23 +5332,17 @@ command, and all monsters summoned with GM commands, but no other ones - that
is, all non-permanent monsters) on the specified map will be killed regardless
of the event label value.

As of r12876 killmonster now supports an optional argument type. Using 1 for type
will make the command fire "OnMyMobDead" events from any monsters that do die
as a result of this command.
killmonster supports an optional argument type. Using 1 for type will make the command
fire "OnMyMobDead" events from any monsters that do die as a result of this command.

---------------------------------------

*killmonsterall "<map name>"{,<type>};

This command will kill all monsters on a specified map name, regardless of how
they were spawned or what they are. As of r12873, The behavior has changed slightly.
In light of a label behavior fix for mob spawning commands that will now allow the label to
trigger when there is no player, killmonsterall has also been modified to support this.

Using this the normal/old way means labels don't trigger when a player didn't
attack/kill a monster. This is because it breaks compatibility with older scripts if
forced to use the new method. However, if you wish to use the new label type with this
command, simply use 1 for type. Any other number won't be recognized.
they were spawned or what they are without triggering any event label attached to them,
unless you specify 1 for type parameter. In this case, mob death labels will be allowed to
trigger when there is no player. Any other number for this parameter won't be recognized.

---------------------------------------

Expand Down Expand Up @@ -5591,7 +5586,7 @@ the invoking NPC's actions, such as using an emotion or talking.
Whichever of the both NPCs is talked to, both will show a random emotion at the
same time.

As of r16564, command now returns 1 or 0 on success and failure.
Command returns 1 or 0 on success and failure.
A debug message also shows on the console when no events are triggered.

---------------------------------------
Expand Down Expand Up @@ -6287,7 +6282,6 @@ castle guardian monsters and will only work with them. It will set the guardian
characteristics up according to the castle's investment values and otherwise
set the things up that only castle guardians need.

Since trunk r12524:
Returns the id of the mob or 0 if an error occurred.
When 'guardian index' isn't supplied it produces a temporary guardian.
Temporary guardians are not saved with the castle and can't be accessed by guardianinfo.
Expand Down Expand Up @@ -6966,7 +6960,7 @@ uppercase/lowercase. Otherwise, 0. Characters not of the alphabelt will return 0

Example:

charisupper("Hercules", 1); //returns 1
charisupper("Hercules", 0); //returns 1

---------------------------------------

Expand Down
3 changes: 1 addition & 2 deletions src/config/classes/general.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
#define _CONFIG_GENERAL_H_

/**
* rAthena configuration file (http://rathena.org)
* For detailed guidance on these check http://rathena.org/wiki/SRC/config/
* Hercules configuration file (http://hercules.ws)
**/

/**
Expand Down

0 comments on commit 6731a64

Please sign in to comment.