Server Clearance - Script Release

(Micha) #61

It is caused by adifferent lua version. Doesn’t matter if I use the original or my edited. The script never worked :stuck_out_tongue:

I removed the following part because etpro doesn’t have et.G_shrubbot_permission.

	if et.gentity_get( id, "sess.sessionTeam" ) == 3 or et.G_shrubbot_permission( id, "?" ) == 1 then
		return false

(Nail) #62

I removed the following part because etpro doesn’t have et.G_shrubbot_permission.

it’s why bani never gave out his mod, so it never would

(phisherman) #63

I believe what Mateos was talking about is the lua binary version. NQ requires lua 5.1, since etpro is even older it might just use the same thing. If you are running lua binaries you “got from this guy who got it from some other guy” rather than the official latest 5.1 binaries, there might be unwanted behaviour.

In the clearSpace() function, the argument is called ‘string’, and later on we call the function string.len(string). What is intended is that we call the ‘len’ function of the ‘string’ library, but a different binary version might interpret this as performing something on the local variable ‘string’. So maaaybe, renaming the variable might do the trick. Either way, you might want to re-download your lua binaries.

Try replacing the function clearSpace(string) with the following (I just renamed the variable to ‘input’):

function clearSpace(input)
	local output = ""
	local i = string.len(input)
	while (string.sub(input,i,i) == " " or string.sub(input,i,i) == "	") do
		input = string.sub(input,1,(i-1))
		i = i - 1

	while (string.sub(input,1,1) == " " or string.sub(input,1,1) == "	") do
		input = string.sub(input,2)

	i = 1
	while string.sub(input,i,i) ~= "" do
		if string.sub(input,i,i) ~= "\"" then
			output = output .. string.sub(input,i,i)
		i = i + 1

	return output

(Micha) #64

Ok I changed the last part from string to input and it’s working now.
Thank you. (3.23 KB)

(phisherman) #65

Episode VI - Italy FP2 Mapscript

Re-playing Streets of Italy again recently after a long time made me feel like improving a few things.

Changelog:[ul][li]rerouted the plane - it is now properly visible along its entire path and won’t pop into and out of the skybox anymore[]removed the bomb models and random dropoffs scattered across the city[]HUGE entity cleanup - 98 unused/redundant entities removed, mainly speakers pointing at inexistent mp3 sound files[]removed a chair which blocked a spawn slot in the axis fallback spawn and would get players stuck[]the gold crate dropoff trigger at the jeep is now larger and covers the entire vehicle[]separated the two ramps - the jeep will now drive onto the first ramp even if the second is not yet constructed[]fixed buggy stolen/returned messages of the gold[]added text announcements for some events - omnibot compatibility remains untouched[]removed delay in jeep movement - it will now instantly start moving when somebody gets near it[]better jeep sound calculation[]added a clipweapon to the command post - this will prevent players from throwing things into it (like hiding a satchel charge in it)[]dynamic timelimit - 20min from the start, +7 when the jeep is at the tower, +3 when both gold crates have been secured[]removed beam texture on window across from command post[*]included command post into and improved autospawn calculation[/ul][/li]
This script has been made for the latest official release (fp2). I have not tested it with any of the more recent and qualitatively questionable unofficial releases.

This is an ETpro mapscript and will only work with mods that support it. Please do not put this script into a pk3 but make proper use of your mod’s mapScriptDirectory cvar. Made using NQ 1.2.9 b6, I don’t know about compatibility to other mods or older versions.

NOTE: Since apparently, this site’s admin has been in a coma for the last five years and the maximum allowed upload size of a zip file is 16KB, I had to upload it as mp3. Rename to .zip and extract.

// Alternative download link, thanks Magic.

(Magic) #66

Alternativ download link :


(phisherman) #67

On request, another lua script.

Episode VII - No Pro LUA

This script was written to tackle the issue of “pro” players coming to beginner servers and fragging them empty.
It analyzes all players’ skill ratings every X seconds and warns/kicks players if they exceed the average rating by Y percent.
The rating is calculated from the Kill/Death ratio, Damage Given/Received ratio and Kills per Second ratio.
Bots are completely ignored by the script, they are not being punished and do not influence the average rating or player count.
Carefully read the description of the variables below and set them with care to avoid unjustified kicks.
The default values are most likely un-usable. You will need a few test-rounds to find the right values for your server.
The script works on a per-round basis, meaning nothing is saved between maps or sessions. All ratings are reset every mapstart. An inter-round solution might come in a future release, if needed.
The script provides a weapon whitelist, a player whitelist, a minimum player count limit and a few other settings.

I’m going to stress this again: This script needs CONFIGURATION. No out-of-the-box experience, sadly. Read about what you have to do inside the lua file. I hope I documented everything well enough to understand.

Developed on NQ 1.2.9b6 with only the official ETpro lua api, so I hope there are no incompatibilities.

(Mateos) #68

Great work as always :slight_smile: Thank you!

(phisherman) #69

You’re welcome [noparse];)[/noparse] I’ll be happy if somebody uses it.
I also uploaded an update, check the post above.

(phisherman) #70

And another update, see above.

(KeMoN) #71

Thank you very much for all the scripts!
I hope a lot of server admins can make good use of them.

(phisherman) #72

Time to get this old stuff out of my head…

Episode V - Axis Lab Mapscript

