BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.4.x Custom/Unofficial Modules => Topic started by: Ziodberg on August 17, 2007, 08:37:17 pm
-
Hi,
i just made a little update on the bio.php. Hf
<?php
/*
* Bio.php - Identify the end result of Alien Bio Material
*
* BeBot - An Anarchy Online Chat Automaton
* Copyright (C) 2004 Jonas Jax
* Copyright (C) 2005-2007 Thomas Juberg Stensås, ShadowRealm Creations and the BeBot development team.
*
* Developed by:
* - Alreadythere (RK2)
* - Blondengy (RK1)
* - Blueeagl3 (RK1)
* - Glarawyn (RK1)
* - Khalem (RK1)
* - Naturalistic (RK1)
*
* See Credits file for all aknowledgements.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* File last changed at $LastChangedDate: 2007-07-25 21:09:30 +0200 (Wed, 25 Jul 2007) $
* Revision: $Id: Bio.php 818 2007-07-25 19:09:30Z shadowmaster $
*/
$bio = new Bio($bot);
$commands["tell"]["bio"] = &$bio;
$commands["pgmsg"]["bio"] = &$bio;
$commands["gc"]["bio"] = &$bio;
/*
The Class itself...
*/
class Bio
{
var $bot;
/*
Constructor:
Hands over a referance to the "Bot" class.
*/
function Bio (&$bot)
{
$this -> bot = &$bot;
$this -> bot -> accesscontrol -> create('tell', 'bio', 'GUEST');
$this -> bot -> accesscontrol -> create('gc', 'bio', 'GUEST');
$this -> bot -> accesscontrol -> create('pgmsg', 'bio', 'GUEST');
$this -> help['description'] = "Identify the end result of a given bio material.";
$this -> help['command']['bio <item>'] = "Identifies the bio material <item>.";
$this -> help['notes'] = "<item> must be an item reference.";
}
/*
This gets called on a tell with the command
*/
function tell($name, $msg)
{
if (preg_match("/<a href=\"itemref:\/\/([0-9]+)\/([0-9]+)\/([0-9]+)\">Solid Clump of Kyr'Ozch Bio-Material<\/a>/i", $msg, $info))
$this -> bot -> send_tell($name, $this -> make_bio($info[2], $info[3]));
if (preg_match("/<a href=\"itemref:\/\/([0-9]+)\/([0-9]+)\/([0-9]+)\">Frozen Crystal Compound<\/a>/i", $msg, $info))
$this -> bot -> send_tell($name, $this -> make_gem($info[2], $info[3]));
else
$this -> bot -> send_help($name);
}
/*
This gets called on a msg in the privgroup with the command
*/
function pgmsg($name, $msg)
{
if (preg_match("/<a href=\"itemref:\/\/([0-9]+)\/([0-9]+)\/([0-9]+)\">Solid Clump of Kyr'Ozch Bio-Material<\/a>/i", $msg, $info))
$this -> bot -> send_pgroup($this -> make_bio($info[2], $info[3]));
if (preg_match("/<a href=\"itemref:\/\/([0-9]+)\/([0-9]+)\/([0-9]+)\">Frozen Crystal Compound<\/a>/i", $msg, $info))
$this -> bot -> send_pgroup($this -> make_gem($info[2], $info[3]));
}
/*
This gets called on a msg in the guildchat with the command
*/
function gc($name, $msg)
{
if (preg_match("/<a href=\"itemref:\/\/([0-9]+)\/([0-9]+)\/([0-9]+)\">Solid Clump of Kyr'Ozch Bio-Material<\/a>/i", $msg, $info))
$this -> bot -> send_gc($this -> make_bio($info[2], $info[3]));
if (preg_match("/<a href=\"itemref:\/\/([0-9]+)\/([0-9]+)\/([0-9]+)\">Frozen Crystal Compound<\/a>/i", $msg, $info))
$this -> bot -> send_gc($this -> make_gem($info[2], $info[3]));
}
/*
This gets called help is called. Returns the help.
*/
function make_bio($high, $ql)
{
switch($high)
{
case 247103:
$highid = 247107;
$lowid = 247106;
$purpose = "Used for making alien armor";
$type = "Pristine Kyr'Ozch Bio-Material";
break;
case 247105:
$highid = 247109;
$lowid = 247108;
$purpose = "Used for making alien armor";
$type = "Mutated Kyr'Ozch Bio-Material";
break;
case 247698:
$highid = 247674;
$lowid = 247673;
$purpose = "(Weapon Upgrade) Brawl, Fast Attack";
$type = "Kyr'Ozch Bio-Material - Type 76";
break;
case 247700:
$highid = 247676;
$lowid = 247675;
$purpose = "(Weapon Upgrade) Brawl, Dimach, Fast Attack";
$type = "Kyr'Ozch Bio-Material - Type 112";
break;
case 247702:
$highid = 247677;
$lowid = 247678;
$purpose = "(Weapon Upgrade) Brawl, Dimach, Fast Attack, Sneak Attack";
$type = "Kyr'Ozch Bio-Material - Type 240";
break;
case 247704:
$highid = 247679;
$lowid = 247680;
$purpose = "(Weapon Upgrade) Dimach, Fast Attack, Parry, Riposte";
$type = "Kyr'Ozch Bio-Material - Type 880";
break;
case 247706:
$highid = 247682;
$lowid = 247681;
$purpose = "(Weapon Upgrade) Dimach, Fast Attack, Sneak Attack, Parry, Riposte";
$type = "Kyr'Ozch Bio-Material - Type 992";
break;
case 247708:
$highid = 247684;
$lowid = 247683;
$purpose = "(Weapon Upgrade) Fling shot";
$type = "Kyr'Ozch Bio-Material - Type 1";
break;
case 247710:
$highid = 24768;
$lowid = 247;
$purpose = "(Weapon Upgrade) Aimed Shot";
$type = "Kyr'Ozch Bio-Material - Type 2";
break;
case 247712:
$highid = 247686;
$lowid = 247685;
$purpose = "(Weapon Upgrade) Burst";
$type = "Kyr'Ozch Bio-Material - Type 4";
break;
case 247714:
$highid = 247690;
$lowid = 247689;
$purpose = "(Weapon Upgrade) Fling Shot, Burst";
$type = "Kyr'Ozch Bio-Material - Type 5";
break;
case 247716:
$highid = 247692;
$lowid = 247691;
$purpose = "(Weapon Upgrade) Burst, Full Auto";
$type = "Kyr'Ozch Bio-Material - Type 12 ";
break;
case 247718:
$highid = 247694;
$lowid = 247693;
$purpose = "(Weapon Upgrade) Fling Shot, Aimed Shot";
$type = "Kyr'Ozch Bio-Material - Type 3 ";
break;
case 247720:
$highid = 247696;
$lowid = 247695;
$purpose = "(Weapon Upgrade) Burst, Fling Shot, Full Auto";
$type = "Kyr'Ozch Bio-Material - Type 13";
break;
case 254804:
$highid = 254805;
$lowid = 247765;
$purpose = "Used for making high QL buildings";
$type = "Kyr'Ozch Viral Serum";
break;
default:
$purpose = "unknown";
}
return "##highlight##QL " . $ql . "##end## " . $this -> bot -> make_item($lowid, $highid, $ql, $type) . " " . $purpose;
}
function make_gem($high, $ql)
{
switch($high)
{
case 269800:
$highid = 168432;
$purpose = "Modi: HP/ NR/ Nano";
$type = "Galactic Jewel of the Infinite Moebius";
break;
case 269811:
$highid = 168473;
$purpose = "Modi: HP/ add Melee Dmg/ %-Reflect/Reflect-Dmg";
$type = "Galactic Jewel of the Bruised Brawler";
break;
case 269812:
$highid = 168553;
$purpose = "Modi: HP/ add Fire Dmg/ %-Reflect/Reflect-Dmg";
$type = "Galactic Jewel of the Searing Desert";
break;
case 269813:
$highid = 168620;
$purpose = "Modi: HP/ add Cold Dmg/ %-Reflect/Reflect-Dmg";
$type = "Galactic Jewel of the Frozen Tundra";
break;
case 269814:
$highid = 168717;
$purpose = "Modi: HP/ add Projectile Dmg/ %-Reflect/Reflect-Dmg";
$type = "Galactic Jewel of the Jagged Landscape";
break;
case 269815:
$highid = 168843;
$purpose = "Modi: HP/ add Poison Dmg/ %-Reflect/Reflect-Dmg";
$type = "Galactic Jewel of the Silent Killer";
break;
case 269816:
$highid = 229984;
$purpose = "Doesn't work with Eternal Gem's";
$type = "Galactic Jewel of the Frail Juggernaut";
break;
case 269817:
$highid = 230176;
$purpose = "Doesn't work with Frozen Gem's";
$type = "Galactic Jewel of the Icy Tundra";
break;
case 269818:
$highid = 230216;
$purpose = "Doesn't work with Jagged Gem's";
$type = "Galactic Jewel of the Craggy Landscape";
break;
case 269819:
$highid = 230256;
$purpose = "Doesn't work with Rainbow-hued Gem's";
$type = "Galactic Jewel of the Scarlet Sky";
break;
case 270000:
$highid = 269999;
$purpose = "Stupid Robe";
$type = "Robe of City Lights";
break;
default:
$purpose = "unknown";
}
return $this -> bot -> make_item($highid,$highid, $ql, $type) . " " . $purpose;
}
}
?>
-
Hmm, if we're going to make this the catch-all for identifing objects, we should probably rethink how we're doing it.
-
The last 4 (Frail Juggernaut, Icy Tundra, Craggy Landscape and Scarlet Sky) are useless junk and should be marked as such.
-
The last 4 (Frail Juggernaut, Icy Tundra, Craggy Landscape and Scarlet Sky) are useless junk and should be marked as such.
I'm not so sure they're "junk". They have two tradeskill processes, so I'd wonder if they'd work as the gems they are marked as.
-
I'm not so sure they're "junk". They have two tradeskill processes, so I'd wonder if they'd work as the gems they are marked as.
These are the same gem types used in level-60 bracers. The Monarch/Emperor/Stellar of these weaker versions aren't ingame. Also, there happen to be 4 of the normal types missing.
It's a dev mess-up that's been discussed (http://forums.anarchy-online.com/showthread.php?t=503754) to (http://forums.anarchy-online.com/showthread.php?t=503839) death (http://forums.anarchy-online.com/showthread.php?t=503997).
-
The last 4 (Frail Juggernaut, Icy Tundra, Craggy Landscape and Scarlet Sky) are useless junk and should be marked as such.
I guess you're right, so I changed it.