Author Topic: Script Core Suggestions  (Read 85689 times)

0 Members and 4 Guests are viewing this topic.

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Script Core Suggestions
« Reply #140 on: June 27, 2009, 02:57:36 am »
Pointers

Offline Prodigyx

  • Soldier
  • **
  • Posts: 188
    • SoldatX Brasil
Re: Script Core Suggestions
« Reply #141 on: June 30, 2009, 01:13:58 am »
Basic file management functions: CopyFile, MoveFile, DeleteFile...

and search file functions: FindFirst/FindNext Delphi like, using mask *.txt, *.*, etc
SoldatX - SX Brasil - www.soldatx.com

Offline SpiltCoffee

  • Veteran
  • *****
  • Posts: 1579
  • Spilt, not Split!
    • SpiltCoffee's Site
Re: Script Core Suggestions
« Reply #142 on: July 02, 2009, 12:32:16 am »
GetPlayerStat(ID,'admin')
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 Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Script Core Suggestions
« Reply #143 on: July 04, 2009, 05:34:51 pm »
KeyPress EVENT PLEASE!!!
KAWAAAAAAAIIIIIIIIII

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Script Core Suggestions
« Reply #144 on: July 05, 2009, 02:53:17 am »
Quote
function GetKeyPress(ID: byte; Key: string):boolean

Parameter Info:
  ID (Byte): Player ID to get the key press of.
  Key (String): See Description for more information.

Description:
This function will return true/false if a player is holding down the specified key.

Key              Result
Left               Left key
Right             Right key
Up                Jump/Up Key
Down            Crouch/Down key
Shoot            Attack button
Jetpack         Jetpack button
Grenade        Grenade button
Changewep   Change weapon button
Throw           Throw Weapon button
Reload          Reload Button
Crouch          Crouch/Down key
Prone            Prone key (will stay TRUE while proned)

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Script Core Suggestions
« Reply #145 on: July 07, 2009, 05:07:33 pm »
Quote
function GetKeyPress(ID: byte; Key: string):boolean

Parameter Info:
  ID (Byte): Player ID to get the key press of.
  Key (String): See Description for more information.

Description:
This function will return true/false if a player is holding down the specified key.

Key              Result
Left               Left key
Right             Right key
Up                Jump/Up Key
Down            Crouch/Down key
Shoot            Attack button
Jetpack         Jetpack button
Grenade        Grenade button
Changewep   Change weapon button
Throw           Throw Weapon button
Reload          Reload Button
Crouch          Crouch/Down key
Prone            Prone key (will stay TRUE while proned)
It's not an event.
KAWAAAAAAAIIIIIIIIII

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Script Core Suggestions
« Reply #146 on: July 07, 2009, 05:33:23 pm »
AppOnIdle to be called each tick, and the beginning with "if GetKeyPress..."
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Script Core Suggestions
« Reply #147 on: July 08, 2009, 10:15:46 am »
It's not an event.

Do you mean with event, that it is called like OnPlayerKill, etc.?
Event > something will be called if you do sth. specific? Am I right? :P
When yes, it would awesome ;)
« Last Edit: July 08, 2009, 10:18:41 am by y0uRd34th »

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Script Core Suggestions
« Reply #148 on: July 08, 2009, 04:09:48 pm »
KAWAAAAAAAIIIIIIIIII

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Script Core Suggestions
« Reply #149 on: July 10, 2009, 07:03:42 am »
kk, :D I wasn't sure what a event is in soldat :O not the best in english, lalala^^

Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: Script Core Suggestions
« Reply #150 on: July 11, 2009, 12:07:03 am »
Quote
function GetKeyPress(ID: byte; Key: string):boolean

Parameter Info:
  ID (Byte): Player ID to get the key press of.
  Key (String): See Description for more information.

Description:
This function will return true/false if a player is holding down the specified key.

Key              Result
Left               Left key
Right             Right key
Up                Jump/Up Key
Down            Crouch/Down key
Shoot            Attack button
Jetpack         Jetpack button
Grenade        Grenade button
Changewep   Change weapon button
Throw           Throw Weapon button
Reload          Reload Button
Crouch          Crouch/Down key
Prone            Prone key (will stay TRUE while proned)
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Script Core Suggestions
« Reply #151 on: July 11, 2009, 07:00:42 am »
To be able to specify in OnWeaponChange how did the weapon got changed, if it was picked up, changed at wep menu, thrown or changed to secondary.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script Core Suggestions
« Reply #152 on: July 13, 2009, 03:38:17 pm »
Ability to only allow CrossFunc to access certain functions from specific scripts using scripting somehow.
(I have a script w/ functions i do not want to be able to be called except by this one other script)
« Last Edit: July 13, 2009, 08:17:50 pm by DorkeyDear »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Script Core Suggestions
« Reply #153 on: July 13, 2009, 03:42:31 pm »
Ability to only allow CrossFunc to access certain functions from specific scripts using scripting somehow.
It's not possible?

Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: Script Core Suggestions
« Reply #154 on: July 13, 2009, 04:24:12 pm »
Ability to change a scenery depending on what the player does. Like /open opens a gate. This would require modifying map format, but it's worth it! Think of the possibilities! Soldat would be the best game ever made, if this was implemented.
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Script Core Suggestions
« Reply #155 on: July 13, 2009, 05:21:26 pm »
AppOnIdle being called each determinate number of ticks you can specify for each function you put in, not soldat.ini based, but script-based.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Script Core Suggestions
« Reply #156 on: July 14, 2009, 12:54:49 am »
Not each specified number but each second, and if you use mod() function you can set it like mod(ticks) BUT the ticks musst be = xy*60.

There should be an procedure that would call something every xy ticks.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Script Core Suggestions
« Reply #157 on: July 14, 2009, 03:14:23 am »
Not each specified number but each second, and if you use mod() function you can set it like mod(ticks) BUT the ticks musst be = xy*60.

There should be an procedure that would call something every xy ticks.
Enesce said in his blog that calling a procedure too much is causing access violations...
That's why he is not going to add OnFire :S
Still I don't get how calling a procedure could cause an access violation O_o
KAWAAAAAAAIIIIIIIIII

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Script Core Suggestions
« Reply #158 on: July 14, 2009, 05:08:16 am »
Ill describe it to you this way:
Make a script like this

Code: [Select]
AppOnIdle(Ticks: integer);

var
i: integer;

begin
for i := 1 to 32
if GetPlayerStat(i, primary) = 1 then
   repeat
   if GetPlayerStat(i, ammo) = 0 then WriteConsole(i,'LOL, NO BULLETS',$EE81FAA1);
   until GetPlayerStat(i, ammo) > 0
end;

Enjoy it.

Not a access violation though, but it is the same effect.
« Last Edit: July 14, 2009, 05:10:16 am by croat1gamer »
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Script Core Suggestions
« Reply #159 on: July 15, 2009, 02:30:16 am »
Ill describe it to you this way:
Make a script like this

Code: [Select]
AppOnIdle(Ticks: integer);

var
i: integer;

begin
for i := 1 to 32
if GetPlayerStat(i, primary) = 1 then
   repeat
   if GetPlayerStat(i, ammo) = 0 then WriteConsole(i,'LOL, NO BULLETS',$EE81FAA1);
   until GetPlayerStat(i, ammo) > 0
end;

Enjoy it.

Not a access violation though, but it is the same effect.
Server will freeze... Or AppOnIdle is called in another thread?
KAWAAAAAAAIIIIIIIIII