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

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

Author Topic: Can bot issue slash command?  (Read 1656 times)

0 Members and 1 Guest are viewing this topic.

Offline Riccarr

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Can bot issue slash command?
« on: November 28, 2010, 05:04:17 am »
I'd like to have a popup info window with chatcmd's in them that are in-game slash commands, like the /WHO command.
When I code a chatcmd it just sends the /who <name> to the bot and not to the chat command line.

How/Can we code a game slash command to go to the chat command line?

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Can bot issue slash command?
« Reply #1 on: November 28, 2010, 03:04:09 pm »
Someone else who have looked into the protocol used will have to give an definitive answer to this, but my gut feeling is that such commands are either handled by the community or the game server and not the chat server which is the only one the bot is connected to.

As such there is nothing we can really do.
BeBot Founder and Fixer Kingpin

Offline Yite

  • BeBot Apprentice
  • ***
  • Posts: 152
  • Karma: +0/-0
    • Niflheim - Crom
Re: Can bot issue slash command?
« Reply #2 on: November 29, 2010, 11:31:38 am »
What you can try is connect to the chat server using aoc chat and see what commands (if any) you can use there.
-Yite [Crom]

Offline Riccarr

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Can bot issue slash command?
« Reply #3 on: November 30, 2010, 06:58:57 am »
Actually I determined you can and it is very simple.

I realized that the chatcmd was just issuing slash commands. If you left origin parameter to default that it would just do a /tell to botname.

I made a simple function that will only prefix the output with a leading "/" and just add what you send it. So ...

    function plainchat($link, $title)
    {
        $retStr = "<a href='chatcmd:///".$chatcmd.$link . "'>" . $title . "</a>";
        Return ($retStr);
    }

Used like: plainchat("who ".$name, $name)
would create a link in the info window that is $name and clicking it will send /who name to the chat command line.

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 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: 286
  • 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