Jump to content
  • 0

BG Random Team Chooser


Nokia

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

topic says, just 1 npc which warps random into the bg, something like this i found:

//Conquest Randomizer
bat_room,135,175,4 script Conquest I::ConR_Random 466,{
end;
OnInit:
waitingroom "Conquest",1,"ConR_RANDOM::OnDoB_CONQ",1;
end;
}
- script ConR_RANDOM -1,{
OnDoB_CONQ:
if( $@Conquest == 1 ) {
//
set .@Guillaume, bg_get_data($@Conquest_id1, 0);
set .@Croix, bg_get_data($@Conquest_id2, 0);
if( .@Guillaume < .@Croix )
 waitingroom2bg_single $@Conquest_id1,.Castle$,.GX,.GY,"ConR_Random";
else if( .@Guillaume > .@Croix )
 waitingroom2bg_single $@Conquest_id2,.Castle$,.CX,.CY,"ConR_Random";
else
{
 set .@GuillaumeR, getwaitingroomstate(0,"ConR_Random");
 set .@CroixR, getwaitingroomstate(0,"ConR_Random");
 if( .@GuillaumeR <= .@CroixR )
  set .@Limit, .@GuillaumeR;
 else
  set .@Limit, .@CroixR;
 if( .@Limit + .@Guillaume > 50 )
  set .@Limit, 50 - .@Guillaume;
 if( .@Limit <= 0 ) end;
 for( set .@i, 0; .@i < .@Limit; set .@i, .@i + 1 )
 {
  waitingroom2bg_single $@Conquest_id1,.Castle$,.GX,.GY,"ConR_Random";
  waitingroom2bg_single $@Conquest_id2,.Castle$,.CX,.CY,"ConR_Random";
 }
 set .@Guillaume, .@Guillaume + .@Limit;
 set .@Croix, .@Croix + .@Limit;
 mapannounce "bat_room","Battleground -- Conquest [80-99] G: " + .@Guillaume + "/50, C: " + .@Croix + "/50 (Playing)",1,0xFFA500;
}
end;
}
}

but its not working on rathena, nothing happens if i enter the waitingroom.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

I think it's only working on eAmod. :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

topic says, just 1 npc which warps random into the bg, something like this i found:

//Conquest Randomizer
bat_room,135,175,4 script Conquest I::ConR_Random 466,{
end;
OnInit:
waitingroom "Conquest",1,"ConR_RANDOM::OnDoB_CONQ",1;
end;
}
- script ConR_RANDOM -1,{
OnDoB_CONQ:
if( $@Conquest == 1 ) {
//
set .@Guillaume, bg_get_data($@Conquest_id1, 0);
set .@Croix, bg_get_data($@Conquest_id2, 0);
if( .@Guillaume < .@Croix )
 waitingroom2bg_single $@Conquest_id1,.Castle$,.GX,.GY,"ConR_Random";
else if( .@Guillaume > .@Croix )
 waitingroom2bg_single $@Conquest_id2,.Castle$,.CX,.CY,"ConR_Random";
else
{
 set .@GuillaumeR, getwaitingroomstate(0,"ConR_Random");
 set .@CroixR, getwaitingroomstate(0,"ConR_Random");
 if( .@GuillaumeR <= .@CroixR )
  set .@Limit, .@GuillaumeR;
 else
  set .@Limit, .@CroixR;
 if( .@Limit + .@Guillaume > 50 )
  set .@Limit, 50 - .@Guillaume;
 if( .@Limit <= 0 ) end;
 for( set .@i, 0; .@i < .@Limit; set .@i, .@i + 1 )
 {
  waitingroom2bg_single $@Conquest_id1,.Castle$,.GX,.GY,"ConR_Random";
  waitingroom2bg_single $@Conquest_id2,.Castle$,.CX,.CY,"ConR_Random";
 }
 set .@Guillaume, .@Guillaume + .@Limit;
 set .@Croix, .@Croix + .@Limit;
 mapannounce "bat_room","Battleground -- Conquest [80-99] G: " + .@Guillaume + "/50, C: " + .@Croix + "/50 (Playing)",1,0xFFA500;
}
end;
}
}

but its not working on rathena, nothing happens if i enter the waitingroom.

This script is for eamod only. It will only work on the source code of eAmod.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

hmm, can i do this by just warping the people random into the waiting rooms? like this:

bat_room,156,160,3 script Register 416,{
switch( select("Tierra") )
{
 case 1:
switch( rand(1,2) ){
	case 1: warp "bat_room", 57, 223; end; //blue team waiting room
	case 2: warp "bat_room", 57, 207; end; //red team waiting room
}
}
}

i probably need some checks there, like stop warping if there are 3 users in the watingroom, this will probably not work becasue all waiting rooms are an the same map :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   37
  • Joined:  12/30/11
  • Last Seen:  

Heyya Rathena

i have a question about a script ,

Im Searched in the Eathena and Rathena forum but found no hint about it . Im Looking for a PVP Script for the KVM and Tierra Battle . I Want that the Team Members are SPlittet up in Random Teams .

Example: A wating room for 10 Players for KVM 5vs5 , When the 10 Players are in the CHatRoom/or on a Special Map the Script will Select Random 5er Teams from the 10 PPls on the map or Chatroom. And will start the KVM then

Im not sure if this is Possibel any Help would be Pretty nice whit this

Edited by Brian
*merged topics
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

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...