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: Guild Recruitment  (Read 34081 times)

0 Members and 2 Guests are viewing this topic.

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Guild Recruitment
« Reply #15 on: July 20, 2008, 12:24:12 pm »
Alright, I'll give the long answer, the reason is pretty simple.

If you personally spam the public channel and people object to it, you might get petitioned.
In this case a GM will come up, ask you to stop spamming. You'll apologize and stop spamming.

However, when your bot spams the channel and a GM comes up. The bot doesn't know a GM is asking it to stop spamming, so it'll just continue.
A GM is left with only 1 choice at this point, ban your account.

Also, think about it if everyone setup a bot 24/7 to advertise their guild.
Using macro's, the spamming is only limited to the amount of time a recruiter is online. But bots can cover the channel 24/7.
Now imagine every guild on the server sending an advertisement message every 30 minutes.

Yes, that's alot of spam. Funcom won't be pleased.
In the worst case, they'll just shut down bot access altogether.
Don't spoil it for the rest and just stay clear of the public channels.

Ps. thanks for the kind words GBH :)
« Last Edit: July 20, 2008, 12:26:46 pm by Vhab »

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #16 on: July 22, 2008, 09:43:38 pm »
Here's what I do.

You have a handful of people spam in the public channels.
The people you have spam the chat channels make the following script.

Place the following in a .txt file.  name it spam.txt for example
Quote
/OOC <a href="text://CLICK HERE FOR INFORMATION ABOUT US FROM OUR CHAT BOT.<br><br><a href='chatcmd:///tell guildcrier !ginfo view'>Click Here.<br></a>">Devotion: Accepting Members</a>

They will place this file in the Age Of Conan/scripts/   folder

once in game the people with the script can type   /spam.txt

It will auto put that link into the OOC chat, with a link to the bot.




Offline Jiheld

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #17 on: March 23, 2009, 09:01:07 am »
Hi,

After some requests, i post here our Guildinfo script.

I modified the script abit. I putted the leaders and officers in it, online/offline.

Quote
'<?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;
   }
}
?>

Offcourse you need to change the names and the guild text. Also the guildname, because the script is made for my guild.

Good luck with it.

Jih.

Offline Krica

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #18 on: March 25, 2009, 03:11:25 pm »
thanks mate,very good job  ;)

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: Guild Recruitment
« Reply #19 on: April 01, 2009, 05:27:30 pm »
thx al lot for this script .... perfekt work ... runs perfekt :D

Offline almas

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #20 on: August 28, 2009, 02:49:56 pm »
Hi
I have tried to modify this script to our guild needs. but I get this error message when I try to start the bot:
Parse error: syntax error, unexpected T_STRING in C:\BeBot\custom\modules\ginfo.
php on line 84

Hope that someone can help me. I am a noob with php. This is how my script looks like:
Code: [Select]
<?php
/*
* GuildInfo, by Kaeus
* This module helps people with guild recruitment.
*
*
*/
$GuildInfo = new GuildInfo($bot);

