PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: plop on 10 June, 2004, 05:13:19

Title: kickbattle V2
Post by: plop on 10 June, 2004, 05:13:19
instead of counting the contesters now need 2 type x words.
1 word per line otherwise it's considered cheating, which offcourse is punished.
it needs external word files, 1 word per line.
for this you can for exampl use the files from wombat's word jumble, or you can download the files from my website (word jumble word files can be found there 2).

download here (http://www.plop.nl/ptokaxbots/Plop/kickbattle_v2.lua)

plop
Title:
Post by: bastya_elvtars on 10 June, 2004, 16:02:35
GJ again, plop, as usual :D
Title: h!
Post by: Cp6uja on 11 June, 2004, 09:39:53
Hi All !!!

plop nice work  :]
Title:
Post by: imby on 26 June, 2004, 03:23:35
amazing script. by far the best i've seen. plop or someone else. could you please implement these things for me? :

when kicked a user gets the default time ban.

like in the old script, a setting for when a user enters the hub with too many hubs, they get auto added as a ball?

maybe not sent as much txt to the main chat? condense the pictures somewhat?

make it more apparent to general users, that they're actually kicking someone.

maybe by rewording "[02:03] <-KickBattle-> x has scored. His/Her's current score is: 2"

to something along the lines of 'x has successfully kicked (cheating/faking users nick) from the hub' or something. my brain isnt working at the moment, but you get the idea.

Also, i'm getting the following syntax errors:

"No syntax errors in script file texter4.5.lua
Syntax error: attempt to call global `Save' (a nil value)
stack traceback:
   1:  function `Main' at line 63 [file `... - Games\ptokax 15.25\scripts\kickbattle_v2.lua']

Syntax error: attempt to concat global `cmd' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 367 [file `...rams - Games\ptokax 15.25\scripts\texter4.5.lua']

Syntax error: attempt to concat global `cmd' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 367 [file `...rams - Games\ptokax 15.25\scripts\texter4.5.lua']

Syntax error: attempt to concat global `cmd' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 367 [file `...rams - Games\ptokax 15.25\scripts\texter4.5.lua']"

am using txter. seems something to do with txter but this error only happened when i added kickbattle. what it means or how to solve?
Title:
Post by: plop on 26 June, 2004, 03:39:29
kickbattle V2.1 is on my website try if it happens on that version.
i never saw that error on my hub, i reguarly run them side by side myself.

i removed the hub check as we (yep3 and me) came up with the idea 2 use CDM with a raw command 2 controll it.
so users can get release there stress on fakers. lol

download titmouse from the tools section of my website.
all the text which is shown in purple can be changed 2 your wishes.
just leave the " " round it.
small hint 2 avoid you from pulling out your hair, don't use ctrl-c.
that closes the file.

plop
Title:
Post by: imby on 26 June, 2004, 03:45:27
thanks, will try what you said tomorrow and report back if need extra help. one thing though, checked your website. the link for v2 and 2.1 are exactly the same.

oh, and i thought that syntax info would give an inidication of what was causing it. dont know very much about scripting at all :)
Title:
Post by: plop on 26 June, 2004, 16:57:47
QuoteOriginally posted by imby
thanks, will try what you said tomorrow and report back if need extra help. one thing though, checked your website. the link for v2 and 2.1 are exactly the same.

oh, and i thought that syntax info would give an inidication of what was causing it. dont know very much about scripting at all :)
you found a bug in the CMS i made for my website.
the .1 was removed because of an error in a strfind.
thx.

plop
Title:
Post by: imby on 26 June, 2004, 17:16:36
thx, the link to titmouse also seems dead.

tryed the new version. "Syntax error: bad argument #2 to `random' (interval is empty)
stack traceback:
   1:  function `random' [C]
   2:  function `GetWords' at line 194 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.1.lua']
   3:  function `Commands' at line 317 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.1.lua']
   4:  function `DataArrival' at line 374 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.1.lua']"

still no chance in implementing the normal time ban for a kick? when kicked the users reconnect and enter the hub again within a minute. seems to only disconnect them. maybe a message to their client why they've kicked would also be nice, but haven't checked if that's implemented yet.
Title:
Post by: imby on 26 June, 2004, 17:24:28
"i removed the hub check as we (yep3 and me) came up with the idea 2 use CDM with a raw command 2 controll it. "

