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: Bane List For Vistrix  (Read 4014 times)

0 Members and 1 Guest are viewing this topic.

Offline Vulkor

  • BeBot User
  • **
  • Posts: 20
  • Karma: +0/-0
Bane List For Vistrix
« on: April 14, 2009, 03:42:56 am »
For Vistrix Raids in Age of Conan

We would like to create a List that we can update/change each time we do the Vistrix Raid.
We use Banes for Vistrix. So this is the Bane List

Can the Bot be Made to have a window open and with each persons name on it and if someone clicked on a Persons name in the window it would send them a tell saying you are Next on Bane.


Commands:

!bane would bring up the Bane Window, similar to !help

the superadmin could !bane Edit or !bane Add player



Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: Bane List For Vistrix
« Reply #1 on: May 07, 2009, 09:48:27 am »
Though it would be cool to have a bot function for this (With automatic reminders for set timers), this one is also easily handled with a script in the aoc script folder. Well, if you're on ventrilo at the same time of course..

You might know this and already use it, but if you don't here's the code I use for this purpose:
Code: [Select]
<a href="text://<b><font color=#006699 face='hyborianlarge'>Bane users for Vistrix.</font></b><br><font color=#FF0099 face='hyborianlarge'>1:Baneuser1<br>2:Baneuser2<br>3:Baneuser3<br>4:Baneuser4<br>5:Baneuser5<br>6:Baneuser6<br>7:Baneuser7<br>8:Baneuser8<br>9:Baneuser9<br></font><center><font color=#006699 face='hyborianlarge'>LET'S KILL THE DRAGON!</font><br>(And drink beer)</center>">Bane users for Vistrix</a>
Save that to a text file named bane.txt and put it in your Age of conan/scripts folder. When ingame, write /bane.txt and the raid will get a link to click with the bane list.

Not as cool and optimal as a bot function, but it works :)
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Jiheld

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Re: Bane List For Vistrix
« Reply #2 on: May 08, 2009, 02:00:47 pm »
Hi, i used the raid.php to make a banelist, it works sofar only the people who joined the list comes in order and not on the bane order, if you know what i mean, so it would be nice to have some commands to order the bane list.

Code sofar:

Quote
<?php
/*
* Bane.php - Announces the Banelist.
*
* BeBot - An Anarchy Online & Age of Conan Chat Automaton
* Copyright (C) 2004 Jonas Jax
* Copyright (C) 2005-2007 Thomas Juberg Stensås, ShadowRealm Creations and the BeBot development team.
*
* Developed by:
* - Alreadythere (RK2)
* - Blondengy (RK1)
* - Blueeagl3 (RK1)
* - Glarawyn (RK1)
* - Khalem (RK1)
* - Naturalistic (RK1)
* - Temar (RK1)
*
* See Credits file for all aknowledgements.
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; version 2 of the License only.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
*  USA
*
* Revision: $Id: bane.php 2008-08-05 Jiheld $
* Thanks to alreadythere for the raid.php
*/


$bane = new Bane($bot);

/*
The Class itself...
*/
class Bane extends BaseActiveModule
{
   var $bane;
   var $user;
   var $announce;
   var $start;




   function __construct(&$bot)
   {
      parent::__construct(&$bot, get_class($this));

      $this -> bane = false;
      $this -> user = array();
      $this -> announce = 0;

      $this -> register_command("tell", "c", "LEADER");
      $this -> register_command("all", "Bane", "GUEST");
        $this -> register_event("pgleave");

        $this -> bot -> core("settings") -> create("Bane", "Command", "LEADER", "Who should be able to access the higher level raid commands (all commands     except join/leave)?", "ADMIN;LEADER;MEMBER;GUEST;ANONYMOUS");
   

      $this -> help['description'] = 'Module to manage and announce the Banelist.';
      $this -> help['command']['bane start <description>']="Starts the Banelist with optional description.";
      $this -> help['command']['bane end'] = "Ends the Banelist.";
      $this -> help['command']['bane join'] = "Join the active Banelist.";
      $this -> help['command']['bane leave'] = "Leave the active Banelist.";
   
      $this -> help['command']['bane add <name>'] = "Adds player <name> to the current banelist";
      $this -> help['command']['bane kick <name>'] = "Kicks player <name> from the current banelist.";
      $this -> help['command']['bane check'] = "Generates a list of active banelist members with assist links in a window for attendance checking.";
   
      }


