Author Topic: Scripting Suggestions  (Read 16044 times)

0 Members and 3 Guests are viewing this topic.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Scripting Suggestions
« on: April 13, 2010, 01:17:14 pm »
Ok, I've decided to make this topic since eC doesn't watch the old Scripting Core Suggestions thread anymore...

Things you should check before you post a suggestion:
  • Check if it has been suggested already.
  • Think about your suggestion twice before you post it.
  • If the proc./func. doesn't explain itself add an description of it.


Implemented stuff through this topic

  • Nothing.


Suggestions

  • function WriteINI(FileName, Section, Key: string): boolean;
  • function Power(Base, Exponent: double): double;
  • function GetBotStat(ID: byte; Stat: string): variant; [Click! for more info]
  • function ReadBinaryFile(const Filename: string): string; [Click! for more info]
  • Add Jet fuel, grenades, vest values to SetPlayerStat();
  • Allow to use all bulletstyles with CreateBullet();
  • Make OnPlayerSpeak(); return a boolean [Click! for more info]
  • Make plain bullets visible no matter which weapon players hold
  • procedure CreateDirectory/CreateFolder(const Path: string);
  • procedure CreateFile(const Path: string);
  • -> I guess they could be combined. Note that CreateFile is already possible via WriteFileing an empty string.
  • function ReadAccess(const Path: string): boolean;
  • -> returns whether or not I have read access to the file
  • function WriteAccess(const Path: string): boolean;
  • -> returns whether or not I have write access to the file
  • function ExecuteAccess(const Path: string): boolean;
  • ->returns whether or not I have execution access to the file
  • ->this probably will rarely if ever be used, but could possibly be used with shellexec.



    This stuff will never implemented

  • There will be no procedure which triggers whenever a player shoots.
  • There will be no event which triggers each tick or millisecond or too often in general.
  • There will be no function(s) which allow to get info or modify waypoints.
« Last Edit: June 21, 2010, 02:09:53 pm by Swompie »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Scripting Suggestions
« Reply #1 on: April 13, 2010, 02:52:34 pm »
  • procedure OnPlayerShoot(Shooter, Bulletstyle: byte);
  • procedure OnTick(Ticks: integer);
Those will not be implemented. OnShoot would be called too many times(imagine 32 players shooting minigun, instant crash), OnTick too I think.

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Scripting Suggestions
« Reply #2 on: April 13, 2010, 04:32:57 pm »
function GetWaypointStat(ID: byte; Stat: string): Variant;
procedure SetWaypointStat(ID: byte; Stat: string;Value: Variant);

This would add another dimension to customizability (zombie RPG scripts for example :P)


function GetBotStat(ID: byte; Stat: string): Variant;
target: byte // current target id of aggression, 0 for idle
waypoint: byte // current waypoint bot is following
string: friend // the friend name
state: byte // bot state 0 = idle/following waypoints, 1 = attacking, 2 = attacking flagger, 3 = fleeing with flag, ect

procedure SetWaypointStat(ID: byte; Stat: string;Value: Variant);
all of the things above

More to come.


Offline mich1103

  • Flagrunner
  • ****
  • Posts: 558
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: Scripting Suggestions
« Reply #3 on: April 13, 2010, 04:40:33 pm »
OnKnifeThrow
(If you dont want knife throwing in your server you KillObjects (kill the knife in air))

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Scripting Suggestions
« Reply #4 on: April 13, 2010, 05:33:50 pm »
OnWeaponChange already does this.


Offline Stuffy

  • Soldier
  • **
  • Posts: 182
  • Very stuffy.
    • Climb-Zone Forum
Re: Scripting Suggestions
« Reply #5 on: April 14, 2010, 05:27:13 am »
pow() or power() function, at the moment you have to do stupid loops.
The truth is out there? Does anyone know the URL?
The URL is here

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Scripting Suggestions
« Reply #6 on: April 15, 2010, 01:03:59 pm »
Updated :O

Yeah, I think alot of other math functions should be implemented too.

One question Hacktank, why would you want to modify the waypoints?
GetBotStat is actually something nice & new, I like it!



