Archive > AoC 0.6 support
Guild Join spam
Tulia:
Ok i have a little problem i seem unable to fix. Ive created a Info recurtment scrpt for the bot in Php and got that working fine thanks to the Ginfo script i found in the forums (i've heavy moded mine)
But here is the problem: Towards the end of the script this Displayed code is used and displays:
$txt.= "##GI_highlight##<font face='HYBORIANSMALL' color=#E3319D>-NAME OF GUILD-##end##\n";
$txt.= "##GI_highlight##<font face='FLYING_NUMBERS_SHIELDED_ITALICS'><a href='chatcmd:///tell <botname> !join I wouid like to join<guildname> '>Invite</a>##end##\n <br></><br>";
How ever i am Unable to figure out HOW to get the guilds bot to display In Guild chat that a person that clicks the link is intrested in joining the guild.
Is any one able to help me out here please ?
I figure that some kind of !join php script is needed am i right here ?
Drizzurden:
hmmmmm maybe the command !say would help ... try to change like this ...
<a href='chatcmd:///tell Botchar !say Hi i'm interested to join your guild'>asking for guildinvite</a>
make sure that the !say command in tell's ist set to Anonymous ... this you could change by type !commands tell
if u see this blob inside the guildchannel u can see who wrot this msg with !whosaidthat .....
i don't know if this would be work .. but just try and error ^^
cherio
da Drizz
Tulia:
Thanks alot Driz. with some tingering around i got this working.
First i copied the !say php and renamed it !invite
In side the Invite i found and changed all 'say' to invite
saved the file under Invite in the mods folder and rebooted the bot.
!commands tells Invite > an
<a href='chatcmd:///tell Botchar !Invite Hi I am interested in joining your guild %m '> -invite- </a>
Results : Hi I am intrested in joining your guild (name or person)
Is printed clearly in guild chat for all officers to see.
Drizzurden:
ok than would be nice if u post the new script ;)
Tulia:
<?php
/*
* Invite.php - recrutment guild Notice.
* An Edit Of the Say Mod.
* Invite module by Tulia.
*
* BeBot - An Anarchy Online & Age of Conan Chat Automaton
* Copyright (C) 2004 Jonas Jax
* Copyright (C) 2005-2010 Thomas Juberg, 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
*/
$Invite = new Invite($bot);
/*
The Class itself...
*/
class Invite extends BaseActiveModule
{ // Start Class
var $whoaskedthat;
function __construct(&$bot)
{
parent::__construct(&$bot, get_class($this));
$this -> whoaskedthat = array();
// Setup Access Control
$this -> register_command("all", "Invite", "ADMIN");
$this -> register_command("all", "whoaskedthat", "MEMBER");
$this -> bot -> core("settings") -> create("Invite", "OutputChannel", "both", "Into which channel should the output of Invite be sent? Either gc, pgmsg, both or original channel.", "gc;pgmsg;both;origin");
$this -> help['description'] = 'Makes the bot spam guild.';
$this -> help['command']['Invite someone'] = "Makes the bot message guild from 'someone'";
$this -> help['command']['whoaskedthat'] = "Finds out who made the bot spam guild.";
}
function command_handler($name, $msg, $source)
{ // Start function handler()
$args = $this -> parse_com($msg, array("com","args"));
switch ($args['com'])
{
case "Invite":
if (strtolower($this -> bot -> core("settings") -> get("Invite", "OutputChannel")) == "origin")
{
return $this -> Invitethis($name, $args['args']);
}
else
{
$this -> bot -> send_output($name, $this -> Invitethis($name, $args['args']),
$this -> bot -> core("settings") -> get("Invite", "OutputChannel"));
}
return false;
case "whoaskedthat":
return $this -> whoaskedthat();
}
$this -> bot -> send_help($name);
return false;
} // End function handler()
function Invitethis($name, $message)
{
$this -> whoaskedthat['time'] = time();
$this -> whoaskedthat['name'] = $name;
$this -> whoaskedthat['what'] = $message;
return $message;
}
function whoaskedthat()
{
if (empty($this -> whoaskedthat))
{
$output = "Nobody has used the Invite command since I logged in.";
}
else
{
$output = $this -> whoaskedthat['name'];
$output .= ' made me Invite "';
$output .= $this -> whoaskedthat['what'];
$output .= '" ';
$output .= time()-$this -> whoaskedthat['time'];
$output .= ' seconds ago.';
}
return $output;
}
} // End of Class
?>
------------------------------------------------------------
Save this as Invite.php to the mods Folder.
In game type : !commands tell
and set this new mod to Anonymous in the list.
Restart your bot.
How to use:
In your recruitment script Place the following Line of text (or something like it)...
<a href='chatcmd:///tell Botchar !Invite Hi I am interested in joining your guild %m '> -invite- </a>
Botchar being the Name of your Bot.
Now when the new link in your global recruitment script is clicked a message is displayed in your Guild window::
Hi I am intrested in joining your guild (name or person)
Navigation
[0] Message Index
[#] Next page
Go to full version