EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Player tracker? (https://www.eqemulator.org/forums/showthread.php?t=28880)

ChaosSlayerZ 07-13-2009 10:46 PM

Player tracker?
 
I want to set up a little quest which would track when a player levels up and write that information into a text file on server side.

The practical usage for this is for example to give award to say first warrior to reach level 50

Could you guys help me out?

Kayen 07-14-2009 06:36 PM

quest::write(file,string)

Can save any info you want to a txt file this way.

ChaosSlayerZ 07-14-2009 08:32 PM

ok this is what I have put together for player.pl

Code:



sub EVENT_LEVEL_UP
{
       
        if($ulevel==50)
        {

        $client->Message(15, "You've achieved level 50!");

        my $string=" $name the $class has achieved level $ulevel ";

        quest::write("50.txt", $string);

}


does this looks right?

Also does quest::write includes some sort of time stamp when it makes an entry into a file?

thanks!

trevius 09-18-2009 07:26 AM

Try this:

Code:

$timestamp = localtime(time);
quest::write("LevelTrack.txt","[$timestamp] : $name the $class has achieved level $ulevel.");


ChaosSlayerZ 09-18-2009 11:23 AM

thanks Trev! I will try this out today!


All times are GMT -4. The time now is 05:53 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.