Modules
· Home
· Content
· Downloads
· FAQ
· Feedback
· Forums
· Members List
· Notable Players
· Private Messages
· Recommend Us
· Search
· Server Bans
· Statistics
· Stories Archive
· Surveys
· Web Links
· Your Account
   Total Hits
We received
12759533
page views since December 2004
   User Info
Welcome, Anonymous
Nickname
Password
(Register)
Membership:
Latest: SGTJoker
New Today: 0
New Yesterday: 2
Overall: 4113

People Online:
Visitors: 69
Members: 5
Total: 74

Online Now:
01 : Spiderm4N
02 : Gwonam
03 : supercommierussian
04 : Snarf
05 : phant0m
   Amazon
SourceOP.com :: View topic - Dispenser GUM's Mode Switcher
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dispenser GUM's Mode Switcher
Goto page Previous  1, 2, 3, ... 15, 16, 17  Next
 
Post new topic   Reply to topic    SourceOP.com Forum Index -> TF2 Items
View previous topic :: View next topic  
Author Message
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Mon Sep 14, 2009 7:07 am    Post subject: Reply with quote

OmegaZero_Alpha wrote:
DispenserGUM wrote:
Anyway, unless YOU tell us that you've run a server and idled SOLO


I don't have to, I have multiple remote servers at datacenters, why would I waste my time?


There are maney a reasons why thou, a gentle manne, could waste thou time.

Remote server connection is never 100% permanent. If you leave for an extended period of time [days], you risk being disconnected and waste whatever time not idling until you come back.

As for if ever VALVe decides to blacklist achievement idle servers, you can always hide behind your "legit" empty 2fort server Wink

Then again, I guess you can idle all you want on your server even if it's not an idle server.



Anyway, you seemed to be suggesting that it was a router setup issue, hence knowing what there was to do to allow drops on a private server.


You told nirvaa that his router problem isn't just about forwarding, but his problem isn't about having his connection dropped by the router. It's about running a TF2 server behind a router that would fit whatever criteria needed for giving the sole player in it some item drops.
Back to top
View user's profile Send private message
The111
Dedicated Member
Dedicated Member


Joined: Sep 03, 2009
Posts: 215

PostPosted: Mon Sep 14, 2009 8:45 am    Post subject: Reply with quote

DispenserGUM wrote:

You told nirvaa that his router problem isn't just about forwarding, but his problem isn't about having his connection dropped by the router. It's about running a TF2 server behind a router that would fit whatever criteria needed for giving the sole player in it some item drops.


Actually, I know how to run a TF2 server behind a router, as a sole player, and get some item drops. Some meaning far reduced from the rate on a server full of people (be they idling or actually playing).

What I need to know is how to get the normal rate of item drops, as a sole player on a server behind a router. I really don't think the router has anything to do with it.
Back to top
View user's profile Send private message
LScratcheR
Member
Member


Joined: Aug 18, 2009
Posts: 58

PostPosted: Fri Sep 18, 2009 8:07 am    Post subject: Reply with quote

DispenserGUM wrote:
Good news!

I found a way to reconnect when you get disconnected.

It will take some time to script it, but it is now possible!

The process itself won't be quick, but if you're gone 8-12 hours, it sure will be useful to get reconnected within 5-10 minutes.

For the sake of making you guys useful, please post here any console messages that appear for getting disconnected

Example:

Server shutdown
Kicked
banned
disconnected
time out [timed out?]




The script will be looking at the console log file for any disconnect messages, so I don't want to miss out any possible message.


when this script is ready can u post it here i would love to have it
Back to top
View user's profile Send private message
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Fri Sep 18, 2009 9:19 am    Post subject: Reply with quote

LScratcheR wrote:
when this script is ready can u post it here i would love to have it


yeah I will don't worry.

Just that I have little free time these days so I spend that little free time actually playing TF2 or doing something else :p

Script will be updated on my tf2blog and this thread.
Back to top
View user's profile Send private message
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Mon Oct 05, 2009 2:19 pm    Post subject: AUTO RECONNECT SCRIPT BETA Reply with quote

Currently broken until further notice

I have completed a script to auto reconnect shortly after being disconnected [either from losing the connection to the internet, or being kicked, or server timed out, etc]

This script will initiate a "retry" attempt. I haven't gotten around to making it cycle through a list. So if the server you were connected to has crashed and isn't coming back up, you'll be SOL until that server comes back up.

It is still in beta as I will need to work out any bugs that arises. So for those who will try it, I will need your console dump if you got disconnected and didn't get reconnected.


