WinMX World :: Forum

Metis Scripts and Help => Other Metis scripts => Topic started by: Lagerlout666 on December 03, 2006, 07:28:29 pm

Title: Last visited script
Post by: Lagerlout666 on December 03, 2006, 07:28:29 pm
Code: [Select]
<OnJoinRoom type="script">
###########################
### log files directory ###
###########################
<out type="push" extdata="ipdisplaydirectory">E:\Program Files\RoboMX\Plugins\txt\</out>
###########################
</OnJoinRoom>

<OnEnter type="script">
<out type="push" extdata="IP">%IP%</out>
<out type="push" extdata="NAME">%NAME%</out>

<out type="push" extdata="HOUR">%HOUR%</out>
<out type="push" extdata="HOUR" condition="<" lvalue="$HOUR$" rvalue="10">0$HOUR$</out>
<out type="push" extdata="MINUTE">%MINUTE%</out>
<out type="push" extdata="MINUTE" condition="<" lvalue="$MINUTE$" rvalue="10">0$MINUTE$</out>
<out type="push" extdata="SECOND">%SECOND%</out>
<out type="push" extdata="SECOND" condition="<" lvalue="$SECOND$" rvalue="10">0$SECOND$</out>

<out type="push" extdata="YEAR">%YEAR%</out>

<out type="push" extdata="MONTH">%MONTH%</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="1">January</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="2">February</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="3">March</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="4">April</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="5">May</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="6">June</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="7">July</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="8">August</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="9">September</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="10">October</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="11">November</out>
<out type="push" extdata="MONTH" condition="==" lvalue="$MONTH$" rvalue="12">December</out>

<out type="push" extdata="DAY">%DAY%</out>
<out type="push" extdata="DAY" condition=">" lvalue="$DAY$" rvalue="3">$DAY$th</out>
<out type="push" extdata="DAY" condition="==" lvalue="$DAY$" rvalue="1">1st</out>
<out type="push" extdata="DAY" condition="==" lvalue="$DAY$" rvalue="2">2nd</out>
<out type="push" extdata="DAY" condition="==" lvalue="$DAY$" rvalue="3">3rd</out>
<out type="push" extdata="DAY" condition="==" lvalue="$DAY$" rvalue="21">21st</out>
<out type="push" extdata="DAY" condition="==" lvalue="$DAY$" rvalue="21">22nd</out>
<out type="push" extdata="DAY" condition="==" lvalue="$DAY$" rvalue="23">23rd</out>
<out type="push" extdata="DAY" condition="==" lvalue="$DAY$" rvalue="31">31st</out>

<out type="push" extdata="NewEntry">%USERVAR[IP]% %USERVAR[HOUR]%:%USERVAR[MINUTE]%.%USERVAR[SECOND]% %USERVAR[DAY]%_%USERVAR[MONTH]%_%USERVAR[YEAR]% %USERVAR[NAME]%</out>

<out type="push" extdata="linenumber">0</out>
<out type="push" extdata="enters">0</out>

<out type="push" extdata="linenumber"><operator type="+" lvalue="%USERVAR[linenumber]%" rvalue="1"/></out>
<out type="push" extdata="previousenter"><operator type="readfile" nvalue="%USERVAR[ipdisplaydirectory]%DisplayLog.txt" lvalue="l" rvalue="%USERVAR[linenumber]%"/></out>
<out type="self" condition="==" lvalue="%USERVAR[previousenter]%" rvalue="">!AddIpDisplay!</out>
<out type="break" condition="==" lvalue="%USERVAR[previousenter]%" rvalue=""></out>
<out type="push" extdata="previousenteriplength"><operator type="strfind" lvalue="%USERVAR[previousenter]%" rvalue=" "/></out>
<out type="push" extdata="previousenterip"><operator type="strtrm" lvalue="%USERVAR[previousenter]%" rvalue="%USERVAR[previousenteriplength]%"/></out>
<out type="goto" extdata="-6" condition="!=" lvalue="%USERVAR[previousenterip]%" rvalue="%USERVAR[IP]%"></out>

<out type="push" extdata="previousenter"><operator type="strrem" lvalue="-%USERVAR[previousenter]%" rvalue="-%USERVAR[previousenterip]% "/></out>
<out type="push" extdata="previousenteriplength"><operator type="strfind" lvalue="%USERVAR[previousenter]%" rvalue=" "/></out>
<out type="push" extdata="previousentertime"><operator type="strtrm" lvalue="%USERVAR[previousenter]%" rvalue="%USERVAR[previousenteriplength]%"/></out>