class 
GuildInfo extends BaseActiveModule
{

   function 
__construct(&$bot)
   {
      
parent::__construct(&$botget_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($msgstrlen('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##Sinister Awakening##end##\n\n";
      
      
      
$txt.= "##purple##Leaders:##end##\n\n";
      
$online $this -> bot -> core("online") -> get_online_state('Wulgo');
      
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Wulgo Im interested in joining SA'>Wulgo</a>##end##\n";
      
$online $this -> bot -> core("online") -> get_online_state('Brachus');
      
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Brachus Im interested in joining SA'>Brachus</a>##end##\n\n";
      
      
$txt.= "##purple##Officers:##end##\n";
      
$online $this -> bot -> core("online") -> get_online_state('Ashata');
      
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Ashata Im interested in joining...'>Ashata</a> - Officer##end##\n";
      
$online $this -> bot -> core("online") -> get_online_state('Hrotgar');
      
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Hrotgar Im interested in joining...'>Hrotgar</a> - Officer##end##\n";
      
$online $this -> bot -> core("online") -> get_online_state('Skammkell');
      
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Skammkell Im interested in joining...'>Skammkell</a> - Officer##end##\n";
      
$online $this -> bot -> core("online") -> get_online_state('Xhil');
      
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Xhil Im interested in joining...'>Xhil</a> - Officer##end##\n";
      
$online $this -> bot -> core("online") -> get_online_state('Wilhelmtell');
      
$txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Wilhelmtell Im interested in joining...'>Wilhelmtell</a> - Officer##end##\n";
$txt.= "##GI_red##Website:##end## ##GI_highlight##http://www.sinister-awakening.com##end##\n\n";
      
$txt.= "##GI_red##City:##end## ##GI_highlight##Full Tier III Guild City (& Full Tier I Battlekeep)##end##\n\n";
      
$txt.= "##GI_red##Recruitment:##end## ##yellow## We are looking for people over the age of 17 and from level 40+ active people for both pve and pvp.##end##\n\

      
      
$txt.= "<a href='chatcmd:///tell botsa !ginfo members'>List of Members</a>\n";
      
$txt.= "<a href='chatcmd:///tell botsa !ginfo classes'>List of Classes</a>\n";
      
$txt.= "##end##";
      
      
      
return $this -> bot -> core("tools") -> make_blob("Sinister Awakening"$txt);
   }
   
/*
   Still working on this, for now just some random debugging stuff I was trying
   */
   
function recruit()
   {   
      
$blob "Sinister Awakening 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;
   }
}
?>

« Last Edit: August 29, 2009, 12:41:13 am by Khalem »

Offline Arawacian

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #21 on: August 28, 2009, 06:06:54 pm »
change this line in your script:
 
     $txt.= "##GI_red##Recruitment:##end## ##yellow## We are looking for people over the age of 17 and from level 40+ active people for both pve and pvp.##end##\n\

to

      $txt.= "##GI_red##Recruitment:##end## ##yellow## We are looking for people over the age of 17 and from level 40+ active people for both pve and pvp.##end##\n";

I think that should do the trick.... not sure though im noob too

Offline almas

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #22 on: August 28, 2009, 07:06:05 pm »
That worked. Thanks for the help

Offline keirou

  • BeBot Apprentice
  • ***
  • Posts: 90
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #23 on: October 05, 2009, 03:58:39 am »
Is it possible to align text and change font or its size in age of conan

Basically the guild name i want centered and in the hyborian font
also is there a way since we have the !alts command and there is a table of a persons alt in the sql to modify the online offline to referance if a player is on any of their alts?

currently i am using this as a crude method
Code: [Select]
      $online = $this -> bot -> core("online") -> get_online_state('Morgahne');
      $txt.= "##GI_highlight##".$online['content']." :: Morgahne";
$txt.= "##Silver## [";
$txt.= "##GI_highlight##Morgaena:";
$online = $this -> bot -> core("online") -> get_online_state('Morgaene');
$txt.= "##GI_highlight##".$online['content']."##Silver##]##end##\n";
$txt.= "##end##\n";
« Last Edit: October 05, 2009, 04:22:03 am by keirou »

Offline keirou

  • BeBot Apprentice
  • ***
  • Posts: 90
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #24 on: October 08, 2009, 01:41:31 pm »
With the help of a guild member I was able to modify this script so it now tells you if the leader / officers are online (AND on what character)

Code: [Select]
<?php
/*
* GuildInfo
* This module helps people with guild recruitment.
*
*
*/
$GuildInfo = new GuildInfo($bot);

class 
GuildInfo extends BaseActiveModule
{

   function 
__construct(&$bot)
   {
      
parent::__construct(&$botget_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($msgstrlen('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##GUILD NAME HERE##end##\n\n";
 $txt.= "##end##\n";      
      
      
$txt.= "##highlight##Leader:##end##\n\n";
$online $this -> officercheck("GUILD LEADER NAME");
$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("OFFICER 1");
$online_state $online[0];
      
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
 $txt.= "##end##\n";
     
$online $this -> officercheck("OFFICER 2");
$online_state $online[0];
      
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
 $txt.= "##end##\n";
$online $this -> officercheck("OFFICER 3");
$online_state $online[0];
      
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
 $txt.= "##end##\n";
$online $this -> officercheck("OFFICER 4");
$online_state $online[0];
      
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
 $txt.= "##end##\n";
$online $this -> officercheck("OFFICER 5");
$online_state $online[0];
      
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
 $txt.= "##end##\n";  
$online $this -> officercheck("OFFICER 6");
$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## WWW. YOUR WEBSITE HERE .COM##end##\n\n";
      
$txt.= "##GI_red##City:##end## ##Silver##WHAT YOUVE BUILT##end##\n\n";
      
$txt.= "##GI_red##Raids:##end## ##Silver##WHAT YOUVE KILLED##end##\n\n";
      
$txt.= "##GI_red##Recruitment:##end## ##Silver##SPECIAL REQUIREMENTS??.##end##\n\n";
 $txt.= "##end##\n";
      
$txt.= "##highlight##Assassin:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Barbarian:##end## ##Red## [Closed]##end##\n";
      
$txt.= "##highlight##Bear Shaman:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Conqueror:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Dark Templer:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Demonologist:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Guardian:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Herald of Xotli:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Necromancer:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Priest of Mitra:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Ranger:##end## ##Red##[Closed]##end##\n";
      
$txt.= "##highlight##Tempest of Set:##end## ##Red##[Closed]##end##\n\n";
 $txt.= "##end##\n";
      
      
$txt.= "##GI_red##Guild Info:##end##\n";
      
$txt.= "##Silver##";
      
$txt.= "GUILD INFO SECTION 1\n\n";
 $txt.= "##end##\n";
 $txt.= "##Silver##";
      
$txt.= "GUILD INFO SECTION 2\n\n";
 $txt.= "##end##\n";
 $txt.= "##Silver##";
      
$txt.= "GUILD INFO SECTION 3\n\n";
      
$txt.= "##end##";
      
      
      return 
$this -> bot -> core("tools") -> make_blob("WHAT YOU WANT THE BOT TO TELL THE PLAYER"$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;
   }
}
?>

Offline freakyfreak

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #25 on: April 04, 2010, 07:29:45 pm »
How can I post this script in Global Chat.
Is there any possibility?

Offline ST34LTH

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #26 on: April 04, 2010, 08:05:44 pm »
dont think u can post this in Global but u can call it from another script, e.g

make a script that has the commant /tell <botname> !ginfo. so when someone clicks on it, it will send them the guild information

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #27 on: April 04, 2010, 09:18:13 pm »
Create a txt file called rec.txt in your scripts game directory and copy this text to it:

Code: [Select]
<a href="text://mfs<br><br><br><br><br><a href='chatcmd:///tell INSERTBOTNAME !ginfo'>Click here<br></a>">INSERTGUILDNAME is Recruiting!</a>
Save it (dont forget to change INSERTBOTNAME and INSERTGUILDNAME)

Then simply type /rec.txt in global and you got your global add. (assuming your bot is up and the ginfo module is present :p)


Offline freakyfreak

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #28 on: April 07, 2010, 03:44:49 pm »
Thx Monk4Y,
The script works fine.

One Question, What shoul i paste in the Guildinfo.php that the Bot tells me who clicked on the message

Code: [Select]
      $txt.= "GUILD INFO SECTION 2\n\n";
    $txt.= "##end##\n";
    $txt.= "##Silver##";
      $txt.= "GUILD INFO SECTION 3\n\n";
      $txt.= "##end##";
     
     
      return $this -> bot -> core("tools") -> make_blob("WHAT YOU WANT THE BOT TO TELL THE PLAYER", $txt)

Here is the line where the bot post it in the "tell"

Offline freakyfreak

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Guild Recruitment
« Reply #29 on: August 10, 2010, 08:52:48 pm »
Thx Monk4Y,
The script works fine.

One Question, What shoul i paste in the Guildinfo.php that the Bot tells me who clicked on the message

Code: [Select]
      $txt.= "GUILD INFO SECTION 2\n\n";
    $txt.= "##end##\n";
    $txt.= "##Silver##";
      $txt.= "GUILD INFO SECTION 3\n\n";
      $txt.= "##end##";
     
     
      return $this -> bot -> core("tools") -> make_blob("WHAT YOU WANT THE BOT TO TELL THE PLAYER", $txt)

Here is the line where the bot post it in the "tell"

Can anyone help me.
I donĀ“t have any clue

 

* 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: 491
  • 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