adding users who enter the hub who are in too many hubs would be a wonderful feature. because people would still be added as balls even when ops aren't around. or when ops are too lazy to add people all the time. an option to have it turned on or off in the next version would make you a god :D but i can appreciate why you'd not want to implement it if made more for personal use.  :))
Title:
Post by: plop on 26 June, 2004, 18:44:18
QuoteOriginally posted by imby
"i removed the hub check as we (yep3 and me) came up with the idea 2 use CDM with a raw command 2 controll it. "

adding users who enter the hub who are in too many hubs would be a wonderful feature. because people would still be added as balls even when ops aren't around. or when ops are too lazy to add people all the time. an option to have it turned on or off in the next version would make you a god :D but i can appreciate why you'd not want to implement it if made more for personal use.  :))
V2.2 is on my site.
------ V2.2
-- fixed error on random.
-- added, hub check can nominate ball's again.

enjoy

plop
Title:
Post by: imby on 26 June, 2004, 23:03:13
woohoo, thanks,  :D but still no temp ban for those kicked. just a disconnection. so those kicked rejoin again within a minute. if you don't want it there, maybe you or someone can show me what function to add to the script?
Title:
Post by: plop on 27 June, 2004, 03:50:39
QuoteOriginally posted by imby
woohoo, thanks,  :D but still no temp ban for those kicked. just a disconnection. so those kicked rejoin again within a minute. if you don't want it there, maybe you or someone can show me what function to add to the script?
change:
vix:Disconnect()

for
vix:TempBan()

line 304 in the DoGame function.

plop
Title:
Post by: imby on 01 July, 2004, 03:02:10
been testing.
downloaded v2.2 fresh and removed other scripts so i could see what was going on.

upon: !addwords : Syntax Error: attempt to concat global `tScoresFolder' (a nil value)

Upon: !delwords : Syntax Error: attempt to concat global `tScoresFolder' (a nil value)

Next, implemented vix:TempBan() . feature works perfectly. no more errors to add, but the same errors specified are still there. max hub kick works fine also.

Set up as follows:

In folder scripts\kickbattle_v2.2.lua
              scripts\public_kick\kickbattle[E].txt
              scripts\public_kick\kickbattle.lua (made itself)

that's all the files associated.
Title:
Post by: plop on 01 July, 2004, 04:38:51
replace the SaveWords function for this 1:
function SaveWords()
   writeto(fScoresFolder.."/"..fLangFile)
   for i=1,getn(tGame.tBWords) do
      write(tGame.tBWords[i].."\n")
   end
   writeto()
end
small spelling error.
tScoresFolder should be fScoresFolder.

plop
Title:
Post by: (UK)Ridaz on 01 July, 2004, 10:16:35
Hiya Plop,

Im getting this error report
Syntax error: attempt to call global `Save' (a nil value)
stack traceback:
   1:  function `Main' at line 82 [file `... Debug\Ptokax Debug\scripts\kickbattle_v2.2.lua']

Could it be something im doing wrong?
Title:
Post by: imby on 01 July, 2004, 23:47:04
i got the same error. odd. i tested it on ptokax 4.99 and it worked perfectly. added it to 15.25 and got that error.
Title:
Post by: plop on 02 July, 2004, 04:36:54
version 2.3 is uploaded 2 my site.
again a stupid error, haven't been really here with my head the last weeks.
forgot 2 change Save() to SaveScores() on function Main().

plop
Title:
Post by: (UK)Ridaz on 02 July, 2004, 20:50:50
QuoteOriginally posted by plop

change:
vix:Disconnect()

for
vix:TempBan()

line 304 in the DoGame function.

plop


Cheers again plop, i had to change the quoted line above in version 2.3 and now me and my users are  happy.

Keep them coming.

Ridaz
Title:
Post by: imby on 02 July, 2004, 23:24:13
yep, thanks a lot plop. gonna test it fully tonight. think i found a few minor errors. consider me your beta tester.  :D  dunno if my error reports are useful to you or irritating. i suspect the latter, but anyway, thanks for your patience and time. it's really appreciated.
Title:
Post by: plop on 03 July, 2004, 00:08:53
QuoteOriginally posted by imby
yep, thanks a lot plop. gonna test it fully tonight. think i found a few minor errors. consider me your beta tester.  :D  dunno if my error reports are useful to you or irritating. i suspect the latter, but anyway, thanks for your patience and time. it's really appreciated.
the only bug reports which are anoying are like "it doesn't work". lol
any detailed report with the msg's from the ptokax console and posible with the typed command are most welcome.
as i need those 2 be able 2 find the bug.
your bug reports are great.

