summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-17 22:32:49 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-17 22:32:49 +0000
commit0884f746a4c82c31b7d98d2f2f95ad9508d01525 (patch)
tree51c8da822a92a07fd87d83b250c19bea12978b2b /src/map/script.c
parent132b6ddad9dcc9537fd98b08fc928e5568689c05 (diff)
downloadhercules-0884f746a4c82c31b7d98d2f2f95ad9508d01525.tar.gz
hercules-0884f746a4c82c31b7d98d2f2f95ad9508d01525.tar.bz2
hercules-0884f746a4c82c31b7d98d2f2f95ad9508d01525.tar.xz
hercules-0884f746a4c82c31b7d98d2f2f95ad9508d01525.zip
- Implemented official battlechat packets (thanks to Pakpil).
- Implemented the scoreboard packets (thanks to Pakpil). - Updates to Tierra Valley according to official info. * There are no barricades around each base, barricades are in the middle left path. * There is another graveyard used for the owners of the middle base, with faster spawn (each 20 seconds). * I added a flag respawn in the middle, currently I don't know if this if official or not, but it allows each team recapture the middle base. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13593 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d7a3b1e07..5c1836c97 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13405,6 +13405,20 @@ BUILDIN_FUNC(waitingroom2bg_single)
return 0;
}
+BUILDIN_FUNC(bg_team_setxy)
+{
+ struct battleground_data *bg;
+ int bg_id;
+
+ bg_id = script_getnum(st,2);
+ if( (bg = bg_team_search(bg_id)) == NULL )
+ return 0;
+
+ bg->x = script_getnum(st,3);
+ bg->y = script_getnum(st,4);
+ return 0;
+}
+
BUILDIN_FUNC(bg_warp)
{
int x, y, mapindex, bg_id;
@@ -13437,6 +13451,26 @@ BUILDIN_FUNC(bg_monster)
return 0;
}
+BUILDIN_FUNC(bg_monster_set_team)
+{
+ struct mob_data *md;
+ struct block_list *mbl;
+ int id = script_getnum(st,2),
+ bg_id = script_getnum(st,3);
+
+ if( (mbl = map_id2bl(id)) == NULL || mbl->type != BL_MOB )
+ return 0;
+ md = (TBL_MOB *)mbl;
+ md->state.bg_id = bg_id;
+
+ mob_stop_attack(md);
+ mob_stop_walking(md, 0);
+ md->target_id = md->attacked_id = 0;
+ clif_charnameack(0, &md->bl);
+
+ return 0;
+}
+
BUILDIN_FUNC(bg_leave)
{
struct map_session_data *sd = script_rid2sd(st);
@@ -13489,6 +13523,22 @@ BUILDIN_FUNC(bg_getareausers)
return 0;
}
+BUILDIN_FUNC(bg_updatescore)
+{
+ const char *str;
+ int m;
+
+ str = script_getstr(st,2);
+ if( (m = map_mapname2mapid(str)) < 0 )
+ return 0;
+
+ map[m].bgscore_lion = script_getnum(st,3);
+ map[m].bgscore_eagle = script_getnum(st,4);
+
+ clif_bg_updatescore(m);
+ return 0;
+}
+
BUILDIN_FUNC(bg_get_data)
{
struct battleground_data *bg;
@@ -13874,12 +13924,15 @@ struct script_function buildin_func[] = {
// BattleGround
BUILDIN_DEF(waitingroom2bg,"siiiss?"),
BUILDIN_DEF(waitingroom2bg_single,"isiis"),
+ BUILDIN_DEF(bg_team_setxy,"iii"),
BUILDIN_DEF(bg_warp,"isii"),
BUILDIN_DEF(bg_monster,"isiisi*"),
+ BUILDIN_DEF(bg_monster_set_team,"ii"),
BUILDIN_DEF(bg_leave,""),
BUILDIN_DEF(bg_destroy,"i"),
BUILDIN_DEF(areapercentheal,"siiiiii"),
BUILDIN_DEF(bg_get_data,"ii"),
BUILDIN_DEF(bg_getareausers,"isiiii"),
+ BUILDIN_DEF(bg_updatescore,"sii"),
{NULL,NULL,NULL},
};