Jump to content
  • 0

WoR Event


Jayz

Question

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

like this ?

http://goo.gl/2hb5S

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

yes, similar to that

however I still think its much better to script this using battleground system

as the battleground system itself auto-create team and prevented players killing teammate

PS: this topic also now under 1 of my to-do list, please leave this topic to me

I did say I wanted to support anyone who wanted to make that but nobody even PM me how to make it

so I guess I personally make this myself

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

bg is a good way, but it needs to create a waitingroom to give a bg team

(we have bg_monster_set_team but no bg_set_team? blablabla :3)

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

use this

http://www.eathena.w...howtopic=275949

hmm ...............

http://trac.rathena..../battleground.c

no wonder it broke

however I don't think that patch might work in rathena anymore ...

maybe need to update the patch 1st before start writing this script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   10
  • Joined:  11/21/11
  • Last Seen:  

I found that -> http://www.eathena.w...howtopic=248127

battleground script commands for rAthena last revision:

Index: map/battleground.c
===================================================================
--- map/battleground.c (revision 16819)
+++ map/battleground.c (working copy)
@@ -23,7 +23,7 @@
#include <stdio.h>

static DBMap* bg_team_db; // int bg_id -> struct battleground_data*
-static unsigned int bg_team_counter = 0; // Next bg_id
+static unsigned int bg_team_counter = 1000; // Next bg_id

struct battleground_data* bg_team_search(int bg_id)
{ // Search a BG Team using bg_id
@@ -171,6 +171,22 @@
 return bg->bg_id;
}

+int bg_create2( unsigned short bg_id, unsigned short mapindex, short rx, short ry, const char *ev, const char *dev ) {
+ struct battleground_data *bg = bg_team_search(bg_id);
+ if ( bg ) return 0;
+ CREATE(bg, struct battleground_data, 1);
+ bg->bg_id = bg_id;
+ bg->count = 0;
+ bg->mapindex = mapindex;
+ bg->x = rx;
+ bg->y = ry;
+ safestrncpy(bg->logout_event, ev, sizeof(bg->logout_event));
+ safestrncpy(bg->die_event, dev, sizeof(bg->die_event));
+ memset(&bg->members, 0, sizeof(bg->members));
+ idb_put(bg_team_db, bg_id, bg);
+ return bg_id;
+}
+
int bg_team_get_id(struct block_list *bl)
{
 nullpo_ret(bl);
Index: map/battleground.h
===================================================================
--- map/battleground.h (revision 16819)
+++ map/battleground.h (working copy)
@@ -35,6 +35,7 @@
struct map_session_data* bg_getavailablesd(struct battleground_data *bg);

int bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev);
+int bg_create2( unsigned short bg_id, unsigned short mapindex, short rx, short ry, const char *ev, const char *dev );
int bg_team_join(int bg_id, struct map_session_data *sd);
int bg_team_delete(int bg_id);
int bg_team_leave(struct map_session_data *sd, int flag);
Index: map/script.c
===================================================================
--- map/script.c (revision 16819)
+++ map/script.c (working copy)
@@ -16980,7 +16980,79 @@
 return 0;
}

+// createbgid <battleground ID>, <respawn map>, <respawn x>, <respawn y>, <On Quit event>, <On Death event>;
+BUILDIN_FUNC(createbgid) {
+ if ( bg_create2( script_getnum(st,2), mapindex_name2id( script_getstr(st,3) ), script_getnum(st,4), script_getnum(st,5), script_getstr(st,6), script_getstr(st,7) ) > 0 )
+  script_pushint( st, script_getnum(st,2) );
+ else
+  script_pushint( st, 0 );
+ return 0;
+}