plop
Title:
Post by: imby on 03 July, 2004, 01:34:29
ah, glad i'm not such a pest :)

error 1: if nominated ball itself types the magic words, not only does it stop him/her from being kicked, it seems to halt the script altogether. no errors seen in ptokax but seems mildy serious.

*goes back to testing*
Title:
Post by: imby on 03 July, 2004, 02:24:41
update: if nominated user types ANYTHING in the main chat at all, it cancels out the script completely. need a 'restart scripts' to get it working again. with the exception of that, can't find one other error. :D almost there.
Title:
Post by: plop on 03 July, 2004, 02:37:35
works fine here tho.
[02:40] <-KickBattle-> plop has been named the ball by [TGA-OP]plop in kick soccer for the following reason: test
[02:40] <-KickBattle-> The magic words are: the / affectionately / typed
[02:40] the
[02:40] typed
[02:40] *** Disconnected

[02:41] <-KickBattle-> plop has been named the ball by [TGA-OP]plop in kick soccer for the following reason: test
[02:41] <-KickBattle-> The magic words are: point / keyboards / end
[02:41] point
[02:41] point
[02:41] end
[02:41] keyboards
 
[02:42] <-KickBattle-> plop has been named the ball by [TGA-OP]plop in kick soccer for the following reason: test
[02:42] <-KickBattle-> The magic words are: pretty / known / as
[02:42] pretty
[02:42] known
[02:42] *** Disconnected

[02:43] <-KickBattle-> plop has been named the ball by [TGA-OP]plop in kick soccer for the following reason: test
[02:43] <-KickBattle-> The magic words are: god / online / through
[02:43] balh
[02:43] da
[02:43] re
[02:43] fsfg
[02:43] ga
[02:43] e
[02:43] re
[02:43] rwet
[02:44] qtv
[02:44] <[TGA-OP]plop> god
[02:44] <[TGA-OP]plop> online
[02:44] <[TGA-OP]plop> through
[02:44] <-KickBattle-> [TGA-OP]plop has scored. His/Her's current score is: 25
[02:44] <-KickBattle-> No more balls left. Game ended!
plop
Title:
Post by: imby on 03 July, 2004, 20:59:14
sorry. done :)
Title:
Post by: imby on 04 July, 2004, 21:53:09
never mind. did it myself with careful testing.
i'll delete if possible the script i pasted to save space.

pin pointed the error exactly. it wasn't something i did, added your script, then a user in too many hubs entered. if the user entered in too many hubs types the words it halts the script. then upon user in too many hubs rejoin: Syntax Error: `for' table must be a table.

i dunno if that helps.
Title:
Post by: imby on 04 July, 2004, 22:25:51
you only tested by using !ball i think.
Title:
Post by: plop on 05 July, 2004, 01:03:16
QuoteOriginally posted by imby
you only tested by using !ball i think.
yep i indeed only tested it with the !ball command.
thx for the info, should help a lot 2 find the bug now.

plop
Title:
Post by: imby on 05 July, 2004, 01:51:55
thx, ill check back every couple of days for a fix.
Title:
Post by: imby on 05 July, 2004, 04:46:23
update: it's also people that havent been nominated by the script yet, but are in too many hubs, who can stop the script.
Title:
Post by: plop on 10 July, 2004, 01:21:15
------ V2.4
-- fixed balls can't kick balls anymore,
-- should solve the bug causing the script to freeze when they try.

plop
Title:
Post by: imby on 10 July, 2004, 04:04:52
hi, i dunno if this is any help. only added the tempban part and left it running:

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `NewUserConnected' at line 517 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']

if not, i'll try looking more into what's causing it.
Title:
Post by: plop on 10 July, 2004, 08:27:57
QuoteOriginally posted by imby
hi, i dunno if this is any help. only added the tempban part and left it running:

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `NewUserConnected' at line 517 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']

if not, i'll try looking more into what's causing it.
try removing function NewUserConnected also, the script should still keep finding the balls.
only a bit later.
not only because of this bug, but also 2 check if dataarival works correct on nominating balls which are in 2 much hub's.

