LUA on NQ 1.2.5


(phisherman) #1

Hey folks

Since the board search was so kind to tell me my search term “lua” was too short, I do not know if there is another thread about this topic. If there is, please give me a link and remove this topic.

I have a problem. My server is currently running NQ125, but I would like to upgrade to 128 when it’s released. Problem is that I dont like the Killingspree-Announcements of 127 ( and changelog of 128 didnt say anything about a change ), because its the most ridiculous and the most non-informing thing that I’ve ever seen, anyway. I would like a LUA-script take control over the kspree-announces, so that I dont have my screen spammed by big announcements that dont actually announce anything.

I managed to get the script working and stuff, but I only hear the “Killing Spree!” sound, no text appears. Console says “Unknown client game command: b”, and I guess thats the problem. In the LUA-script, I got the line “kspree_pos = b 8”, but I guess that’s an ETpro-Feature and does not work with NQ. I’m a complete newby with LUA, so you maybe want to help me getting started and tell me if there’s a similar thing for NQ with another name, so I’ll just have to change it. Thanks for your help. :slight_smile:

Download the LUA-Script here.

Greetz
phishi


(stealth6) #2

opened it up and opened up the example lua script that comes with NQ (dc.lua) within the first lines it says:


gamename = et.trap_Cvar_Get("gamename")
if gamename == "etpro" then
	CHAT = "b 8"
	POPUP = "etpro" 
elseif gamename == "etpub" then
	CHAT = "chat" 
	POPUP = "etpub"
else -- "noquarter"
	CHAT = "cp" 
	POPUP = "nq"
end

so supossedly replacing “b 8” by “cp” should work?


(IRATA) #3

http://****storm.org/noquarter/wiki/index.php?title=Lua-Scripting


(kamikazee) #4

Did you intentionally censor that URL?


(IRATA) #5

hehe no. probably done by forum software.


(phisherman) #6

[QUOTE=stealth6;226286]so supossedly replacing “b 8” by “cp” should work?[/QUOTE]This sounds good. I’ll try that out and tell you. Thank you very much. :slight_smile:

Yep, that’s right. Thanks for the Tutorial, didn’t know there was one. :slight_smile:


(phisherman) #7

Ok, results:

“cp” is not the Chat-Area but the Center of the Screen. I could not try out other locations, because it seems like I kind of messed up the script, but cant tell why. I’ll try again. Does anybody know what the chat-location for NQ is? Would save me bruteforcing. :slight_smile:


(stealth6) #8

I think “chat” should work


(ailmanki) #9

‘qsay’

does print to chat


(phisherman) #10

Ok, got this script working again. “chat” prints to chat, “qsay” prints “Unknown client game command” error message.
Now I’ll try to modify it. Wish me luck. :stuck_out_tongue: