-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random map in 1vs1 #36
Comments
I do have that on my server! (You can test it on robskebueba.no-ip.biz:3114) |
But as @Minifixio doesn't accept PRs i can't help you |
can you share your phar maybe? |
I can compile it for you |
oh, that will be great :D |
can you share it @robske110 |
@robske110 Would you be able to show me the changes you made? (show commit) Thanks |
Ok, here it is: |
private function launchNewRounds(){
// Check that there is at least 2 players in the queue
if(count($this->queue) < 2){
Server::getInstance()->getLogger()->debug("There is not enough players to start a duel : " . count($this->queue));
return;
}
// Check if there is any arena free (not active)
Server::getInstance()->getLogger()->debug("Check ". count($this->arenas) . " arenas");
$freeArena = NULL;
$freeArenaCount = 0;
foreach ($this->arenas as $arena){
if(!$arena->active){
$freeArenaCount++;
$freeArena[$freeArenaCount] = $arena;
}
}
if($freeArena == NULL){
Server::getInstance()->getLogger()->debug("[1vs1] - No free arena found");
return;
}
//Randomize
$freeArenas = count($freeArena);
var_dump($freeArenas);
$finalArena = mt_rand(1, $freeArenas);
var_dump($finalArena);
$freeArenafinal = $freeArena[$finalArena];
// Send the players into the arena (and remove them from queues)
$roundPlayers = array();
array_push($roundPlayers, array_shift($this->queue), array_shift($this->queue));
Server::getInstance()->getLogger()->debug("[1vs1] - Starting duel : " . $roundPlayers[0]->getName() . " vs " . $roundPlayers[1]->getName());
$freeArenafinal->startRound($roundPlayers);
} |
Just replace the function launchNewRounds with this in Arena Manager |
ily |
What? |
'i love you' :p and how do you edit the amount of blocks that you spawn from each other? 5 isn't really enough. |
Somewhere is an constant |
In arena.php there is player_offset... |
i changed that, gave me an error lol rip |
const PLAYER_1_OFFSET_X = 5; gives error if i took it for 30 and idk why cus it's normally possible |
Robske. Can you upload yout code ffor random map. |
Ive got it |
Can anyone share the phar with random arena? I tried robske's but it crashed |
You cannot use the github version, its broken |
Can you share the working phar? I used your code above and it crashed too |
I do not have an phar |
Wait, I'll make an fork (stay tuned, could take some time) |
Nice |
i have a version with all the changes of the other guys who forked + with mine, youreturn in creative mode though :P fork mine and make a phar out of it here: http://pmt.mcpe.me/ but i haven't tested if it works but i hope it does :D |
What |
Any news in TeamVsTeam ? |
^ :D also adding points for economic? killrate doest work for some reason while this plugin is running a match.. |
Create a system with random map so the users dont fight every time in the fist map that you add. I think that is a simple feature
The text was updated successfully, but these errors were encountered: