Author Topic: Ready made: Bullet Nova  (Read 12508 times)

0 Members and 1 Guest are viewing this topic.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Ready made: Bullet Nova
« on: September 28, 2007, 02:02:53 pm »

Two knife novas with a total of 95 knifes



procedure Nova(X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);

This procedure creates a customized circle of bullets around the specified coordinates. Very useful for coding special effects or... magic spells :D
Requires a deg2rad function (which can also be quite useful ;) )



How to use the parameters:
X & Y:
¬  ¬  ¬  ¬  ¬  ¬  ¬ Coordinates for the Nova
Speed:            Speed of the bullets
Decentralize:¬  ¬ How far the starting circle is away from it's center (= X & Y)
Power:            Power of the bullets
ID:¬  ¬  ¬  ¬  ¬  ¬  ¬  ¬  ¬  Owner of the bullets
Style:             Bullettype
n:¬  ¬  ¬  ¬  ¬  ¬  ¬  ¬  ¬  ¬ Number of bullets


And the code for copy & pasting:
Code: [Select]
procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);
var i: integer;
    angle: single;
begin
  angle := 2*pi/n;
  for i:=0 to n do
    CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );
end;
« Last Edit: July 18, 2008, 05:34:34 am by Avarax »
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 863
  • mr. foobar2000
Re: Ready made: Bullet Nova
« Reply #1 on: September 28, 2007, 04:19:57 pm »
pointless, but CRAZY COOL :o. Gj, this would be fun with m79 bullets xD.

Iq Unlimited

Offline Kitty

  • Major
  • *
  • Posts: 60
Re: Ready made: Bullet Nova
« Reply #2 on: September 28, 2007, 04:47:01 pm »
A shield made out of grenades  :o that would be funny

Nice one ;)  ;D
-A female soldat player.


Offline SirJamesaford

  • Flagrunner
  • ****
  • Posts: 763
  • SirJamesaford is still in the early Beta stage.
Re: Ready made: Bullet Nova
« Reply #3 on: September 28, 2007, 04:49:07 pm »
I smell a new hexer skill....fucking a.  Cant wait to see this (that is, if this is gonna be used in hexer.)
And if the dam breaks open many years too soon
And if there is no room upon the hill
And if your head explodes with dark forebodings too
Ill see you on the dark side of the moon

Offline Thomas

  • Major
  • *
  • Posts: 76
    • mnus.de
Re: Ready made: Bullet Nova
« Reply #4 on: September 28, 2007, 06:45:00 pm »
nice work!

i wonder if this makes any difference: (performance, but im sure it doesnt)
deg/(180/pi); <-> deg*(pi/180);
the second is how you would calculte it normally imho

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Ready made: Bullet Nova
« Reply #5 on: September 28, 2007, 09:21:36 pm »
you are a goddam genius Avarax!!!
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Macellan
Re: Ready made: Bullet Nova
« Reply #6 on: September 29, 2007, 01:51:25 am »
OMG! Perfect!
you are a goddam genius Avarax!!!
CoFounder / CTO @ Macellan
Founder Turkish Soldat Community

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Ready made: Bullet Nova
« Reply #7 on: September 29, 2007, 03:17:43 am »
Oh come on, how does that little piece of code make someone a genius :-|
Using a negative decentralize value btw creates a nova that goes from outside to inside instead of inside to outside.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Thomas

  • Major
  • *
  • Posts: 76
    • mnus.de
Re: Ready made: Bullet Nova
« Reply #8 on: September 29, 2007, 04:35:12 am »
alternatively you can also use a negative speed value, but somehow the knives didnt really hit my soldat
 i wanted to make some leet adminkill command /novakill *id*

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
  if GetPiece(Text,' ',0) = '/novakill' then begin
    Nova(
       GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'X'), //X
       GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'Y'), //Y
       -6, //Speed
       50, // distance/decentralize
       100, //power
       ID, //owner
       13, //knife
       40 //n
     );
  end;
  //NOTE: This function will be called when an admin types a / command.
  Result := false; // Return true if you want to ignore the command typed.
end;

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Ready made: Bullet Nova
« Reply #9 on: September 29, 2007, 04:37:48 am »
Use a higher speed and use less decentralization.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Ready made: Bullet Nova
« Reply #10 on: September 29, 2007, 06:22:10 pm »
you're not just a genius because of THIS script, it's good, but you made Hexer!!! anyone who could do that is a genius in my book ;)

