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: Pocketboss and Symbiant module  (Read 47282 times)

0 Members and 2 Guests are viewing this topic.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #15 on: December 14, 2005, 01:07:32 pm »
Hrm, im starting to think it would be better to move the array of symbiants into the database.
Just look here. Made tables out of the information I got on aopockets.

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #16 on: December 14, 2005, 02:05:04 pm »
*pokes Xenixa*

Cheers,

-jj-

Heheh... still havn't got around to converting this one yet to work off the db, that for some odd reason I keep updating.
Had some Org members pressing me to get Guest auto inviting working, which I finished last night.
<<< Hack's in Zend Studio

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

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #17 on: January 02, 2006, 12:32:01 am »
Added following symbs (not on AOPocket):

Cognizant Feet Symbiant, Infantry - Sashu
Cognizant Right Wrist Symbiant, Artillery - Sashu
Cognizant Ocular Symbiant, Extermination - Sashu
Cognizant Brain Symbiant, Extermination - Sashu
Cognizant Left Hand Symbiant, Infantry - Sashu
Cognizant Thigh Symbiant, Infantry - Sashu

www.jjones.co.uk/files/pb.php

Thanks again Enrubi and Octopuss for help,

Cheers,

-jj-

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Pocketboss and Symbiant module
« Reply #18 on: March 30, 2006, 04:50:11 am »
Not sure if anyone ever noticed this but when you create the blob for a return on matches on the !symb command, you return with links for the pocketbosses with just /tell botname pb etc... no prefix if they have one.

Just add a simple <pre> before pb (/tell <botname> <pre>pb...) and it's fixed.
Eternalist
General of The Syndicate

Offline Nogoal

  • BeBot Apprentice
  • ***
  • Posts: 77
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #19 on: April 04, 2006, 02:19:13 pm »

Offline Nogoal

  • BeBot Apprentice
  • ***
  • Posts: 77
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #20 on: April 19, 2006, 02:51:24 pm »
*Excited Thigh Symbiant, Artillery Unit Aban - The Worm King
*Effective Right Arm Symbiant, Infantry Unit Aban - Churn
*Vigorous Right Wrist Symbiant, Artillery Unit Aban - Churn

Those were on aopocket but not inside file

http://ao.inutiles.be/pb.phps

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Pocketboss and Symbiant module
« Reply #21 on: April 20, 2006, 03:09:17 am »
Eternalist
General of The Syndicate

Offline senare

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #22 on: September 06, 2006, 11:35:40 pm »
I made an little addition to this .. making it possible to dropa pattern for the pocket boss instead of typing name of it ... here is the code
Quote
<?

/*
*Not in AOPocket:
*Alert Left Arm, Extermination - Anansi's Adherent
*Cognizant Right Arm, Control - Ushqa
*Effective Left Hand, Control - Shake
*Cognizant Feet Symbiant, Infantry - Sashu
*Cognizant Right Wrist Symbiant, Artillery - Sashu
*Cognizant Ocular Symbiant, Extermination - Sashu
*Cognizant Brain Symbiant, Extermination - Sashu
*Cognizant Left Hand Symbiant, Infantry - Sashu
*Cognizant Thigh Symbiant, Infantry - Sashu
*/

include_once("_Colors.php");
$pb = new PB($bot);

$commands["gc"]["pb"] = &$pb;
$commands["tell"]["pb"] = &$pb;
$commands["pgmsg"]["pb"] = &$pb;
$commands["gc"]["symb"] = &$pb;
$commands["tell"]["symb"] = &$pb;
$commands["pgmsg"]["symb"] = &$pb;

