Author Topic: Script Core Suggestions  (Read 72244 times)

0 Members and 1 Guest are viewing this topic.

Offline LORD KILLA

  • Camper
  • ***
  • Posts: 254
  • Happie
Re: Script Core Suggestions
« Reply #120 on: May 01, 2009, 06:10:31 am »
new Events/Functions:
Code: [Select]
Function OnPlayerShoot (ID, Weapon: Byte): Boolean;
begin
  Result := false; // false: Discard bullet (dont create it), true: Create it
end;

Function GetCursorPosition (ID: Byte; X: Boolean): Single;
begin
  if X = true then Result := {get cursor position code here(X)} else Result := {get cursor position code here(Y)};
end;

Offline ]{ing

  • Major(1)
  • Posts: 17
Re: Script Core Suggestions
« Reply #121 on: May 02, 2009, 12:17:07 am »
I vote for OnPlayerShoot, would make my accuracy script allot cleaner.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #122 on: May 03, 2009, 06:51:33 pm »
having shell_exec changed so it is not limited to 8 characters doesn't ruin case sensitivity (it does everything in caps at least in windows) <- required for a script I want to do..

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #123 on: May 05, 2009, 08:29:07 pm »
function SocketReceivedLength(Index: integer): integer;
function ReadSocket(Index, Length: integer): string; // reads the next Length characters... if longer than whats ready, it waits for it? or throws an exception.. or just returns what it gets..
« Last Edit: May 05, 2009, 08:30:44 pm by DorkeyDear »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #124 on: May 06, 2009, 03:09:51 pm »
function ExceptionProcName(ExProc: cardinal): string;
ExProc is the value returned by ExceptionProc: cardinal;


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #125 on: May 07, 2009, 05:30:40 am »
function FunctionExists(Script, FuncName: string): boolean;

and just an idea i just came up with, would make some things easier, but not necessarily necessary
function GetFunction(Script, FuncName: string): TFunc; // or if TVarType supports it... but i doubted it
function InvokeFunction(Func: TFunc): variant;
can be used for other things like RenameFunction <- not sure what the real use of it would be tho :P


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #126 on: May 08, 2009, 06:48:51 pm »
CreatePackage / UsePackage - allowing temporary modification of objects and possibly images such as boxes and flags and such. can come out to be kick-ass server mods :D

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #127 on: May 11, 2009, 07:22:03 pm »
procedure Write(const Text: string);
procedure WriteAt(const X, Y: integer; const Text: string);
(console functions)
« Last Edit: May 13, 2009, 08:27:07 pm by DorkeyDear »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #128 on: May 18, 2009, 07:00:32 pm »
I believe you mentioned something about a Time function, but howabout a DateTime function?
Also ability to minipulate the return values of either into a string functions.

Possibly:
DateTimeTotalMinutes(Time: cardinal): cardinal;
DateTimeMinutes(Time: cardinal): cardinal;
DateTimeTotalHours(Time: cardinal): cardinal;
etc.. Something similar to .NET's TimeSpan class' methods: DateTime[Total](Days|Hours|Minutes|Seconds|Ticks|Milliseconds) whereas [] is optional and (a|b|c) are ors.

EDIT:
parameter is specified time (FormatDate does not have this ability); would probably be better if you did something similar to FormatDate but with a time parameter (new function)
FormatDateTime(Time: cardinal, Format: string): string;
« Last Edit: May 23, 2009, 10:32:40 am by DorkeyDear »

Offline LORD KILLA

  • Camper
  • ***
  • Posts: 254
  • Happie
Re: Script Core Suggestions
« Reply #129 on: May 23, 2009, 06:00:03 am »
function FormatDate(): string;
>_<, we have already gotta that, look in eC help .-.

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Script Core Suggestions
« Reply #130 on: June 02, 2009, 07:06:30 pm »
Instead of having lots of things like MovePlayer, ForceWeapon and SetScore, why not just have:
SetPlayerStat(ID: byte, Stat: string, Value: variant)
Of course it wouldn't work for things like IP and Name (possibly could create a temp name).

I'd also like SetPlayerVelocity(ID: byte, VelX, VelY: Single)

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Script Core Suggestions
« Reply #131 on: June 02, 2009, 11:31:38 pm »
Quote
I'd also like SetPlayerVelocity(ID: byte, VelX, VelY: Single)
SetPlayerStat(ID, 'VelX', x)

Offline Bloo

  • Soldier
  • **
  • Posts: 105
  • Yellow
    • BlueMutiny.com
Re: Script Core Suggestions
« Reply #132 on: June 03, 2009, 12:25:52 am »
It's undoubtably been suggested before, but an IsAdmin() function is more-than-needed.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Script Core Suggestions
« Reply #133 on: June 03, 2009, 07:48:04 am »
Why not just add 'admin' to GetPlayerStat?

Offline Bloo

  • Soldier
  • **
  • Posts: 105
  • Yellow
    • BlueMutiny.com
Re: Script Core Suggestions
« Reply #134 on: June 03, 2009, 07:49:39 am »
Even better.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #135 on: June 10, 2009, 11:13:44 pm »
functions relating to weapon mods (current mod; current mod filename; mod name at least?)

current mapslist filename; ability to get the mapslist (one map at a time if you can't?)? (i believe there is/was a command to modify it, but not modify the file?)

function GetMapsList(): array of string;
var MapslistFilename: string;

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #136 on: June 11, 2009, 12:31:45 am »
Something that acts similar to the way cookies act on websites. Temporary (or permenant data) stored client-side that can be retrieved by the server whenever, and only by that server.

i see no reason why not to still call them cookies.

procedure SetCookie(Name, Value: string);
function GetCookie(Name: string): string;
procedure DeleteCookie(Name: string);
function CookieList(): array of string; // list of cookie names

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #137 on: June 18, 2009, 03:59:34 pm »
Having ReadLnSocket either return '' or throw an exception once the socket becomes disconnected. Please and thank you.

A function SocketReady(const Index: integer): boolean; or something which checks whether ReadLnSocket is ready to retrieve some text or not. (So you don't have ReadLnSocket waiting if you don't want it to)
« Last Edit: June 18, 2009, 04:39:03 pm by DorkeyDear »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Script Core Suggestions
« Reply #138 on: June 21, 2009, 09:15:42 am »
ServerModifier('Resistance',x) - modifies air resistance.

> 0 - speed is deacreasing(very high value will unable any bullet/player to move)
= 0 - speed doesn't change(awesome with gravity set to 0)
< 0 - speed is increasing(100% fun  ;D)

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Script Core Suggestions
« Reply #139 on: June 26, 2009, 03:34:40 pm »
GetPlayerStat(ID, 'registered')