+// setbgid <battleground ID> {, <player name> };
+BUILDIN_FUNC(setbgid) {
+ unsigned short bg_id = script_getnum(st,2);
+ struct battleground_data *bg = bg_team_search(bg_id);
+ TBL_PC* sd;
+ if ( bg_id < 0 || bg_id > 1000 ) {
+  script_pushint( st, -4 );
+  return 0;
+ }
+ if ( script_hasdata(st,3) )
+  sd = map_nick2sd( script_getstr(st,3) );
+ else
+  sd = script_rid2sd(st);
+ if ( sd == NULL ) {
+  script_pushint( st, -3 );
+  return 0;
+ }
+ if ( bg_id > 0 && bg == NULL ) {
+  script_pushint( st, -1 );
+  return 0;
+ }
+ if ( sd->bg_id == bg_id && bg_id != 0 ) {
+  script_pushint( st, -5 );
+  return 0;
+ }
+ if ( sd->bg_id )
+  bg_team_leave(sd,0);
+ if ( bg_id == 0 ) {
+  script_pushint( st, 0 );
+  return 0;
+ }
+ if ( bg_team_join( bg_id, sd ) == 0 )
+  script_pushint( st, -2 );
+ else
+  script_pushint( st, bg_id );
+ return 0;
+}
+
+// getbgusers <battleground ID>;
+BUILDIN_FUNC(getbgusers) {
+ struct battleground_data *bg = bg_team_search( script_getnum(st,2) );
+ unsigned char i;
+ if ( bg == NULL ) {
+  script_pushint( st, -1 );
+  return 0;
+ }
+ for ( i = 0; bg->members[i].sd != NULL; i++ )
+  mapreg_setreg( reference_uid( add_str("$@arenamembers"), i ), bg->members[i].sd->bl.id );
+ mapreg_setreg( add_str("$@arenamembersnum"), i );
+ script_pushint( st, i );
+ return 0;
+}
+
+// bg_kickall <battleground ID>;
+BUILDIN_FUNC(bg_kickall) {
+ struct battleground_data *bg = bg_team_search( script_getnum(st,2) );
+ unsigned char i;
+ if ( bg == NULL )
+  return 0;
+ for ( i = 0; bg->members[i].sd != NULL; i++ )
+  bg_team_leave( bg->members[i].sd , 0 );
+ return 0;
+}
+
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN_FUNC(defpattern);
@@ -17433,5 +17505,9 @@
 BUILDIN_DEF(checkquest, "i?"),
 BUILDIN_DEF(changequest, "ii"),
 BUILDIN_DEF(showevent, "ii"),
+
+ BUILDIN_DEF(createbgid,"isiiss"),
+ BUILDIN_DEF(setbgid,"i?"),
+ BUILDIN_DEF(getbgusers,"i"),
+ BUILDIN_DEF(bg_kickall,"i"),
 {NULL,NULL,NULL},
-};

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

at that time I overlooked that topic because a lot members complain about tabbing ... heading... etc

which I thought that script might not get popular ... though

and now comparing this request and that topic, its just simply not the same thing

- request for randomizing team members, but the script use fix party vs party

- request player from same team can attack each other, but the script use pvp ( I'll go for battleground )

- request for 1 specific player to be crown as king, but the script doesn't has one

anyway thx for fixing the modification for me, I'll test it soon and post in source snippet

PS: to list out top player kills in your team, sorting algorithm is required XD

if you play counter-strike, and show the score, that's what I mean

EDIT: I found that patch don't even have to fix anything lol

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

like this ?

http://goo.gl/2hb5S

That's amazing.. is it working with latest rathena?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  396
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

waiting for this btw thank annie and to all to writing script like this event

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

like this ?

http://goo.gl/2hb5S

That's amazing.. is it working with latest rathena?

I only use basic commands, so I think it could.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

will this evre be done?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

damn... I scare people bump unnecessary topics =/

this one will get started after I finish that wow battleground, and maybe your ro-bust event

and I felt this script can be as challenging as wow battleground

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

damn... I scare people bump unnecessary topics =/

this one will get started after I finish that wow battleground, and maybe your ro-bust event

and I felt this script can be as challenging as wow battleground

are you going to do what GDI said? as shown here in the bottom link?

like this ?

http://goo.gl/2hb5S

Edited by stydianx
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

nah ... I'm going to do in my own way

btw, please be more considerable that there are certain kind of scripts can take up to weeks or even months to finish

this one is estimated need to tackle for about 2 weeks after declare started

and right now I have TONS of PMs need to solve first

EDIT

you seriously think every script here is done in 1 night ?

true ... some below 100 lines script I can finish in hours

but this one will be estimated over 600 lines

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  275
  • Reputation:   7
  • Joined:  10/08/12
  • Last Seen:  

wow,,,,also been looking for this

Like this brings me back memories of some server I played way back years ago(Forgot it though)....

I'll be checking this post...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...