Development > Coding and development discussion

Invite to Group | Raid from Logon Message (Logon.php)

(1/2) > >>

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).

As you can see on the next screenshot, I added the $name variable to get the players name
--- Code: ---$res .= " :: <a href='chatcmd:///invite $name'>Invite to Group</a> ::";
--- End code ---

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.

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

Ah, thanx for that information, I'll check the "makeblob" functionality


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: --- 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));

--- End code ---

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

Hope that help.

Thanks mate, I will check this out!


[0] Message Index

[#] Next page

Go to full version