Author Topic: Script Core Suggestions  (Read 71857 times)

0 Members and 1 Guest are viewing this topic.

Offline jezza

  • Major(1)
  • Posts: 9
    • Thermal* community of stick-online
Re: Script Core 2.6.4 Suggestions
« Reply #100 on: December 02, 2008, 09:24:07 pm »
Good to see an upcoming release! About the gravity i think there should be a parameter in it allowing you to change a certain players gravity and/or the entire server. Now for my own idea, maybe something like GetPlayerMouse(ID) would check to see at what coordinates on the map or relative to the player, the players mouse is, this would open up so many boundaries and help with many scripts, maybe

GetPlayerMouse(ID,'Absolute');
or
GetPlayerMouse(ID,'Relative');
thanks for considertation.


Modifcation: And also maybe would it be possible to have more than one DrawTexts up at a time without it overwriting?


Modification: Also a WriteINI(blablabla) function would be very useful, i suggest that. There are some WriteINI custom functions already out there but they are very laggy to the servers.
« Last Edit: December 02, 2008, 09:44:34 pm by jezza »

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Script Core 2.6.4 Suggestions
« Reply #101 on: December 04, 2008, 11:10:47 pm »
It would be nice if the scriptcore gave a bit more information about any errors, like what things are causing the problem. And at the same time you could fix up the problem that when it says where the error occured, it is always a couple of lines ahead and makes it a pain in the ass to fix.

Thank you.
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core 2.6.4 Suggestions
« Reply #102 on: December 12, 2008, 06:27:53 am »
having CrossFunc (and possibly ThreadFunc if you want) to work on built-in functions so we don't have to redefine them with a different name.
For instance.. CrossFunc(['test'], ScriptName + '.WriteLn');

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Script Core 2.6.4 Suggestions
« Reply #103 on: December 22, 2008, 04:35:26 am »
Bugfix/suggestion:
Make Round(0.5) return 1 instead of 0. Same with Round(0.45) and such.

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Script Core 2.6.4 Suggestions
« Reply #104 on: January 17, 2009, 12:28:47 am »
Could you make the numbers for guns and objects consistent throughout functions please?

As in setweaponactive and forceweapon use different numbers for each gun. It's kinda annoying.
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core 2.6.4 Suggestions
« Reply #105 on: January 17, 2009, 02:43:12 pm »
(more of a server suggestion but relates to scripting)
When starting up the server with scripting enabled, but 0 scripts found and no Includes.txt found in the old format, preventing the errors..

Offline cynicle

  • Major(1)
  • Posts: 37
Re: Script Core 2.6.4 Suggestions
« Reply #106 on: January 25, 2009, 03:51:45 am »
A simple one. modification to add more options to setscore procedure.

procedure SetScore(ID: Byte; Type, Value: Integer);

Where Type could be:
1 = Score
2 = Kills
3 = Deaths

or optionally Type could be a string.
Join the Army. Visit strange and exotic places. Meet fascinating people. And kill them.

Aus Soldat League 203.208.70.216:23073

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Script Core 2.6.4 Suggestions
« Reply #107 on: January 28, 2009, 11:33:35 am »
ln and exp function.
« Last Edit: March 26, 2009, 01:32:59 pm by tk »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core 2.6.4 Suggestions
« Reply #108 on: January 28, 2009, 11:58:24 am »
or possibly even a Log function; whatever u name it Ln & Log or Log and Log10
« Last Edit: February 10, 2009, 04:02:17 pm by DorkeyDear »

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Script Core 2.6.4 Suggestions
« Reply #109 on: February 10, 2009, 09:01:58 am »
function FormatGMTDate(FormatString: string; offset: integer): String

similar to FormatDate, but returns the GMT+offset time instead of local server time. Useful for keeping logs on multiple servers synchronized.

Or/and, if possible:
function UnixTimestamp(): integer
function FormatTimestampDate(FormatString: string; timestamp: integer): String

Offline deguix

  • Major
  • *
  • Posts: 79
