Back Reply to topic
Goto page 1, 2  Next
Creator 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 16
Playing:  AOC-Omm
Ingame:  Creator
Years registered: * * * * * * * * * * * * * * * * *
gratz-plugin? Posted: Post 09:23 Mon - Jun 23, 2008

I was trying to create a module that would give props to a character (ya know when there the only one on without anyone to "gratz" them). But it seems that guild announcement messages aren't actually sent to chat... is there a way to get the bot to respond to guild announcements?

Also, it looks like the stripcolors script also strips legit numbers from a message.... Lets say (assuming above is possible) I want the script to ignore characters below level 10. When I use pluginwords[5] in an evaluation (for <name> is now level <##>), because the 5th argument is a number, it gets stripped.

Any ideas?
Reply with quote


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

splitted again .. sry lachen

the gratz-script was a nice addon for anarchy-online bots.

the bot doesn't receive the guild-announcements (not even a login of a guildmate) as far as i know, but i've noticed that the aochat-engine receives a packet 20 (AOCP_CLIENT_NAME) every time a buddy changes his/her state (exactly the engine also gets a 20 when an unkown character talks anywhere..).
a state seems to be a playfield change as well as gaining a new level.
aocchat.php, line 339 tells that the packet has three parameters: characterid, unknown, charactername.
there's no supported plugin-type triggered on packet 20 yet. maybe worth a try:
- inc/call_back.php, line line 42 add
Code:
   /*****
        ****** namelookup triggerd
        *****/
   if ($type==20) {
      $sender           =$AOC->id[$args[0]];
      $status          =$args[1];
      execute_plugin("lookup",$args,$status,$sender);
   }

- create a directory plugins/lookup
- create a directory plugins/lookup/test
- create a file plugins/lookup/test/index.php
here i'm stucked yet: the engine doesn't get a buddy-state change on a levelup. so i suggest for the new index.php:
Code:
<?php
global $myname;
if ($sender!=$myname) {
   global $guildmates,$AOC,$BuddyList;
   if ($guildmates[$sender] && $BuddyList[$sender] && $AOC->buddy_exists($sender)) {
      global $congratz;
      $congratz[$sender]=$BuddyList[$sender]["level"];
      $AOC->buddy_remove($sender);
      $AOC->buddy_add($sender);
   }
}

next the plugins/buddy/guildbuddies/index.php will be triggered with the removed+added buddy. here we have to add an if at the top:
- is the buddy in the congratz-array then we don't have to inform anyone of the logon/logoff..
- is the buddy in the congratz-array and the new level ( $args["level"] here ) isn't the same that we just saved in the lookup-plugin, then we can send a gratz..
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.


Last edited by Chaly on 12:06 Tue - Jun 24, 2008; edited 1 time in total
Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 10:08 Mon - Jun 23, 2008

Creator wrote:
Also, it looks like the stripcolors script also strips legit numbers from a message....

Code:
/****** cleanup a message
******* Idea: Beaker, http://tera.kuren.org/basicbot
******/
$stripcolorsarray=array();
for ($i=1;$i<=31;$i++) $stripcolorsarray[$i]="";
function stripcolors($message) {
   global $stripcolorsarray;
   return strtr($message,$stripcolorsarray);
}

legit numbers should start at ascii 48 but the numbers are missing in the debugoutput. grübel
the ingame messages contain numbers anyway slash
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.


Last edited by Chaly on 08:19 Tue - Jun 24, 2008; edited 1 time in total
Guest 
 
Topics: 404
 
 
 
Posted: Post 12:21 Tue - Jun 24, 2008

uih nice work
but your posting is to crazy for me, can you make a bundel for this update
that wood be soooooooooo perfekt mate
Reply with quote


Creator 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 16
Playing:  AOC-Omm
Ingame:  Creator
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 05:21 Tue - Jun 24, 2008

Just saw that you split off the posts... reviewing now... should be in bed though. I'll have to dig in in the morning.

- Creator
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 08:34 Tue - Jun 24, 2008

yep.. i caught myself spending 6 hours with bot-posts, 15 minutes with bot-coding, 0 minutes playing, 3 hours with sleeping zwinkern Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Guest 
 
Topics: 404
 
 
 
Posted: Post 06:05 Tue - Jun 24, 2008

i love playing with the bot more then playing aoc strichauge

how is the status for the gratz script ?
Reply with quote


Creator 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 16
Playing:  AOC-Omm
Ingame:  Creator
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 06:18 Tue - Jun 24, 2008

As I'm sure it's obvious since I'm responding... but I'm working today... so I can't access my bot ATM. When I get home I'll be taking another look.

I'll beat it down.

That said... what I really could use are messages for the bot to grats with...

I have 6 or 7 right now, although I can't recall them at the moment.

Anyone have any ideas? Just post them here and I'll add em.
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 06:40 Tue - Jun 24, 2008

Come on save some gratz for the rest!
Enough with the dingin you are making me feel low enough!
lvl80:
Gratz! You have reached the end of the line! You can log off and quit aoc now.
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Creator 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 16
Playing:  AOC-Omm
Ingame:  Creator
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 06:43 Tue - Jun 24, 2008

::grins:: I think we're looking at the same code Chaly.

Thought of one:

Why don't you come over and Apprentice me for a change?
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 06:53 Tue - Jun 24, 2008

for levels below 20: "gratz, only".(80-$level)." to go"
Creator wrote:
::grins:: I think we're looking at the same code Chaly.

saufen
offtopic: there was a german anarchy-online bot - engine called "angelsbot" with a really nice 8ball plugin (sorry, i just looked at the code, but there wasn't a gratz-plugin). i think there should be an english one too.. maybe for an irc eggdrop or sth.
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Dukain 
Blue-Ribbon Chicken 
Topics: 3
Posts: 8
 
 
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 07:57 Wed - Jun 25, 2008

what i have to do to get the gratz plugin with the really cool lvl 80 message pls post it agein for us noobs lachen Reply with quote


Goto page 1, 2  Next
Back Reply to topic