plop
Title:
Post by: imby on 11 July, 2004, 03:36:16
Syntax error: attempt to concat a nil value
stack traceback:
   1:  function `DoGame' at line 299 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']
   2:  function `Commands' at line 399 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']
   3:  function `DataArrival' at line 448 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']

this was happening back on 2.3 to. it seemed to work at first. then i got a fresh version of 2.3 from your site and it started doing that. there's something fundamentally wrong with that script. and i can't work it out. i guess you just need to test it thoroughly and see what comes up. no matter what you implement it just seems to die after the first few users have been kicked from being in too many hubs for me. as a result ive been unable to leave it running in my hub as of yet. maybe you've not seen it because you use it only with the !ball function? or maybe i'm doing something wrong, but i truly doubt it. think it's beyond me. will leave it to you for the time being.
Title:
Post by: imby on 21 July, 2004, 20:00:49
hi, pls don't give up. it's a great script. is it only me who's getting problems? maybe i'm doing something wrong, no one else seems to be reporting anything.
Title:
Post by: plop on 22 July, 2004, 01:59:14
QuoteOriginally posted by imby
hi, pls don't give up. it's a great script. is it only me who's getting problems? maybe i'm doing something wrong, no one else seems to be reporting anything.
i'm not giving up and yes you seem 2 be the only 1 having this problem.
i'm just @ the moment busy on a new CMS for my site which is taking a lot of time.
unlike the previous version i want this 1 2 work flawlessly and i'm adding a whole bunch of new features.

plop
Title:
Post by: imby on 22 July, 2004, 18:23:49
adding new features to your site or to the script? and if it's just me then i guess there's nothing you can do really. it might be the ptokax i'm using, or the scripts i'm using it in conjunction with. i've regged all the 6 bots in the user list including robocop with one bot name.
Title:
Post by: plop on 22 July, 2004, 23:37:29
QuoteOriginally posted by imby
adding new features to your site or to the script? and if it's just me then i guess there's nothing you can do really. it might be the ptokax i'm using, or the scripts i'm using it in conjunction with. i've regged all the 6 bots in the user list including robocop with one bot name.
the site is gone have a bunch of new features, filesize, date, descriptions, etc..

try giving kickbattle it's own nick, if it then still gives an error you have found a bug.
if not you caused a conflict.

plop
Title:
Post by: imby on 23 July, 2004, 21:16:48
gave own nick, and works for the first few users, then dies. with both new user connected there, and not there.


Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `NewUserConnected' at line 517 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']

Syntax error: attempt to concat a nil value
stack traceback:
   1:  function `DoGame' at line 306 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']
   2:  function `Commands' at line 399 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']
   3:  function `DataArrival' at line 448 [file `... Games\ptokax 15.25\scripts\kickbattle_v2.4.lua']

cheers.
Title:
Post by: bastya_elvtars on 25 October, 2004, 02:24:56
My biggest pride i guess: i updated it!

Quote------ V2.5
-- added: newly connecting user gets notified of the current ball and words
-- added custom bantime (or perm) in CL
------------------------------------

Download here (http://rnrdoctor.sytes.net/kickbattle_v2.5.lua)
Title:
Post by: bastya_elvtars on 25 October, 2004, 11:16:13
any1 who dled it please redownload, i forgot 2 comment the debug part :D
Title:
Post by: yepyepyep4711 on 25 October, 2004, 20:44:17
QuoteOriginally posted by bastya_elvtars
any1 who dled it please redownload, i forgot 2 comment the debug part :D

But now it's working great!!! :D

yepyepyep4711, feature suggester, lucky tester, happy user  8)
Title:
Post by: UwV on 27 January, 2005, 12:25:08
QuoteOriginally posted by bastya_elvtars
any1 who dled it please redownload, i forgot 2 comment the debug part :D
@ http://rnrdoctor.sytes.net/kickbattle_v2.5.lua
Gateway Timeout
The following error occurred:

A gateway timeout occurred. The server is unreachable.
Please contact the administrator.
:0(
and i really want it .. :0))
(i have same prob as imby does)
Title:
Post by: plop on 30 January, 2005, 19:23:43
QuoteOriginally posted by UwV
QuoteOriginally posted by bastya_elvtars
any1 who dled it please redownload, i forgot 2 comment the debug part :D
@ http://rnrdoctor.sytes.net/kickbattle_v2.5.lua
Gateway Timeout
The following error occurred:

A gateway timeout occurred. The server is unreachable.
Please contact the administrator.
:0(
and i really want it .. :0))
(i have same prob as imby does)
click (http://www.plop.nl/ptokaxbots/bastya_elvtars.php)

plop
Title: great
Post by: UwV on 04 February, 2005, 01:33:18
have i looked with my eyes closed.. or is this a new section in your wellrespected page in bookmarks ?  :D