edit
What you guys think about bows back to all gamemodes?

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Scripting Suggestions
« Reply #7 on: April 15, 2010, 02:07:56 pm »
OnKnifeThrow
(If you dont want knife throwing in your server you KillObjects (kill the knife in air))
Flying knife is a bullet not object.

Oh, GetBulletStat(),KillBullet() etc :D

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Scripting Suggestions
« Reply #8 on: April 15, 2010, 02:10:47 pm »

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: Scripting Suggestions
« Reply #9 on: April 15, 2010, 02:13:40 pm »
Swompie slaps Gizd with a huge Scripting Manual
Style #25..
the knife is a bullet until it collides with something. Then it becomes an object (hence it can't deal damage any more and you can pick it up)

On a side note, this thread is turning into a mess of a discussion already <.< Not good

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Scripting Suggestions
« Reply #10 on: April 15, 2010, 02:36:04 pm »
Well, dnmr, what have you expected...

Offline SpiltCoffee

  • Veteran
  • *****
  • Posts: 1579
  • Spilt, not Split!
    • SpiltCoffee's Site
Re: Scripting Suggestions
« Reply #11 on: April 16, 2010, 03:23:59 am »
The thread might be messy, but Swompie is taking note of all the suggested additions to the ScriptCore, so it's all good.

I reckon, if you're gonna recommend SetPlayerStat have a vest value, also recommend that GetPlayerStat to have a vest value. :D
When life hands you High Fructose Corn Syrup, Citric Acid, Ascorbic Acid, Maltodextrin, Sodium Acid Pyrophosphate,
Magnesium Oxide, Calcium Fumarate, Yellow 5, Tocopherol and Less Than 2% Natural Flavour... make Lemonade!

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Scripting Suggestions
« Reply #12 on: April 16, 2010, 08:57:33 am »
also recommend that GetPlayerStat to have a vest value. :D
It does -.-

Offline SpiltCoffee

  • Veteran
  • *****
  • Posts: 1579
  • Spilt, not Split!
    • SpiltCoffee's Site
Re: Scripting Suggestions
« Reply #13 on: April 16, 2010, 09:03:43 am »
« Last Edit: April 16, 2010, 10:55:53 pm by SpiltCoffee »
When life hands you High Fructose Corn Syrup, Citric Acid, Ascorbic Acid, Maltodextrin, Sodium Acid Pyrophosphate,
Magnesium Oxide, Calcium Fumarate, Yellow 5, Tocopherol and Less Than 2% Natural Flavour... make Lemonade!

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Scripting Suggestions
« Reply #14 on: April 16, 2010, 09:04:21 am »
Swompie slaps Gizd with a huge Scripting Manual
Style #25..
the knife is a bullet until it collides with something. Then it becomes an object (hence it can't deal damage any more and you can pick it up)

On a side note, this thread is turning into a mess of a discussion already <.< Not good
I still can learn things..  :-X

Anyway, less discussing and more suggestions are appreciated.

Edit
This manual ftw.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Suggestions
« Reply #15 on: April 16, 2010, 10:14:31 am »
function ReadDataFile(Filename: string): string;
Same exact thing as ReadFile, except doesn't "quit" reading after that one character that makes it stop reading :P (I forget what exactly it is right now).

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Scripting Suggestions
« Reply #16 on: April 16, 2010, 10:38:09 am »
Quote
pow() or power() function, at the moment you have to do stupid loops.
http://forums.soldat.pl/index.php?topic=33387.0
Both scripted and built in functions have to do stupid loops.
« Last Edit: April 16, 2010, 10:42:53 am by tk »

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Scripting Suggestions
« Reply #17 on: April 16, 2010, 11:15:45 am »
But if it was implemented we hadn't to dig through all the scripts and then copy&paste it into our script. :P

Offline Stuffy

  • Soldier
  • **
  • Posts: 182
  • Very stuffy.
    • Climb-Zone Forum
Re: Scripting Suggestions
« Reply #18 on: April 16, 2010, 01:29:36 pm »
tk, I love you!
The truth is out there? Does anyone know the URL?
The URL is here

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Scripting Suggestions
« Reply #19 on: April 20, 2010, 11:31:59 am »
Anyone else than me wants plain bullets spawned through CreateBullet() visible to anyone no matter which weapon he carries?