Re: Script Core 2.6.4 Suggestions
« Reply #110 on: March 07, 2009, 09:02:34 am »
My project consists on customized weapon swaps, so I suggest the following:
- Remove the initial onweaponchange call when the player joins the server... it gives invalid weapon ids.
- Make onweaponchange to be called only when the weapon change is complete like on the flamer god bonus (flamer, oldprimary; oldprimary, oldprimary; flamer, oldprimary) - make it directly flamer, oldprimary. (although possible to pass by).
- Either make a OnBulletChange procedure/function (which would be called whenever a bullet is shot), or fix GetPlayerStat(ID, "ammo") to correctly get the current weapon ammo inside onweaponchange (latter is easier).
- procedure OnWeaponSelEnd(ID, primary, secondary:byte); - procedure to be called when the weapon selection ends on the weapon menu.
- unlock forceweaponing rambo bow and add options to soldat.ini for Weapon_14 and Weapon_15 and make "Disable_AntiCheat_Kick" to work on them too - then there wouldn't be anymore unnecessary rambo kicks if a script uses the bow. But, make sure it's considered a normal weapon on game modes that are not rambo mode, and make sure the forceweaponing of bow on RM servers is locked.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core 2.6.4 Suggestions
« Reply #111 on: March 11, 2009, 07:13:08 pm »
GetURLTimeout: cardinal; // in millisecs
or function GetGetURLTimout(): cardinal; procedure SetGetURLTimeout(const Amount: cardinal);

events rather then GetKeyState or wahtever function it is called
« Last Edit: March 11, 2009, 07:25:58 pm by DorkeyDear »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core 2.6.4 Suggestions
« Reply #112 on: March 21, 2009, 02:48:45 pm »
Binary writing and reading..
function fOpen(filename: string): integer; (returns index to a built-in array of handlers)
procedure fClose(handle: integer);
procedure BinaryWrite<type>(handle: integer; data: <type>); (example BinaryWriteByte(handle: integer; data: byte); BinaryWriteString(handle: integer; data: string) would write an int or something for length of string, and then each char of the array)
function BinaryRead<type>(handle: integer): <type>; (example BinaryReadString(handle: integer): string;
procedure ReadAll(handle: integer): string;
procedure Write(handle: integer; options: integer); (options is to make it either clear everything and start from beginning, or start at end, or whatever; probably better word than options tho (or instead have different functions, either way works))
whereas <type> are all basic types..

would make life a lot more fun with binary reading and writing..

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Script Core 2.6.4 Suggestions
« Reply #113 on: March 27, 2009, 08:06:53 am »
AppOnIdle_interval=x option in server.ini
To set how ofter that procedure is called (if its not more complex than adding two lines of code of course <.<) This could give some room for experimenting for those who have extra resources.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core 2.6.4 Suggestions
« Reply #114 on: April 10, 2009, 02:55:36 pm »
event: procedure DeactivateServer(); called right before a "/recompile" "/recompile <script>" of same script, server closing down (ctrl+c / Shutdown() or whatever) in order to close sockets, clean stuff up before shutdown, etc.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core 2.6.4 Suggestions
« Reply #115 on: April 12, 2009, 03:05:46 pm »
global var BattlEyeEnabled: boolean; (or integer 1/0)

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Script Core 2.6.4 Suggestions
« Reply #116 on: April 18, 2009, 09:02:53 am »
Fix transparent DrawText's. When text fades it flashes and does other unwanted things.

Offline ]{ing

  • Major(1)
  • Posts: 17
Re: Script Core 2.6.4 Suggestions
« Reply #117 on: April 23, 2009, 10:50:59 pm »
Could you please add 'OnWeaponReload' function ... or make OnWeaponChange be called on a reload. Either one of these would be tremendous!

Offline Bloo

  • Soldier
  • **
  • Posts: 105
  • Yellow
    • BlueMutiny.com
Re: Script Core 2.6.4 Suggestions
« Reply #118 on: April 27, 2009, 07:35:06 am »
OnPlayerRespawn shouldn't act on OnMapChange.

Offline NTxC

  • Major(1)
  • Posts: 34
  • Scripter
Re: Script Core Suggestions
« Reply #119 on: April 29, 2009, 09:25:42 am »
Well, I guess it would be great if Command( Cmd: string ); would call OnCommand too!  ::)
:[ NT-Online Server Mod Coming Up! ]:
________________________________
Featuring:
- Admin System with dynamic ranks and privileges...
- Duel System...
- Reward System - earn rewards for your frags...
- CVARs - configuration variables - to make the server administering easier...

... and more! Coming soon!