User:Phenomenon: Difference between revisions
Phenomenon (talk | contribs) |
Phenomenon (talk | contribs) m changed download locations |
||
| (20 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:ETPro:Mods]] | [[Category:ETPro:Mods]] | ||
= | <table><tr><td width=200>http://wowdev.org/wiki/images/thumb/9/95/Lua.gif/180px-Lua.gif</td><td> | ||
'''''Homepage''''' | |||
:''[http://www.force-opponents.de www.force-opponents.de]'' - Home of the Force Opponents Clan | |||
'''''[[IRC]]''''' | |||
:''[irc://irc.quakenet.org:6667/force-opponents #force-opponents]'' - channel on QuakeNet | |||
</td></tr></table> | |||
<br> | |||
: | <table width=100%> | ||
<tr> | |||
<td width=50% style="border: 1px solid #fabd23; color: #000; background-color: #fcfae3" valign=top> | |||
<div style="padding: .5em .9em .9em"> | |||
== ''Scripts'' == | |||
:*''[[#LUA script - slacstatsaver.lua|slacstatsaver.lua]] (<font color="red">new</font>)'' | |||
:*''[[#LUA script - playsoundcmd.lua|playsoundcmd.lua]]'' | |||
:**''[[#ETAdmin_mod spree sounds HowTo|ETAdmin_mod spree sounds HowTo]]'' | |||
</div> | |||
</td> | |||
<td height=100%> </td> | |||
<td width=50% style="border: 1px solid #fabd23; color: #000; background-color: #fcfae3" valign=top> | |||
<div style="padding: .5em .9em .9em"> | |||
== ''Functions'' == | |||
:*''[[#LUA function - et.G_ClientSound()|et.G_ClientSound()]]'' | |||
</div> | |||
</td> | |||
</tr> | |||
</table> | |||
<br> | |||
== ''LUA script - <font color=blue>slacstatsaver.lua</font>'' == | |||
This script fixes the "loosing XP and stats at reconnect" bug on a ''[http://sl-anticheat.com SLAC]'' addon enabled server. | |||
===== '''''Requirements''''' ===== | |||
:*Wolfenstein - Enemy Territory (patched to v2.60b) - ''[http://www.splashdamage.com splashdamage.com]'' | |||
:*''[[ETPro]]'' 3.2.6 or higher - ''[http://etpro.anime.net etpro.anime.net]'' | |||
===== '''''Installation''''' ===== | |||
:*Download the latest ''[http://download.force-opponents.de/etpro/slacstatsaver.lua slacstatsaver.lua]'' script and save it into your ''[[ETPro]]'' folder. | |||
:*Add the following line to your server configuration to instruct your server to load the script on startup.<pre>set lua_modules "slacstatsaver.lua"</pre> | |||
:*Restart your server. | |||
===== '''''<font color="red">Note</font>''''' ===== | |||
:Do not use this script with enabled PunkBuster server! | |||
<br> | |||
== ''LUA script - <font color=blue>playsoundcmd.lua</font>'' == | |||
This script adds new console commands ''<font color=gray>playsound</font>'' and ''<font color=gray>playsound_env</font>'' to your server. The difference to the already existing ''[[User:RoadKillPuppy|playsound.lua]]'' is this one can play a sound for a certain player only and/or also for players in the proximity of this player (exactly ''[http://et.tjw.org/etpub ETPub]'' behavior). | |||
===== '''''Requirements''''' ===== | |||
:*Wolfenstein - Enemy Territory (patched to v2.60b) - ''[http://www.splashdamage.com splashdamage.com]'' | :*Wolfenstein - Enemy Territory (patched to v2.60b) - ''[http://www.splashdamage.com splashdamage.com]'' | ||
:*''[[ETPro]]'' 3.2.6 or higher - ''[http://etpro.anime.net etpro.anime.net]'' | |||
===== '''''Installation''''' ===== | |||
:*Download the latest ''[http://download.force-opponents.de/etpro/playsoundcmd.lua playsoundcmd.lua]'' script and save it into your ''[[ETPro]]'' folder. | |||
:*Add the following line to your server configuration to instruct your server to load the script on startup.<pre>set lua_modules "playsoundcmd.lua"</pre> | |||
:*Restart your server. | |||
===== '''''Usage''''' ===== | |||
:''<font color=gray>\rcon (rconpassword) playsound [sound]</font>'' | |||
::Plays a '''sound''' for all clients. | |||
:''<font color=gray>\rcon (rconpassword) playsound [name/slot#] [sound]</font>'' | |||
::Plays a '''sound''' for client with '''name/slot#''' only. | |||
:''<font color=gray>\rcon (rconpassword) playsound_env [name/slot#] [sound]</font>'' | |||
::Plays a '''sound''' for client with '''name/slot#''' and surrounding clients only. | |||
===== '''''[http://et.d1p.de/etadmin_mod/wiki/index.php ETAdmin_mod] spree sounds HowTo''''' ===== | |||
:*If needed you must update your ''[[ETPro]]'' to version 3.2.6 or higher. You can found the newest package available at ''[http://etpro.anime.net etpro.anime.net]''. | |||
:*Download the latest ''[http://www.force-opponents.de/website/lua/playsoundcmd.lua playsoundcmd.lua]'' script and save it into your ''[[ETPro]]'' folder. | |||
:*Add the following line to your server configuration to instruct your server to load the script on startup.<pre>set lua_modules "playsoundcmd.lua"</pre> | |||
:*You must provide the sounds on your server to make them available to your players. Download the file ''[http://www.force-opponents.de/website/lua/etadmin_sounds.pk3 etadmin_sounds.pk3]'' and save it into your ''[[ETPro]]'' folder. This file contains the basic ''[http://et.d1p.de/etadmin_mod/wiki/index.php ETAdmin_mod]'' sounds. | |||
:*Configure ''[http://et.d1p.de/etadmin_mod/wiki/index.php ETAdmin_mod]'' v0.29 or higher to use the ''<font color=gray>playsound</font>'' command.<br><br><p>''etadmin_mod/etc/etadmin.cfg'':</p><table cellspacing=0 cellpadding=0 width=100%><tr><td><pre><nowiki># Detect Multikills (UT like, 3 at once) | |||
# Note: The 3 kills have to be max. 3 seconds away from each other | |||
multikill_detector = 1 | |||
# Detect Monsterkills (UT like, 5 at once) | |||
# Note: 5 kills have to be max. 3 seconds away from each other | |||
monsterkill_detector = 1 | |||
# note: the spree_color is deprected. See [spree_messages] instead. | |||
# Announce first blood | |||
first_blood = 1</nowiki></pre></td></tr></table><p>''etadmin_mod/etc/sound.cfg'':</p><table cellspacing=0 cellpadding=0 width=100%><tr><td><pre><nowiki># -> THIS OPTION IS DEPRECATED, USE SOUND_MAPPINGS INSTEAD !!!! | |||
# its only here for people, that don't want to change their config from 0.28! | |||
spree_sounds = 0 | |||
# 1 = enable soundmappings, 0 = disable | |||
sound_mappings = 1 | |||
# rcon: means, that the regexp will apply to all rcon commands send from the etadmin_mod into the game. | |||
# clog: means, that the regexp apply to every line of the etconsole.log. | |||
# Remove # to activate sound. | |||
[sound_mappings] | |||
# First blood (also in spree sounds, don't mix spree_sounds = 1 and this): | |||
#rcon:drew \^1first \^1BLOOD = sound/misc/firstblood.wav | |||
rcon:"-PLAYERNAME- \^1drew \^1first \^1BLOOD \^1! = sound/misc/firstblood.wav | |||
: | # Sounds on Monster / Multikill (also in spree sounds, don't mix spree_sounds = 1 and this) | ||
rcon:\^7!!!! \^1Multikill = sound/misc/multikill.wav | |||
rcon:\^1OMG, MONSTERKILL = sound/misc/monsterkill.wav | |||
== | # private sounds (only use these or the above, don't mix!): | ||
#rcon:Multikill \^7> \^7-PLAYERNAME- \^7< \^1Multikill = sound/misc/multikill.wav | |||
#rcon:^1MONSTERKILL \^7>>> \^7-PLAYERNAME- \^7<<< ^1MONSTER KILL = sound/misc/monsterkill.wav | |||
:* | # Spree messages (global) | ||
rcon:\^8is \^8on \^8a \^8killing \^8spree = sound/misc/killingspree.wav | |||
rcon:\^8is \^8on \^8a \^8rampage = sound/misc/rampage.wav | |||
rcon:\^8is \^8dominating = sound/misc/dominating.wav | |||
rcon:\^8is \^8unstoppable = sound/misc/unstoppable.wav | |||
rcon:\^8is \^8godlike = sound/misc/godlike.wav | |||
rcon:\^8is \^8wicked \^8sick = sound/misc/wickedsick.wav</nowiki></pre></td></tr></table> | |||
:* Restart your ''[http://et.d1p.de/etadmin_mod/wiki/index.php ETAdmin_mod]'' and your server. | |||
<br> | |||
< | == ''LUA function - <font color=blue>et.G_ClientSound()</font>'' == | ||
Use this function in your own projects to play a sound for a certain client only. | |||
</ | |||
:* | ===== '''''Requirements''''' ===== | ||
:*''[[ETPro]]'' 3.2.6 or higher - ''[http://etpro.anime.net etpro.anime.net]'' | |||
===== Usage ===== | ===== '''''Usage''''' ===== | ||
:et.G_ClientSound('''clientnum''', '''soundfile''') | |||
::Plays a global sound '''soundfile''' for a certain client '''clientnum''' only. | |||
===== '''''Source''''' ===== | |||
:<table cellspacing=0 cellpadding=0 width=100%><tr><td><pre><nowiki>EV_GLOBAL_CLIENT_SOUND = 54 | |||
function et.G_ClientSound(clientnum, soundfile) | |||
local tempentity = et.G_TempEntity(et.gentity_get(clientnum, "r.currentOrigin"), EV_GLOBAL_CLIENT_SOUND) | |||
et.gentity_set(tempentity, "s.teamNum", clientnum) | |||
et.gentity_set(tempentity, "s.eventParm", et.G_SoundIndex(soundfile)) | |||
end</nowiki></pre></td></tr></table> | |||
__NOTOC__ | |||
__NOEDITSECTION__ | |||
Latest revision as of 10:11, 24 October 2010
| http://wowdev.org/wiki/images/thumb/9/95/Lua.gif/180px-Lua.gif |
Homepage
|
Scripts |
Functions |
LUA script - slacstatsaver.lua
This script fixes the "loosing XP and stats at reconnect" bug on a SLAC addon enabled server.
Requirements
- Wolfenstein - Enemy Territory (patched to v2.60b) - splashdamage.com
- ETPro 3.2.6 or higher - etpro.anime.net
Installation
- Download the latest slacstatsaver.lua script and save it into your ETPro folder.
- Add the following line to your server configuration to instruct your server to load the script on startup.
set lua_modules "slacstatsaver.lua"
- Restart your server.
Note
- Do not use this script with enabled PunkBuster server!
LUA script - playsoundcmd.lua
This script adds new console commands playsound and playsound_env to your server. The difference to the already existing playsound.lua is this one can play a sound for a certain player only and/or also for players in the proximity of this player (exactly ETPub behavior).
Requirements
- Wolfenstein - Enemy Territory (patched to v2.60b) - splashdamage.com
- ETPro 3.2.6 or higher - etpro.anime.net
Installation
- Download the latest playsoundcmd.lua script and save it into your ETPro folder.
- Add the following line to your server configuration to instruct your server to load the script on startup.
set lua_modules "playsoundcmd.lua"
- Restart your server.
Usage
- \rcon (rconpassword) playsound [sound]
- Plays a sound for all clients.
- \rcon (rconpassword) playsound [name/slot#] [sound]
- Plays a sound for client with name/slot# only.
- \rcon (rconpassword) playsound_env [name/slot#] [sound]
- Plays a sound for client with name/slot# and surrounding clients only.
ETAdmin_mod spree sounds HowTo
- If needed you must update your ETPro to version 3.2.6 or higher. You can found the newest package available at etpro.anime.net.
- Download the latest playsoundcmd.lua script and save it into your ETPro folder.
- Add the following line to your server configuration to instruct your server to load the script on startup.
set lua_modules "playsoundcmd.lua"
- You must provide the sounds on your server to make them available to your players. Download the file etadmin_sounds.pk3 and save it into your ETPro folder. This file contains the basic ETAdmin_mod sounds.
- Configure ETAdmin_mod v0.29 or higher to use the playsound command.
etadmin_mod/etc/etadmin.cfg:
# Detect Multikills (UT like, 3 at once) # Note: The 3 kills have to be max. 3 seconds away from each other multikill_detector = 1 # Detect Monsterkills (UT like, 5 at once) # Note: 5 kills have to be max. 3 seconds away from each other monsterkill_detector = 1 # note: the spree_color is deprected. See [spree_messages] instead. # Announce first blood first_blood = 1
etadmin_mod/etc/sound.cfg:
# -> THIS OPTION IS DEPRECATED, USE SOUND_MAPPINGS INSTEAD !!!!
- its only here for people, that don't want to change their config from 0.28!
spree_sounds = 0
- 1 = enable soundmappings, 0 = disable
sound_mappings = 1
- rcon: means, that the regexp will apply to all rcon commands send from the etadmin_mod into the game.
- clog: means, that the regexp apply to every line of the etconsole.log.
- Remove # to activate sound.
[sound_mappings]
- First blood (also in spree sounds, don't mix spree_sounds = 1 and this):
- rcon:drew \^1first \^1BLOOD = sound/misc/firstblood.wav
rcon:"-PLAYERNAME- \^1drew \^1first \^1BLOOD \^1! = sound/misc/firstblood.wav
- Sounds on Monster / Multikill (also in spree sounds, don't mix spree_sounds = 1 and this)
rcon:\^7!!!! \^1Multikill = sound/misc/multikill.wav rcon:\^1OMG, MONSTERKILL = sound/misc/monsterkill.wav
- private sounds (only use these or the above, don't mix!):
- rcon:Multikill \^7> \^7-PLAYERNAME- \^7< \^1Multikill = sound/misc/multikill.wav
- rcon:^1MONSTERKILL \^7>>> \^7-PLAYERNAME- \^7<<< ^1MONSTER KILL = sound/misc/monsterkill.wav
- Spree messages (global)
rcon:\^8is \^8on \^8a \^8killing \^8spree = sound/misc/killingspree.wav rcon:\^8is \^8on \^8a \^8rampage = sound/misc/rampage.wav rcon:\^8is \^8dominating = sound/misc/dominating.wav rcon:\^8is \^8unstoppable = sound/misc/unstoppable.wav rcon:\^8is \^8godlike = sound/misc/godlike.wav
rcon:\^8is \^8wicked \^8sick = sound/misc/wickedsick.wav- Restart your ETAdmin_mod and your server.
LUA function - et.G_ClientSound()
Use this function in your own projects to play a sound for a certain client only.
Requirements
- ETPro 3.2.6 or higher - etpro.anime.net
Usage
- et.G_ClientSound(clientnum, soundfile)
- Plays a global sound soundfile for a certain client clientnum only.
Source
EV_GLOBAL_CLIENT_SOUND = 54
function et.G_ClientSound(clientnum, soundfile) local tempentity = et.G_TempEntity(et.gentity_get(clientnum, "r.currentOrigin"), EV_GLOBAL_CLIENT_SOUND) et.gentity_set(tempentity, "s.teamNum", clientnum) et.gentity_set(tempentity, "s.eventParm", et.G_SoundIndex(soundfile))
end