Date Posted: September 29, 2007, 07:18:38 pm
what's the max number of bullets a map can render/make at once?
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline Navy0zkr

  • Major(1)
  • Posts: 15
Re: Ready made: Bullet Nova
« Reply #11 on: January 25, 2008, 04:29:49 pm »
AND THE COMMAND?
/???
/???

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Ready made: Bullet Nova
« Reply #12 on: January 25, 2008, 06:27:13 pm »
Oh my god, stop typing in caps,

There is no command, this is just a function that you put at the start of a script and then you can call it later, so, either someone has to make you a script so you can just type /nova or something, and I can't be F***ed doing it.
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline Navy0zkr

  • Major(1)
  • Posts: 15
Re: Ready made: Bullet Nova
« Reply #13 on: January 25, 2008, 09:49:09 pm »
look my nova!



CODE:
Quote
function deg2rad(deg: single): single;
begin
¬  result:=deg/(180/pi);
end;

procedure Nova(X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);
var i: integer;
begin
¬  for i:=0 to n do
¬  ¬  CreateBullet(X + (cos(deg2rad(360 / n * i))*decentralize),Y + (sin(deg2rad(360 / n * i))*decentralize),(cos(deg2rad(360 / n * i))*speed),(sin(deg2rad(360 / n * i))*speed),power,style,ID);
end;
function OnCommand(ID: Byte; Text: string): boolean;
begin
¬  if GetPiece(Text,' ',0) = '/novakill' then begin
Nova(
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'X'), //X
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'Y'), //Y
¬  ¬  ¬  ¬ -5, //Speed
¬  ¬  ¬  ¬ 40, // distance/decentralize
¬  ¬  ¬  ¬ 100, //power
¬  ¬  ¬  ¬ ID, //owner
¬  ¬  ¬  ¬ 12, //knife
¬  ¬  ¬  ¬ 40 //n
¬  ¬  ¬ );
¬  ¬  Nova(
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'X'), //X
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'Y'), //Y
¬  ¬  ¬  ¬ -5, //Speed
¬  ¬  ¬  ¬ 30, // distance/decentralize
¬  ¬  ¬  ¬ 100, //power
¬  ¬  ¬  ¬ ID, //owner
¬  ¬  ¬  ¬ 4, //knife
¬  ¬  ¬  ¬ 40 //n
¬  ¬  ¬ );
¬  Nova(
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'X'), //X
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'Y'), //Y
¬  ¬  ¬  ¬ -5, //Speed
¬  ¬  ¬  ¬ 10, // distance/decentralize
¬  ¬  ¬  ¬ 100, //power
¬  ¬  ¬  ¬ ID, //owner
¬  ¬  ¬  ¬ 4, //knife
¬  ¬  ¬  ¬ 40 //n
¬  ¬  ¬ );
Nova(
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'X'), //X
¬  ¬  ¬  ¬ GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'Y'), //Y
¬  ¬  ¬  ¬ -5, //Speed
¬  ¬  ¬  ¬ 5, // distance/decentralize
¬  ¬  ¬  ¬ 100, //power
¬  ¬  ¬  ¬ ID, //owner
¬  ¬  ¬  ¬ 13, //knife
¬  ¬  ¬  ¬ 40 //n
¬  ¬  ¬ );
¬  end;
¬  //NOTE: This function will be called when an admin types a / command.
¬  Result := false; // Return true if you want to ignore the command typed.
end;
Quote
:D

Offline IvanTh3Great

  • Major(1)
  • Posts: 8
Re: Ready made: Bullet Nova
« Reply #14 on: February 12, 2008, 09:59:18 pm »
can u make this into a zip file with the sub folders and whatnot...please?

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Ready made: Bullet Nova
« Reply #15 on: March 31, 2008, 02:48:20 pm »
So... sumthing went wrong (probably everything)
I have the deg3rag thing and after that i have:

