PtokaX forum

Archive => Archived 5.1 boards => Request for scripts => Topic started by: baba.runner on 12 November, 2006, 19:27:59

Title: AFK-script
Post by: baba.runner on 12 November, 2006, 19:27:59
Hello all

I'm searching an AFK-script like the one from the one from "Udgard swiss". Their script is only for Lua5.0X but not for 5.1.X!

Will be great if anyone could give me some info where to find such a script. or if anyone could make such a script.

Thanks in advance for all your help and assistance.

I'm using PtokaX 3.5.2.

B.R.
baba.runner
Title: Re: AFK-script
Post by: CrazyGuy on 12 November, 2006, 20:05:31
well, if you paste the 5.0.2 version, it might be converted
Title: Re: AFK-script
Post by: baba.runner on 12 November, 2006, 21:17:29
No chance its a compiled script
Title: Re: AFK-script
Post by: Herodes on 13 November, 2006, 07:35:28
First:What is "Udgard swiss"? I don't know. (I suppose its a hub) but be more informative please.
Second: If you are looking for a script that you have used-experienced then give details as to how it does whatever it does.

help us to help you :)
Title: Re: AFK-script
Post by: baba.runner on 16 November, 2006, 21:09:25
Ok, I try to do my best ;)

Udgard Swiss, I think they made this script. No it is not a hub.
It's difficult to explain what is inside this script, as it is compiled.
It is an EXE-file that installs the compiled script in your folder.
I got this script from the "DC-Stammtisch"-Forum. A German Forum for every stuff for DC++ and PtokaX!
Title: Re: AFK-script
Post by: Madman on 17 November, 2006, 16:03:14
Okey... what i got so far...
a user types #afk and and optional msg.
user returns on #back
and in the afk file there is some default msg...
for example,
#zzz will set the msg Bin im Bett, melde mich sp?ter!
witch is the same as #afk Bin im Bett, melde mich sp?ter!
there is also a #show cmd to show the time the users went away and with what msg...
the cmd #help shows all cmd's including the cmd's in afk.txt
#newafk add's a new msg to afk.txt.
All cmd's is shown in rightclick

I can code this...
But since it's in german... i don't understand the msgs in afk.txt
so a translated afk.txt would be good.... =)
I'll make the script multi lang =)
Title: Re: AFK-script
Post by: baba.runner on 17 November, 2006, 16:56:35
Hi Madman

Thanks. thats exactly what I need.
For the translation , I can provide you English and French. Just let me know in which format you want to have the file. I suppose in TXT. But all in one AFK.txt or in seperate TXT-files, one for english, one for german a.s.o. ...?

Thanks again ;) :D
Title: Re: AFK-script
Post by: CrazyGuy on 17 November, 2006, 17:46:50
My german aint perfect, but if you show the afk.txt, I'll give it a go
Title: Re: AFK-script
Post by: Madman on 17 November, 2006, 17:58:43
@baba and @cg

i used zzz as test cmd, and it looks like this.
zzz = "ZZZ, I'm sleeping",
So just put it cmd = "msg" in either one or seperate files.
i'll paste them in to the files .lang i have now anyway ;)
i'll paste some more text later...
atm I only have this "The User [nick] is AFK: " and the afk.txt to be translated.
Thanks for your help.

@cg

http://forum.ptokax.org/index.php?topic=6549#msg64455

The file is attached there... ;)
Title: Re: AFK-script
Post by: baba.runner on 17 November, 2006, 20:14:32
I think you put in the wrong link , @Madman!

It's the link of this thread here.
Title: Re: AFK-script
Post by: Madman on 17 November, 2006, 20:59:56
No it's correct.. it should link to this thread.. and infact.. it links to your post with the file ;)


Lang = {
Returned = "User [nick] has just returned",
notAway = "You are not away",
defaultAFK = "The User [nick] is AFK: ",
showMsg = "Current users away:",
Syntax = "Syntax: ",
notUserCmd = "You are not allowed to use this command",
tableMsg = "Around [time], [nick] went away, and left this msg: ",
rcNAFKMsg = "Enter msg for cmd",
rcNAFKCmd = "Enter cmd",
rcAFK = "Enter msg",
newCmdAdd = "[cmd] with the msg: [msg] was added by [nick], [cmd] will appear in rightclick after reconnect",
newCmdExist = "already added",
HelpHelp = "Shows this help",
HelpBack = "Makes you come back from afk",
HelpAFK = "[Optinal msg], Set you afk, with msg",
HelpShow = "Shows current away msg's",
HelpNewAFK = "[cmd] [msg], adds cmd with msg",
Cmds = {
-- AFK.txt should be here...
cmd = "the msg to the cmd",
},
}


