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: Another Modified TowerAttack  (Read 18024 times)

0 Members and 1 Guest are viewing this topic.

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Another Modified TowerAttack
« on: December 06, 2005, 07:10:01 am »
TOWER ATTACK MODULE

Description:
A module that displays tower attacks in pgroup and/or gc. Redid all notification messages (I think). And updated for the new patch.

Commands

!battle

!victory
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Another Modified TowerAttack
« Reply #1 on: December 06, 2005, 08:44:13 am »
dont you need the new AOChat.php to interpret the new messages? if not great job!

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Another Modified TowerAttack
« Reply #2 on: December 06, 2005, 08:48:55 am »
This module is not completed. There are a couple of little tweaked things. This uses the AOChat.php from http://bebot.fieses.net/viewtopic.php?t=203 You also have to modify your Bot.php as described in that thread. It's not completely straight forward, but I'd say its worth it.
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Another Modified TowerAttack
« Reply #3 on: December 07, 2005, 02:23:32 pm »
Tower notifications have reached my expectations and I'll now consider them complete.
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #4 on: January 11, 2006, 09:38:00 am »
Using this one myself now. Made a little change however, because I'm running Alreadythere's Persistent Whois cache module figured the TowerAttacks module could use the whois cache also.

Replaced this:
Code: [Select]
    function info($name) {
        $content = $this -> bot -> get_site('http://www.anarchy-online.com/character/bio/d/'.$this -> bot -> dimension.'/name/'.strtolower($name).'/bio.xml');
        $user['nick'] = $this -> bot -> xmlparse($content, 'nick');
        $user['profession'] = $this -> bot -> xmlparse($content, 'profession');
        $user['level'] = $this -> bot -> xmlparse($content, 'level');
        $user['title'] = $this -> bot -> xmlparse($content, 'profession_title');
        $user['AT'] = $this -> bot -> xmlparse($content, 'defender_rank');
        $user['AI'] = $this -> bot -> xmlparse($content, 'defender_rank_id');
        $user['org'] = $this -> bot -> xmlparse($content, 'organization_name');
        $user['rank'] = $this -> bot -> xmlparse($content, 'rank');
        $user['faction'] = $this -> bot -> xmlparse($content, 'faction');
        $this -> user = $user;
    }

With This:
Code: [Select]
    function info($name) {
        $who = $this -> bot -> whois -> lookup($name);
        $user['nick'] = $who['nick'];
        $user['profession'] = $who['profession'];
        $user['level'] = $who['level'];
        $user['org'] = $who['org'];
        $user['faction'] = $who['faction'];
        $this -> user = $user;
    }

Works like a Champ. :)
<<< Hack's in Zend Studio

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

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #5 on: May 07, 2006, 11:45:52 am »
As I noted in Wolfbiters thread here - http://bebot.link/index.php/topic,378.msg2312/topicseen.html#msg2312
I've updated this module to show LCA info.
You can Get it Here

Other changes incl:
- Uses and parses Tower Messages from AOChat.php 1.19 and the custom version mentioned in this thread.
- Requires as stated above in the previous post, Alreadythere's whois module.
- Search battles by playfield, EX: !battle Lush - will return all recent battles in Lush Fields. The search uses the sql LIKE function for matching.

This is mostly for Bebot 0.3.2 and above. I havn't tested it with any of the older bot versions but it should work.
One last note. I had to disable Craized's anti-spam code for the Tower Alerts. PHP 5 was freaking out over it. Looking at making another method for that routine but if anyone else wants to take a stab at it, feel free.
« Last Edit: May 07, 2006, 11:54:46 am by Xenixa »
<<< Hack's in Zend Studio

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

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #6 on: May 09, 2006, 08:40:51 pm »
Great work Xenika, thanks :)

Always wanted to do something like that myself, but never got around to it.
Now I just got to add the zone to the victories table.

