User:Vetinari: Difference between revisions

From WolfWiki
Jump to navigation Jump to search
Vetinari (talk | contribs)
added dynamite.lua
Vetinari (talk | contribs)
"readme" for dynatimer, added etpub_printf.lua w/ readme
Line 6: Line 6:


== Serverside dynamite timer ==  
== Serverside dynamite timer ==  
[http://ankh-morp.org/~vetinari/rspree/dynamite.lua dynamite.lua]
[http://svn.ankh-morp.org:8080/etpro_mods/dynatimer/dynamite.lua dynamite.lua]
 
This is a server side dynamite timer script. The messages will be sent to all clients who enabled the messages. The default of sending / not sending the timer messages are set by the server admin, see the ''cl_default'' setting in the script.
 
A client can set it's default (on/off) by setting ''+setu v_dynatimer 1'' or ''+setu v_dynatimer 0'' as command line argument for et ... or with the ''\setu v_dynatimer 1/0'' command... but that will not (de-)activate immediately
 
Timers can be enabled for the current connection with the client command ''\dynatimer 1'' or disabled with ''\dynatimer 0''.
 
== ETPub / NoQuarter style say substitutions ==
[http://svn.ankh-morp.org:8080/etpro_mods/shortcuts/etpub_printf.lua etpub_printf.lua]
 
The etpub and NoQuarter mods have a shortcuts replacement feature. Some keys inside square brackets ("[]") are replaced by values. This script does the same for etpro. Supported commands are ''say'', ''say_team'', ''say_buddy'', ''say_teamnl'', ''vsay'' and ''vsay_team''. See below for some examples.
 
Known keys in etpub/nq are:
 
* '''[a]''' last player who gave you ammo, currently not working, just returns '''*unknown*'''
* '''[d]''' last player who killed you
* '''[h]''' last player who gave you health currently not working, just returns '''*unknown*'''
* '''[k]''' last player you killed
* '''[l]''' your location (letter,number)  currently not really working, [[http://wolfwiki.anime.net/index.php/Talk:Lua_Mod_API#Locations feature request]] for etpro filed :-)
Currently it just returns the world coords in map units
* '''[n]''' your name
* '''[r]''' last player who revived you
* '''[p]''' last player you looked at, not working, probably never will ...
* '''[s]''' health remaining
* '''[w]''' name of current weapon
* '''[t]''' ammo for current weapon
 
We added the following keys:
 
* '''[m]''' name of the last player who was revived by you
* '''[x]''' health of last killer (don't ask me why "x"... I just took this from the first version of this script :-))
 
Both health replacements ("s" and "x") will return "0" if your the health value is below that, i.e. you will not know if a player is gibbed or just waiting for a revive.
 
=== Examples: ===
 
To test this simply do a say on the server:
\vsay_team Medic "Need a medic, ^1[s]^5 health left!"
result: Global voice sound: I need a medic and a custom text: "Need a medic, 15 health left!"
 
bind x "vsay negative Stop killing me, [d]"
result: Global voice sound: Negative/No, and a custom text: "Stop killing me, [!!!]Harlekin"
 
bind x "vsay_team thanks Thanks for the Team-Kill, [d]!"
result: Team voice sound: Thanks, and a custom text: "Thanks for the Team-Kill, [!!!]Harlekin!"
 
 
Thanks to [!!!]Harlekin and bennz. [[User:Bennz|Bennz]] did the first version of this script, which I rewrote completely ;-). He also helped debugging.


[[Category:ETPro:Mods]]
[[Category:ETPro:Mods]]

Revision as of 11:22, 24 February 2007

Reviving Spree Lua

"reviving sprees" in the style of etadmin_mod's killing sprees: rspree_mod

(I know this page is broken with IE, I'm not going to fix it  ;-))

Serverside dynamite timer

dynamite.lua

This is a server side dynamite timer script. The messages will be sent to all clients who enabled the messages. The default of sending / not sending the timer messages are set by the server admin, see the cl_default setting in the script.

A client can set it's default (on/off) by setting +setu v_dynatimer 1 or +setu v_dynatimer 0 as command line argument for et ... or with the \setu v_dynatimer 1/0 command... but that will not (de-)activate immediately

Timers can be enabled for the current connection with the client command \dynatimer 1 or disabled with \dynatimer 0.

ETPub / NoQuarter style say substitutions

etpub_printf.lua

The etpub and NoQuarter mods have a shortcuts replacement feature. Some keys inside square brackets ("[]") are replaced by values. This script does the same for etpro. Supported commands are say, say_team, say_buddy, say_teamnl, vsay and vsay_team. See below for some examples.

Known keys in etpub/nq are:

  • [a] last player who gave you ammo, currently not working, just returns *unknown*
  • [d] last player who killed you
  • [h] last player who gave you health currently not working, just returns *unknown*
  • [k] last player you killed
  • [l] your location (letter,number) currently not really working, [feature request] for etpro filed :-)

Currently it just returns the world coords in map units

  • [n] your name
  • [r] last player who revived you
  • [p] last player you looked at, not working, probably never will ...
  • [s] health remaining
  • [w] name of current weapon
  • [t] ammo for current weapon

We added the following keys:

  • [m] name of the last player who was revived by you
  • [x] health of last killer (don't ask me why "x"... I just took this from the first version of this script :-))

Both health replacements ("s" and "x") will return "0" if your the health value is below that, i.e. you will not know if a player is gibbed or just waiting for a revive.

Examples:

To test this simply do a say on the server:

\vsay_team Medic "Need a medic, ^1[s]^5 health left!"

result: Global voice sound: I need a medic and a custom text: "Need a medic, 15 health left!"

bind x "vsay negative Stop killing me, [d]"

result: Global voice sound: Negative/No, and a custom text: "Stop killing me, [!!!]Harlekin"

bind x "vsay_team thanks Thanks for the Team-Kill, [d]!"

result: Team voice sound: Thanks, and a custom text: "Thanks for the Team-Kill, [!!!]Harlekin!"


Thanks to [!!!]Harlekin and bennz. Bennz did the first version of this script, which I rewrote completely ;-). He also helped debugging.