Geo Posted March 19, 2013 Share Posted March 19, 2013 (edited) 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 = specexec = what would go here? something to exec spec.luadesc = spectates the playersyntax =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 March 19, 2013 by Arcane Quote Link to comment Share on other sites More sharing options...
Dragonji Posted March 20, 2013 Share Posted March 20, 2013 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 5http://mygamingtalk.com/forums/topic/2345-lua-api-questions/?p=95282. 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. Quote Link to comment Share on other sites More sharing options...
Geo Posted March 20, 2013 Author Share Posted March 20, 2013 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 Quote Link to comment Share on other sites More sharing options...
clan DIABOLIK Posted March 20, 2013 Share Posted March 20, 2013 (edited) 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 March 20, 2013 by clan DIABOLIK hellreturn 1 Quote Link to comment Share on other sites More sharing options...
Geo Posted March 20, 2013 Author Share Posted March 20, 2013 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? Quote Link to comment Share on other sites More sharing options...
Dragonji Posted March 20, 2013 Share Posted March 20, 2013 Can I disable the default msgs so that the ones customised in .lua can be the only ones showing to all clients?http://mygamingtalk.com/wiki/index.php/Silent_Mod_Server_Cvar#g_spreeOptions Quote Link to comment Share on other sites More sharing options...
Geo Posted March 21, 2013 Author Share Posted March 21, 2013 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! Quote Link to comment Share on other sites More sharing options...
Dragonji Posted March 21, 2013 Share Posted March 21, 2013 I don't know, and I didn't test at all, but you could try replacing thespree = K_Sprees[35] with return. In function checkKSprees(id) Replace: if killing_sprees[id] > 35 then spree = K_Sprees[35] endWith: if killing_sprees[id] > 35 then return endIn:function checkKSprees(id) hellreturn 1 Quote Link to comment Share on other sites More sharing options...
Geo Posted March 22, 2013 Author Share Posted March 22, 2013 Thankyou! This worked perfectly Quote Link to comment Share on other sites More sharing options...
Geo Posted March 23, 2013 Author Share Posted March 23, 2013 (edited) There's one last problem I have having! 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 March 23, 2013 by Arcane Quote Link to comment Share on other sites More sharing options...
Geo Posted March 23, 2013 Author Share Posted March 23, 2013 Problem fixed - i'd removed the ludicrouskill and holyshit msg, so it was trying to exec something that didn't exist. Quote Link to comment Share on other sites More sharing options...
Geo Posted March 24, 2013 Author Share Posted March 24, 2013 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! Quote Link to comment Share on other sites More sharing options...
Dragonji Posted March 24, 2013 Share Posted March 24, 2013 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. Quote Link to comment Share on other sites More sharing options...
Geo Posted March 24, 2013 Author Share Posted March 24, 2013 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 Quote Link to comment Share on other sites More sharing options...
Geo Posted March 26, 2013 Author Share Posted March 26, 2013 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.