<out type="push" extdata="previousenter"><operator type="strrem" lvalue="-%USERVAR[previousenter]%" rvalue="-%USERVAR[previousentertime]% "/></out>
<out type="push" extdata="previousenteriplength"><operator type="strfind" lvalue="%USERVAR[previousenter]%" rvalue=" "/></out>
<out type="push" extdata="previousenterdate"><operator type="strtrm" lvalue="%USERVAR[previousenter]%" rvalue="%USERVAR[previousenteriplength]%"/></out>

<out type="push" extdata="previousentername"><operator type="strrem" lvalue="-%USERVAR[previousenter]%" rvalue="-%USERVAR[previousenterdate]% "/></out>
<out type="push" extdata="previousenterdate"><operator type="strrep" nvalue="%USERVAR[previousenterdate]%" lvalue="_" rvalue=" "/></out>

<out>/opmsg %NAME% last entered at %USERVAR[previousentertime]%GMT on %USERVAR[previousenterdate]%</out>
<out>/opmsg Has been known as %USERVAR[previousentername]%</out>

<out type="push" extdata="linenumber">0</out>
<out type="pop" extdata="IpDisplayFile"></out>

<out type="push" extdata="linenumber"><operator type="+" lvalue="%USERVAR[linenumber]%" rvalue="1"/></out>
<out type="push" extdata="IpDisplayFileLine"><operator type="readfile" nvalue="%USERVAR[ipdisplaydirectory]%DisplayLog.txt" lvalue="l" rvalue="%USERVAR[linenumber]%"/></out>
<out type="goto" extdata="7" condition="==" lvalue="%USERVAR[IpDisplayFileLine]%" rvalue=""></out>
<out type="push" extdata="previousenteriplength"><operator type="strfind" lvalue="%USERVAR[previousenter]%" rvalue=" "/></out>
<out type="push" extdata="previousenterip"><operator type="strtrm" lvalue="%USERVAR[previousenterip]%" rvalue="%USERVAR[previousenteriplength]%"/></out>
<out type="goto" extdata="-5" condition="==" lvalue="%USERVAR[previousenterip]%" rvalue="%USERVAR[IP]%"></out>
<out type="push" extdata="IpDisplayFile"><operator type="strcat" lvalue="%USERVAR[IpDisplayFile]%" rvalue="%USERVAR[IpDisplayFileLine]%"/></out>
<out type="push" extdata="IpDisplayFile"><operator type="strcat" lvalue="%USERVAR[IpDisplayFile]%" rvalue="«newline«"/></out>
<out type="goto" extdata="-8"></out>

<out type="push" extdata="IpDisplayFile"><operator type="strrep" nvalue="%USERVAR[IpDisplayFile]%" lvalue="«newline«" rvalue="\n"/></out>
<out type="file" mode="t" extdata="%USERVAR[ipdisplaydirectory]%DisplayLog.txt">%USERVAR[IpDisplayFile]%</out>

<out type="self">!AddIpDisplay!</out>
</OnEnter>

<command type="script">
<in users="_BOT_SELF_TRIGGER_">!AddIpDisplay!</in>
<out type="file" mode="a" extdata="%USERVAR[ipdisplaydirectory]%DisplayLog.txt">%USERVAR[NewEntry]%\n</out>
</command>
Title: Re: Last visited script
Post by: gypsyroadhog on January 05, 2009, 08:01:49 pm
Hiya
I dont know if i am missing something here ?
is this all thats to the direcrory        <out type="push" extdata="ipdisplaydirectory">E:\Program Files\RoboMX\Plugins\txt\</out>
as its making no record or file
OR has it got to be used with a specific robot, and IF so which bot
thankyou if you can help
although i had to change to        C:\Program Files\Games Bot\Plugins\txt\
Title: Re: Last visited script
Post by: ']['affy on January 05, 2009, 10:44:45 pm
C:\Program Files\RoboMX\Plugins</out>    try that gypsy
Title: Re: Last visited script
Post by: sharon2010 on January 08, 2009, 04:08:57 am
Hi,
I was trying to get this script to work too. I did have it working for 1 night and then it stopped. I'm running metis 2.7 version 6. Does this script not work  properly on this metis bot?  I changed the file path to match where my bot is again and still no go.
Title: Re: Last visited script
Post by: ']['affy on January 08, 2009, 08:39:07 am
hello sharon ive had a look at this script instead of this line being like this <out type="push" extdata="ipdisplaydirectory">E:\Program Files\RoboMX\Plugins\txt\</out>

