Back Reply to topic
Snibbeldibbel 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 17
 
 
Years registered: * * * * * * * * * * * * * * * * *
/tells for guild+allied instead of /guild commands Posted: Post 02:47 Mon - Jun 23, 2008

Servus, erst Deutsch dann Englisch, da das nicht so gut ist

Würde gerne diesen Bot dazu kriegen das er nur noch peer /tell antwortet, ansprechen können wir ihn nur peer /tell. würde den gerne so haben das personen aus der Ally sich mit eintragen können mit !main und !alt und auch die anderen sachen wie !online nutzen können ohne in der Gilde zu sein, was muß ich ändern und am besten wo, und bitte..ich bin absoluter anfänger, *winkt chaly zu* wie du im anderem forum schon gemeerkt hast*grinst*

Hi,
i want that the bot answers using /tell instead of /gu. the bot should answer if the sender is a guildmate or an allied. particularly !main, !alt and !online would be nice, maybe the other commands too. i´m a real beginner, chaly knows from PM in other forum
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 04:39 Mon - Jun 23, 2008

at first: sry, i moderated your post a bit zwinkern
and..: this will only be possible if you change the code of the plugins.

there are two things to do (the part with the allied below is a bit complicated;))
let's start with the /tell modification, here is an example for !online (the guildonline-directory). you have to do modify all plugins in more or less the same way:
1) move the plugin from plugins/guild/guildonline to plugins/tell/guildonline
the bot now handles the plugin every time he receives a /tell.
2a) open the index.php
2b) search "send_public_channel_message($myguild,$msg);"
2c) replace with "send_private_tell($sender,$msg);"
after saving the file the bot now replies in a tell instead of the guildchannel
3a) open the index.php again
3b) replace the second line with these
Code:
global $guildmates;
if ($pluginwords[1]=="!online" && $guildmates[$sender]) {

the bot now checks if the sender is a guildmate

about an ppl in allied guild:
version 0.6 of ragebot knows three types of characters: admins, guildmates, others
i think the best solution for checking if a sender is a guildmate of an allied guild would be:
- each guild runs ragebot
- a plugin that does a conversation between the two bots, telling each other of new or deleted guildmates (and a complete synchronization if one of them has just restarted)
not impossible but not done in an hour lachen
*edit*
the bot-conversation may also mirror the guildchannels......
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Snibbeldibbel 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 17
 
 
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 05:31 Mon - Jun 23, 2008

thx a lot, as i said my english isnt the best, will test it

mhm, change what u said..but it is in the /gu not in /tell ..
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 09:22 Mon - Jun 23, 2008

i think there is still a send_public_channel_message at the end of your index.php.
backup your index.php (copy to index.bak), open index.php and replace with this code:
Code:
<?php
global $guildmates;
if ($pluginwords[1]=="!online" && $guildmates[$sender]) {
   global $myguild,$BuddyList,$guildmates,$guildmains;

   $link=colortext("::::: Guildstatus Online Info :::::\n");
   $BuddyClasses=array(); foreach($BuddyList as $buddy) $BuddyClasses[]=$buddy["class"];
   $BuddySorted =$BuddyList;
   array_multisort($BuddyClasses,SORT_ASC,$BuddySorted);
   $BuddyClasses="";
   foreach ($BuddySorted as $buddy) {
      if ( $guildmates[$buddy["name"]] && $buddy["status"]>0 ) {
         if ($BuddyClasses!=$buddy["class"]) {
            $link.="\n<font color=#10FA30><u>".classname($buddy["class"])."</u></font>\n";
            $BuddyClasses=$buddy["class"];
         }
         $link.="<font color=#20F080>".$buddy["name"]."</font> <font color=#A0E0A8>(".$buddy["level"].")</font>";
         if ($guildmains[$buddy["name"]])
            $link.=" <font color=#20F080>Main:</font><font color=#A0E0A8>".$guildmains[$buddy["name"]]."</font>";
         if ($buddy["status"]==3)
            $link.=" <font color=#A0F020><i>(AFK)</i></font>";
         $link.="\n";
      }
   }
   $msg = makelink(":: Current Online ::",$link);

   send_private_tell($sender,$msg);
} elseif ($pluginwords[1]=="!offline") {
   global $myguild;
   send_private_tell($sender,colortext("No I won't."));
}
?>
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Snibbeldibbel 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 17
 
 
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 10:15 Mon - Jun 23, 2008

thx a lot u are the best, now it works...not so hard to understand..if someone explain it like u do, edit all index in the plugins and it works too*bow*

with the mirroring...that sound great...perfekt allychannel...when u bring this to run..u are my personal coder and AoC helper god

using for Ally works, only some minor things edit..

2a) open the index.php
2b) search "send_public_channel_message($myguild,$msg);"
2c) replace with "send_private_tell($sender,$msg);"
after saving the file the bot now replies in a tell instead of the guildchannel
in all index.php..and it works..

the only thing i didn´t find is !twinklist, want mor then 15 !alt on one page, and that no notice came in the /gu channel..done dreamweaver search brings it up
Reply with quote


Back Reply to topic