   function command_handler($name, $msg, $type)
   {
      $var = explode (" ", $msg, 2);

      switch($var[0])
      {
         case 'c':
            $this -> bane_command($name, $var[1]);
            Break;
         case 'bane':
            $var = explode(" ", $msg, 3);
            switch($var[1])
            {
               case 'start':
                  $this -> bot -> send_output($name, $this -> start_bane($name, $var[2]), $type);
                  Break;
               case 'stop':
               case 'end':
                  $this -> bot -> send_output($name, $this -> end_bane($name), $type);
                  Break;
               case 'join':
                  $this -> bot -> send_output($name, $this -> join_bane($name), $type);
                  Break;
               case 'leave':
                  $this -> bot -> send_output($name, $this -> leave_bane($name), $type);
                  Break;
               case 'kick':
                  $this -> bot -> send_output($name, $this -> kick_bane($name, $var[2]), $type);
                  Break;
               case 'check':
                  $this -> bot -> send_output($name, $this -> check_bane($name), $type);
                  Break;
            
               case 'add':
                  $this -> bot -> send_output($name, $this -> addto_bane($name, $var[2]), $type);
                  Break;
               
               Default:
                  $this -> bot -> send_help($name, "bane");
            }
            Break;
         Default:
            $this -> bot -> send_output($name, "##error##Error : Broken plugin, bane.php recieved unhandled command: ".$var[0]."##end##", $type);
      }
   }



   /*
   This gets called if someone leaves the privgroup
   */
   function pgleave($name)
   {
      if ($this -> bot -> core("settings") -> get("Bane", "Remonleave"))
      {
         if (isset($this -> user[$name]))
         {
            unset($this -> user[$name]);
            return "##highlight##$name##end## was removed from the Banelist.";
            
         }
      }
   }

   /*
   Starts a Banelist
   */
   function start_bane($name, $desc)
   {
      if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Bane', 'Command')))
      {
         if (!$this -> bane)
         {
            $this -> description = $desc;
            $this -> bane = true;
            $this -> start = time();
            $this -> bot -> send_output($name, "##highlight##$name##end## has started the Banelist :: " . $this -> clickjoin(), "both");
            $this -> pause(TRUE);
            $this -> register_event("cron", "1min");
            return "Banelist started.";
         }
         else
            return "Banelist already running.";
      }
      else
         return "You must be a " . $this -> bot -> core("settings") -> get('Bane', 'Command') . " to start a Banelist";
   }



   /*
   Ends the banelist
   */
   function end_bane($name)
   {
      if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Bane', 'Command')))
      {
         if ($this -> bane)
         {
            $this -> bane = false;
            $this -> user = array();
            $this -> announce = 0;
            $this -> unregister_event("cron", "1min");
            $this -> bot -> send_output($name, "##highlight##$name##end## has stopped the Banelist.", "both");
            
            $this -> locked = false;
            Return "Banelist stopped.";
         }
         else
            return "No banelist running.";
      }
      else
         return "You must be a " . $this -> bot -> core("settings") -> get('Bane', 'Command') . " to do this";
   }

   /*
   Issues a bane command
   */
   function bane_command($name, $command)
   {
      if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Bane', 'Command')))
      {
         $msg = $this -> bot -> core("settings") -> get('Bane', 'Cformat');
         $msg = str_replace("##name##", $name, $msg);
         $msg = str_replace("##msg##", $command, $msg);
         $this -> bot -> send_output($name, $msg, "both");
      }
      else
         $this -> bot -> send_tell($name, "You must be a ".$this -> bot -> core("settings") -> get('Bane', 'Command')." to do this");
   }

   