can u do it so it looks like this  <out type="push" extdata="ipdisplaydirectory">E:\Program Files\RoboMX\Plugins\txt</out>

Title: Re: Last visited script
Post by: gypsyroadhog on January 13, 2009, 04:02:16 pm
Still having probs with this?
when my computer is on, the script works well, but when its been turned off and back on, it
starts from scratch again, saying "welcome", even if its a visitor who has called before ?
Title: Re: Last visited script
Post by: Røçkåfë££ë® §kåñK on January 13, 2009, 04:46:44 pm
in that case i would suggest that metis is not saving the file correctly. can you check if it is in fact making a file or not?
Title: Re: Last visited script
Post by: gypsyroadhog on January 13, 2009, 05:04:04 pm
In my MXC i have <out type="push" extdata="ipdisplaydirectory">C:\Program Files\Games Bot\Plugins\txt</out>
then in my C:\Program Files\Games Bot\Plugins
it creates txtDisplayLog
Title: Re: Last visited script
Post by: F£¥è® on January 13, 2009, 11:24:50 pm
This would not work for me until I added a folder named DisplayLog.txt to the plugins folder,   now works great
Title: Re: Last visited script
Post by: gypsyroadhog on January 14, 2009, 02:07:57 pm
Thanks Flyer
Did you have to change any of       <out type="push" extdata="ipdisplaydirectory">C:\Program Files\Games Bot\Plugins\txt</out>
or leave it as it is?
Title: Re: Last visited script
Post by: Lagerlout666 on January 14, 2009, 03:40:59 pm
What OS are you running. If you have vista this script wont wok as it wont have the right permissions to write to their. safest bet is to choose <out type="push" extdata="ipdisplaydirectory">C:\</out>
Title: Re: Last visited script
Post by: F£¥è® on January 14, 2009, 03:51:39 pm
Hi Gypsy,
I only changed the path to my bot directory did not need to add the folder name.

@ Deux,
I run xp pro with service pack 2 and it would not run as it is without adding the folder.
Title: Re: Last visited script
Post by: gypsyroadhog on January 14, 2009, 04:25:16 pm
I use XP Home and service pack 2
So is the correct directory   <out type="push" extdata="ipdisplaydirectory">C:\Program Files\Games Bot\Plugins</out>
and I added a folder named DisplayLog.txt to the plugins folder
Is that correct ???
Title: Re: Last visited script
Post by: F£¥è® on January 14, 2009, 05:22:37 pm
Hi Gypsy,
It needs the  \txt at the end of the line.
Title: Re: Last visited script
Post by: gypsyroadhog on January 14, 2009, 07:08:16 pm
Thanks again
But how does
<out type="push" extdata="ipdisplaydirectory">C:\Program Files\Games Bot\Plugins\txt</out>
link to
"a FOLDER named DisplayLog.txt in the plugins folder"......shouldnt there be something in  "C:\Program Files\Games Bot\Plugins\txt"
to link them both.....sorry for my ignorance.
Title: Re: Last visited script
Post by: F£¥è® on January 14, 2009, 11:14:07 pm
Hi Gypsy,
Sorry my Bad  :oops:
The path I have is    <out type="push" extdata="ipdisplaydirectory">E:\Program Files\Metis 2.8\Plugins\DisplayLog.txt</out>.
Title: Re: Last visited script
Post by: reef on January 16, 2009, 05:57:08 am
Code: [Select]
<out type="push" extdata="ipdisplaydirectory">C:\Program Files\Games Bot\Plugins\lastvisited.txt</out>
the above should work without having to create an extra folder

just change    txt       into       lastvisited.txt
Title: Re: Last visited script
Post by: ace202 on June 05, 2009, 01:17:09 am
Just wondering, is there anything i could add to this script to find out someone elses last visit.

For example

!find ace

And it displays back to me, when i was in last?

Would love for this, if it's possible?