Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

A few questions


  • Please log in to reply
14 replies to this topic

#1
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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, 19 March 2013 - 11:15 PM.


#2
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland

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....estions/?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.

#3
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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 :)



#4
OFFLINE   clan DIABOLIK

clan DIABOLIK

    Advanced Member

  • Members
  • PipPipPipPip
  • 322 posts
36
Getting Better
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, 20 March 2013 - 06:03 PM.


#5
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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?



#6
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland

Can I disable the default msgs so that the ones customised in .lua can be the only ones showing to all clients?

http://mygamingtalk....#g_spreeOptions

#7
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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..../995-kspreelua/

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



#8
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland

I don't know, and I didn't test at all, but you could try replacing the

spree = K_Sprees[35]
with return. In function checkKSprees(id)


Replace:
		    if killing_sprees[id] > 35 then
			    spree = K_Sprees[35]
		    end
With:
		    if killing_sprees[id] > 35 then
			    return
		    end
In:
function checkKSprees(id)


#9
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

Thankyou! This worked perfectly :)



#10
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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, 23 March 2013 - 01:41 AM.


#11
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

Problem fixed - i'd removed the ludicrouskill and holyshit msg, so it was trying to exec something that didn't exist.



#12
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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!



#13
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland

The original kspree.lua's code is too damn complicated. It was created for ETPro and needs some changes to work perfectly with silEnT mod.



#14
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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



#15
OFFLINE   Geo

Geo

    Regular Member

  • Members
  • PipPipPip
  • 70 posts
12
A step in the right direction
  • LocationUnited Kingdom

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users