   /*
   Adds a player to the banelist
   */
   function addto_bane($name, $player)
   {
      $player = ucfirst(strtolower($player));
      if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Bane', 'Command')))
      {
         if (!$this -> bane)
            return "No Banelist in progress";
         else if (isset($this -> user[$player]))
            return $player." is already on the banelist";
         $uid = $this -> bot -> core("chat") -> get_uid($player);
         if (!$uid)
            return "Player ##highlight##$player##end## does not exist.";
         else
         {
            

            //Update last_banelist
            $query = "UPDATE #___users SET last_bane = " . time() . " WHERE nickname = '$player'";
            $this -> bot -> db -> query($query);

            $this -> user[$player] = $uid;
            $this -> bot -> send_tell($player, "##highlight##$name##end## added you to the Banelist.");
            $this -> bot -> send_output("", "##highlight##$player##end## was ##highlight##added##end## to the Banelist by ##highlight##$name##end## :: " . $this -> clickjoin(), "both");
            return "##highlight##$player##end## has been ##highlight##added##end## to the Banelist";
         }
      }
   }


   /*
   Joins the banelist
   */
   function join_bane($name)
   {
      if (isset($this -> user[$name]))
      {
         return "You are already on the banelist";
      }
      else if ($this -> locked)
      {
         return "The banelist status is currently ##highlight##locked##end##.";
      }
      else if ($this -> bane)
      {
         

         //Update last_bane
         $query = "UPDATE #___users SET last_bane = " . time() . " WHERE nickname = '$name'";
         $this -> bot -> db -> query($query);
         $this -> user[$name] = $this -> bot -> core("chat") -> get_uid($name);
         $this -> bot -> send_output("", "##highlight##$name##end## has ##highlight##joined##end## the Banelist :: " . $this -> clickjoin(), "both");
         return "you have joined the Banelist";
      }
      else
         return "No Banelist in progress";
   }



   /*
   Leaves the banelist
   */
   function leave_bane($name)
   {
      if (!isset($this -> user[$name]))
         return "You are not on the Banelist.";
      else
      {
         unset($this -> user[$name]);
         $this -> bot -> send_tell($name, "You have ##highlight##left##end## the Banelist.", 1);
         return "##highlight##$name##end## has ##highlight##left##end## the Banelist :: " . $this -> clickjoin();
      }
   }



   /*
   Kicks someone from the banelist
   */
   function kick_bane($name, $who)
   {
      if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Bane', 'Command')))
      {
         if (!isset($this -> user[$who]))
            return "##highlight##$who##end## is not on the Banelist.";
         else
         {
            unset($this -> user[$who]);
         
            $this -> bot -> send_tell($who, "##highlight##$name##end## kicked you from the Banelist.");
            return "##highlight##$who##end## was kicked from the Banelist.";
         }
      }
      else
         return "You must be a " . $this -> bot -> core("settings") -> get('Bane', 'Command') . " to do this";
   }




   /*
   Checks memebers on the banelist
   */
   function check_bane($name)
   {
      if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Bane', 'Command')))
      {
         $players = array_keys($this -> user);
         sort($players);

         $inside = "##blob_title##:::: People on the Banelist ::::##end##\n\n";

         if (!empty($players))
         {
            if($this -> bot -> game == "ao")
            {
               foreach ($players as $player)
               {
                  if (!empty($assist))
                     $assist .= " \\n /assist $player";
                  else
                     $assist = "/assist $player";
               }

               $inside .= "<a href='chatcmd://$assist'>Check all banelist members</a>\n\n";
            }
            foreach ($players as $player)
            {
               $inside .= $player . " [".$this -> bot -> core("tools") -> chatcmd(
               "bane kick ".$player, "Kick")."]\n";
            }
         }
         else
            $inside .= "There are no members of this banelist.";

         return "Players on the Banelist :: " .
         $this -> bot -> core("tools") -> make_blob("click to view", $inside);
      }
      else
         return "You must be a " . $this -> bot -> core("settings") -> get('Bane', 'Command') . " to do this";
   }


   /*
   Make click to join blob
   */
   function clickjoin()
   {
      $inside = "##blob_title##:::: Join/Leave Banelist ::::##end##\n\n";
      if($this -> description && !empty($this -> description))
         $inside .= "Description:\n     ".$this -> description;
      $inside .= "\n\n - ".$this -> bot -> core("tools") -> chatcmd("bane join", "Join the Banelist")."\n";
      $inside .= " - ".$this -> bot -> core("tools") -> chatcmd("bane leave", "Leave the Banelist")."\n";

      return $this -> bot -> core("tools") -> make_blob("click to join", $inside);
   }
   
   

}
?>

Greetz

Jiheld

 

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