Back Reply to topic
Kebra 
(started thread)
Blue-Ribbon Chicken 
Topics: 4
Posts: 10
Playing:  AOC
Ingame:  Anarchie
Years registered: * * * * * * * * * * *
Simple "speak" script Posted: Post 06:53 Mon - Aug 18, 2008

Code:
<?php
global $myname,$admins;
if ($sender!=$myname)
{
   if($pluginwords[1]=="!admin.say")
   {
      $text = "";
      $i = 0;
      foreach($pluginwords as $word)
      {
         if($i >= 2)
         {
            $text .= $word ." ";
         }
         $i++;
      }
      send_guild_channel_message(colortext($text));
   }
}
?>

Just the basic speak script for your bot. Allows you the admin to command the bot to say stuff in guildchat.

Place it in the tell folder
Reply with quote


Argorn 
Blue-Ribbon Chicken 
Topics: 5
Posts: 19
Playing:  Age of Conan
Ingame:  Argorn
Years registered: * * * * * * * * * * *
Posted: Post 06:19 Tue - Oct 28, 2008

Works nice but it doesnt show up numers higher than zero and it ignores capitals.
For example:

If i want the bot to say: Die Raid fängt in 60 Minuten an.

The bot says:

[Bot] :: die raid fã¤ngt in 0 minuten an

Any way to fix this?


Regards
Reply with quote



_________________

Argorn (80) : Miezekatze (80) ::: NR Guild Leader
Chaly 
Offizier · Webmaster 
Topics: 403
Posts: 2106
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 09:06 Wed - Oct 29, 2008

Code:
<?php
global $myname,$admins;
if ($sender!=$myname)
{
   if($pluginwords[1]=="!admin.say")
   {
      $msg=substr($pluginmessage,strlen($pluginwords[1]));
      send_guild_channel_message(colortext($msg));
   }
}
?>

worth a try..
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Argorn 
Blue-Ribbon Chicken 
Topics: 5
Posts: 19
Playing:  Age of Conan
Ingame:  Argorn
Years registered: * * * * * * * * * * *
Posted: Post 12:55 Thu - Oct 30, 2008

Works nice as announcement, I sent u a mail Chaly...


Regards
Reply with quote



_________________

Argorn (80) : Miezekatze (80) ::: NR Guild Leader
Equinox 
Blue-Ribbon Chicken 
Topics: 0
Posts: 10
Playing:  AoC
Ingame:  Xante
Years registered: * * * * * * * * * * *
Posted: Post 08:47 Sat - Dec 13, 2008

Sorry for the question, but where and who can i change the colortext.
I heta this Pink / white mix big grin
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 403
Posts: 2106
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 01:05 Sun - Dec 14, 2008

there is a setting in your config.php
Code:
/***** Colors for output. The bot fades from Botcolors[0] to Botcolors[1] to Botcolors[0]
****** Parameters in the array are red,green,blue. if you're unsure just keep the default
*****/
$BotColors[0]=array(200,10,200);
$BotColors[1]=array(200,240,200);

first line: 200 red + 10 green + 200 blue = bright and colorfull pink
second line: 200 red + 240 green + 200 blue = bright white with a bit green

example white/white:
$BotColors[0]=array(200,200,200);
$BotColors[1]=array(200,200,200);


example green/white:
$BotColors[0]=array(20,240,20);
$BotColors[1]=array(200,200,200);


example oceanblue / green:
$BotColors[0]=array(20,160,240);
$BotColors[1]=array(20,240,20);


this is a "global" setting used by all default plugins. there is a way to generate indiviudal colors. edit kebra's code above and replace
send_guild_channel_message(colortext($text));
with
send_guild_channel_message(colortext($text,array(240,20,20),array(240,240,240)));
now the bot will repeat your !admin.say text in red/white


edit:
here are more colors
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Equinox 
Blue-Ribbon Chicken 
Topics: 0
Posts: 10
Playing:  AoC
Ingame:  Xante
Years registered: * * * * * * * * * * *
Posted: Post 01:43 Fri - Dec 19, 2008

thanks, but i don't understand your script:

Chaly wrote:
Code:
<?php
global $myname,$admins;
if ($sender!=$myname)
{
   if($pluginwords[1]=="!admin.say")
   {
      $msg=substr($pluginmessage,strlen($pluginwords[1]));
      send_guild_channel_message(colortext($msg));
   }
}
?>



how can the bot write numbers and capitals with Kabras script?
Reply with quote


Sabcoll 
Blue-Ribbon Chicken 
Topics: 0
Posts: 12
Playing:  Age of Conan
Ingame:  Aurelia
Years registered: * * * * * * * * * * *
Posted: Post 10:29 Wed - Mar 11, 2009

I dont know where to put the file and how the file name has to be .. can anyone please tell me what to do?
Is it possible to make the bot say somethin in the global channel?
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 403
Posts: 2106
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 12:42 Wed - Mar 11, 2009

-open notepad
-copy and paste the code above
-save the file as plugins/tell/admin.say/index.php
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Sabcoll 
Blue-Ribbon Chicken 
Topics: 0
Posts: 12
Playing:  Age of Conan
Ingame:  Aurelia
Years registered: * * * * * * * * * * *
Posted: Post 02:31 Sat - Mar 14, 2009

Alright, this works great for me lachen
Thanks for your help!
Reply with quote


Back Reply to topic