open it with notepad, change the data, stop when you hit the "THE CODE BELOW SHOULD BE LEFT ALONE"
(unless you know what you're doing)
example:
global.VMRandom = 0;
change to:
global.VMRandom = 1;
currently there are these options:
-change the chat bubble vote command (you need to manually change the text of the tutorial)
-change the voting time
-hide the third map's name, turning it into a random option
-randomize next map if no vote is casted
-record the map choosen, so bad map can be detected (natural selection)
global.VMBuffer = buffer_create();
global.mapVoting = 0;
global.option1 = '';
global.option2 = '';
global.isVoting = 0;
object_event_add(PlayerControl,ev_create,0,"
visible = true;
");
PlayerControl.visible = true;
object_event_add(Player,ev_create,0,"
vote = 1;
");
//I guess plugin load after the host player object create so it created an error saying vote variable doesn't exists
Player.vote = 2;
////////////////////////////////////////////////////////////
//map change: slow down the counter and prepare for voting//
////////////////////////////////////////////////////////////
object_event_add(GameServer,ev_step,ev_step_begin,"
if (impendingMapChange == 1)
//global.nextMap
and !(global.winners == TEAM_RED and global.currentMapArea < global.totalMapAreas) and (global.mapVoting == 0) {
////humiliation over////
with (Character)
hp = 0;
////voting session////
global.mapVoting = 1;
impendingMapChange = 600;
////pick 2 map that will never overlap unless the map rotation list is too small////
var VMHalfMapListSize;
randomize();
VMHalfMapListSize = (ds_list_size(global.map_rotation)-1)/2;
//global.option1 = ds_list_find_value(global.map_rotation,global.currentMapIndex+ceil(random(VMHalfMapListSize)));
//global.option2 = ds_list_find_value(global.map_rotation,global.currentMapIndex+VMHalfMapListSize+ceil(random(VMHalfMapListSize)));
global.option1 = ds_list_find_value(global.map_rotation,irandom(ds_list_size(global.map_rotation)-1));
global.option2 = ds_list_find_value(global.map_rotation,irandom(ds_list_size(global.map_rotation)-1));
////send options to client////
write_ubyte(global.VMBuffer, string_length(global.option1));
write_string(global.VMBuffer, global.option1);
write_ubyte(global.VMBuffer, string_length(global.option2));
write_string(global.VMBuffer, global.option2);
PluginPacketSend(argument1, global.VMBuffer);
buffer_clear(global.VMBuffer);
show_message(global.option1);
show_message(global.option2);
}
////collect vote////
if (global.mapVoting) and (PluginPacketGetBuffer(argument1) != -1) {
with (PluginPacketGetPlayer(argument1)) {
vote = PluginPacketGetBuffer(argument1);
vote = read_ubyte(vote);
show_message(string(vote));
PluginPacketPop(argument1);
}
}
////change map to voted map////
if (impendingMapChange == 1) and (global.mapVoting == 1) {
var VMResult,VMFinalResult;
VMResult = ds_priority_create();
ds_priority_add(VMResult,1,0);
ds_priority_add(VMResult,2,0);
ds_priority_add(VMResult,3,0);
ds_priority_add(VMResult,4,0);
with (Player) {
ds_priority_change_priority(VMResult,vote,ds_priority_find_priority(VMResult,vote)+1);
}
VMFinalResult = ds_priority_find_max(VMResult);
if (VMFinalResult) == 2 {
global.nextMap = global.option1;
}
if (VMFinalResult) == 3 {
global.nextMap = global.option1;
}
ds_priority_destroy(VMResult);
}
");
//////////////////////////
//receive options + vote//
//////////////////////////
object_event_add(Client,ev_step,ev_step_begin,"
if (PluginPacketGetBuffer(argument1) != -1) {
//var optionSize,VMB;
global.isVoting = 1;
//VMB = PluginPacketGetBuffer(argument1);
//PluginPacketPop(argument1);
//optionSize = read_ubyte(VMB);
//global.option1 = read_string(VMB,optionSize);
//optionSize = read_ubyte(VMB);
//global.option2 = read_string(VMB,optionSize);
var VMSize;
global.option1 = PluginPacketGetBuffer(argument1);
VMSize = read_ubyte(global.option1);
global.option1 = read_string(global.option1,VMSize);
global.option2 = PluginPacketGetBuffer(argument1);
VMSize = read_ubyte(global.option2);
global.option2 = read_string(global.option2,VMSize);
PluginPacketPop(argument1);
show_message(global.option1);
show_message(global.option2);
}
if global.isVoting {
if (keyboard_check_pressed(ord('1')))
with (global.myself) {
vote = 1;
write_ubyte(global.VMBuffer, vote);
PluginPacketSend(argument1, global.VMBuffer);
}
if (keyboard_check_pressed(ord('2')))
with (global.myself) {
vote = 2;
write_ubyte(global.VMBuffer, vote);
PluginPacketSend(argument1, global.VMBuffer);
}
if (keyboard_check_pressed(ord('3')))
with (global.myself) {
vote = 3;
write_ubyte(global.VMBuffer, vote);
PluginPacketSend(argument1, global.VMBuffer);
}
if (keyboard_check_pressed(ord('4')))
with (global.myself) {
vote = 4;
write_ubyte(global.VMBuffer, vote);
PluginPacketSend(argument1, global.VMBuffer);
}
buffer_clear(global.VMBuffer);
}
");