View Single Post
  #3  
Old 11-12-2007, 10:38 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Here's an explanation on how to get the day and night to shift - I'll post a Linux and a Windows script/example.
First, what happens;
I made a variable in quest_globals table called "shifter" - shifter will have 24 values and will change every EQ hour, starting with "8" (8:00 am).
How to make this variable change by the EQ hour?
With a script, that runs outside the emulator I called "shifts". Call shifts from your startup script, example;
Code:
#!/bin/sh

wine MiniLogin.exe > logs/MiniLogin.log &
P=`pwd` 
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$P"
#make sure we have a place to log
mkdir -p logs 2>&1 > /dev/null 

#boot up world
if [ ! -e .lock-world ] ; then 
	    touch .lock-world 
	    ./world & 
	    # wait for shared memory to load
	    sleep 20 
fi 
#start up the official launcher
if [ ! -e .lock-launcher ]; then
	    touch .lock-launcher
	    ./shifts &
	    ./eqlaunch zones &
fi
Attached to this post is a package; time.tar.gz
install the time directory in your /server directory (/eqemu/server/time), with the sql files. shifts goes in /eqemu/server.
If you downloaded the latest PEQ, then it will all work.
the "shifts" script is for Linux - my next post here will be a windows/version script.
This will work fine, I've used it with no problems on my server, and now its running flawless with PEQ.

EDIT:
Actually no need to make a windows batch, just add this line to your startup.bat file;
Quote:
start perl.exe shifts.pl
rename shifts to shifts.pl and you will have to edit shifts and change the time/*.sql to time\*.sql (or maybe perl will know )

Last edited by Angelox; 11-12-2007 at 06:45 PM..
Reply With Quote