Code: [Select]
procedure Nova(X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);
var i: integer;
begin
  for i:=0 to n do
    CreateBullet((GetPlayerStat(ID,'x') + (cos(deg2rad(360 / 50 * i))*50),(GetPlayerStat(ID,'y') + (sin(deg2rad(360 / 50 * i))*50),(cos(deg2rad(360 / 50 * i))*70),(sin(deg2rad(360 / 50 * i))*70),0,14,ID);
end;

function OnCommand(ID: Byte; Text: string): boolean;
begin
  if Text = '/Nova' then begin
    Nova;
end;

Could someone tell what went wrong?
So i want the "skill" triggered with /nova
Help?
Also Known As REIMA


Lol Happles (happy apples)

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Ready made: Bullet Nova
« Reply #16 on: March 31, 2008, 03:33:47 pm »
One thing is that you're missing an end. It helps to line out code so that begin and end's that belong together have the same indenting. It's easier to spot errors that way.

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
  if Text = '/Nova' then
  begin
    Nova(X,Y,speed,decentralize, power, ID, style, n);
  end
end;

Also for X,Y,speed,decentralize, power, ID, style, n you need to either enter values or make them variables. Read the rest of the thread to find out what kind of values these take. You need to think about these and try various things depending on what you want...
« Last Edit: March 31, 2008, 03:40:52 pm by sai`ke »
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Ready made: Bullet Nova
« Reply #17 on: April 01, 2008, 08:07:11 am »
I tried to do something but the script wont work!! >:(
I think scripting is driving me nutty... i just cant get it where is the problem.
Also Known As REIMA


Lol Happles (happy apples)

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Ready made: Bullet Nova
« Reply #18 on: April 02, 2008, 09:49:57 am »
how exactly does it "not work"? Got any error messages?

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Ready made: Bullet Nova
« Reply #19 on: April 02, 2008, 01:11:59 pm »
When i try to put up the server, it gives this error:

  • MyOwn -> [Error] (19:74): Close round expected 

    that's exactly how it doesn't work :(
Also Known As REIMA


Lol Happles (happy apples)

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Ready made: Bullet Nova
« Reply #20 on: April 02, 2008, 02:09:42 pm »
(19:74) means that there is an error in line 19.
If you open the script in notepad the first line is line 2.
'Close round expected' means you're probably missing a ')' in line 19, but it could be something else. Look closely.
Come join: EliteCTF
Listen to: My Music

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Ready made: Bullet Nova
« Reply #21 on: April 02, 2008, 06:53:36 pm »
lol try this, it is triggered with /wave, its the funniest damn thing

try it on your soldatserver

just unzip this into your scripts folder in your soldatserver directory


anyways here is what it is,
Bullet Nova
luanches grenades
launches 1000 grenades, its pretty funny, when you do /wave you get this huge KABOOM and also you get a few grenades launch off all over the place

have fun

*edit* also blows up the map ;)
« Last Edit: April 19, 2008, 05:45:20 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline trickster

  • Major(1)
  • Posts: 30
  • Dont play with bouncing grenades
Re: Ready made: Bullet Nova
« Reply #22 on: April 21, 2008, 08:44:29 pm »
were i should paste this thing i dont know if theres a script creator or something i meant that i dont know how to make this thing!

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Ready made: Bullet Nova
« Reply #23 on: April 21, 2008, 10:44:36 pm »
1. Get SoldatServer (here)
2. Make a new folder called EvilAvarax in SoldatServer/Scripts/
3. Make a file called EvilAvarax.pas (in Scripts/EvilAvarax/)
4. Copy and paste the script into EvilAvarax.pas
5. Make a file called Includes.txt (in Scripts/EvilAvarax/)
6. Write "EvilAvarax.pas" in Includes.txt

Run soldatserver.exe, open Soldat and join your server (127.0.0.1 23073)

Didn't know where your problem was, so I put it all there. Oh yes, Avarax is evil.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Ready made: Bullet Nova
« Reply #24 on: April 22, 2008, 04:33:39 pm »
use notepad for making the pas file Trickster

hope this helps
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline trickster

  • Major(1)
  • Posts: 30
  • Dont play with bouncing grenades
Re: Ready made: Bullet Nova
« Reply #25 on: April 23, 2008, 04:09:40 pm »
one more thing how i make my server stay in the lobby every day even if im not playing?

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Ready made: Bullet Nova
« Reply #26 on: April 23, 2008, 07:10:51 pm »
Don't close it...

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Ready made: Bullet Nova
« Reply #27 on: April 24, 2008, 02:51:24 pm »
I wonder... would it be possible to create a nova around other player, but the bullets still belongs to the 'creator' of the nova? 8)
Also Known As REIMA


Lol Happles (happy apples)

Offline Irlandec

  • Soldier
  • **
  • Posts: 176
Re: Ready made: Bullet Nova
« Reply #28 on: July 18, 2008, 04:42:05 am »
nopaste goes mad on me , cannot copy the script :(

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Ready made: Bullet Nova
« Reply #29 on: July 18, 2008, 05:34:02 am »
Code: [Select]
procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);
var i: integer;
    angle: single;
begin
  angle := 2*pi/n;
  for i:=0 to n do
    CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );
end;
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Ready made: Bullet Nova
« Reply #30 on: February 03, 2009, 12:44:22 am »
umm how would i change the weapon style in this code? i cant remember what i did, if anyone can figure it out can it bold it for me plz in their reply?
Code: [Select]
function Aim(const X1,Y1,X2,Y2: single) : single;
begin
  if (X2 - X1)<>0 then begin
    if X1 > X2 then
      result:= arctan((y2 - y1) / (x2 - x1)) + Pi
    else
      result:= arctan((y2 - y1) / (x2 - x1));
  end
  else begin
    if Y2 > Y1 then result:= Pi/2 + Pi/4;
    if Y2 < Y1 then result:= -Pi/2 + Pi/4;
  end;
end;

procedure Wave(X,Y,Direction,Offset,Radius,Speed,Power,RoomPerBullet,Radiation: single; Bullettype,Bulletcount,Owner: byte);
var i: integer;
    angle,centerX,centerY: single;
begin
  centerX:=X-cos(Direction)*Radius;
  centerY:=Y-sin(Direction)*Radius;
  angle := (1000 * 90) / (1000 * pi * 1);
  for i:=-1000 div 10 to 1000 div 10 + 1000 mod 2 do
    CreateBullet(centerX+cos(25+angle*i)*1+cos(25)*10,centerY+sin(Direction+angle*i)*90+sin(Direction)*1, cos(25+angle*i*1)*20, sin(25+angle*i*1)*30,80,2,Owner);
end;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
  If text = '/wave' then begin
    {Insert some Wave() calls in here. For example:}
    Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),20,35,19,100,1.9,0,14,5,ID);
    Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),30,35,19,100,1.95,0,14,5,ID);
    Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),40,35,19,100,2,0,14,5,ID);
    Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),50,35,19,100,2.05,0,14,5,ID);
    Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),60,35,19,100,2.1,0,14,5,ID);
    Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),70,35,19,100,2.15,0,14,5,ID);
    Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),80,35,19,100,2.2,0,14,5,ID);
  end;
  Result := false;
end;

been ages since ive played with my scripts

or is there a way to add a "/wave <style>" command?
« Last Edit: February 03, 2009, 12:46:53 am by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Ready made: Bullet Nova
« Reply #31 on: February 03, 2009, 06:24:50 am »
The 14 in your Wave() calls stands for the bullettype. Wrong thread btw.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Ready made: Bullet Nova
« Reply #32 on: February 03, 2009, 05:24:56 pm »
oops maybe i should have started a new thread?

wont happen again

but since i have posted here i may as well continue, can someone plz answer my last question, is there a way to add a "/wave <style>" command, or will it need to be put in a brand new script?
« Last Edit: February 03, 2009, 05:28:04 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Ready made: Bullet Nova
« Reply #33 on: February 04, 2009, 08:28:40 am »
Do you wanna make Novas ingame?
Then use this i've made it:
Code: [Select]
procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);
var
   i: integer;
   Angle: single;
begin
     Angle := 2*Pi/n;
     for i:= 0 to n do
     CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );
end;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
Var
   Temp1, Temp2, Temp3, Temp4, Temp5, Temp6, Temp7, Temp8: Variant;
   Temp0: String;
begin
     if Temp0 = '/nova' then begin
        Temp1 := GetPlayerStat(ID,'X');                   {Player X}
        Temp2 := GetPlayerStat(ID,'Y');                   {Player Y}
        Temp3 := strtofloat(GetPiece(Text, ' ', 1));      {Speed}
        Temp4 := strtofloat(GetPiece(Text, ' ', 2));      {Decentralize}
        Temp5 := strtofloat(GetPiece(Text, ' ', 3));      {Power}
        Temp6 := strtoint(GetPiece(Text, ' ', 4));        {Bullettype}
        Temp7 := strtoint(GetPiece(Text, ' ', 5));        {Number}
         if (Temp6 > 0) and (Temp6 < 16) then begin
         Nova(Temp1,Temp2,Temp3,Temp4,Temp5,ID,Temp6,Temp7);
      end;
   end;
Result := False;
end;
Command: "/nova <Speed> <Decentralize> <Power> <Bullettype> <Number>
NOT TESTET
« Last Edit: February 04, 2009, 08:30:17 am by y0uRd34th »

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Ready made: Bullet Nova
« Reply #34 on: February 04, 2009, 04:35:38 pm »
Do you wanna make Novas ingame?
Then use this i've made it:
Code: [Select]
procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);
var
   i: integer;
   Angle: single;
begin
     Angle := 2*Pi/n;
     for i:= 0 to n do
     CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );
end;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
Var
   Temp1, Temp2, Temp3, Temp4, Temp5, Temp6, Temp7, Temp8: Variant;
   Temp0: String;
begin
     if Temp0 = '/nova' then begin
        Temp1 := GetPlayerStat(ID,'X');                   {Player X}
        Temp2 := GetPlayerStat(ID,'Y');                   {Player Y}
        Temp3 := strtofloat(GetPiece(Text, ' ', 1));      {Speed}
        Temp4 := strtofloat(GetPiece(Text, ' ', 2));      {Decentralize}
        Temp5 := strtofloat(GetPiece(Text, ' ', 3));      {Power}
        Temp6 := strtoint(GetPiece(Text, ' ', 4));        {Bullettype}
        Temp7 := strtoint(GetPiece(Text, ' ', 5));        {Number}
         if (Temp6 > 0) and (Temp6 < 16) then begin
         Nova(Temp1,Temp2,Temp3,Temp4,Temp5,ID,Temp6,Temp7);
      end;
   end;
Result := False;
end;
Command: "/nova <Speed> <Decentralize> <Power> <Bullettype> <Number>
NOT TESTET

just tested it, doesnt work

can u plz fix it?

command tried: /nova 10 5 10 4 5
« Last Edit: February 04, 2009, 04:39:11 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Ready made: Bullet Nova
« Reply #35 on: February 05, 2009, 01:49:46 pm »
This will work:
Code: [Select]
procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);
var
   i: integer;
   Angle: single;
begin
     Angle := 2*Pi/n;
     for i:= 0 to n do
     CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );
end;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
Var
   Temp1, Temp2, Temp3, Temp4, Temp5, Temp6, Temp7, Temp8: Variant;
   Temp0: String;
begin
        Temp0 := GetPiece(LowerCase(Text),' ',0);
     if Temp0 = '/nova' then begin
        Temp1 := GetPlayerStat(ID,'X');                   {Player X}
        Temp2 := GetPlayerStat(ID,'Y');                   {Player Y}
        Temp3 := strtofloat(GetPiece(Text, ' ', 1));      {Speed}
        Temp4 := strtofloat(GetPiece(Text, ' ', 2));      {Decentralize}
        Temp5 := strtofloat(GetPiece(Text, ' ', 3));      {Power}
        Temp6 := strtoint(GetPiece(Text, ' ', 4));        {Bullettype}
        Temp7 := strtoint(GetPiece(Text, ' ', 5));        {Number}
         if (Temp6 > 0) and (Temp6 < 16) then begin
         Nova(Temp1,Temp2,Temp3,Temp4,Temp5,ID,Temp6,Temp7);
      end;
   end;
Result := False;
end;
I forgot a little thing  ::)

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Ready made: Bullet Nova
« Reply #36 on: February 05, 2009, 02:49:38 pm »
it works, thanks for the fix :D

would it be possible to add in an ID to the command so the admin can "force" a nova on another player or bot? lol

for example:
/nova (the usual parts) <ID>

if ID id blank then the nova is done on self

please? ill be forever grateful :D
« Last Edit: February 05, 2009, 02:58:06 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Ready made: Bullet Nova
« Reply #37 on: February 06, 2009, 08:03:56 am »
Yes, but with the "SelfAim", i don't know, I'll show...