User:Phenomenon: Difference between revisions

From WolfWiki
Jump to navigation Jump to search
m ^^
m changed download locations
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
'''''Homepage'''''
'''''Homepage'''''
:''[http://www.force-opponents.de www.force-opponents.de]'' - Home of the Force Opponents Clan
:''[http://www.force-opponents.de www.force-opponents.de]'' - Home of the Force Opponents Clan
'''''EMail'''''
:''[mailto:phenomenon@force-opponents.de phenomenon@force-opponents.de]''
'''''[[IRC]]'''''
'''''[[IRC]]'''''
:''[irc://irc.quakenet.org:6667/force-opponents #force-opponents]'' - channel on QuakeNet
:''[irc://irc.quakenet.org:6667/force-opponents #force-opponents]'' - channel on QuakeNet
Line 17: Line 15:
<div style="padding: .5em .9em .9em">
<div style="padding: .5em .9em .9em">
== ''Scripts'' ==
== ''Scripts'' ==
:*''[[#LUA script - slacstatsaver.lua|slacstatsaver.lua]] (<font color="red">new</font>)''
:*''[[#LUA script - playsoundcmd.lua|playsoundcmd.lua]]''
:*''[[#LUA script - playsoundcmd.lua|playsoundcmd.lua]]''
:**''[[#ETAdmin_mod spree sounds HowTo|ETAdmin_mod spree sounds HowTo]]''
:**''[[#ETAdmin_mod spree sounds HowTo|ETAdmin_mod spree sounds HowTo]]''
Line 30: Line 29:
</tr>
</tr>
</table>
</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>
<br>
Line 41: Line 57:


===== '''''Installation''''' =====
===== '''''Installation''''' =====
:*Download the latest ''[http://www.force-opponents.de/lua/playsoundcmd.lua playsoundcmd.lua]'' script and save it into your ''[[ETPro]]'' folder.
:*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>
:*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.
:*Restart your server.
Line 55: Line 71:
===== '''''[http://et.d1p.de/etadmin_mod/wiki/index.php ETAdmin_mod] spree sounds HowTo''''' =====
===== '''''[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]''.
:*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/lua/playsoundcmd.lua playsoundcmd.lua]'' script and save it into your ''[[ETPro]]'' folder.
:*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>
:*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/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.
:*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)
:*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
# Note: The 3 kills have to be max. 3 seconds away from each other

Latest revision as of 10:11, 24 October 2010


http://wowdev.org/wiki/images/thumb/9/95/Lua.gif/180px-Lua.gif

Homepage

www.force-opponents.de - Home of the Force Opponents Clan

IRC

#force-opponents - channel on QuakeNet


 

Functions


LUA script - slacstatsaver.lua

This script fixes the "loosing XP and stats at reconnect" bug on a SLAC addon enabled server.

Requirements
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
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 !!!!
    
    1. its only here for people, that don't want to change their config from 0.28!

    spree_sounds = 0

    1. 1 = enable soundmappings, 0 = disable

    sound_mappings = 1

    1. rcon: means, that the regexp will apply to all rcon commands send from the etadmin_mod into the game.
    2. clog: means, that the regexp apply to every line of the etconsole.log.
    3. Remove # to activate sound.

    [sound_mappings]

    1. First blood (also in spree sounds, don't mix spree_sounds = 1 and this):
    2. rcon:drew \^1first \^1BLOOD = sound/misc/firstblood.wav

    rcon:"-PLAYERNAME- \^1drew \^1first \^1BLOOD \^1! = sound/misc/firstblood.wav

    1. 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

    1. private sounds (only use these or the above, don't mix!):
    2. rcon:Multikill \^7> \^7-PLAYERNAME- \^7< \^1Multikill = sound/misc/multikill.wav
    3. rcon:^1MONSTERKILL \^7>>> \^7-PLAYERNAME- \^7<<< ^1MONSTER KILL = sound/misc/monsterkill.wav
    1. 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


    LUA function - et.G_ClientSound()

    Use this function in your own projects to play a sound for a certain client only.

    Requirements
    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