0 Members and 1 Guest are viewing this topic.

Quote from: miketh2005 on July 10, 2009, 07:31:20 pmDonate to enesceHAHAHAHAHAHAHA

Donate to enesce

How about Gun Game?

type TVars = record x: Double; y: Double; a: Double; b: Double; c: Double; n: Double; t: Double; d: Double; e: Double; f: Double;end; var vars: TVars; lv: integer; i: integer;const pi = 3.14159265358979; function power(base: double; exp: integer): double;var i: byte;begin result := 1; if exp = 0 then exit; for i := 1 to round(abs(exp)) do result := result * base; if exp < 0 then result := 1 / result;end;function root(base: double; exp: integer): double;var x: double; neg_exp: boolean;begin if base < 0 then if exp mod 2 = 0 then exit; if exp < 0 then begin neg_exp := true; exp := -exp; end; result := 1; repeat x := result; result := (result * (exp - 1) + base / power(result, exp - 1)) / exp; until abs(x-result) < 0.0000000001; if neg_exp then result := 1 / result;end;function formula (s: string): Double; // '1+1'var buff: array[0..10] of Double; num: string; inum: Double; iinum: Double; nnum: Double; pos: integer; eofn: boolean; eofn1: boolean; st: string; summ: double;begin num := ''; lv := 0; for i := 1 to 10 do buff[i] := 0; sum := 0; for i := 1 to length(s) do begin if (s[i]='1')or(s[i]='2')or(s[i]='3')or(s[i]='4')or(s[i]='5')or(s[i]='6')or(s[i]='7')or(s[i]='8')or(s[i]='9')or(s[i]='0')or(s[i]='.') then begin num := num + s[i]; eofn1 := false; WriteLn(num); end else begin inum := strtofloat(num); num := ''; eofn1 := true; end;{ if ((s[i]='1')or(s[i]='2')or(s[i]='3')or(s[i]='4')or(s[i]='5')or(s[i]='6')or(s[i]='7')or(s[i]='8')or(s[i]='9')or(s[i]='0')or(s[i]='.')) and (eofn1) then begin num := num + s[i]; eofn := false; end else begin inum := strtofloat(num); num := ''; eofn := true; eofn2 := true; end; } if eofn1 then begin if s[i] = '(' then lv := lv + 1; if s[i] = ')' then lv := lv - 1; if s[i] = '+' then st := '+'; if s[i] = '-' then st := '-'; if s[i] = '*' then st := '*'; if s[i] = '/' then st := '/'; if s[i] = '^' then st := '^'; // 2^3 = 2³ if s[i] = 'v' then st := 'v'; // root end; if eofn then begin if st = '+' then begin //summ := summ + inum; Result := summ + inum; end; if st = '-' then begin summ := summ - inum; end; if st = '*' then begin summ := summ * inum; end; if st = '/' then begin summ := summ / inum; end; if st = '^' then begin summ := power(summ, inum); end; if st = 'v' then begin summ := root(summ, inum); end; end; end; Result := buff[0];end;function onplayercommand(id:byte; text: string): boolean;begin if getpiece(text, ' ', 0) = '/f' then begin WriteConsole(id, floattostr(formula(copy(text, 4, length(text)))), $EEFF00FF); end;end;

Explain please?

Quote from: ~Niko~ on June 18, 2009, 08:46:58 amExplain please?Every player starts with Pistol. They have to get certain kills to get to the next level (gun). If someone knife someone, the person who knifed automatic go to the next level and the person who got knifed lose a level.

Quote from: koolazngy94 on June 18, 2009, 03:50:19 pmQuote from: ~Niko~ on June 18, 2009, 08:46:58 amExplain please?Every player starts with Pistol. They have to get certain kills to get to the next level (gun). If someone knife someone, the person who knifed automatic go to the next level and the person who got knifed lose a level.Pretty likely to advance mode, but it's quite different.I'll give it a try.

Nah, niko.try to make it maybe with accounts. levels are saved and you get more damage incrase with a higher level ^^