Okay, here's how to do it [only works if you have walked through my guide already]:


MODE.BAT
Simply fill out your steamfolder, username and your launch options. Just 3 lines to modify for yourself, they are seen at the top with #####

To launch mode.bat, you need to specify either "idle" or "play"

so in command, you'd do this : mode.bat idle
or : mode.bat play
You can figure out how to do that with shortcuts as well.

Quote:

@echo off
##Steam folder location
##Example: C:\program files (x86)\steam [do not put an ending \ ]
set steamfolder=d:\steam

//Steam Username
//Username used to login, so that the program knows where you cfg files are.
set steamuser=steamlogin

##Your TF2 launch options
##Example:-novid -heapsize 1048576 +connect 42.23.24.231:27015
set launchoptions=-novid +exec autoexec2.cfg


echo alias autorecon "wait 1000;exec autorecon.cfg" > %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
echo autorecon >> %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg

goto %1

:idle
set registry=idle.reg
set launch=-novid -nosound +exec idle.cfg
set vdf=idle.vdf
set looping=loop2
goto tf2

:play
set registry=normal.reg
set launch=%launchoptions%
set vdf=play.vdf
set looping=loop
goto tf2


:tf2
taskkill /F /IM hl2.exe
copy %steamfolder%\idle\%vdf% %steamfolder%\config\serverbrowser.vdf
regedit.exe /S %steamfolder%\idle\%registry%
cls
echo Do not close this window. It will close itself when you quit TF2...
PING 1.1.1.1 -n 1 -w 1000 >NUL
start %steamfolder%\Steam.exe -applaunch 440 %launch%
PING 1.1.1.1 -n 2 -w 20000 >NUL
goto loop


:loop
@echo off
ping.exe -n 6 -w 1000 127.0.0.1 >NUL
tasklist.exe /FI "USERNAME eq %USERDOMAIN%\%USERNAME%" /FI "IMAGENAME eq hl2.exe" 2>NUL | find.exe "hl2.exe" >NUL && GOTO %looping%
ECHO HL2.exe stopped.

copy %steamfolder%\config\serverbrowser.vdf %steamfolder%\idle\%vdf%

exit

:loop2
@echo off
setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in (%steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt) do (
set var2=!var1!
set var1=!var!
set var=%%a
)
echo !var2! | find.exe "Disconnect:" >NULL && GOTO recon
echo !var1! | find.exe "Disconnect:" >NULL && GOTO recon
echo !var! | find.exe "Disconnect:" >NULL && GOTO recon
echo !var2! | find.exe "ResultNotLoggedOn" >NULL && GOTO recon
echo !var1! | find.exe "ResultNotLoggedOn" >NULL && GOTO recon
echo !var! | find.exe "ResultNotLoggedOn" >NULL && GOTO recon
echo !var2! | find.exe "Connection failed" >NULL && GOTO recon
echo !var1! | find.exe "Connection failed" >NULL && GOTO recon
echo !var! | find.exe "Connection failed" >NULL && GOTO recon
endlocal
set set var=%var%
set var1=%var1%
set var2=%var2%

echo Reset Console > %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt
GOTO loop


:recon
echo reconnecting...
echo alias autorecon "wait 500;retry;wait 10000;exec autorecon.cfg" > %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
echo autorecon >> %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg

ping.exe -n 6 -w 1000 127.0.0.1 >NUL
ping.exe -n 6 -w 1000 127.0.0.1 >NUL
echo alias autorecon "wait 1000;exec autorecon.cfg" > %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
echo autorecon >> %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
GOTO loop



the autorecon.cfg file will be automatically created by mode.bat

If you wanna test out the autoreconnect script, do the following :

