collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: !whois (addbuddy function)  (Read 11112 times)

0 Members and 1 Guest are viewing this topic.

Offline meatshield

  • BeBot User
  • **
  • Posts: 24
  • Karma: +0/-0
!whois (addbuddy function)
« on: July 03, 2008, 01:19:51 am »
the code is

$window .= $this -> bot -> core("tools") -> chatcmd('cc addbuddy ' - $whois['nickname'], 'Add to buddylist') . "\n";

i'm not sure how to fix this, but it basically sends the person who clicked it a whisper cc addbuddy "name".  I changed it to /invite and got /invite "name". Scripting - I can use <a href='chatcmd:///tchatell Dalri Im interested in joining your guild.'>, but i'm really not sure how to edit the whois.php to get it to work proper with the addbuddy.  If you can help me with that I'm sure I can get an auto guild invite .php going (with a password verification).  (a mod that i'm gonna req if I can't figure it out)

Offline Noer

  • BeBot Apprentice
  • ***
  • Posts: 107
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #1 on: July 03, 2008, 10:22:14 am »
Not entirely sure on what you are trying to do. You probably need to explain it in a bit more detail.

Offline meatshield

  • BeBot User
  • **
  • Posts: 24
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #2 on: July 03, 2008, 08:16:06 pm »
the code that I linked was from the whois.php included with bebot. The problem is, when you do !whois name you get a text from the bot telling you their level.  Then there is a nice little link called details at the end of that message.  Once you click that message it brings up a window with that same information. On that window is a button that you can press to addbuddy or removebuddy. When you select the addbuddy it puts cc addbuddy in guild chat.

Just to make sure you understand, I'm not adding a module. This is a module that came with the package.

I'm trying to figure out how to change the command line so that it actually adds the person to your friends instead of telling you the command.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: !whois (addbuddy function)
« Reply #3 on: July 03, 2008, 10:09:18 pm »
cc is not coded into the function but it does allow custom commands
Code: [Select]
$window .= $this -> bot -> core("tools") -> chatcmd("addbuddy " . $whois['nickname'], "Add to buddylist", "cc") . "\n";

Offline meatshield

  • BeBot User
  • **
  • Posts: 24
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #4 on: July 04, 2008, 02:19:49 am »
cc is not coded into the function but it does allow custom commands
Code: [Select]
$window .= $this -> bot -> core("tools") -> chatcmd("addbuddy " . $whois['nickname'], "Add to buddylist", "cc") . "\n";

So, i updated my whois.php with the "cc") . "\n";.  It didn't change anything though. When I click the AddBuddy button it just sends me a tell with addbuddy name.

Originally the code looked like the cc rembuddy.  So i'm kind of confused here. I read in one post that .php can't execute chat commands like /invite name or /cc addbuddy name.  This confuses, if a script can do it then there has to be a way to link whois.php to a script maybe? I could be totally wrong as I'm not a programmer.

Original Code
Code: [Select]
$window .= $this -> bot -> core("tools") -> chatcmd("cc addbuddy " . $whois['nickname'], "Add to buddylist") . "\n";

This is the code in a script (i'm sure you already know, just trying  to cover all bases)
Code: [Select]
<a href='chatcmd:///tell name Im interested in joining your guild.'>  (will send a tell to the person named)

So I don't understand why .php can call a tell command but not a cc or /invite guild (new way to do it).

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: !whois (addbuddy function)
« Reply #5 on: July 04, 2008, 05:11:39 am »
now im not sure about AoC but but i made the tools module and i wrote the chatcmd function and sending "cc" as the Source should use Default since it doesnt recognise it which is
$source." "
and do /cc addbuddy name
look in the modules /main/14_Tools.php (asuming its same) to verify this

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: !whois (addbuddy function)
« Reply #6 on: July 04, 2008, 05:17:47 am »
i just checked what you are useing in AoC
its an old version from 0.5.0
0.5.1 and Better have support for any command e.g. /cc

Offline meatshield

  • BeBot User
  • **
  • Posts: 24
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #7 on: July 04, 2008, 07:01:30 am »
You're amazing - I am using the old vesion.  Quick question then... Do i have to recreate my database and complete reinstall the bot again?  OR can i just copy the files over?

Second Question - Can I get a link to where I can download it? The download link only provides an AO version of bebot.

This is where i'm downloading Bebot Hyborian
Code: [Select]
code.google.com/pbebot-aoc/downloads/list
« Last Edit: July 04, 2008, 07:18:47 am by meatshield »

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: !whois (addbuddy function)
« Reply #8 on: July 04, 2008, 02:13:48 pm »
i have compared the old tools module in AoC bot to the latest AO version, replacing with the AO version should be fine

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #9 on: July 04, 2008, 04:26:16 pm »
Second Question - Can I get a link to where I can download it? The download link only provides an AO version of bebot.
The AO and AoC chat protocolls are pretty similar, which means that many parts of the bot can be used with both games. Unless there were some serious changes to the blob technology in AO (and I haven't read anything about this) you should be able to simply grab the AO version of the Tools file.
« Last Edit: July 04, 2008, 08:34:32 pm by Alreadythere »

Offline meatshield

  • BeBot User
  • **
  • Posts: 24
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #10 on: July 04, 2008, 07:59:34 pm »
I tried this 2 different ways. The 1st way I copied over all the AO files into a new folder. Set it up and failed. So I entered in the server info so that it would connect -- and the same issue. When I click the addbuddy link it sends me a tell !cc addbuddy name.

The 2nd attempt was to copy the new AO version ontop of the AOCH version.  Same issue, I get sent an in-game tell.

I even attempted to just copy the 14_Tools.php and update the whois code manually - same issue.

---- copying the AO version ontop of the Hyborian version - breaks !say command. Not sure if there's anything else.  I'm going to revert back to Hyborian for the time being. I'm going to check all the files and see if I can manually update Hyborian to the current AO version.
« Last Edit: July 04, 2008, 08:04:02 pm by meatshield »

Offline Noer

  • BeBot Apprentice
  • ***
  • Posts: 107
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #11 on: July 05, 2008, 12:59:03 pm »
I added the latest Tools module to the source. Do a svn update to get this.

Offline meatshield

  • BeBot User
  • **
  • Posts: 24
  • Karma: +0/-0
Re: !whois (addbuddy function)
« Reply #12 on: July 05, 2008, 08:11:46 pm »
I updated, but it still doesn't work.
« Last Edit: July 05, 2008, 09:38:53 pm by meatshield »

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 96
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal