BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: dillinger on August 14, 2013, 12:02:23 pm

Title: Invite to Group | Raid from Logon Message (Logon.php)
Post by: dillinger on August 14, 2013, 12:02:23 pm
Sub Guys

I've been looking for a small "tweak" on the Logon.php script.

I want to add a player invite link at the default logon message - so everytime a user logs in, I can klick that link and the player gets a group invitation.

I figured out how to add a link- text at the player logon message itself; therefor I used the chatcmd:/// invite option "Invite to Group" (see screenshot).

(http://abload.de/img/2013-08-14_112131j1kaw.jpg)

As you can see on the next screenshot, I added the $name variable to get the players name
Code: [Select]
$res .= " :: <a href='chatcmd:///invite $name'>Invite to Group</a> ::";
(http://abload.de/img/2013-08-14_1125288pj2d.jpg)

But yeah, thats not gonna work *bleh* - any assistance / ideas on this one, I would realy appreciate that.

Regards, dill

Btw. Your forum is full of Add- Bots such as immirubstug, ZefOffinnaSaw, emernTalaNeal, Faflialbees... etc.
Title: Re: Invite to Group | Raid from Logon Message (Logon.php)
Post by: Getrix on August 15, 2013, 11:19:17 pm
As far as i remember its not possible to link a command directly into chat, must be done via "blob"/popup window with a new link inside
Title: Re: Invite to Group | Raid from Logon Message (Logon.php)
Post by: dillinger on August 19, 2013, 09:29:42 am
Ah, thanx for that information, I'll check the "makeblob" functionality
Title: Re: Invite to Group | Raid from Logon Message (Logon.php)
Post by: Oolwe on August 22, 2013, 12:34:01 pm
Hello,

I have something that maybe you can find usefull. note that i haven't played AOC for some month and play a little this month, i have maintained the bot online and this fonction works very fine.

All my script are translated in french, so i suggest you to try my two modified script and see if it suit you and modify it to your need.

what it does
Announce to Guild chat:
- Name / Level / Class, reroll if defined and a clickable blob

exemple -> Piwi: Mackenzi (Lvl 80 Dark Templar) Connecté :: Reroll de Aemm :: [link]Détails et Option[/link]

In the Blob "Détails et Option (details and options)" i have added what i think was the most common usefull and used command for user himself but also for other people (like invit to group):

* Player Options *
- invite to group
- add as a friend
- AAMON showall timer

* Quick access to help and scripts *

- Aemotes script
- KOS liste module (show KOS liste)
- AAMON Help
- Alts help
- City module (a personal module to set some ressource needed for city spamed every 2hours in Guild chat) i can provide this one if someone is interested
- Google translation script (doesn't work anymore because of google api)
- Logon help
- Alias Help
- Items Database Help

- Complete Help Bot


quote from the modified whois.php, full whois.php attached at the bottom:
Code: [Select]
if ($this -> bot -> core("settings") -> get("Whois", "ShowOptions") == TRUE)
{
$window .= "<BR><BR>##normal##<center>::: Options du Joueur :::</center>##end##<BR>";
$window .= "<a href='chatcmd:///invite " . $whois['nickname'] . "'>Inviter dans un Group</a>\n";
$window .= $this -> bot -> core("tools") -> chatcmd('addbuddy ' . $whois['nickname'], "Ajouter à la Liste d'Amis", 'cc') . "\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>aamon showall " . $whois['nickname'] . "'>AAMON: Timer de Perk Offline en cours</a>\n";
$window .= "<BR><BR>##normal##<center>::: Accès rapide à l'Aide :::</center>##end##<BR>";
$window .= "<a href='chatcmd:///tell <botname> <pre>aemotes'>Aemotes</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>kos'>KOS Liste</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>help aamon'>AAMON</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>help alts'>Reroll</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>city'>Village de Guilde</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>scripts'>Liste des Scripts</a>\n";
// $window .= "<a href='chatcmd:///tell <botname> <pre>help en2fr'>Google Traduction</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>help logon'>Message de Connection</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>help alias'>Nom de Connection</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>help items'>Rechercher du Stuff</a>\n";
$window .= "<a href='chatcmd:///tell <botname> <pre>help'>Toute l'Aide</a>\n";
//$window .= $this -> bot -> core("tools") -> chatcmd('history ' . $whois['nickname'], 'Character history') . "\n";
}

return ($this -> bot -> core("tools") -> make_blob("Détails et Option", $window));
}

attached:
modified botfolder/modules/logon.php
modified botfolder/core/aoc/whois.php

Hope that help.
Regards
Title: Re: Invite to Group | Raid from Logon Message (Logon.php)
Post by: dillinger on August 26, 2013, 01:17:35 am
Thanks mate, I will check this out!
Title: Re: Invite to Group | Raid from Logon Message (Logon.php)
Post by: Hyenaman on February 27, 2014, 01:10:43 pm
Hi trying to get this working but getting an error of:

Fatal error: Cannot redeclare class Whois_Core in C:\Users\bebot\Desktop\backup\
modules\Whois.php on line 558

can someone help?
SimplePortal 2.3.7 © 2008-2024, SimplePortal