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: dragonjr on November 12, 2010, 02:03:30 am
-
ok im still learning hearand ive read 3-4 diffrent things ive gotten one ginfo.php put it into the custom mods and i ahvent changed the info on it(guild info ). ive read i need to make a info file and put it into the txt folder under the bot but what is the info file and how do i make it ?
any help would be great
thanks
-
You do not need another file, all you need is in the ginfo.php file.
Open it in a editor like Crimson Editor (http://www.crimsoneditor.com/) and customize it as you wish.
-
http://www.cro-guild.com/bebot/Ginfo.php.txt
this is ginfo module, change officers ofc
this is recruitment info file that is defined at line 11:
http://www.cro-guild.com/bebot/recruitment.php.txt
change text to your likeing
and dont forget to rename files :)
-
Oh, hmm.. yeah.. I was a bit fast there, we're using guildinfo.php for our needs when it comes to this, and not ginfo.php :)
This is ours, and we're not using 2 files for this.
(rename from .txt to .php)
-
so am i taking the ginfo.php and changing it to a txt file and puting it in to the txt file ???
-
You only keep the ginfo.php and change the texts in that file in your code editor (notepad++ or whatever you like to use). All texts are in the .php file. This module does not support a .txt file with the info.
-
do any of the mods except .txt because im getting broken codes in scripts and everything else do i just rename them ?
-
you can change
[/code]private $recruitment_file = 'D:/www/bebot/recruitment.php';to whatever you want, it will work since file is being read with file_get_contents() function
-
i have one more question on the guild info mod is it possible to run 2 different ginfo at the same time like i wanted to try this one
<?php
/*
* GuildInfo, by Kaeus
* This module helps people with guild recruitment.
*
*
*/
$GuildInfo = new GuildInfo($bot);
class GuildInfo extends BaseActiveModule
{
function __construct(&$bot)
{
parent::__construct(&$bot, get_class($this));
$this -> register_command('all', 'ginfo', "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", "red", "red");
$this -> bot -> core("colors") -> define_scheme("GI", "blue", "blue");
$this -> help['description'] = 'Helps with guild recruitment.';
$this -> help['command']['ginfo']="Displays guild's info tab.";
$this -> help['command']['ginfo members']="Displays a list of members in the guild.";
$this -> help['command']['ginfo classes']="Displays a list of classes in the guild.";
$this -> help['command']['grecruit']="Displays a recruitment link in OOC (usable only with priveleges).";
}
function command_handler($name, $msg, $origin)
{
if (preg_match('/^ginfo/i', $msg, $info)) {
$words = trim(substr($msg, strlen('ginfo')));
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);
}
}
/*
Guilds Info
*/
function info()
{
$txt.= "##GI_red##_-E M P-_##end##\n\n";
$txt.= "##purple##Leaders:##end##\n\n";
$online = $this -> bot -> core("online") -> get_online_state('Jiheld');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Jiheld Im interested in joining _-E M P-_'>Jiheld</a>##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Ronmel');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Ronmel Im interested in joining _-E M P-_'>Ronmel</a>##end##\n\n";
$txt.= "##purple##Leaders Alts:##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Mustage');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Mustage Im interested in joining _-E M P-_'>Mustage</a>##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Ronmello');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Ronmello Im interested in joining _-E M P-_'>Ronmello</a>##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Balashi');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Balashi Im interested in joining _-E M P-_'>Balashi</a>##end##\n\n";
$txt.= "##purple##Officers:##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Cheyenne');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Cheyenne Im interested in joining _-E M P-_'>Cheyenne</a> - Officer##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Blui');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Blui Im interested in joining _-E M P-_'>Blui</a> - Officer##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Haiwan');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Haiwan Im interested in joining _-E M P-_'>Haiwan</a> - Officer##end##\n";
$online = $this -> bot -> core("online") -> get_online_state('Froxer');
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Froxer Im interested in joining _-E M P-_'>Froxer</a> - Officer##end##\n";
$txt.= "##GI_red##Website:##end## ##GI_highlight##http://www.enragedpolarbears.com##end##\n\n";
$txt.= "##GI_red##City:##end## ##GI_highlight##Full Tier II (include towers and walls). Tier III keep##end##\n\n";
$txt.= "##GI_red##Recruitment:##end## ##yellow## We looking for people older then the age of 18 and from level 70+ Active people that want to raid and have fun.##end##\n\n";
$txt.= "##Red## [Low]: We have enough.##end## ##yellow## [Medium]: We could use 1.##end## ##green##[High]: need 2 or more.##end##\n\n";
$txt.= "##purple##Assissin:##end## ##yellow##[Medium]##end##\n";
$txt.= "##purple##Barbarian:##end## [Closed]##end##\n";
$txt.= "##purple##Bear Shaman:##end## ##red##[Low]##end##\n";
$txt.= "##purple##Conqueror:##end## ##yellow##[Medium]##end##\n";
$txt.= "##purple##Dark Templer:##end## ##red##[Low]##end##\n";
$txt.= "##purple##Demonologist:##end## ##Yellow##[Medium]##end##\n";
$txt.= "##purple##Guardian:##end## ##red##[Low]##end##\n";
$txt.= "##purple##Herald of Xotli:##end## ##Yellow##[Medium]##end##\n";
$txt.= "##purple##Necromancer:##end## ##Red##[Low]##end##\n";
$txt.= "##purple##Priest of Mitra:##end## ##red##[Low]##end##\n";
$txt.= "##purple##Ranger:##end## ##Yellow##[Medium]##end##\n";
$txt.= "##purple##Tempest of set:##end## ##Yellow##[Medium]##end##\n\n";
$txt.= "##GI_red##Guild Info:##end##\n";
$txt.= "##GI_info##";
$txt.= "Enraged Polarbears is curently progressing through the 24 people raid material of AoC, and we are curently in need of a few selected recruits among our ranks.\n
Our main goal is to form a stable and solid relatively small raiding team with people that will get to know each other and have fun together. This is, in our opinion, the only way a guild can stack together and succeed, and the only way one won't feel just another pawn of the guild's leadership. We plan on making members feel at home and welcome. We also plan on encouraging people to take part in the guild's doings, not only in the raiding part but also the planning ones. We will ask for your opinion, your best thought strategy, your participation in the guild's politics, we will be happy when you speak your mind and provide constructive feedback at our forum. \n
We will also face with respect any prospective applicants, trials and members. There will not be any form of abusing at all, none harassing/pseudo-professional elitist attitude and so on and forth. We are fully aware of the true importance of this game, which is close to zero, and our priority -hands down- will be to have fun and make people in the raid happy so they will be eager to raid with us again, irregardless of the epics. \n
That of course doesn't mean we will slack behind and go casual, rather the opposite. We are a semi-hardcore guild with high if not very high end-game goals that are to be achieved, meaning that we have a good selection system and only keep players good enough to achieve those goals. \n
In any case, anyone who decides to apply, please visit our website for an application. Or just have a chat with one of us. http://www.enragedpolarbears.com \n
If you reached here, bravo! and thank you for your time and hope to see all of you soon online! \n\n";
$txt.= "<a href='chatcmd:///tell embot !ginfo members'>List of Members</a>\n";
$txt.= "<a href='chatcmd:///tell embot !ginfo classes'>List of Classes</a>\n";
$txt.= "##end##";
return $this -> bot -> core("tools") -> make_blob("_-E M P-_", $txt);
}
/*
Still working on this, for now just some random debugging stuff I was trying
*/
function recruit()
{
$blob = "EMP is Recruiting!: '";
$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;
}
}
?>
and im useing this one
<?php
/*
* GuildInfo
* This module helps people with guild recruitment.
*
*
*/
$GuildInfo = new GuildInfo($bot);
class GuildInfo extends BaseActiveModule
{
function __construct(&$bot)
{
parent::__construct(&$bot, get_class($this));
$this -> register_command('all', 'ginfo', "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", "red", "red");
$this -> bot -> core("colors") -> define_scheme("GI", "Silver", "Silver");
$this -> help['description'] = 'Helps with guild recruitment.';
$this -> help['command']['ginfo']="Displays guild's info tab.";
$this -> help['command']['ginfo members']="Displays a list of members in the guild.";
$this -> help['command']['ginfo classes']="Displays a list of classes in the guild.";
$this -> help['command']['grecruit']="Displays a recruitment link in OOC (usable only with priveleges).";
}
function command_handler($name, $msg, $origin)
{
if (preg_match('/^ginfo/i', $msg, $info)) {
$words = trim(substr($msg, strlen('ginfo')));
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);
}
}
/*
Guilds Info
*/
function info()
{
$txt.= "##GI_red##Black Moon Rising##end##\n\n";
$txt.= "##end##\n";
$txt.= "##highlight##Leader:##end##\n\n";
$online = $this -> officercheck("Reklats");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$txt.= "##end##\n";
$txt.= "##highlight##Officers:##end##\n";
$online = $this -> officercheck("nerissa");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$online = $this -> officercheck("sininstyle");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$online = $this -> officercheck("jormette");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$online = $this -> officercheck("bludflo");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$online = $this -> officercheck("wintershade");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$online = $this -> officercheck("Lunixxheals");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$online = $this -> officercheck("thrognar");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$online = $this -> officercheck("melwren");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##\n";
$txt.= "##end##\n";
$txt.= "##GI_red##Website:##end## ##GI_info## http://blackmoonrising.guildlaunch.com##end##\n\n";
$txt.= "##GI_red##City:##end## ##Silver##Complete T3 City##end##\n\n";
$txt.= "##GI_red##Raids:##end## ##Silver##T1 T2 T3##end##\n\n";
$txt.= "##GI_red##Recruitment:##end## ##Silver##Open.##end##\n\n";
$txt.= "##end##\n";
$txt.= "##highlight##Assassin:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Barbarian:##end## ##Red## [open]##end##\n";
$txt.= "##highlight##Bear Shaman:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Conqueror:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Dark Templer:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Demonologist:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Guardian:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Herald of Xotli:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Necromancer:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Priest of Mitra:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Ranger:##end## ##Red##[open]##end##\n";
$txt.= "##highlight##Tempest of Set:##end## ##Red##[open]##end##\n\n";
$txt.= "##end##\n";
$txt.= "##GI_red##Guild Info:##end##\n";
$txt.= "##Silver##";
$txt.= "Mature Casual Guild - Looking for all classes and levels - and serious raiders, especially West Coast and Oceanic Players.Also Looking for Tier Three Raiders willing to put in the work of learning new strats and be part of a team.
\n\n";
$txt.= "##end##\n";
return $this -> bot -> core("tools") -> make_blob("Black Moon Rising", $txt);
}
/*
Still working on this, for now just some random debugging stuff I was trying
*/
function recruit()
{
$blob = "Guild Name is Recruiting!: '";
$blob.= $this -> info();
$blob.= " Playfield ID: ";
return $blob;
}
/*
Checks online list for presence of officer of $name
Returns online status, and if online, name of current main/alt
*/
function officercheck($name)
{
$online = $this -> bot -> db -> select("SELECT t1.nickname FROM "
. "#___online AS t1 LEFT JOIN #___whois AS t2 ON t1.nickname = t2.nickname WHERE status_gc=1");
$found = FALSE;
if (!empty($online))
{
foreach ($online as $player)
{
if(isset($this -> listed[$channel][$player[0]]))
Continue;
$main = $this -> bot -> core("alts") -> main($player[0]);
if ($name == $main)
{
$online_state = $this -> bot -> core("online") -> get_online_state($this -> bot -> core("chat") -> get_uname($player[0]));
$retstr = " - " . $this -> bot -> core("chat") -> get_uname($player[0]);
$found = TRUE;
break;
}
else if ($name == $this -> bot -> core("chat") -> get_uname($player[0]))
{
$online_state = $this -> bot -> core("online") -> get_online_state($main);
$retstr = " - " . $main;
$found = TRUE;
break;
}
}
if ($found == FALSE)
{
$online_state = $this -> bot -> core("online") -> get_online_state($name);
$retstr = " - " . $name;
}
}
return array($online_state, $retstr);
}
/*
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##&#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;
}
}
?>
and i have this file saved in the mod folder as php and i have it saved in txt file.
if i want to add info on it all i do is change and save it in both files but is it possible to have 2 diffrent Ginfo's in the bot running at the same time? if so how would i make it work?
-
of course it is possible ... just change the name of the second file ... like ginfo2.php than u have to change the code itself ... u have to change the comand ginfo into ex. ginfo2 ... so u can see with !ginfo2 the text of the ginfo2.php ... this would be the easiest way so i think
hope i could help
greetz drizz
-
i just want to make sure im doing this right
<?php
/*
* GuildInfo, by Kaeus
* This module helps people with guild recruitment.
*
*
*/
$GuildInfo = new GuildInfo($bot);
class GuildInfo extends BaseActiveModule
thats the orginal
<?php
/*
* GuildInfo2, by Kaeus
* This module helps people with guild recruitment.
*
*
*/
$GuildInfo2 = new GuildInfo2($bot);
class GuildInfo2 extends BaseActiveModule
is that what you mean by adding the 2?
-
jebb
-
You'd also have to change (at the very least) the
$this -> register_command('all', 'ginfo', "ANONYMOUS");
and the command handler:
function command_handler($name, $msg, $origin)
{
if (preg_match('/^ginfo/i', $msg, $info)) {
$words = trim(substr($msg, strlen('ginfo')));
Having said that, if you want to try out and play around with the module I'd recommend either having a second bot (for testing) running (if you make that bot part of the same guild make sure each bot knows about the existence of the other and they use different op commands (like ! and @) configurable in the conf file)
Or rename the original Ginfo.php to _Ginfo.php (modules starting with a _ are not loaded on startup) and play with your second Ginfo.php
-
ok thanks guys for the quick reply
-
Hi all
I'm using the !ginfo as well and It's great! But I want it to make it look a "tick" sexyer... so here is my question:
The start(hyper)link für the !ginfo script is shown in AoC standard orange, wich is ugly as hell.
How can I set the code to format the link in other colours and styles?
return $this -> bot -> core("tools") -> make_blob("<font color='#6E328A' face='HYBORIANSMALL'>Gildeninfo!</font>", $txt);
This is my current code.
Thanx in advance!
dill
-
Try this untested code:
return $this -> bot -> core("tools") -> make_blob(<font color=#6E328A face=HYBORIANSMALL>Gildeninfo!</font>", $txt, "style=text-decoration:none");
-
Thanx Kyr!
I will test this later that day.
-
I testet your code and the output has the same look as before -_- The font type is correct (HYBORIANSMALL), but I'm not able to change the color at all! :(
Any idea pls?
dill
-
The colour is defined by the font color=#6E328A bit
this is a RGB (Red Green Blue) value in hex, so to analyze it:
6E is the amount of red
32 is the amount of green
8A is the amount of blue
If you want the letters to be bright red you could use:
font color=#FF0000
green => #00FF00
blue => #0000FF
white => #FFFFFF
grey => #777777
etc
A quick google search and you can find a page like this http://cloford.com/resources/colours/500col.htm which has a lot of colours and their RGB values.
-
Ye ye Yite
I know the color tables for HTML, but my problem is: How can I colourize the static link in the !ginfo script. I tested it in a few ways, but all it changes is the font face and nothing more.
Unfortunately Kyr's code wont work also :'(
return $this -> bot -> core("tools") -> make_blob("<font color=#6E328A face=HYBORIANSMALL>Gildeninfo!</font>", $txt, "style=text-decoration:none");
-
Right so you're not after changing the colours in the blob itself but want to change the colour of the link that is returned in guildchat or tells.
I know how to do it in static scripts with a blob, I'll post one this evening (if I remember :p) which might or might not be of help :-/
-
Right so you're not after changing the colours in the blob itself but want to change the colour of the link that is returned in guildchat or tells.
I know how to do it in static scripts with a blob, I'll post one this evening (if I remember :p) which might or might not be of help :-/
Jay, that would be great! I can give you a reminder if u want ^^
Thanx!
-
Have you tried other color codes? The color and face changes work for me in the scripts module.
<font color=#ff00ff face=hyborianlarge>Click here</font>
-
Yeah, all I need is the code to change the link color in the "/tell" script of !ginfo...
return $this -> bot -> core("tools") -> make_blob("<font color=#6E328A face=HYBORIANSMALL>ildeninfo!</font>", $txt, "style=text-decoration:none");
This code wont change the link color! -_-
-
I haven't really tested this thoroughly since conanchat doesn't support hyboriansmall, but colors should work.
Code from main/14_Tools.php
function make_blob($title, $content)
{
// Using " inside a blob will end the blob.
// Convert opening and closing tags with " to '
// Convert any other " to HTML entities.
$content = str_replace("=\"", "='", $content);
$content = str_replace("\">", "'>", $content);
$content = str_replace("\"", """, $content);
return "<a href=\"text://" . $content . "\">" . $title . "</a>";
}
The code from Kyr won't work without modifications...
You can add a modified make_blob function to your ginfo module and use that instead of the one inside tools
(You could modify 14_Tools.php if you want, but your change will be lost when you upgrade bebot.)
Edit GuildInfo.php and add this function at the bottom or wherevever inside the class.
function make_blob($title, $content, $attributes = '')
{
// Using " inside a blob will end the blob.
// Convert opening and closing tags with " to '
// Convert any other " to HTML entities.
$content = str_replace("=\"", "='", $content);
$content = str_replace("\">", "'>", $content);
$content = str_replace("\"", """, $content);
return "<a href=\"text://" . $content . "\"". ($attributes ? ' '. $attributes : '') .">" . $title . "</a>";
}
Replace this:
return $this -> bot -> core("tools") -> make_blob("<font color='#6E328A' face='HYBORIANSMALL'>Gildeninfo!</font>", $txt);
with:
return $this -> make_blob("<font color='#6e328a' face='hyboriansmall'>Gildeninfo!</font>", $txt, 'style="text-decoration:none"');
Hope it works out for you.
-
Big up's for you Kentarii and also thanx to Kyr!
Your code is working fine! PERFECT!
Thanx in advance!
dill
-
hey, how i can align the text left? <left> is not working :(
-
There is no such thing as <left>. All you need to do is remove the <center> & </center> tags.
-
There is no such thing as <left>. All you need to do is remove the <center> & </center> tags.
yay! works thank you so much! :D
-
Hey. i know this is an old thread, but asking here anyway. is there a way to make the bot post recruit scripts in global chat?