Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Roll The Dice server plugin by lorgan
- //RM port by Arctic
- global.canRoll = true;
- global.effects = 22;
- global.effect[0] = " Exploded!";
- global.effect[1] = " Turned into a timebomb! Detonation in 10 seconds!"
- global.effect[2] = " froze for 10 seconds!";
- global.effect[3] = " Lost health!"
- global.effect[4] = " can't jump for 20 seconds!";
- global.effect[5] = " has less gravity for 20 seconds!";
- global.effect[6] = " has infinite ammo for 10 seconds!";
- global.effect[7] = " became invincible for 10 seconds!";
- global.effect[8] = " has instakill for 10 seconds!";
- global.effect[9] = " can fly for 20 seconds!"
- global.effect[10] = " has hyperspeed for 10 seconds!"
- global.effect[11] = " healed!";
- global.effect[12] = " became confused for 20 seconds!"
- global.effect[13] = " Talks about his feelings for 20 seconds!";
- global.effect[14] = " lost ammo!";
- global.effect[15] = " got full ammo";
- global.effect[16] = " got rocketed!";
- global.effect[17] = " is poisoned for 10 seconds!";
- global.effect[18] = " has instant refire for 10 seconds!";
- global.effect[19] = " has health regen for 20 seconds!";
- global.effect[20] = " released the spies! All autoguns are sapped!";
- global.effect[21] = " is a disguised spy! Kill him before he kills you!";
- object_event_add(PlayerControl,ev_create,0,"
- alarm[0] = 300;
- ");
- object_event_add(PlayerControl,ev_alarm,0,"
- if global.isHost {
- if !instance_exists(NoticeO) {
- SendChat('This server is running an RTD plugin. Taunt to roll.',global.eventBuffer);
- alarm[0] = 30*5*60;
- } else alarm[0] = 7;
- }
- ");
- object_event_add(Player,ev_create,0,"iCanRoll = true;");
- object_event_add(Player,ev_alarm,10,"iCanRoll = true;");
- object_event_add(Character,ev_create,0,"
- effect = noone;
- ");
- object_event_add(Character,ev_destroy,0,"
- if global.isHost {
- if effect != noone {
- SendChat(player.name + ' died wile using RTD!',global.eventBuffer);
- global.canRoll = true;
- }
- }
- ");
- object_event_add(Character,ev_step,ev_step_normal,"
- if global.isHost {
- if effect != noone {
- switch(effect) {
- case 1:
- RTDtimer -= 1;
- if RTDtimer mod 30 == 0 && RTDtimer <= 90 {
- SendChat('Detonation in '+string(RTDtimer/30) ,global.eventBuffer);
- }
- if RTDtimer <= 0 {
- global.canRoll = true;
- effect = noone;
- with(Character) {
- if point_distance(x,y,other.x,other.y) < 64 {
- if team != other.team or id == other.id {
- lastDamageDealer = other.player;
- lastDamageSource = FINISHED_OFF_GIB;
- hp = -999;
- }
- }
- }
- }
- break;
- case 2:
- RTDtimer -= 1;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' is no longer frozen.' ,global.eventBuffer);
- runPower = runBkp;
- jumpStrength = 8;
- }
- break;
- case 4:
- RTDtimer -= 1;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' can jump again.' ,global.eventBuffer);
- jumpStrength = 8;
- }
- break;
- case 5:
- if(place_free(x,y+1)) vspeed -= 0.3;
- RTDtimer -= 1;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' has normal gravity again.' ,global.eventBuffer);
- }
- break;
- case 6:
- currentWeapon.ammoCount = currentWeapon.maxAmmo;
- RTDtimer -= 1;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' has normal ammo again.' ,global.eventBuffer);
- }
- break;
- case 7:
- hp = 255;
- RTDtimer -= 1;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' is no longer invincible.' ,global.eventBuffer);
- hp = hpBkp;
- }
- break;
- case 8:
- with(Character) if lastDamageDealer == other.player && timeUnscathed <= 1 hp = -999;
- RTDtimer -= 1;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' no longer has instakill.' ,global.eventBuffer);
- }
- break;
- case 9:
- doublejumpUsed = false;
- RTDtimer -= 1;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' can no longer fly.' ,global.eventBuffer);
- if player.class != CLASS_SCOUT canDoublejump = false;
- }
- break;
- case 10:
- RTDtimer -= 1;
- runPower = 4;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' no longer has hyperspeed.' ,global.eventBuffer);
- runPower = runBkp;
- }
- break;
- case 12:
- RTDtimer -= 1;
- if(!taunting && !omnomnomnom) {
- if((keyState|pressedKeys) & $40 and hspeed > -runPower * controlFactor / (baseFriction - 1))
- hspeed += runPower*controlFactor*2;
- if((keyState|pressedKeys) & $20 and hspeed < runPower * controlFactor / (baseFriction - 1))
- hspeed -= runPower*controlFactor*2;
- }
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' is no longer confused.' ,global.eventBuffer);
- }
- break;
- case 17:
- RTDtimer -= 1;
- hp -= 0.2;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' is no longer poisoned.' ,global.eventBuffer);
- }
- break;
- case 18:
- RTDtimer -= 1;
- if player.class != CLASS_PYRO && player.class != CLASS_HEAVY
- if currentWeapon.refireTime > 5 currentWeapon.refireTime = 5;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' no longer has instant reload.' ,global.eventBuffer);
- }
- break;
- case 19:
- RTDtimer -= 1;
- if hp < maxHp hp += 0.2;
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' no longer has health regen.' ,global.eventBuffer);
- }
- break;
- case 13:
- RTDtimer -= 1;
- if RTDtimer mod 7 == 0 {
- var feeling;
- feeling = floor(random(7))
- write_ubyte(global.eventBuffer, CHAT_BUBBLE);
- write_ubyte(global.eventBuffer, ds_list_find_index(global.players,player));
- write_ubyte(global.eventBuffer, 22+feeling);
- setChatBubble(player, 22+feeling);
- }
- if RTDtimer <= 0 {
- effect = noone;
- global.canRoll = true;
- SendChat(player.name + ' has calmed down.' ,global.eventBuffer);
- }
- break;
- default:
- effect = noone;
- }
- }
- if taunting {
- if tauntindex == 0 or tauntindex == tauntlength {
- if player.iCanRoll && global.canRoll {
- effect = floor(random(global.effects));
- SendChat(player.name + global.effect[effect],global.eventBuffer);
- player.iCanRoll = false;
- player.alarm[10] = 30*60;
- switch(effect) {
- case 0:
- effect = noone;
- with(Character) {
- if point_distance(x,y,other.x,other.y) < 64 {
- if team != other.team or id == other.id {
- lastDamageDealer = other.player;
- lastDamageSource = FINISHED_OFF_GIB;
- hp = -999;
- }
- }
- }
- break;
- case 1:
- case 6:
- case 8:
- case 17:
- case 18:
- global.canRoll = false;
- RTDtimer = 10*30;
- break;
- case 2:
- global.canRoll = false;
- RTDtimer = 10*30;
- runBkp = runPower;
- runPower = 0;
- jumpStrength = 0;
- break;
- case 3:
- hp = 1;
- effect = noone;
- break;
- case 4:
- global.canRoll = false;
- RTDtimer = 20*30;
- jumpStrength = 0;
- break;
- case 5:
- case 12:
- case 13:
- case 19:
- case 22:
- global.canRoll = false;
- RTDtimer = 20*30;
- break;
- break;
- case 7:
- global.canRoll = false;
- RTDtimer = 10*30;
- hpBkp = hp;
- break;
- case 9:
- global.canRoll = false;
- RTDtimer = 20*30;
- canDoublejump = true;
- break;
- case 10:
- global.canRoll = false;
- RTDtimer = 10*30;
- runBkp = runPower;
- runPower = 4;
- break;
- case 11:
- effect = noone;
- hp = maxHp;
- case 14:
- effect = noone;
- currentWeapon.ammoCount = 0;
- currentWeapon.alarm[5] = 50;
- break;
- case 15:
- effect = noone;
- currentWeapon.ammoCount = currentWeapon.maxAmmo;
- currentWeapon.alarm[5] = -1;
- break;
- case 16:
- effect = noone;
- vspeed = -15;
- moveStatus = 1;
- break;
- case 20:
- effect = noone;
- with(Sentry) {
- if hp > 25 hp = 25;
- else hp = -999;
- built = 0;
- }
- break;
- case 21:
- if team == TEAM_RED team = TEAM_BLUE;
- else team = TEAM_RED;
- break;
- }
- } else {
- write_ubyte(global.eventBuffer, CHAT_BUBBLE);
- write_ubyte(global.eventBuffer, ds_list_find_index(global.players,player));
- write_ubyte(global.eventBuffer, 44);
- setChatBubble(player, 44);
- }
- }
- }
- }
- ");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement