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

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

Author Topic: Modified online command???  (Read 9349 times)

0 Members and 2 Guests are viewing this topic.

Offline Apexsilverevo8

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Modified online command???
« on: March 26, 2009, 07:51:11 am »
I am trying to have a single line of output into guild channel that includes several bits of information. Something like someone does !online and the bot says:
"There are 10 people online, 3 people in the guest channel and 4 others on notify : Click here to see them all"

Now, all the numbers have already been called out, its just a matter of the bot putting them all in 1 line of text with a link to view them all at the end. How do I do this???

This is what I am trying to modify:

return $countonline[0][0]  . " Members Online " . $this -> bot -> core("tools") -> make_blob("Click here to view", $msg);



 Thanks in advance!!!

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Modified online command???
« Reply #1 on: March 26, 2009, 06:10:43 pm »
The place you have to search in is modules/OnlineDisplay.php, the function online_msg().

There the output is created.

Offline Apexsilverevo8

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Modified online command???
« Reply #2 on: March 26, 2009, 07:09:21 pm »
thats there it is located, I think I have the positioning, its just the sytax or something cuase when ever I change it, it goes into a reboot loop saying there was a parse error. Here is what I was trying:

return $countonline[0][0]  . " Members online ", "Guests online " $count1 , "Others online" $count2 . $this -> bot -> core("tools") -> make_blob("Clocik here to view", $msg);

Count1, count2 etc etc have all been defined earlier in the script. Its just a matter of calling them back up again. Thanks again!!!!!! I think I am soooooo close :)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Modified online command???
« Reply #3 on: March 27, 2009, 04:59:55 pm »
return $countonline[0][0]  . " Members online ", "Guests online " $count1 , "Others online" $count2 . $this -> bot -> core("tools") -> make_blob("Clocik here to view", $msg);
The ", " breaks it I think.

Should be:
return $countonline[0][0]  . " Members online, Guests online " . $count1 . ", Others online " . $count2 . $this -> bot -> core("tools") -> make_blob("Clocik here to view", $msg);

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Modified online command???
« Reply #4 on: March 27, 2009, 05:46:06 pm »
that would break it yes
if ur trying to return the data as an array u need return array();

Offline Apexsilverevo8

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Modified online command???
« Reply #5 on: March 28, 2009, 05:49:04 am »
scuse the noobness, what do you mean by array? Does it have to be? lol sorry I am just beginning to modify existing code and not really writing new :) THANKS AGAIN!!!!!!!!!

Offline Apexsilverevo8

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Modified online command???
« Reply #6 on: March 28, 2009, 05:54:42 am »
ok it looks like I am trying to call up an array...

" 3 Members online, Guests online Array, Others online Array Click here to view"

is what is spammed... How do I make it work? lol thanks again!

Offline Apexsilverevo8

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Modified online command???
« Reply #7 on: April 01, 2009, 08:16:41 pm »
Anyone have an idea? Please feel free to PM me :) Thanks again!

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Modified online command???
« Reply #8 on: April 02, 2009, 05:35:57 pm »
Quick guess is that you need to replace $count1 with $count1[0][0], same for $count2.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

* Who's Online
  • Dot Guests: 118
  • 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