Jump to content
  • 0

modification of bg_emp


Question

Posted (edited)

May I request to add more function for this script?

please follow script request rules and open a new topic for it

as this topic has already done its discussion

so you can do something like -> .. in a new topic

I like to request add modification of this script ...

I want to add this blah blah blah feature ...

I'm using rathena 16xxx

Annie can i request for what should i put so that whenever 1 person from red team kill a member of the blue team all the members will receive an yggrasil seed? and vice versa......

Edited by AnnieRuru
split topic from http://rathena.org/board/topic/72372-bg-type-emperium-breaking/

13 answers to this question

Recommended Posts

Posted (edited)

how do you make a script that when you enter the waiting room it announce how many people are in the room? like

0/12 then if someone enter it announce 1/12 on pvp room?

Edited by caspa
Posted (edited)

oh..... i'm sorry if my explanation was not proper...... but what i mean is like...... im using annie's BG and i want it to announce how many player is currently on the waiting room for red and blue....... like whenever someone enter in the waitingroom it would announce how many player were on the waitingroom?

red team 0/2 blue team 0/2

when somebody enters, it announce's just like in eamod battleground modification..............

Edited by caspa
Posted

prontera,152,187,5	script	kjdhfkdsjfhks	100,{
end;
OnInit:
waitingroom "test", 3, strnpcinfo(0)+"::Onaaa", 1;
end;
Onaaa:
if ( getwaitingroomstate(0) < 2 ) {
	announce "a player has join waitingroom", 0;
	end;
}
announce "event start", 0;
getmapxy .@map$, .@x, .@y, 1;
warpwaitingpc .@map$, .@x, .@y, 2;
end;
}

if you want to display the names of those who had join waitingroom, you have to do source modification

Posted

prontera,152,187,5    script    kjdhfkdsjfhks    100,{
   end;
OnInit:
   waitingroom "test", 3, strnpcinfo(0)+"::Onaaa", 1;
   end;
Onaaa:
   if ( getwaitingroomstate(0) < 2 ) {
       announce "a player has join waitingroom", 0;
       end;
   }
   announce "event start", 0;
   getmapxy .@map$, .@x, .@y, 1;
   warpwaitingpc .@map$, .@x, .@y, 2;
   end;
}

if you want to display the names of those who had join waitingroom, you have to do source modification

annie is this the correct topic ?

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

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

Posted (edited)

yeah, I also forgotten I posted that lol

however I think its better to use something like getwaitingromlist

BUILDIN_FUNC(getwaitingroomlist) {
struct npc_data* nd = script_hasdata(st,2) ? npc_name2id( script_getstr(st,2) ) : (struct npc_data *)map_id2bl(st->oid);
struct chat_data* cd = (struct chat_data *)map_id2bl(nd->chat_id);
if ( nd && cd ) {
	int i;
	for ( i = 0; i < cd->users; i++ )
		mapreg_setreg( reference_uid( add_str("$@waitingroomaid"), i ), cd->usersd[i]->status.account_id );
	mapreg_setreg( add_str("$@waitingroomcount"), cd->users );
}
return 0;
}

BUILDIN_DEF(getwaitingroomlist, "?"),

prontera,155,187,5    script    dsasda    100,{
   getwaitingroomlist;
   for ( .@i = 0; .@i < $@waitingroomcount; .@i++ )
       dispbottom rid2name( $@waitingroomaid[.@i] );
   end;
OnInit:
   waitingroom "abcd", 3, strnpcinfo(0) +"::Onaaa", 1;
   end;
Onaaa:
   getwaitingroomlist;
   announce rid2name( $@waitingroomaid[ $@waitingroomcount -1 ] ) +" has join this waitingroom", 0;
   end;
}

Edited by AnnieRuru
Posted

yeah, I also forgotten I posted that lol

however I think its better to use something like getwaitingromlist

BUILDIN_FUNC(getwaitingroomlist) {
struct npc_data* nd = script_hasdata(st,2) ? npc_name2id( script_getstr(st,2) ) : (struct npc_data *)map_id2bl(st->oid);
struct chat_data* cd = (struct chat_data *)map_id2bl(nd->chat_id);
int i, j = 0;
if ( nd && cd ) {
	for ( i = 0; i < cd->users; i++ ) {
		mapreg_setreg( reference_uid( add_str("$@waitingroomaid"), j ), cd->usersd[i]->status.account_id );
		j++;
	}
	mapreg_setreg( add_str("$@waitingroomcount"), j );
}
return 0;
}

BUILDIN_DEF(getwaitingroomlist, "?"),

prontera,155,187,5	script	dsasda	100,{
getwaitingroomlist;
for ( .@i = 0; .@i < $@waitingroomcount; .@i++ )
	dispbottom rid2name( $@waitingroomaid[.@i] );
end;
OnInit:
waitingroom "abcd", 3, strnpcinfo(0) +"::Onaaa", 1;
end;
Onaaa:
getwaitingroomlist;
announce rid2name( $@waitingroomaid[ $@waitingroomcount -1 ] ) +" has join this waitingroom", 0;
end;
}

annie is it possible to change the name into numbers?

like if the waiting room can only hold up to 10

then a person enters....

it would then announce "The Read Team Has 1/10 User",0;

??????

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...