collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Alien Playfield Module - Keep track of alien PF  (Read 32277 times)

0 Members and 3 Guests are viewing this topic.

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #15 on: October 29, 2005, 06:07:56 pm »
Updated this module to grab Glarawyn's Timestamp from her website and store in the bots local database.

Also changed it to use the Settings Table rather than a seperate table as originally modified by Derroylo.
ftp://xen.afraid.org/bebot_files/Playfield.php

!apf works in Tells, Guild Chat and Guest channels.
I kept the !setpf command

  EDIT: I fixed my error I was having with the Tell commands. You can redownload from same link above if you had already grabbed it.
Works as advertised. :)
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Enian

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #16 on: November 03, 2005, 10:15:13 pm »
That script sounds really really interesting but the link seems to be broken  :(
Could you post source ?

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #17 on: November 04, 2005, 11:02:26 am »
Hmm odd my FTP server is running and the URL should work.

Never Mind: just saw afraid.org was down for a bit earlier in the day but didn't think it would affect a Dynamic URL that points to my local server here at home.

Anywho give a try again. If no download I'll post the code.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Enian

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #18 on: November 04, 2005, 12:12:55 pm »
Ho nice, its up again :D

I will try this script right now, feedback in a bit  8)

Offline Enian

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #19 on: November 04, 2005, 12:17:04 pm »
Amazing work ! Gratz :p

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #20 on: November 13, 2005, 08:48:53 am »
Quote from: "Xenixa"
Updated this module to grab Glarawyn's Timestamp from her website and store in the bots local database.

Also changed it to use the Settings Table rather than a seperate table as originally modified by Derroylo.
ftp://xen.afraid.org/bebot_files/Playfield.php


I had a problem making this work with my server's timezone, after messing around with php's date functions I made a quick and dirty change thats working so far:

Code: [Select]
$this -> timeleft = ($time+$int+$int*$raids)-mktime();

in that line I just added an hour like this:

Code: [Select]
$this -> timeleft = ($time+$int+$int*$raids)-mktime()+60*60;

also added this so you dont have to restart the bot everytime you !setpf

Code: [Select]
$this -> stamp = $settime;

after

Code: [Select]
$this -> bot -> send_tell($name, "Time Stamp is set.");

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #21 on: November 13, 2005, 04:12:39 pm »
Actually I already fixed that issue with having to restart. Just hadn't updated the copy on my ftp server yet.
In the copy I have posted, Copy the follow line from the function Playfield (&$bot) to the begining of the function time()
Code: [Select]
$this -> stamp = $this -> get_timer();
That will allow the bot to pull the time from the DB on start-up and the latest time recorded everytime the apf command is used.

Your timezone fix btw would be for those that are +GMT
If you are at GMT or in a timezone that is in a -GMT timezone the orginal should work just fine. Does for me anyway as I'm -7 GMT
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #22 on: November 14, 2005, 04:22:20 am »
uhm it worked well for a couple of raids and then went on saying there was 8 hrs till apf ><

back to php's date functions...

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #23 on: November 15, 2005, 01:49:09 am »
fixed it :P I had removed intval() from get_timer() function, cause it was adding five minutes to glarawin's timer.

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #24 on: November 15, 2005, 02:29:50 am »
Thats wierd I had to put intval() on $result[1] to get it to work at all. *shrug*

Removing it totaly f***s up my bot.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #25 on: November 15, 2005, 05:36:39 am »
removing or not the bug is still there

the script works either way tho, just wrong timer ;/ gonna redownload yours...

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #26 on: November 15, 2005, 05:49:13 am »
Just now placed the latest copy that works for me on my ftp server. See post above for link.

Changed the method to ensure its evaluating an Integer in get_timer() to:
Code: [Select]
   function get_timer() {
    $result = $this -> bot -> db -> select("SELECT * FROM settings WHERE setting = 'apf_timer'");
        return (int)$result[1];
    }


Also has the changes to the function time().
i.e. added the line $this -> stamp = $this -> get_timer(); to ensure it has the lastest time stamp from the DB.

Oh and added more feed back on !setpf
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #27 on: November 15, 2005, 06:05:18 am »
gotta trim the $timestamp

$this -> bot -> send_tell($name, "Time Stamp is set to $TimeStamp.");

theres a new line at the end

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #28 on: November 15, 2005, 06:36:06 am »
Just remove the period in here $TimeStamp." No trim necessary.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Solerna

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Alien Playfield Module - Keep track of alien PF
« Reply #29 on: November 21, 2005, 01:56:50 am »
ok I've got some issues here and considering the time of the day I'm probably missing something. since I wanted to have the ability to use a timestamp I had set myself I did an alernative to the !setpf command named !altsetpf It's basicly a copy of !setpf with the only change that it takes the time from another site. In this case (http://www.och.nu/serenity/apf.timestamp) since I needed something to test with.

__________________
To [Pfnet]: !apf
[Pfnet]: 00:37:54 remaining until Alien Playfield opens.
To [Pfnet]: !setpf
[Pfnet]: Time Stamp is set to gatetime 2005-11-19 20:45:15 UTC

To [Pfnet]: !apf
[Pfnet]: 00:37:46 remaining until Alien Playfield opens.
To [Pfnet]: !altsetpf
[Pfnet]: Time Stamp is set to gatetime 2005-11-19 20:52:15 UTC
To [Pfnet]: !apf
[Pfnet]: 00:37:38 remaining until Alien Playfield opens.
__________

checking timer. making sure it is set to the first sites timestamp. checking it again.  and the timer seems to be ok.  Now I'm setting it to my alt sites timestamp. As u can se !altsetpf does have another timestamp. so far so good. Now I check the timer using the new timestamp. And the timer hasn't changed? oO

The timer in the script is curently 7 mins of on rk2 and I had some hopes to correct it this way. However it does not seem as if the bot cares about the timestamp. Rebooting the bot gives the exact same time.

Any ideas?

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 305
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal