L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 03:40:53 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: Pocketboss and Symbiant module
Pages: 1 [2]   Go Down
« previous next »
Print
Author Topic: Pocketboss and Symbiant module  (Read 4393 times)
0 Members and 1 Guest are viewing this topic.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Pocketboss and Symbiant module
« Reply #15 on: December 14, 2005, 07:07:32 AM »

Quote from: Khalem on December 13, 2005, 09:28:37 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.
Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: Pocketboss and Symbiant module
« Reply #16 on: December 14, 2005, 08:05:04 AM »

Quote from: jj666 on December 13, 2005, 08:29:01 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.
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Pocketboss and Symbiant module
« Reply #17 on: January 01, 2006, 06:32:01 PM »

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-
Logged
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Pocketboss and Symbiant module
« Reply #18 on: March 29, 2006, 09:50:11 PM »

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.
Logged

Eternalist
General of The Syndicate
Nogoal
Rookie
**
Offline Offline

Posts: 61


Re: Pocketboss and Symbiant module
« Reply #19 on: April 04, 2006, 07:19:13 AM »

http://bebot.shadow(...)#msg790 Cheesy
Logged
Nogoal
Rookie
**
Offline Offline

Posts: 61


Re: Pocketboss and Symbiant module
« Reply #20 on: April 19, 2006, 07:51:24 AM »

*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
Logged
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Pocketboss and Symbiant module
« Reply #21 on: April 19, 2006, 08:09:17 PM »

Quote from: Nogoal on April 04, 2006, 07:19:13 AM
http://bebot.shadow(...)#msg790 Cheesy

Pays to read the whole thread eh?
Logged

Eternalist
General of The Syndicate
senare
Freshman
*
Offline Offline

Posts: 5


Re: Pocketboss and Symbiant module
« Reply #22 on: September 06, 2006, 04: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
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Pocketboss and Symbiant module
« Reply #23 on: September 06, 2006, 05:13:12 PM »

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-
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Pocketboss and Symbiant module
« Reply #24 on: September 07, 2006, 12:06:52 AM »

SQL based hands down.
Easier to maintain aswell.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Pocketboss and Symbiant module
« Reply #25 on: September 08, 2006, 03: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.
Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: Pocketboss and Symbiant module
« Reply #26 on: September 15, 2006, 08:56:53 AM »

We have that now Vhab with MySQL.

See: http://bebot.shadow-realm.org/index.php/topic,306.0.html
Importing an .sql file is a snap. Smiley

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.
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
Pages: 1 [2]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: Pocketboss and Symbiant module
« previous next »
 
Jump to:  

Recent
Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11145
Total Topics: 1505
Online Today: 25
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 12
Total: 13
Stealth

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.368 seconds with 29 queries. (Pretty URLs adds 0.033s, 4q)
Loading...