summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-01 07:15:33 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-01 07:15:33 +0000
commitcdb790a155ac008b78cd3cceb823cc1f79f6735c (patch)
treee4b84c5672ef53f6604ac8d706b801220a8be0d8
parent6803e755d6805fe86345558a76f7d7b24dbbacc3 (diff)
downloadhercules-cdb790a155ac008b78cd3cceb823cc1f79f6735c.tar.gz
hercules-cdb790a155ac008b78cd3cceb823cc1f79f6735c.tar.bz2
hercules-cdb790a155ac008b78cd3cceb823cc1f79f6735c.tar.xz
hercules-cdb790a155ac008b78cd3cceb823cc1f79f6735c.zip
* Added script command 'setbattleflag'.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5407 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/script.c18
2 files changed, 18 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 50a44286b..8826c2f21 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -7,6 +7,7 @@ GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALAR
2006/03/01
* Corrected a few Compiling Warnings [Codemaster]
* Added the ability to select GM loading via Login (default) or Char [Codemaster]
+ * Added script command 'setbattleflag'. [Lance]
2006/02/28
* Rewrote LAN support code. Changed configuration file name
lan_support.conf to subnet_athena.conf, changed it syntax. [LuzZza]
diff --git a/src/map/script.c b/src/map/script.c
index c0c3b9040..2bee93f63 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -403,6 +403,7 @@ int buildin_petstat(struct script_state *st); // [Lance] Pet Stat Rq: Dubby
int buildin_callshop(struct script_state *st); // [Skotlex]
int buildin_equip(struct script_state *st);
int buildin_autoequip(struct script_state *st);
+int buildin_setbattleflag(struct script_state *st);
void push_val(struct script_stack *stack,int type,int val);
int run_func(struct script_state *st);
@@ -706,6 +707,7 @@ struct {
{buildin_callshop,"callshop","si"}, // [Skotlex]
{buildin_equip,"equip","i"},
{buildin_autoequip,"autoequip","ii"},
+ {buildin_setbattleflag,"setbattleflag","ss"},
{buildin_setitemscript,"setitemscript","is"}, //Set NEW item bonus script. Lupus
{buildin_disguise,"disguise","i"}, //disguise player. Lupus
{buildin_undisguise,"undisguise","i"}, //undisguise player. Lupus
@@ -9421,12 +9423,26 @@ int buildin_autoequip(struct script_state *st){
return 0;
}
+int buildin_setbattleflag(struct script_state *st){
+ char *flag, *value;
+
+ flag = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ value = conv_str(st,& (st->stack->stack_data[st->start+3]));
+
+ if (battle_set_value(flag, value) == 0)
+ ShowWarning("buildin_setbattleflag: unknown battle_config flag '%s'",flag);
+ else
+ ShowInfo("buildin_setbattleflag: battle_config flag '%s' is now set to '%s'.",flag,value);
+
+ return 0;
+}
+
//=======================================================
// strlen [Valaris]
//-------------------------------------------------------
int buildin_getstrlen(struct script_state *st) {
- char *str = str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ char *str = conv_str(st,& (st->stack->stack_data[st->start+2]));
int len = (str) ? (int)strlen(str) : 0;
push_val(st->stack,C_INT,len);