From 76a336eea15b0af70ebe4d3dd13b25f1f503e03c Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Tue, 26 Feb 2019 17:51:04 +0800 Subject: Add missing documentation for disable battleground respawn - fix a minor bug that bg_create_team should return -1, as mentioned in doc/script_commands.txt --- doc/script_commands.txt | 7 +++++++ src/map/script.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index db851128f..b74a231d3 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9616,6 +9616,11 @@ is run when they relog. refers to an NPC label that attaches to the character and is run when they die. Can be "" for empty. +If "-" is supplied for , this will remove the 1 second automatic +respawn on the battleground map. This allows for better manipulation of +. The player will have to be warped to desired location +at the end of . + Unlike the prior command, the latter will attach a GROUP in a waiting room to the battleground, and sets the array $@arenamembers[0] where 0 holds the IDs of the first group, and 1 holds the IDs of the second. @@ -9747,6 +9752,8 @@ mapflag%TAB%%TAB%battleground%TAB%2 This command will create a new BG Team. When player dies, they will be respawned map_name,X,Y as mentioned. +If "-" is supplied for the map name, this will remove the 1 second automatic +respawn on the battleground map. Command will return -1 if BG Creation is failed, else it will return the BG ID(Also known as TeamID). diff --git a/src/map/script.c b/src/map/script.c index 7578fcdcc..8096ec471 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -23687,7 +23687,7 @@ static BUILDIN(bg_create_team) if( strcmp(map_name,"-") != 0 ) { map_index = script->mapindexname2id(st,map_name); if( map_index == 0 ) { // Invalid Map - script_pushint(st,0); + script_pushint(st, -1); return true; } } -- cgit v1.2.3-70-g09d2