BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Age of Conan Archive => AoC 0.6.x Custom/Unofficial modules => Topic started by: Monk4y on March 29, 2010, 04:04:23 pm
-
Ok, this is basically a scripts collection run with lots of hyperlinks. The scripts are as follows:
1. all 24 Culture Armour recipe drops locations
2. All 24 culture armour components lists
3. All 4 Culture armour base recipe components and drop locations
4. All Rare Special recipes (niello, royal gold, darksteel etc etc, their components lists and drop locations
5. All Culture Weapon recipes, their drop locations and recipe components
6. All Culture Weapon base recipes, their drop locations and their component parts.
If you like it do what you want with it. Have fun
(btw I emailed the author of the scripts module and he gave permission for me to use it)
save this as craft.php<?php
/*
*
*
*
*
*/
$craft = new craft($bot);
class craft extends BaseActiveModule
{
function __construct(&$bot)
{
parent::__construct(&$bot, get_class($this));
$this -> register_command('all', 'craft', "ANONYMOUS");
$this -> bot -> core("colors") -> define_scheme("GI", "highlight", "yellow");
$this -> bot -> core("colors") -> define_scheme("GI", "normal", "white");
$this -> bot -> core("colors") -> define_scheme("GI", "info", "lightgreen");
$this -> bot -> core("colors") -> define_scheme("GI", "orange", "orange");
$this -> bot -> core("colors") -> define_scheme("GI", "blue", "blue");
$this -> help['description'] = 'A very basic craft script, converted from a guild recruitment module. Just Click on the links for information. It relies on user input to be kept up to date so if nobody tells the module manager what they can craft, the crafter part of the module is useless. I hope you find this usefull. N.';
}
function command_handler($name, $msg, $origin)
{
if (preg_match('/^craft/i', $msg, $info)) {
$words = trim(substr($msg, strlen('craft')));
if ($words == "members")
{
return $this -> memberslist();
} else if($words == "classes") {
return $this -> memberscount();
} else {
return $this -> info();
}
} else if(preg_match('/^grecruit/i', $msg, $info)) {
//return "Command under development";
$msg = $this -> recruit();
$channel = $this -> bot -> core("chat") -> lookup_group("Playfield");
return "Currently under development: ".$channel;
} else {
$this -> bot -> send_help($name);
}
}
/*
craft Info
*/
function info()
{
$txt.= "<font face='LARGE' color='#FF9933'><u>Culture Weapon, Armour & Components Lists</u></font><br /><br>
|<a href='chatcmd:///tell KCONAN <pre>abasemats'>Base Armour Materials</a> | <a href='chatcmd:///tell KCONAN <pre>special'>Sub Components Materials</a>|<br>
|<a href='chatcmd:///tell KCONAN <pre>wmats'>Weapon Materials</a> | <a href='chatcmd:///tell KCONAN <pre>wbasemats'>Base Weapon Materials</a>|<br /><br>
(minor) = Gloves Belt and Feet<br>
(major) = Head Chest and Legs<br /><br>
<font color='#ff0000'><u>Conqueror</u> </font> <a href='chatcmd:///tell KCONAN <pre>conqcult'>materials</a><br>
<font color='#cc9933'>Vanaheim Conquest Adornments</font> Atzel's Fortress, Rorik the Ghost (minor)<br>
<font color='#cc9933'>Vanaheim Conquest Guardings</font> Atzel's Fortress, Rorik the Ghost (major)<br /><br>
<font color='#ff0000'><u>Dark Templar</u> </font> <a href='chatcmd:///tell KCONAN <pre>dtcult'>material</a><br>
<font color='#cc9933'>Hyperborean Grimsword Adornments</font> Atzel's Fortress, Lord Suth (minor)<br>
<font color='#cc9933'>Hyperborean Grimsword Corslets</font> Atzel's Fortress, Lord Suth (major)<br /><br>
<font color='#ff0000'><u>Guardian</u> </font> <a href='chatcmd:///tell KCONAN <pre>guardcult'>material</a><br>
<font color='#cc9933'>Acheronian Keeper Adornments</font> Onyx Chambers, Mage Bosses (minor)<br>
<font color='#cc9933'>Acheronian Keeper Armature</font> Onyx Chambers, Mage Bosses (major)<br /><br>
<font color='#ff0000'><u>Assassin</u> </font> <a href='chatcmd:///tell KCONAN <pre>sincult'>material</a><br>
<font color='#cc9933'>Bossonian Prowlers Accessories</font> Atzel's Fortress, King Atzel the Nithing (minor)<br>
<font color='#cc9933'>Bossonian Prowlers Guise</font> Atzel's Fortress, King Atzel the Nithing & Talon the Spymaster (major)<br /><br>
<font color='#ff0000'><u>Barbarian</u> </font> <a href='chatcmd:///tell KCONAN <pre>barbcult'>material</a><br>
<font color='#cc9933'>Kushite Savage Howl Trimmings</font> Oasis of Zaara, Middle Boss (minor)<br>
<font color='#cc9933'>Kushite Savage Howl Pelts</font> Oasis of Zaara, Middle Boss (major)<br /><br>
<font color='#ff0000'><u>Ranger</u> </font> <a href='chatcmd:///tell KCONAN <pre>rgrcult'>material</a><br>
<font color='#cc9933'>Zingaran Doomed Path Trimmings</font> Imirian Ravine, First Boss (minor)<br>
<font color='#cc9933'>Zingaran Doomed Path Trappings</font> Imirian Ravine, First Boss (major)<br /><br>
<font color='#ff0000'><u>Demonologist</u> </font> <a href='chatcmd:///tell KCONAN <pre>democult'>material</a><br>
<font color='#cc9933'>White Hand Valewalker Accoutrements</font> Atzel's Fortress, Osithmes (minor)<br>
<font color='#cc9933'>White Hand Valewalker Raiment</font> Atzel's Fortress, Osithmes (major)<br /><br>
<br><font color='#ff0000'><u>Herald of Xotli</u> </font> <a href='chatcmd:///tell KCONAN <pre>hoxcult'>material</a><br>
<font color='#cc9933'>Nemedian Cursecaller Accoutrements</font> Onyx Chambers, Mage Bosses (minor)<br>
<font color='#cc9933'>Nemedian Cursecaller Regalia</font> Onyx Chambers, Mage Bosses (major)<br /><br>
<font color='#ff0000'><u>Necromancer</u> </font> <a href='chatcmd:///tell KCONAN <pre>neccult'>material</a><br>
<font color='#cc9933'>Pictish Cryptbearer Accoutrements</font> Atzes's Fortress, Tainmic (minor)<br>
<font color='#cc9933'>Pictish Cryptbearer Skins</font> Atzel's Fortress, Tainmic (major)<br /><br>
<font color='#ff0000'><u>Bear Shaman</u> </font> <a href='chatcmd:///tell KCONAN <pre>bscult'>material</a><br>
<font color='#cc9933'>Shemite Stormwatcher Trimmings</font> Onyx Chambers, Kesh (minor)<br>
<font color='#cc9933'>Shemite Stormwatcher Coverings</font> Onyx Chambers, Kesh (major)<br /><br>
<font color='#ff0000'><u>Priest of Mitra</u> </font> <a href='chatcmd:///tell KCONAN <pre>pomcult'>material</a><br>
<font color='#cc9933'>Argossean Sunpalmer Items</font> Onyx Chambers, Nefru (minor)<br>
<font color='#cc9933'>Argossean Sunpalmer Leathers</font> Onyx Chambers, Nefru (major)<br /><br>
<font color='#ff0000'><u>Tempest of Set</u> </font> <a href='chatcmd:///tell KCONAN <pre>toscult'>material</a><br>
<font color='#cc9933'>Stygian Deathcoil Garnature</font> Onyx Chambers, Neftummon (minor)<br>
<font color='#cc9933'>Stygian Deathcoil Vesture</font> Onyx Chambers, Neftummon (major)<br>";
return $this -> bot -> core("tools") -> make_blob("craft", $txt);
}
/*
Still working on this, for now just some random debugging stuff I was trying
*/
function recruit()
{
$blob = "craft: '";
$blob.= $this -> info();
$blob.= " Playfield ID: ";
return $blob;
}
/*
Need to revize so it just uses core
*/
function memberslist()
{
$blob = "";
$count = 0;
$result = $this -> bot -> db -> select("SELECT nickname, last_seen FROM #___users WHERE user_level = " . MEMBER . " ORDER BY nickname ASC");
if (!empty($result))
{
$inside = "##blob_title##:::: <botname>'s Member List ::::##end##\n \n";
foreach ($result as $val)
{
$count++;
$inside .= "##blob_text##• " . $val[0];
if ($val[1] > 0)
{
$inside .= ", last seen at " . gmdate($this -> bot -> core("settings") -> get("Time", "FormatString"), $val[1]);
}
else
{
$inside .= ", never seen online";
}
$inside .= "##end## ".$this -> bot -> core("tools") -> chatcmd("whois " . $val[0], "[Whois]")."\n";
}
$blob = " :: " . $this -> bot -> core("tools") -> make_blob("click to view", $inside);
}
return $count . " Guild Members:" . $blob;
}
/*
Need to revize so it just uses core
*/
function memberscount()
{
$blob = "";
$total = 0;
$buddies = count($this -> bot -> aoc -> buddies);
//Get a list of professions
$profession_list = "'".$this->bot->core('professions')->get_professions("', '")."'";
$counts = $this -> bot -> db -> select("SELECT t2.class, COUNT(DISTINCT t1.nickname)
FROM #___users AS t1 LEFT JOIN #___whois AS t2 ON t1.nickname = t2.nickname
WHERE user_level = " . MEMBER . " AND t2.class IN ($profession_list) GROUP BY class");
foreach ($this -> bot->core('professions')->get_profession_array() as $prof)
$count[$prof] = 0;
if (!(empty($counts)))
{
foreach ($counts as $profcount)
{
$count[$profcount[0]] += $profcount[1];
$total += $profcount[1];
}
}
$inside = "##blob_title##:::: <botname>'s Member Count ::::##end##\n";
$inside .= "\n##blob_text##Buddy List Count: ##blob_title##".$buddies."##end##\n";
foreach ($count as $key => $value)
$inside .= "\n• ".$key." = ##blob_title##".$value."##end##";
$blob = " :: " . $this -> bot -> core("tools") -> make_blob("click to view", $inside);
return $total . " Guild Classes:" . $blob;
}
}
?>
The Botname in this !craft module is called KCONAN so you need to find/replace that with your own bots name.
Once you have done that you need to add the old scripts module.
Save this as scripts.php<?php
/*
*
* Display Scripts for APF Sectors.
* Based on Rules_Raid.php by Blondengy
* By Andrew Zbikowski <[email protected]> (AKA Glarawyn, RK1)
* Version 1.0.0
* Converted to script module by Kelmino <[email protected]>
*/
$Scripts = new Scripts($bot);
/*
The Class itself...
*/
class Scripts Extends BaseActiveModule
{
var $bot;
/*
Constructor:
Hands over a referance to the "Bot" class.
*/
function __construct (&$bot)
{
parent::__construct(&$bot, get_class($this));
$this -> register_command('all', 'scripts', 'ANONYMOUS');
$this -> register_command('all', 'script', 'ANONYMOUS');
$this -> help['description'] = 'Shows popup scripts. Scripts are setup by bot admin.';
$this -> help['command']['scripts'] = 'Shows the list of all available scripts.';
$this -> help['command']['script <scriptname>'] = 'Shows a specific script.';
}
/*
This function handles all the inputs and returns output
sutible for send_tell, send_pgroup, and send_gc.
*/
function command_handler($name, $msg, $origin)
{
$this->error->reset(); //Reset the error message so we don't trigger the handler by old error messages.
$com = $this->parse_com($msg, array('com', 'args', 'error'));
if(empty($com['args']))
return $this -> make_list();
else if(empty($com['error']))
return $this -> make_script($com['args']);
return "Command not understood, here's the list of scripts instead: " . $this -> make_list();
}
/*
Makes the list of scripts
*/
function make_list()
{
if(false !== ($handle = @fopen("scripts/script.lst", "r")))
{
$content = fread($handle, filesize("scripts/script.lst"));
fclose($handle);
return "Script List :: " . $this -> bot -> core("tools") -> make_blob("click to view", $content);
}
return "Script List :: No Scripts currently available.";
}
/*
Make the Script
*/
function make_script($script)
{
if(false !== ($handle = @fopen("scripts/".$script.".txt", "r")))
{
$content = fread($handle, filesize("scripts/".$script.".txt"));
fclose($handle);
$content = "<font color=CCInfoHeadline> :::: Script Name [".$script."] ::::</font>\n\n".$content;
return "Script :: " . $this -> bot -> core("tools") -> make_blob("click to view", $content);
}
return "Specified script not found! - " . $this -> make_list();
}
} // End of Class
?>
And finally you gotta add the scripts themselves.
You need to make a folder in your bots root directory called "scripts" and copy these scripts into them. CLICK (http://www.63rdredirect.co.uk/aoc2/scripts.rar)
Once installed you then need to add them all as command aliases to your bot. Do this like this: we use the script "bsculture" as example
type:
!comalias add bsculture script bsculture
Do this for all the scripts and start the bot.
Type !craft and you should get the craft module with lots of links on it.
Here are a few screenies (5/16 )to show examples of the scripts.
(http://www.63rdredirect.co.uk/aoc2/craft1.jpg)
(http://www.63rdredirect.co.uk/aoc2/craft2.jpg)
(http://www.63rdredirect.co.uk/aoc2/craft3.jpg)
(http://www.63rdredirect.co.uk/aoc2/craft4.jpg)
(http://www.63rdredirect.co.uk/aoc2/craft5.jpg)
-
Thanks alot, btw can you possibly upload the .php files? because i have some syntax errors with copy paste
Thanks
EDIT: seems it is caused by the formatting changes when i paste it into Notepad, solution: paste it into word first so it keeps its formatting, then copy/paste it into notepad
-
Thanks alot, btw can you possibly upload the .php files? because i have some syntax errors with copy paste
Thanks
EDIT: seems it is caused by the formatting changes when i paste it into Notepad, solution: paste it into word first so it keeps its formatting, then copy/paste it into notepad
Actually the solution is to not use notepad, but a real text editor like: Notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm) ;)
-
I am in doubt about where to add the command !comalias add bsculture script bsculture
Is it in the scripts on in the game?
Can someone help?
-
Thanks coval
you need to have the scripts in the script folder in the bots directory
once u have that load the bot, go into game and do:
!comalias add bscult script bscult
for all the scripts, replacing bsculture with the name of the script e.g
!comalias add sincult script sincult
!comalias add toscult script toscult
!comalias add pomcult script pomcult
so now, when ever !bscult is called it will show the script bscult.txt
hope tht helped
-
Thank you very much mate that worked. ;D
-
Thak you for this Cool MOD.
The only issue i am having is that when i TYPE craft i get the YOU ARE ALCHEMIST AND ARCHITECT
??
do i have to Disable craftclasses module??
-
Followed all the instructions and did all the !comalias commands
But all I get when I press a link on the first screen is
/t <bot> !abasemats
[bot] /tell <bot> !help
I did not have a script or scripts directory or php file. Not sure where the php file goes or if the directory should be script or scripts. I just took over the bot from someone who move to a different game, so this is all new to me.
Never mind, I found enough examples and got it all working.....
Thanks
-
the scripts are good, thanks.
- use <botname> in your scripts in place of KCONAN and it will be automatically be replaced correctly at run time.
- not sure why to use those comaliases when you can just do !script [script name] as easily as ![script name] in the module.
- you can use a script to open another script so that you dont need to create a module every time, thats part of the beauty of the scripts module, you can make a change without restarting the bot
- I have attached a new version of your module with a couple things cleaned up.
- Removed the stuff that was left over from the module you copied to create it.
- Also, the module name craft is already in use on my bots so I also changed the name to culture.
- And I removed the need for all the comaliases, you can still add and use them so your users can easily call without having to open the !culture mod first, if you like.
Here are some links to post where I have posted some sample scripts:- http://bebot.link/aoc-modules/script-module/ (http://bebot.link/aoc-modules/script-module/)
- http://bebot.link/aoc-0-6-support/scripts-to-module (http://bebot.link/aoc-0-6-support/scripts-to-module)
-
Kyr, also its great you wrote a better way of presenting the info and cleaned a few things up. Thanks.
-
You are welcome, glad I could help.
~Kyr
-
I found an error with the necro cult script:
---------------------------------
<font color='#ff0000'>~~~NECRO PICTISH CRYPTBEARER ARMOUR~~~</font><br>
<font color='#cc9933'>Pictish Cryptbearer Accoutrements (Minor). </font><br>
<font color='#ffff99'>Gloves</font> - 10 Rawhide, 4 Buckskin, 3 Ebony Ash<br>
<font color='#ffff99'>Belt</font> - 8 Rawhide, 3 Buckskin, 2 Ebony Ash<br>
<font color='#ffff99'>Feet</font> - 12 Rawhide, 5 Buckskin, 3 Ebony Ash<br /><br>
--------------------------
The Pictish Cryptbearer gloves and belt require 3 basalt and 2 basalt; respectively, not 3 and 2 Ebon Ash.
-
TY Altera - fixed and re upped.
-
Ok noob scripter here. so I was tryin' to program it and actually programed the bot when you click on the conqcult link it gives PoMcult lol. how do I reverse this? like !comalias del <codes> like that?
-
Hmm.. I seem to have a limit to how many chars I can have in the script because it cuts off half my script here. Is there such a limit?
I find it odd since the scripts written above are faaaar longer than mine.. :)
But still, anybody able to verify this?
-
yes, there is a limit and its based on the number of characters.
-
But the odd thing is that if one looks at the scripts posted in this thread they are like four or five times larger then mine, which gets me pretty puzzled.
-
Does this happen with all the scripts or just certain ones? Did you edit any of the affected scripts and if so what program did you use? (word, notepad etc)?
-
I haven't made many scripts, actually only two and haven't noticed it on the one I made earlier, which is about the same size.
I'm making them in notepad.
-
I made the script in Crimson editor now and it seems to work better.
-
Thats great! Glad it works for you :)
-
The only problem i have is the zip file isn't there can someone re-post the zip file for me ;D
-
I have it at home somewhere, if anyone can recommend an upload location I'd be happy to upload it.
-
OK here is the Scripts.rar file for everyone http://www.ggg-team.com/files/scripts.rar (http://www.ggg-team.com/files/scripts.rar)
-
Tumbaga was not included in the "special" script. The recipe also drops from Brokk. I added it and posted the new version here.
~Kyr
-
howdy ,
did someone can repost the script.rar file splease
-
Can some one please give a working link for the scripts for this great mod. thanks
-
Try the file at
scripts.rar (http://bebot.link/aoc-0-6-support/scripts-to-module/?action=dlattach;attach=898)
file from the forum post at
http://bebot.link/aoc-0-6-support/scripts-to-module/msg15087/#msg15087 (http://bebot.link/aoc-0-6-support/scripts-to-module/msg15087/#msg15087)
-
Thanks Shelly but i had these few already.
Im looking for the zip with these :
script sincult
script toscult
script pomcult
And the others for other classes. sadly all the links are broken :(
-
Sorry,
I don't run an AoC bot, so don't collect the various modules to "archive" them. :)
Hopefully someone else will have a copy sitting around they can post.
Shelly
-
Here are my files. Let me know if any are missing and I will update.
- .txt files go in the bots scripts folder
- .php files go in the bots custom\modules folder
~Kyr
-
TY Kyr ! awesome finaly got them all
-
Have translated the culture module and its scripts in spanish.