This is the entire eng.lang

all text in [] are case sensative, so [Nick] wont work but [nick] will..

btw, i'll make a swedish translation
Title: Re: AFK-script
Post by: CrazyGuy on 17 November, 2006, 22:21:56
Aight, here's a translated afk.txt
Some are translated word by word, most are translated freely, others are completely own creations and even a few i didn't bother with so just deleted them  ;D

Quote
zzz I'm in bed, will report back later!
away I'm away, just away! Will report back later...
cu I'm away, just away! Will report back later...
work I'm working, will report back later...
school I'm at school / doing coursework, will report back later...
coffee making / getting coffee
eating I'm cooking / eating.    Catcha soon!
rs Restarting computer... Be right there :-)
tv I'm staring at the tv, will report back later...
company I got company!! Do Not Disturb... :-)
shopping I'm gone shopping, cya later...
phone I'm on the phone...
shower taking a shower, will report back later!
gaming I'm gaming til my eyes turn square ;-) 
outside With every encounter with natur, one can find more than was intended to. 
biking Thinking about the environment and my health * biking is clean * 
CDgrilling Time to fry a few cd's ;-) cya later..... 
googling I'm googling, cya soon
Title: Re: AFK-script
Post by: Madman on 18 November, 2006, 00:19:13
Quoteschool I'm at school / doing coursework, will report back later...
guessing coursework is meant to be course work... if not, you tell me the swedish word for it ;p


Btw, you can't do an eng-german translation on the code part i pasted earlier?
Title: Re: AFK-script
Post by: CrazyGuy on 18 November, 2006, 02:00:41
QuoteBtw, you can't do an eng-german translation on the code part i pasted earlier?

Well, if you mean from German to English, It looks like your code is in english.
If you mean the other way around, then no. Since im learning swedish I have trouble making german sentences. I mix words up and such  :-\
Title: Re: AFK-script
Post by: Madman on 18 November, 2006, 03:31:04
no i meant english to german. Well, maybe someone else can do it
Title: Re: AFK-script
Post by: baba.runner on 18 November, 2006, 20:25:57
Here comes the translation: English to German:
Lang = {
Returned = "User [nick] ist nun wieder f?r euch da",
notAway = "Du warst nicht weg",
defaultAFK = "Der User [nick] ist AFK: ",
showMsg = "Folgende User sind zurzeit AFK:",
Syntax = "Syntax: ",
notUserCmd = "Dir ist es nicht erlaubt diesen Befehl zu nutzen",
tableMsg = "Gegen [time], ging [nick] weg, und hinterlies diese Nachricht: ",
rcNAFKMsg = "Gib die Nachricht f?r den Befehl ein",
rcNAFKCmd = "Gib den Befehl ein",
rcAFK = "Gib die Nachricht ein",
newCmdAdd = "[cmd] mit der Nachricht: [msg] wurde von [nick] hinzugef?gt, [cmd] wird nach einem Reconnect im Rechtsklick-Men? erscheinen",
newCmdExist = "schon hinzugef?gt",
HelpHelp = "Zeigt diese Hilfe",
HelpBack = "Makes you come back from afk",
HelpAFK = "[Optinal msg], Setz dich afk, mit dieser Nachricht",
HelpShow = "Zeigt die bestehenden AFK Nachrichten an",
HelpNewAFK = "[cmd] [msg], f?gt eine Nachricht mit diesem Befehl hinzu",
Cmds = {
-- AFK.txt should be here...
cmd = "Die Nachricht zu diesem Befehl",
},
}


Hopefully this is what you need! ;)
Title: Re: AFK-script
Post by: Madman on 19 November, 2006, 00:43:33
Yup, it was =)

And here is the script...
http://www.thedestruction.org/lua/lua5/AFK.rar
Title: Re: AFK-script
Post by: baba.runner on 20 November, 2006, 00:22:14
Hi Madman

Thank you really much for this script. I really appreciate.

Nevertheless there are some minor bugs in it.
While changing the language to german.lang in the settings.ini file, I got follwing errors in the script window of my PtokaX:
[22:04] Syntax ...OKAX TESTHUB\PTOKAX 0.3.5.2.lua5.1.1\scripts\AFK.lua:77: attempt to index global 'Lang' (a nil value)
[23:54] Syntax ...OKAX TESTHUB\PTOKAX 0.3.5.2.lua5.1.1\scripts\AFK.lua:94: attempt to index global 'Lang' (a nil value)

