Development > Module Requests

request: Raid (Raid.php) with invite links inside

<< < (2/2)

Huesos:
The dkp module is more complex and for me cannot readily incorporate the invite blob anyhow.. I don't have eqdkp access (on a site)anyhow.. It is beyond me if the code is there and to add it in the Raid.php.

lines 687-694:


--- Code: ---{
$list = "Users Not with Raid Group: ";
foreach ($missing[1] as $player)
{
$inside .= $player . " [".$this -> bot -> core("tools") -> chatcmd(
"raid kick ".$player." Not with Group", "Kick")."]\n";
$list .= $player.", ";
$count++;
}
--- End code ---

Huesos:
I have found in a Ally module this command:

--- Code: ---$blob .= "<a href='chatcmd:///invite ".$player."'>$player</a> invite to group<br>";
$blob .= "<a href='chatcmd:///invitetoraid ".$player."'>$player</a> invite to raid";
--- End code ---

but have no idea how to place it , when I !raid check
then have it list the players and right next to <kick> a <invite to raid> etc

the dkp one I'm not into using, plus don't have any eqdkp system

Huesos:
heres the !raid check part

--- Code: ---/*
Checks memebers on a raid
*/
function check_raid($name, $names)
{
if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Raid', 'Command')))
{
if(!empty($names))
{
if(preg_match_all("/Can\'t find target &gt;([A-Za-z0-9]+)&lt;\./", $names, $missing))
{
$list = "Users Not with Raid Group: ";
foreach ($missing[1] as $player)
{
$inside .= $player . " [".$this -> bot -> core("tools") -> chatcmd(
"raid kick ".$player." Not with Group", "Kick")."]\n";
$list .= $player.", ";
$count++;
}
$list = substr($list, 0, -2);
$this -> raid_command($name, $list);
Return("##highlight##".$count."##end## Players Missing :: ".$this -> bot -> core("tools") -> make_blob("click to view", $inside));
}
else
Return("##highlight##0##end## Players Missing");
}
else
{
$players = array_keys($this -> user);
sort($players);

$inside = "##blob_title##:::: People in the raid ::::##end##\n\n";
                        $inside .= "Send not-joined warnings: ".$this -> bot -> core("tools") -> chatcmd("raid notin", "raid notin")."\n";
$inside .= "Kick not-joined from bot: ".$this -> bot -> core("tools") -> chatcmd("raid notinkick", "raid notinkick")."\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 raid members</a>\n\n";
}
$inside .= "Example use: <pre>raid check Can't assist yourself. Target is not in a fight. Can't find target &gt;Chris05&lt;.\n\n";
foreach ($players as $player)
{

$who = $this -> bot -> core("whois") -> lookup($player, TRUE); //All info about raiders are expected to be correct as already beeing member and all.

if ($who['faction']=="Omni")
$info = " [##omni##Omni</font>/";

elseif ($who['faction']=="Clan")
$info = " [##clan##Clan</font>/";

elseif ($who['faction']=="Neutral")
$info = " [##neut##Neut</font>/";

else //Should never happend but who knows shit happens.
$info = " [<font color=#D7FFBC>".$who['faction']."</font>/";

$info .= "<font color=#A2FF4C>" . $who['level']."</font>/";
$info .= "<font color=#FFFB9E>" . $who['profession']."</font>]";

$inside .= $player . $info . " [".$this -> bot -> core("tools") -> chatcmd(
"raid kick ".$player, "Kick")."]\n";
}
}
else
$inside .= "There are no members of this raid.";

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


/*

--- End code ---

Huesos:
making progress think I just got it .. at least in the name who !raid join 's
 a invite to raid link on them with it

--- Code: ---/*
Checks memebers on a raid
*/
function check_raid($name, $names)
{
if ($this -> bot -> core("security") -> check_access($name, $this -> bot -> core("settings") -> get('Raid', 'Command')))
{
if(!empty($names))
{
if(preg_match_all("/Can\'t find target &gt;([A-Za-z0-9]+)&lt;\./", $names, $missing))
{
$list = "Users Not with Raid Group: ";
foreach ($missing[1] as $player)
{
$inside .= $player . " [".$this -> bot -> core("tools") -> chatcmd(
"raid kick ".$player." Not with Group", "Kick")."]\n";
$list .= $player.", ";
$count++;
}
$list = substr($list, 0, -2);
$this -> raid_command($name, $list);
Return("##highlight##".$count."##end## Players Missing :: ".$this -> bot -> core("tools") -> make_blob("click to view", $inside));
}
else
Return("##highlight##0##end## Players Missing");
}
else
{
$players = array_keys($this -> user);
sort($players);

$inside = "##blob_title##:::: People in the raid ::::##end##\n\n";
                        $inside .= "Send not-joined warnings: ".$this -> bot -> core("tools") -> chatcmd("raid notin", "raid notin")."\n";
$inside .= "Kick not-joined from bot: ".$this -> bot -> core("tools") -> chatcmd("raid notinkick", "raid notinkick")."\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 raid members</a>\n\n";
}
$inside .= "Example use: <pre>raid check Can't assist yourself. Target is not in a fight. Can't find target &gt;Chris05&lt;.\n\n";
foreach ($players as $player)
{

$who = $this -> bot -> core("whois") -> lookup($player, TRUE); //All info about raiders are expected to be correct as already beeing member and all.

if ($who['faction']=="Omni")
$info = " [##omni##Omni</font>/";

elseif ($who['faction']=="Clan")
$info = " [##clan##Clan</font>/";

elseif ($who['faction']=="Neutral")
$info = " [##neut##Neut</font>/";

else //Should never happend but who knows shit happens.
$info = " [<font color=#D7FFBC>".$who['faction']."</font>/";

$info .= "<font color=#A2FF4C>" . $who['level']."</font>/";
$info .= "<font color=#FFFB9E>" . $who['profession']."</font>]";

$inside .= "<a href='chatcmd:///invitetoraid ".$player."'>$player</a> invite to raid" . $info . " [".$this -> bot -> core("tools") -> chatcmd(
"raid kick ".$player, "Kick")."]\n";
}
}
else
$inside .= "There are no members of this raid.";

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

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version