Offline Pharexys

  • BeBot Apprentice
  • ***
  • Posts: 117
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #7 on: May 13, 2006, 02:16:11 pm »
As I noted in Wolfbiters thread here - http://bebot.link/index.php/topic,378.msg2312/topicseen.html#msg2312
I've updated this module to show LCA info.
You can Get it Here

Other changes incl:
- Uses and parses Tower Messages from AOChat.php 1.19 and the custom version mentioned in this thread.
- Requires as stated above in the previous post, Alreadythere's whois module.
- Search battles by playfield, EX: !battle Lush - will return all recent battles in Lush Fields. The search uses the sql LIKE function for matching.

This is mostly for Bebot 0.3.2 and above. I havn't tested it with any of the older bot versions but it should work.
One last note. I had to disable Craized's anti-spam code for the Tower Alerts. PHP 5 was freaking out over it. Looking at making another method for that routine but if anyone else wants to take a stab at it, feel free.




Awesome, loving it already :P

Offline Mephistobane

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #8 on: June 26, 2006, 07:27:56 pm »
so,will Xenixa's work with having JUST installed the whois cache(meaning it hasn't had time to put anything into the cache yet)?

and the link to the AOchat.php thing is broke, i would have liked to have looked at that thread :D

anyways, it says meh bot crashs whenever it does a member lookup (Towerattack.php line 305) cuz member_lookup() is a non-object,or soemthing. sorry i dont have anything to paste atm, i clicked and the bot log disappeared. i'm thinking this is because there's nothing in the cache yet so i turned towerattack.php off a while until it does.

if anyone has comments they are welcome.

Offline Barvaz

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #9 on: July 21, 2006, 06:32:54 pm »
hey, the tower_attack table gets clean after some time? atm i got 3 pages of battles, so i wonder, it gets clean every day or after some limit of battle? 32 battles in the tower_attack table now

Offline Tsuyoi

  • BeBot User
  • **
  • Posts: 30
  • Karma: +0/-0
  • BigT
    • Adrenaline Rush Forums
Re: Another Modified TowerAttack
« Reply #10 on: July 21, 2006, 07:22:48 pm »
Afaik, the module has a limiter on how many battles it shows, regardless of how many are in the history table.

Code: [Select]
$result = $this -> bot -> db -> select('SELECT time, off_guild, off_side, off_player, off_level, off_profession,
        def_guild, def_side, zone, x_coord, y_coord FROM tower_attack ORDER BY time DESC LIMIT 0, 13');

If you've removed that limit, then it'll spam the entire table, but if not, it'll only give you the last 13 battles.

In Xenixa's version (incase that's the one you're refering to) it's modified to 20:

Code: [Select]
$result = $this -> bot -> db -> select('SELECT time, off_guild, off_side, off_player, off_level, off_profession,
        def_guild, def_side, zone, x_coord, y_coord FROM tower_attack ORDER BY time DESC LIMIT 0, 20');

So if it's displaying too many results each time, you may want to look for those sections of the code and see if something is missing.  Hope that info helps :)

Offline Barvaz

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #11 on: July 22, 2006, 01:41:20 am »
cool, thanks :)

i still need to learn php damnit :P

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #12 on: January 03, 2007, 10:48:46 pm »
Damn, I can never download stuff that Xenixa posts. :( Can someone post a copy?
Luuv  Bot-Keeper of Vengeance ^^*

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Another Modified TowerAttack
« Reply #13 on: January 03, 2007, 10:54:43 pm »
Here you go. Not sure if it's exactly the same one but it supports the latest version of tower broadcast messages and whois cache.
« Last Edit: January 03, 2007, 10:56:26 pm by Malosar »
Eternalist
General of The Syndicate

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Another Modified TowerAttack
« Reply #14 on: January 03, 2007, 11:33:51 pm »
I'm almost sure that this is not it. Does not make use of the LCA module. :)
Luuv  Bot-Keeper of Vengeance ^^*

 

* 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: 293
  • 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