The script is a mix of the original map version (where you had to steal the nuke) and v2 (where you had to steal the documents). I liked v2 more than v1 because it allowed more flexibility: It was really hard for the Allies to get the nuke to the truck because the Axis knew exactly which way they had to take. V2 however was a bit too map-rushy because people would disguise, rush into the bunker, through the teamdoor, get the documents, rush out again and finish the map after 3min before the hill flag was even allied.
This script is an attempt to combine the advanced flexibility of the documents with the anti-maprush effect of having to escort the truck. Short allied mission overview:

  1. [li]Steal the truck and escort it to the hill top. As soon as it’s there, the hill flag will become perm-allied and the sewer gates become dynamitable (they’re a dummy entity beforehand to prevent quick game end - based on |>B<|Molotov)[]Get inside the bunker complex, blow open the war room door, steal the documents and get them to the truck[]Escort the truck over the river

Please note that this script is only a gameplay alternative, not a fix.



//I don’t know either why somebody would load documents on a truck…

(Mateos) #73

Maybe they’re radioactive. There’s a citern with strange unidentified green liquid in the labs, docs can have been dropped by some scientists in it x)

(jemstar) #74

Thanks again for the lua’s Phisherman!!

I have them on my server and works great!!! That is except for the tag protection.

Just wondering if you could help me with it?

It occasionally will work but rarely!! When it does work and renames player…if they change it back it wont re-punish them! This is how i set the config:


checkInterval = 5000 – The interval in milliseconds (1 sec = 1000 millisec) at which the script will check players for clantag violations

clanTags = { – List of clantags to protect, you can add as many as you want
[2] = “|BS|”, – Use the color codes for better looks in case of warnType,
} – but leaving them out does not make a difference

maxMarks = 2 – Determines the number of times a client needs to be marked before punishAction is executed
– NOTE: Set to 0 to instantly punish players

warnType = 1 – warnType can have the following values:
– 1 = warnString is sent as console command, e.g.
– “!warn %s ^7remove proprietary clantag %s”
– In this case, first %s is replaced with the playername, second %s with the clantag
– 2 = warnString is sent to the client as center print message, e.g.
– “^dwarn: ^7remove clantag %s”
– In this case, %s is replaced with the clantag
– NOTE: The maximum length of center print messages is 56 characters

warnString = “!warn %s ^8Remove %s ^8tags. You are ^1NOT ^8a clan member” – This action is performed according to warnType

punishAction = “!rename %s ETPlayer” – This console command is sent when maxMarks is reached
– NOTE: %s is replaced with the playername

resetCounter = true – Whether or not to reset the mark-counter when a player is punished
– NOTE: If you kick players as punishment, the counter will be reset on reconnect

exclusionType = 1 – In order to exclude your clanmates from being punished, choose one of the two
– values below to handle player exclusion
– 1 = Players whose shrublevel is >= exclusionParam are excluded
– In this case, set exclusionParam to the lowest excluded shrublevel
– 2 = Use a player database to handle exclusions
– NOTE: Read the comment below for more info

Any advice is greatly appreciated!!


(phisherman) #75

[QUOTE=jemstar;401783]Just wondering if you could help me with it?[/QUOTE]Sure thing, but I’m kind of busy at the moment, maybe I’ll manage to take a deeper look at it next week. It’s possible that I messed up the script somewhere, but a reason might also be that you set the same clantag twice:

clanTags = {
[1] = "^m|*^1BS^m*|",
[2] = "|*BS*|",

I’ll have a look at the script when I find the time, until then try removing the second line.

I’ll let you know. [noparse]:)[/noparse]

(jemstar) #76

Thanks Phishiman!!!

I have already removed the second set of tags so only color ones in but when I !setlevel jem 0 it doesnt punish me but will test it over the weekend with some trusted friends wearing tags and see if it makes a difference!!

No hurry for you to look at it, when you have time!! All the others work great!! Very appreciative for the release!!


(diaboliksmart) #77

Oh yes, the features of these scripts (especially the 1 with “VOTE addbot”) are so greats that I feel now to migrate my server to NO QUARTER mod !!! :penguin:
GG for sharing your creations, Phishiman xD

(jemstar) #78

Hi again Phisherman,

Just wanted to let you know about another issue we are having with the tagprotection,lua.

I noticed yesterday it warns/punishes players not wearing our tags!! This is one example from our admin log:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: console: : warn: ****************************************: ^4soB^0|^bG^5i^fg^do^4l^>o^0: "^8Remove ^m|^1BS^m| ^8tags. You are ^1NOT ^8a clan member^7(1/2)"
5341:35: -1: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: console: : warn: ****************************************: ^4soB^0|^bG^5i^fg^do^4l^>o^0: "^8Remove ^m|^1BS^m| ^8tags. You are ^1NOT ^8a clan member^7(2/2)"
5341:40: -1: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: console: : rename: *******************************************: ETPlayer: “ETPlayer”

He is a trusted friend of the server and I replaced his guid with ******************************************* in this example.

The relevant section of the lua code:

clanTags = { – List of clantags to protect, you can add as many as you want
– Use the color codes for better looks in case of warnType,
} – but leaving them out does not make a difference

Its more out of curiosity that I post, if the issue persists we can just police manually lol but I really like the lua and would love it working as we cant be online the whole time - but is not really a major issue for us, but it has happened.

Thanks for looking into it, no hurry or if not possible just let us know!!

Thanks heaps,

(phisherman) #79

You are right, I just reproduced this locally. I have no idea why this happens, I quick-checked the corresponding code and it seems alright. Could be a bug in Q_cleanstr(). I’ll have a look at it this weekend. Big thanks for reporting! This is a no-go, so I’ll hurry to provide a fix for you. In the meantime, you could create an additional shrublevel without privileges that is allowed to wear your tag and assign it to that poor guy so he won’t get bugged all the time.

I’m on it!

(phisherman) #80

Sorry to tell you, but apparently my PC decided to give up today, so I’m sitting here typing on my phone. I’ll see if I can manage to get it running again, I’ll keep you posted.