AFK-script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

AFK-script

Started by baba.runner, 12 November, 2006, 19:27:59

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

baba.runner

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

CrazyGuy

well, if you paste the 5.0.2 version, it might be converted

baba.runner

No chance its a compiled script

Herodes

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 :)

baba.runner

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!

Madman

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 =)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

baba.runner

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

CrazyGuy

My german aint perfect, but if you show the afk.txt, I'll give it a go

Madman

#8
@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... ;)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

baba.runner

I think you put in the wrong link , @Madman!

It's the link of this thread here.

Madman

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
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

CrazyGuy

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

Madman

#12
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?
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

CrazyGuy

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  :-\

Madman

no i meant english to german. Well, maybe someone else can do it
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

baba.runner

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! ;)

Madman

We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

baba.runner

#17
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?

Madman

#18
Just need this translated...
"This is an automated msg, "
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

baba.runner

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.

Madman

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 =)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

baba.runner

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.

Cêñoßy†ê

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  ::)
Powered By Leviathan™ 2nd Generation v. 1.9

baba.runner

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.

SMF spam blocked by CleanTalk