summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);