collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Culture armour/weapons component lists and drop locations scripts  (Read 17691 times)

0 Members and 1 Guest are viewing this topic.

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
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
Code: [Select]
<?php
/*
*
*
*
*
*/
$craft = new craft($bot);

class 
craft extends BaseActiveModule
{

function __construct(&$bot)
{
parent::__construct(&$botget_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($msgstrlen('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 &nbsp; \n";
foreach ($result as $val)
{
$count++;
$inside .= "##blob_text##&#8226; " $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&#8226; ".$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
Code: [Select]
<?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(&$botget_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($handlefilesize("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($handlefilesize("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

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.









« Last Edit: April 03, 2010, 01:40:35 am by Monk4y »

Offline ST34LTH

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #1 on: April 04, 2010, 04:11:25 am »
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
« Last Edit: April 04, 2010, 09:53:22 am by ST34LTH »

Offline Cuval

  • BeBot User
  • **
  • Posts: 29
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #2 on: April 04, 2010, 12:55:58 pm »
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++ ;)
« Last Edit: April 04, 2010, 01:02:28 pm by Cuval »

Offline Ozgood

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #3 on: April 04, 2010, 02:39:10 pm »
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?

Offline ST34LTH

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #4 on: April 04, 2010, 08:01:21 pm »
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

Offline Ozgood

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #5 on: April 05, 2010, 01:59:06 am »
Thank you very much mate that worked.  ;D

Offline Space

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #6 on: April 06, 2010, 01:25:13 pm »
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??
« Last Edit: April 06, 2010, 01:50:14 pm by Space »

Offline gpucka

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #7 on: April 06, 2010, 10:00:01 pm »
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
« Last Edit: April 06, 2010, 11:04:01 pm by gpucka »

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #8 on: April 07, 2010, 05:22:28 am »
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:

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #9 on: April 08, 2010, 09:22:37 pm »
Kyr, also its great you wrote a better way of presenting the info and cleaned a few things up. Thanks.

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #10 on: April 08, 2010, 11:47:26 pm »
You are welcome, glad I could help.
~Kyr

Offline altera

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #11 on: April 12, 2010, 11:37:59 pm »
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.

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #12 on: April 28, 2010, 05:35:34 pm »
TY Altera - fixed and re upped.

Offline deathwarnt

  • BeBot Rookie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #13 on: May 02, 2010, 10:40:22 pm »
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?

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: Culture armour/weapons component lists and drop locations scripts
« Reply #14 on: May 18, 2010, 09:53:52 pm »
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?
Wood of Exalted
Age of Conan
Aquilonia - EU

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 578
  • 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