Author Topic: Goofy Random Mode  (Read 1647 times)

0 Members and 3 Guests are viewing this topic.

Offline Tehbugerz0r

  • Soldier
  • **
  • Posts: 158
Goofy Random Mode
« on: December 02, 2011, 12:26:43 pm »
I'm don't know if anyone else has made something like this, but it can't be the same.

Script Name: Goofy Random Mode
Script Description: Makes Soldat stupid and completely random, in a fun kind of way. Random damage, score, weapons, explosions and more.
It has a few small problems but I can work on those if they're really annoying you.
There's even a few handy functions in here.
Recommended mode: Death Match.
Original Author: Tehbugerz0r
Core Version: 2.7.2

Code: [Select]
procedure SomethingRandom(rando:byte);
var rando1:byte;
begin
rando1:=Random(1,RandomID);
     if rando = 0 then begin
        CreateBullet(GetPlayerStat(rando1,'x'), GetPlayerStat(rando1,'y'), GetPlayerStat(rando,'velx'), GetPlayerStat(rando,'vely'),100, 12, rando1);
        DoDamageBy(rando1,rando1,4000);
        CreateBullet(GetPlayerStat(rando1,'x')+Random(-30,30), GetPlayerStat(rando1,'y')+Random(-50,0), Random(-300,300), Random(-300,100),100, 12, rando1);
        CreateBullet(GetPlayerStat(rando1,'x')+Random(-30,30), GetPlayerStat(rando1,'y')+Random(-50,0), Random(-300,300), Random(-300,100),100, 12, rando1);
        CreateBullet(GetPlayerStat(rando1,'x')+Random(-30,30), GetPlayerStat(rando1,'y')+Random(-50,0), Random(-300,300), Random(-300,100),100, 9, rando1);
        CreateBullet(GetPlayerStat(rando1,'x')+Random(-30,30), GetPlayerStat(rando1,'y')+Random(-50,0), Random(-300,300), Random(-300,100),100, 9, rando1);
     end;
     if rando = 1 then Givebonus(rando1,Random(1,5));
     if rando = 2 then DoDamageBy(rando1,rando1,Random(70,200));
     if rando = 3 then Command('/setteam'+IntToStr(Random(0,5))+' '+IntToStr(rando1));
     if rando = 4 then WriteConsole(0,'HAI!'+chr(13)+chr(10)+'Time to ruin your chat console!'+chr(13)+chr(10)+'Time to ruin your chat console!'+chr(13)+chr(10)+'Time to ruin your chat console!'+chr(13)+chr(10)+'Time to ruin your chat console!'+chr(13)+chr(10)+'KTHXBAI',RandomColor);
end;

« Last Edit: December 03, 2011, 05:17:44 am by Tehbugerz0r »

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Goofy Random Mode
« Reply #1 on: December 02, 2011, 03:53:18 pm »
I can see a bug even in the code snippet:
rando1:=Random(1,NumPlayers+Numbots);
may return IDs which are inactive

Offline Tehbugerz0r

  • Soldier
  • **
  • Posts: 158
Re: Goofy Random Mode
« Reply #2 on: December 02, 2011, 10:43:38 pm »
I can see a bug even in the code snippet:
rando1:=Random(1,NumPlayers+Numbots);
may return IDs which are inactive
Yeah I knew about that, I just didn't get around to figuring it out so that part only works effectively with no one leaving. It's really the type of script you'll just wanna try out once maybe twice with friends anyway. I might fix this today.

Edit: I just made the second version, it has many improvements and fixed most problems.
« Last Edit: December 03, 2011, 01:07:41 am by Tehbugerz0r »