Jump to content

A few questions


Geo

Recommended Posts

I have a few issues that I would appreciate help solving. Figured I should just post here instead.

 

1. If I was writing a spec.lua script and I wanted this to become a command called !spec in shrubbot.cfg (which would spectate player as on jaymod), how can I exec the script when the command is executed by the user. E.g

 

[command]

command = spec

exec = what would go here? something to exec spec.lua

desc = spectates the player

syntax =

levels = 0 1 2 3 4 5

 

2. How can I position the killing/death/revive spree announcements at the top of the screen, instead of in the usual console position? Is this a cmd or is the use of lua necessary? Could I use banners instead? e.g

 

"name is on a killing spree! (5 kills in a row)"

 

Any help would be welcomed, thanks.

Edited by Arcane
Link to comment
Share on other sites

I have a few issues that I would appreciate help solving. Figured I should just post here instead.

 

1. If I was writing a spec.lua script and I wanted this to become a command called !spec in shrubbot.cfg (which would spectate player as on jaymod), how can I exec the script when the command is executed by the user. E.g

 

[command]

command = spec

exec = what would go here? something to exec spec.lua

desc = spectates the player

syntax =

levels = 0 1 2 3 4 5

http://mygamingtalk.com/forums/topic/2345-lua-api-questions/?p=9528

2. How can I position the killing/death/revive spree announcements at the top of the screen, instead of in the usual console position? Is this a cmd or is the use of lua necessary? Could I use banners instead? e.g

 

"name is on a killing spree! (5 kills in a row)"

 

Any help would be welcomed, thanks.

There is a client side command for sprees position, can't tell what command it is exactly as I couldn't find it in the wiki.
Link to comment
Share on other sites

Thanks for the fast reply, I realised I could edit the position using lua, which is what i'm working on now. If anyone knows of this cmd then that would be great! I'll look through the topic you posted, thanks :)

Link to comment
Share on other sites

Hello you must forcecvar for everybody :

 

cg_killerhppos 4

cg_revivedpos 4

cg_spreeendpos 2

cg_dspreepos 2

cg_rspreepos 1

cg_kspreepos 2

cg_mkillpos 2

 

(Google them please, I donot remember all and have no time now)

 

make your choice with:

 

0 Chat area

1 Center of screen

2 Left notification area

3 Top of the screen

4 Console only

Edited by clan DIABOLIK
Link to comment
Share on other sites

Thanks for the commands :)  Also, I've got my script to work, except the default killing spree, double/triple kill etc msgs are still showing along with mine. Can I disable the default msgs so that the ones customised in .lua can be the only ones showing to all clients?

Link to comment
Share on other sites

I have a couple more problems! (perhaps good for me, I learnt a lot from them :) )

Anyway in my script I want the killing sprees to stop at 30, not continue such as 35, 40 etc. Once it hits 35, the msg for a normal 5 killing spree appears, and this continues on limitlessly. Is there any way for me to make the sprees stop at 30?

 

I did check this topic: http://mygamingtalk.com/forums/topic/995-kspreelua/

but there didn't seem to be a solution (unless i'm mistaken?) Thanks again to all who reply!

Link to comment
Share on other sites

There's one last problem I have having! :P Everything else is functioning so thanks for all of these replies.

This error keeps appearing in the etconsole.log (repeated LOTS of times)

 

 

 
Lua API: et_RunFrame error running lua script: [string "kspree.lua"]:642: bad 
argument #1 to 'format' (string expected, got nil)
 

 

This seems to have appeared after I put ludicrouskill.wav and holyshit.wav into my .pk3 file, and then uploaded to the server. These files in particular I had to download and convert into wav files from mp3, as I couldn't find a already-man soundpack with these in. The error log is referring to line 642 in the et.RunFrame function, which would be the quoted line below. Any ideas on what is causing this problem? It doesn't seem to affect anything on the server and everything seems to be working fine which I found strange. As always, thankyou!

 

sayClients(kmulti_pos, string.format(kmulti_msg,
m_name))

 

function et_RunFrame(levelTime) if math.mod(levelTime, 500) ~= 0 
then return end local ltm = et.trap_Milliseconds() gamestate = 
tonumber(et.trap_Cvar_Get("gamestate")) if gamestate == 0 
then -- wait before display multi/mega/monster/ludicrous-kill AND 
display highest -- wait_table[id] = {lvltime, 
2} table.foreach(wait_table,            
function(id, arr)   local guid = getGuid(id)   local 
m_name = playerName(id)         
local startpause = 
tonumber(arr[1])         local 
whichkill = arr[2]         if 
whichkill == 1 and (startpause + 3100) < ltm 
then          if 
kmulti_announce then         
  sayClients(kmulti_pos, string.format(kmulti_msg, 
m_name))           if 
kmulti_sound then         
   --et.G_globalSound(multisound)         
   soundClients(multisound)
 
Edited by Arcane
Link to comment
Share on other sites

As additional info - are there any specific moments when sounds will NOT play (ie killing spree sounds, multikill sounds) or you don't hear them. Perhaps if you die straight after getting a multi/spree? Just sometimes I can't hear the sounds and ideally would like the sounds to be heard by all clients every single time one is achieved. Thanks!

Link to comment
Share on other sites

I had to change a hell of a lot of things to make it function, but thanks for making it public nevertheless. There isn't a version specified for silent mod anywhere I assume? I did check the download page again, might be helpful for other admin

Link to comment
Share on other sites

If I wanted to record the silent guid of a player, how can I dump this information into a log that I've created (eg guids.txt) or something? So this information can be accessed at any time. Is there a certain cmd for this? thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...