Author Topic: Scripting Engine Suggestions  (Read 23669 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #40 on: September 06, 2007, 04:11:33 pm »
Is a health pack considered a bonus? If so, I would add it to GiveBonus sense it does two things DoDamage does differently, which is that it doesn't modify vest amount, nor doesn't call OnPlayerDamage.

In addition to Avarax's SetPlayerStat post, Primary and Secondary weapon. Already can be done with ForceWeapon, but those would feel left out if Secondary Ammo, and Ammo are included. :P (like IDtoName being replaced with GetPlayerStat(ID,'Name') and same thing with ID and IP)

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Scripting Engine Suggestions
« Reply #41 on: September 06, 2007, 05:25:42 pm »
Stop with the Set*Stat functions. They can't be added. SetSpawnStat was only added because spawn points are 100% server side, objects and players aren't.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Scripting Engine Suggestions
« Reply #42 on: September 07, 2007, 06:35:04 am »
I understand that ;Q

On a side note:
random() still doesn't seem to be fixed, people still get massive critical strikes all the time (around 6-7 in a row which has a chance of like 0.01% to happen) on the [eC] Hexer server.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Scripting Engine Suggestions
« Reply #43 on: September 07, 2007, 09:20:00 pm »
Respawn(ID: byte) ...

function Respawn(ID, SID: Byte; Health, Delay: integer);

to set which spawn point to spawn at, amount of health left, and wait time to respawn (temporary, won't change server's respawn time)
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."


Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Scripting Engine Suggestions
« Reply #45 on: September 07, 2007, 09:44:14 pm »
I don't want to promote disabling the anti-hack.

procedure DisableWepKick(ID, Wep: Byte; Disable: boolean);

Code: [Select]
procedure DisableWepKick(1,5,false); //disables player one from getting kicked for having spas 12
begin
end;

would this work?

Date Posted: September 07, 2007, 10:40:59 PM
Can't be done server-side.

which part?

(the health part can already be done with GetPlayerStat(ID,'Health') = *)
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1906
Re: Scripting Engine Suggestions
« Reply #46 on: September 08, 2007, 12:15:59 am »
(the health part can already be done with GetPlayerStat(ID,'Health') = *)
Actually, GetPlayerStat and DoDamage.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #47 on: September 09, 2007, 01:32:05 pm »
When an invalid ID is specified for /kill #, it still calls OnPlayerKill when it shouldn't sense no1 got killed.
Along the same lines, making it so when a player who is not in the game receives damage and dies, it doesn't call OnPlayerKill. (Tested through DoDamage, although bringing error, it still called OnPlayerKill when I set the damage to 4000)

Date Posted: September 08, 2007, 08:21:08 AM
I don't know if you can change this but making it so iif function doesn't try to get what both results are, and rather the only one thats needed..
Code: [Select]
WriteConsole(ID,'/logout                  Logs you out' + iif(LoggedIn[ID] = -1,'',' (' + Accounts[LoggedIn[ID]].Name + ')'),Color);Accounts[LoggedIn[ID]].Name is going to be out of range when LoggedIn[ID] = -1, which is the whole purpose of the iif there... but it still brings the error of being out of range.

Date Posted: September 09, 2007, 08:22:46 AM
  • Ability to set the time remaining in the middle of a game
  • Ability to set the position in the Mapslist.txt file so you can change what the next map will be

    Date Posted: September 09, 2007, 12:34:57 PM
    My brother's suggestion: Prototyping
    i think its declaring a "fake" function / procedure before you actually declare what it really is, so you can have this:
    Code: [Select]
    function A(C: byte): byte
    begin
      Result := B(C) * 2;
    end;

    function B(C: byte): byte
    begin
      if C < 100 then Result := A(C) else WriteLn('Finished at ' + InttoStr(C));
    end;
    this is not very useful i don't think, but theres probably cases where prototyping can be useful

Offline KeFear

  • Soldier
  • **
  • Posts: 181
  • ARSSE Creator
Re: Scripting Engine Suggestions
« Reply #48 on: September 09, 2007, 04:42:50 pm »
Is it possible to create sceneries on given coordinates by script?

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Scripting Engine Suggestions
« Reply #49 on: September 09, 2007, 04:49:57 pm »
no and it never will be possible
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Scripting Engine Suggestions
« Reply #50 on: September 09, 2007, 04:55:58 pm »
how about

function ClearText(ID:Byte;Type:string);

clears Text type from ID's screen (0 clears all player's text)
(text just dissapears from screen, isn't deleted)

Types:
Drawn ---------- clears all "Big" text ("you killed *" "Killed by *" "got rambo bow" etc)
Kills ---------- clears all Kill console text
Speak ---------- Clears all spoken text (can still see in text menu)
All ---------- Clears ALL text from screen

only clears text ON SCREEN to prepare for other texts to be written to the console

Example:
Code: [Select]
function OnCommand(ID:Byte;Text:string):boolean;
begin
  result:=false;
  if Text = '/clear' then begin
    ClearText(0,'All'); //clears all text from all player's screens
  end;
end;
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Scripting Engine Suggestions
« Reply #51 on: September 09, 2007, 05:05:45 pm »
Except for the drawn texts, this can't be done afaik
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Scripting Engine Suggestions
« Reply #52 on: September 09, 2007, 06:09:41 pm »
so you CAN clear drawn texts? or can't, cause all I need to clear is drawn texts (so I can write my own up)
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #53 on: September 09, 2007, 06:19:24 pm »
do DrawText where as the text is '  ' (2 spaces)

  • fixing the line # for when errors coming up always being 1 more than the actual line number

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Scripting Engine Suggestions
« Reply #54 on: September 09, 2007, 11:29:03 pm »
All parsers show the line number as 1 more than the actual line. Dunno why, its just how it is.

EDIT: DorkeyDear.... sigh. Change it to < 0 not = -1

Date Posted: September 10, 2007, 09:42:40 AM
When an invalid ID is specified for /kill #, it still calls OnPlayerKill when it shouldn't sense no1 got killed.
Along the same lines, making it so when a player who is not in the game receives damage and dies, it doesn't call OnPlayerKill. (Tested through DoDamage, although bringing error, it still called OnPlayerKill when I set the damage to 4000)
Fixed.

Date Posted: September 10, 2007, 02:14:39 PM
- Added "Direction" stat to GetPlayerStat function
  Will return '<' if player is facing left, or '>' for facing right.

Offline Martino

  • Major(1)
  • Posts: 18
Re: Scripting Engine Suggestions
« Reply #55 on: September 10, 2007, 02:43:23 pm »
What about DoDamage(id,damage,shooter) so you can write who did damage. Because elsewhere it's written as suicide.

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Scripting Engine Suggestions
« Reply #56 on: September 10, 2007, 09:11:33 pm »
how does the soldatserver tell if you are facing left or right?

Date Posted: September 10, 2007, 09:42:18 PM
  • Make percents useable in functions.


like in Drawtext, the scale sometimes makes the lettering go off screen, so if we could use percents, then the text would fit

DrawText(0,'blahblahblah',2500,$332211,50%,200,420); makes 'blahblahblah' appear scaled to half of a window horizontaly (vertical scaling is relative to horizontal) on all players screens
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Scripting Engine Suggestions
« Reply #57 on: September 10, 2007, 11:47:58 pm »
What about DoDamage(id,damage,shooter) so you can write who did damage. Because elsewhere it's written as suicide.
Dont suggest: Adding/Changing new parameters to any functions/events

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Scripting Engine Suggestions
« Reply #58 on: September 11, 2007, 04:09:13 am »
like in Drawtext, the scale sometimes makes the lettering go off screen, so if we could use percents, then the text would fit

DrawText(0,'blahblahblah',2500,$332211,50%,200,420); makes 'blahblahblah' appear scaled to half of a window horizontaly (vertical scaling is relative to horizontal) on all players screens

You can code something like this yourself, allthough it can get a bit tricky with different font types.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Scripting Engine Suggestions
« Reply #59 on: September 12, 2007, 10:01:15 pm »
how could I?
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."