Added getgroupid()
script command (follow-up to r15572).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15583 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
0c87e6ef7a
commit
09193ae095
@ -2671,9 +2671,9 @@ Notice that NPC objects disabled with 'disablenpc' will still be located.
|
|||||||
|
|
||||||
*getgmlevel()
|
*getgmlevel()
|
||||||
|
|
||||||
This function will return the GM level of the account to which the invoking
|
This function will return the (GM) level of player group the account to which the
|
||||||
character belongs. If this is somehow executed from a console command, 99 will
|
invoking character belongs. If this is somehow executed from a console command,
|
||||||
be returned, and 0 will be returned if the account has no GM level.
|
99 will be returned, and 0 will be returned if the account has no GM level.
|
||||||
|
|
||||||
This allows you to make NPC's only accessible for certain GM levels, or behave
|
This allows you to make NPC's only accessible for certain GM levels, or behave
|
||||||
specially when talked to by GMs.
|
specially when talked to by GMs.
|
||||||
@ -2683,6 +2683,13 @@ specially when talked to by GMs.
|
|||||||
|
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
*getgroupid()
|
||||||
|
|
||||||
|
This function will return the id of player group the account to which the
|
||||||
|
invoking player belongs.
|
||||||
|
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
*gettimetick(<tick type>)
|
*gettimetick(<tick type>)
|
||||||
|
|
||||||
This function will return the system time in UNIX epoch time (if tick type is 2)
|
This function will return the system time in UNIX epoch time (if tick type is 2)
|
||||||
|
@ -7350,6 +7350,21 @@ BUILDIN_FUNC(getgmlevel)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the group ID of the player.
|
||||||
|
///
|
||||||
|
/// getgroupid() -> <int>
|
||||||
|
BUILDIN_FUNC(getgroupid)
|
||||||
|
{
|
||||||
|
TBL_PC* sd;
|
||||||
|
|
||||||
|
sd = script_rid2sd(st);
|
||||||
|
if (sd == NULL)
|
||||||
|
return 1; // no player attached, report source
|
||||||
|
script_pushint(st, pc_get_group_id(sd));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/// Terminates the execution of this script instance.
|
/// Terminates the execution of this script instance.
|
||||||
///
|
///
|
||||||
/// end
|
/// end
|
||||||
@ -15978,6 +15993,7 @@ struct script_function buildin_func[] = {
|
|||||||
BUILDIN_DEF(getgdskilllv,"iv"),
|
BUILDIN_DEF(getgdskilllv,"iv"),
|
||||||
BUILDIN_DEF(basicskillcheck,""),
|
BUILDIN_DEF(basicskillcheck,""),
|
||||||
BUILDIN_DEF(getgmlevel,""),
|
BUILDIN_DEF(getgmlevel,""),
|
||||||
|
BUILDIN_DEF(getgroupid,""),
|
||||||
BUILDIN_DEF(end,""),
|
BUILDIN_DEF(end,""),
|
||||||
BUILDIN_DEF(checkoption,"i"),
|
BUILDIN_DEF(checkoption,"i"),
|
||||||
BUILDIN_DEF(setoption,"i?"),
|
BUILDIN_DEF(setoption,"i?"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user