1. load up TF2 in idle mode [mode.bat idle]
2. Wait for everything to load and connected to any idle server.
3. Wait about 1 minute for the mode.bat file to start checking your connection status.
4. Now, type disconnect in console. It will not autoreconnect because you weren't FORCED to disconnect
6. To simulate having been disconnected, type [ echo "disconnect:" ] in the console [don't forget the : ] This will write "disconnect:" in your console, which is what mode.bat will check.
7. sit and wait. Mode.bat will display "reconnecting..." and a few seconds later, TF2 will reconnect.


No time to explain it all how it works, I gtg, hope this will get positive results and decent feedback so I can tweak it.



note - You'll probably get a lot of junk appearing in the mode.bat window while you're connected. Don't worry about it, the script will still work. I gotta clean up the script a bit later.


Last edited by DispenserGUM on Mon Oct 05, 2009 9:23 pm; edited 4 times in total
Back to top
View user's profile Send private message
Drunken_F00l
Site Admin
Site Admin


Joined: Dec 11, 2004
Posts: 4767
Location: Redmond, Washington

PostPosted: Mon Oct 05, 2009 2:51 pm    Post subject: Reply with quote

You have "D:\steam" multiple places in your script. I believe this should be %steamfolder%
Back to top
View user's profile Send private message Visit poster's website
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Mon Oct 05, 2009 5:29 pm    Post subject: Reply with quote

Drunken_F00l wrote:
You have "D:\steam" multiple places in your script. I believe this should be %steamfolder%


Thank you very much. That is why it's useful to have other people look at my work. I'm messy Wink

I did a lot of the testing in separated batch files to isolate each problem, which made me have to type out my actual folder info since I didnt feel like copying all the variables in each batch file.. ugh....

well, anyway once this autoreconnect script is polished, I'm going to create another batch file that will pretty much setup everything for the user. You run it once, it will do EVERYTHING for you [backup your registry and server lists, create the shortcuts, etc]

work work work work
Back to top
View user's profile Send private message
OmegaZero_Alpha
Awesome Member
Awesome Member


Joined: Jan 02, 2005
Posts: 4131
Location: Spokane,WA

PostPosted: Mon Oct 05, 2009 5:50 pm    Post subject: Reply with quote

DispenserGUM wrote:
Remote server connection is never 100% permanent. If you leave for an extended period of time [days], you risk being disconnected and waste whatever time not idling until you come back.


It is more stable than my home computer.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Mon Oct 05, 2009 6:18 pm    Post subject: Reply with quote

OmegaZero_Alpha wrote:
DispenserGUM wrote:
Remote server connection is never 100% permanent. If you leave for an extended period of time [days], you risk being disconnected and waste whatever time not idling until you come back.


It is more stable than my home computer.


good for you

the idle servers aren't always that stable though, then again, you're the elitist guy who runs several servers, so why don't you simply become aware that this guide doesn't apply to you? Wink
Back to top
View user's profile Send private message
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Mon Oct 05, 2009 9:21 pm    Post subject: Reply with quote

darnit, something's obviously defective.

The auto reconnect alias isn't activating itself until you click "OK" to the message of getting disconnected [timed out, kicked, whatever]

I might have to resort to shutting down TF2 the hard way upon getting disconnected and making it restart by connecting to an IP.... the long and ineffective way unless I can find a way to automate clicking "OK".
Back to top
View user's profile Send private message
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Wed Oct 07, 2009 6:32 am    Post subject: Reply with quote

Good news everyone!


I thought the problem was the error window popup when you get disconnected. I couldnt figure out how to auto-close it to disable it.

Well, actually, it wasn't the problem. It was a simple synchronization problem between my batch and the script running within TF2. When the frame pops up, TF2's timing changes [you know, the "wait" command?]

I'll be fine tuning it today.

Hopefully, by tomorrow night, I'll have a self-installer batch for my guide. So pretty much everything will set itself up for you. No need to read through pages of steps Wink

It will be ready for mass exportation!!
Back to top
View user's profile Send private message
Innercy
Member
Member


Joined: Aug 17, 2009
Posts: 12

PostPosted: Wed Oct 07, 2009 6:45 am    Post subject: Reply with quote

DispenserGUM wrote:
Good news everyone!


I thought the problem was the error window popup when you get disconnected. I couldnt figure out how to auto-close it to disable it.

Well, actually, it wasn't the problem. It was a simple synchronization problem between my batch and the script running within TF2. When the frame pops up, TF2's timing changes [you know, the "wait" command?]

I'll be fine tuning it today.

Hopefully, by tomorrow night, I'll have a self-installer batch for my guide. So pretty much everything will set itself up for you. No need to read through pages of steps Wink

It will be ready for mass exportation!!


Nice, Can't wait for this.
Back to top
View user's profile Send private message
DispenserGUM
Senior Member
Senior Member


Joined: Sep 03, 2009
Posts: 951

PostPosted: Wed Oct 07, 2009 9:39 am    Post subject: Reply with quote

Ok, the autoreconnect script is now rock solid.

I will be writing the autosetup script tomorrow.

Then after, I will slowly be tweaking the autoreconnect features.

Right now, it will only reconnect you to the server you were previously on. So if that server has crashed permanently, you obviously won't be able to connect to it.

For any other disconnect the script will get you back on the server [as long as the server is connectable]

So you're covered if you got disconnected for : reserved slot, afk [i know some servers kick you after a few hours if you are in spectator], connection hiccup, whatever



For those impatient, or for those interested in testing right away in case there's a problem I havent noticed yet, here is mode.bat

MODE.BAT
Quote:

@echo off
set steamfolder=c:\program files\steam
set steamuser=steamlogin
set launchoptions=-novid +exec autoexec2.cfg
set timestamp=%date:~0,5% - %time:~0,8%
set error1=ResultNotLoggedOn
set error2=Connection failed
set error3=Server is full
set error4=disconnect:
set error5=Host_Error:
set error6=Server connection timed out
set connected=Connected to
set connecting=Connecting to

echo Reset Console > %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt
echo alias autorecon "wait 500;exec autorecon.cfg" > %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
echo autorecon >> %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg

goto %1

:idle
set registry=idle.reg
set launch=-novid -nosound +exec idle.cfg
set vdf=idle.vdf
set looping=loop2
goto tf2

:play
set registry=normal.reg
set launch=%launchoptions%
set vdf=play.vdf
set looping=loop
goto tf2


:tf2
taskkill /F /IM hl2.exe
copy %steamfolder%\idle\%vdf% %steamfolder%\config\serverbrowser.vdf
regedit.exe /S %steamfolder%\idle\%registry%
cls
echo Do not close this window. It will close itself when you quit TF2...
PING 1.1.1.1 -n 1 -w 1000 >NUL
start %steamfolder%\Steam.exe -applaunch 440 %launch%
PING 1.1.1.1 -n 2 -w 20000 >NUL
goto loop


:loop
ping.exe -n 6 -w 1000 127.0.0.1 >NUL
tasklist.exe /FI "USERNAME eq %USERDOMAIN%\%USERNAME%" /FI "IMAGENAME eq hl2.exe" 2>NUL | find.exe "hl2.exe" >NUL && GOTO %looping%
ECHO HL2.exe stopped.

copy %steamfolder%\config\serverbrowser.vdf %steamfolder%\idle\%vdf%

exit

:loop2
@echo off
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%error1%" >NULL && echo %timestamp% : Steam Connection Lost. && GOTO recon
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%error2%" >NULL && echo %timestamp% : Reconnect Attempt Failed. Server may be down. && GOTO recon
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%error3%" >NULL && echo %timestamp% : Server is full, retrying later. && GOTO recon
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%error4%" >NULL && echo %timestamp% : Kicked by server && GOTO recon
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%error5%" >NULL && echo %timestamp% : Server files differ from client. Try another server && GOTO recon
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%error6%" >NULL && echo %timestamp% : Server crashed or Internet connection dropped && GOTO recon
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%connected%" >NULL && echo %timestamp% : Connection to server initiated.
echo Reset Console > %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt
GOTO loop


:recon
echo Reset Console > %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt
echo retrying...
echo alias autorecon "retry;wait 2000;exec autorecon.cfg" > %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
echo autorecon >> %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
goto reconcheck

:reconcheck
ping.exe -n 12 -w 1000 127.0.0.1 >NUL
find.exe /I %steamfolder%\steamapps\%steamuser%\teamfo~1\tf\status.txt "%connecting%" >NULL && GOTO reset
goto reconcheck

:reset
echo alias autorecon "wait 500;exec autorecon.cfg" > %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
echo autorecon >> %steamfolder%\steamapps\%steamuser%\"team fortress 2"\tf\cfg\autorecon.cfg
GOTO loop


edit 2nd,3rd & 4th line for your personal settings


Add this at the bottom of your idle.cfg
Quote:

con_logfile status.txt
exec autorecon.cfg



To start TF2 type as command in CMD:
IDLE MODE: mode.bat idle
PLAY MODE: mode.bat play
Back to top
View user's profile Send private message
OmegaZero_Alpha
Awesome Member
Awesome Member


Joined: Jan 02, 2005
Posts: 4131
Location: Spokane,WA

PostPosted: Wed Oct 07, 2009 9:52 am    Post subject: Reply with quote

inb4 hat removal for unauthorized scripts.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Hell-met
Awesome Member
Awesome Member


Joined: Feb 15, 2008
Posts: 3828
Location: Canada, Quebec, Quebec

PostPosted: Wed Oct 07, 2009 10:03 am    Post subject: Reply with quote

im 12 what is this
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SourceOP.com Forum Index -> TF2 Items All times are GMT - 8 Hours
Goto page Previous  1, 2, 3, ... 15, 16, 17  Next
Page 2 of 17

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group




PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.10 Seconds