english.lang and swedish.lang work both fine!


An other thing is that in the "original"-version the afk-message I entered while I am AFK appears in the PM that anybody will send me.
Do you think you can also inegrate this function again in your script?
Title: Re: AFK-script
Post by: Madman on 20 November, 2006, 04:31:10
Just need this translated...
"This is an automated msg, "
Title: Re: AFK-script
Post by: baba.runner on 20 November, 2006, 14:31:22
Here it comes...
"Dies ist eine automatische Nachricht,"

I have also an other issue regarding your script
I made an AFK:
[14:20:34] <??XXXXX-AFKBot??> Anv?ndaren Baba.runner ?r AFK: Jag ?r och jobbar, kommer tillbaka senare

And went I mack back, it shows this:
[14:20:45] <??XXXXX??> You weren't in away mode so you don't need to get back

It seems that the AFK-status of the user is not set.
Title: Re: AFK-script
Post by: Madman on 20 November, 2006, 15:16:15
Quote
-- Version 1.1
-- Fixed: error in german language ;p
-- Added: away msg in pm, request by baba.runner
-- Fixed: user not set away if useing lang cmd's

http://www.thedestruction.org/lua/lua5/AFK.rar


That's should be it.. hopefuly no more bugs =)
Title: Re: AFK-script
Post by: baba.runner on 20 November, 2006, 23:28:49
Hi Madman

You're really great.
The PM function works well.
There is only one open issue

I went AFK:
[23:14:55] <??XXXXX-AFKBot??> Der User Baba.runner ist AFK: Bin am pennen und danach arbeiten, melde mich sp?ter!

That's fine and the AFK status is recognized, as the PM notification works fine. I tested it in my Hub.
[23:15:11] <balu> Hallo
[23:15:14] <Baba.runner> Dies ist eine automatische Nachricht, Gegen 2006-11-20 23:14:54, ging Baba.runner weg, und hinterlies diese Nachricht: Bin am pennen und danach arbeiten, melde mich sp?ter!
[23:15:27] <balu> great it works!
[23:15:30] <Baba.runner> Dies ist eine automatische Nachricht, Gegen 2006-11-20 23:14:54, ging Baba.runner weg, und hinterlies diese Nachricht: Bin am pennen und danach arbeiten, melde mich sp?ter!
[23:15:32] <balu> thanks to Madman
[23:15:35] <Baba.runner> Dies ist eine automatische Nachricht, Gegen 2006-11-20 23:14:54, ging Baba.runner weg, und hinterlies diese Nachricht: Bin am pennen und danach arbeiten, melde mich sp?ter!

But the back function does not work correctly!
[23:18:06] <??XXXXX??> You weren't in away mode so you don't need to get back
And the AFK is not turned off:
[23:19:04] <balu> and ? still AFK?
[23:19:07] <Baba.runner> Dies ist eine automatische Nachricht, Gegen 2006-11-20 23:14:54, ging Baba.runner weg, und hinterlies diese Nachricht: Bin am pennen und danach arbeiten, melde mich sp?ter!

Perhaps it is because I also use Leviathan? It has also an inbuild AFK function.
Title: Re: AFK-script
Post by: Cêñoßy†ê on 20 November, 2006, 23:46:42
Quote from: baba.runner on 20 November, 2006, 23:28:49

But the back function does not work correctly!
[23:18:06] <??XXXXX??> You weren't in away mode so you don't need to get back
And the AFK is not turned off:
[23:19:04] <balu> and ? still AFK?
[23:19:07] <Baba.runner> Dies ist eine automatische Nachricht, Gegen 2006-11-20 23:14:54, ging Baba.runner weg, und hinterlies diese Nachricht: Bin am pennen und danach arbeiten, melde mich sp?ter!

Perhaps it is because I also use Leviathan? It has also an inbuild AFK function.

yeps.. leviathan does that to it.
Just add This AFK script before Leviathan in px script list (Script Editor tab) and it works fine  ::)
Title: Re: AFK-script
Post by: baba.runner on 20 November, 2006, 23:53:45
Quote from: C??o?y?? on 20 November, 2006, 23:46:42
yeps.. leviathan does that to it.
Just add This AFK script before Leviathan in px script list (Script Editor tab) and it works fine  ::)
YES!!!!!
It works now very fine. A special "Thank you" to Madman. You did it ;)
And also thanks to you C??o?y?? for your assistance ;)

For me the scipt is now very fine.
Can you please put this thread to solved. Thx.