class PB
{
   var $bot;
   var $symbdata = array(
   array (170,'eye','artillery','Adobe Suzerain','Scheol Upper','Highlands NW Incarnator N','Eremites',125,219135,'QL 170 Active Ocular Symbiant, Artillery Unit Aban'),
   array (170,'legs','infantry','Adobe Suzerain','Scheol Upper','Highlands NW Incarnator N','Eremites',125,235792,'QL 170 Active Thigh Symbiant, Infantry Unit Aban'),
   array (150,'feet','infantry','Adobe Suzerain','Scheol Upper','Highlands NW Incarnator N','Eremites',125,235825,'QL 150 Surviving Feet Symbiant, Infantry Unit Aban') ...
edited some off the array out ...
Quote
   
   function PB (&$bot)
   {
      $this -> bot = &$bot;
   }

   function gc($name, $msg)
   {
      if (preg_match("/^" . $this -> bot -> commpre . "pb <a (.+) '(.+)'(.+)/i", $msg, $info)) {
         $this -> bot -> send_gc("Searching for " . $info[2] );
         $this -> bot -> send_gc($this -> SearchPB($info[2]) );
      } else if (preg_match("/^" . $this -> bot -> commpre . "pb (.+)/i", $msg, $info)) {
         $this -> bot -> send_gc($this -> SearchPB($info[1]));
      } else if (preg_match("/^" . $this -> bot -> commpre . "symb (eye|head|ear|rarm|chest|larm|rwrist|waist|lwrist|rhand|legs|lhand|feet) (support|control|infantry|artillery|extermination)/i", $msg, $info)) {
         $this -> bot -> send_gc($this -> SearchSymb($info[1], $info[2]), "symb");
      } else if (preg_match("/^" . $this -> bot -> commpre . "symb (support|control|infantry|artillery|extermination) (eye|head|ear|rarm|chest|larm|rwrist|waist|lwrist|rhand|legs|lhand|feet)/i", $msg, $info)) {
         $this -> bot -> send_gc($this -> SearchSymb($info[2], $info[1]), "symb");
      }
   }

   function pgmsg($name, $msg)
   {
      if (preg_match("/^" . $this -> bot -> commpre . "pb <a (.+) '(.+)'(.+)/i", $msg, $info)) {
         $this -> bot -> send_pgroup("Searching for " . $info[2] );
         $this -> bot -> send_pgroup($this -> SearchPB($info[2]) );
      } else   if (preg_match("/^" . $this -> bot -> commpre . "pb (.+)/i", $msg, $info)) {
         $this -> bot -> send_pgroup($this -> SearchPB($info[1]));
      } else if (preg_match("/^" . $this -> bot -> commpre . "symb (eye|head|ear|rarm|chest|larm|rwrist|waist|lwrist|rhand|legs|lhand|feet) (support|control|infantry|artillery|extermination)/i", $msg, $info)) {
         $this -> bot -> send_pgroup($this -> SearchSymb($info[1], $info[2]), "symb");
      } else if (preg_match("/^" . $this -> bot -> commpre . "symb (support|control|infantry|artillery|extermination) (eye|head|ear|rarm|chest|larm|rwrist|waist|lwrist|rhand|legs|lhand|feet)/i", $msg, $info)) {
         $this -> bot -> send_pgroup($this -> SearchSymb($info[2], $info[1]), "symb");
      }
   }

   function tell($name, $msg)
   {
      if (preg_match("/^" . $this -> bot -> commpre . "pb <a (.+) '(.+)'(.+)/i", $msg, $info)) {
         $this -> bot -> send_tell($name, "Searching for " . $info[2] );
         $this -> bot -> send_tell($name, $this -> SearchPB($info[2]) );

      } else if (preg_match("/^" . $this -> bot -> commpre . "pb (.+)/i", $msg, $info)) {
         $this -> bot -> send_tell($name, $this -> SearchPB($info[1]));
      } else if (preg_match("/^" . $this -> bot -> commpre . "symb (eye|head|ear|rarm|chest|larm|rwrist|waist|lwrist|rhand|legs|lhand|feet) (support|control|infantry|artillery|extermination)/i", $msg, $info)) {
         $this -> bot -> send_tell($name, $this -> SearchSymb($info[1], $info[2]), "symb");
      } else if (preg_match("/^" . $this -> bot -> commpre . "symb (support|control|infantry|artillery|extermination) (eye|head|ear|rarm|chest|larm|rwrist|waist|lwrist|rhand|legs|lhand|feet)/i", $msg, $info)) {
         $this -> bot -> send_tell($name, $this -> SearchSymb($info[2], $info[1]), "symb");
      }
   }

   function CreateBlob($data, $mode="pb")
   {
      if($mode == "pb") {
         $msg = Headertext("::::: Remains of ".$data[0][3]." :::::\n\n");
         $msg .= Grouptext(
         Highlight("Location: ").$data[0][4]."\n"
         .Highlight("Found on: ").$data[0][6]."\n"
         .Highlight("Mob Level: ").$data[0][7]."\n"
         .Highlight("General Location: ").$data[0][5]."\n"
         ."____________________________________  \n"
         );

         asort($data);
         foreach($data as $symb) {
            $msg .= "<a href='itemref://".$symb[8]."/".$symb[8]."/".$symb[0]."'>".$symb[9]."</a>\n";
         }
         return $this -> bot -> make_blob("Remains of ".$data[0][3], $msg);
      } else {
         $msg = Headertext("::::: Result of your search :::::\n\n");
         ksort($data);
         foreach($data as $symb) {
            $msg .= "<a href='itemref://".$symb[8]."/".$symb[8]."/".$symb[0]."'>".$symb[9]."</a>\n";
            $msg .= Grouptext("   Found on ")."<a href='chatcmd:///tell <botname> <pre>pb ".$symb[3]."'>".$symb[3]."</a>\n\n";
         }
         return $this -> bot -> make_blob("Found ".count($data)." matches", $msg);
      }
   }

   function SearchSymb($location, $art)
   {
      $return = array();
      foreach ($this -> symbdata as $pb) {
         if(stristr($pb[1], $location) && stristr($pb[2], $art)) {
            $return[] = $pb;
         }
      }

      if(!$return) {
         return "Could not find any Pocketboss for \"".Highlight($location." ".$art)."\"";
      } else {
         return $this -> CreateBlob($return, "symb");
      }
   }

   function SearchPB($search)
   {
      $return = array();
      foreach ($this -> symbdata as $pb) {
         if(stristr($pb[3], $search)) {
            $return[] = $pb;
         }
      }

      if(!$return) {
         return "Could not find the Pocketboss \"".Highlight($search)."\"";
      } else {
         return $this -> CreateBlob($return, "pb");
      }
   }
}
?>

/regards chowkow

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #23 on: September 07, 2006, 12:13:12 am »
TBH, I would suggest this module be deleted and the .sql based one only is used.

Unless someone wants to update the array list (I won't) to sync it with the .sql version.

What do you think for 0.3 Khalem?

Cheers,

-jj-

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Pocketboss and Symbiant module
« Reply #24 on: September 07, 2006, 07:06:52 am »
SQL based hands down.
Easier to maintain aswell.
BeBot Founder and Fixer Kingpin

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Pocketboss and Symbiant module
« Reply #25 on: September 08, 2006, 10:29:42 am »
I think databases like these are perfect to do in SQLite.
You can ship the .db3 files and all people need to do is download it and overwrite it while still maintaining the search features of an SQL database.

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #26 on: September 15, 2006, 03:56:53 pm »
We have that now Vhab with MySQL.

See: http://bebot.link/index.php/topic,306.0.html
Importing an .sql file is a snap. :)

But ya, I agree that other Symbs module I linked to should replace this one as the official mod. I've already migrated to it on 0.3.3. Worked without any changes to it.
<<< Hack's in Zend Studio

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

Offline kennethx

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #27 on: March 06, 2009, 11:17:03 am »
Not sure if this post is just very outdated, or I'm posting in the wrong place.

Anyway, I noticed that the symb listing no longer showed from what PB a given symb drops, and guildies where missing that feature, so I added it back in modding the Symbiants.php file from the 0.6.1 release.

changes as follows:
Code: [Select]
$title = "QL {$symb['ql']} {$symb['symb']} ".array_search($symb['slot'], $this->slots)." symbiant, {$symb['unit']} unit aban";
$title = ucwords($title);
$link = "<a href='itemref://{$symb['itemref']}/{$symb['itemref']}/{$symb['ql']}'>$title</a>";
$readable_output .= "$link\n";
$title = "{$symb['boss']} ";
$title = ucwords($title);
$link = "<a href='chatcmd:///tell <botname> !pb $title'>$title</a>";
$readable_output .= "From: " . "$link\n\n";

I also attached the file with the changes.
« Last Edit: March 06, 2009, 02:01:18 pm by kennethx »

Offline kennethx

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Pocketboss and Symbiant module
« Reply #28 on: March 06, 2009, 01:55:20 pm »
Hmm, I ran into an interesting bug...with my above mod, if you do !symb, to list all symbs, the bot crashes. Without the mod it does not.

If you do !symb head, or any other refining parameter, it's fine. I'm suspecting that the pure length of the buffer is getting to large?!!? in case of the complete listing with the pb info included as well.

I've just done a easy fix for now, only displaying the pm info if the search is refined by ether slot, unit or ql (yes, you can still crash it if you do !symb 0-300 I guess :))

Code: [Select]
$title = "QL {$symb['ql']} {$symb['symb']} ".array_search($symb['slot'], $this->slots)." symbiant, {$symb['unit']} unit aban";
$title = ucwords($title);
$link = "<a href='itemref://{$symb['itemref']}/{$symb['itemref']}/{$symb['ql']}'>$title</a>";
$readable_output .= "$link\n";
if($query_slot !== false || $query_ql !== false || $query_unit !== false)
{
   $title = "{$symb['boss']}";
   $title = ucwords($title);
   $link = "<a href='chatcmd:///tell <botname> !pb $title'>$title</a>";
   $readable_output .= "From: " . "$link\n\n";
}
« Last Edit: March 06, 2009, 01:59:33 pm by kennethx »

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Pocketboss and Symbiant module
« Reply #29 on: March 07, 2009, 02:30:18 am »
there is a issue with blob being too large even for the current splitter, i have a fix for it that will be in 0.6.3

 

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