BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: Apexsilverevo8 on March 26, 2009, 07:51:11 am

Title: Modified online command???
Post by: Apexsilverevo8 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!!!
Title: Re: Modified online command???
Post by: Alreadythere 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.
Title: Re: Modified online command???
Post by: Apexsilverevo8 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 :)
Title: Re: Modified online command???
Post by: Alreadythere 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);
Title: Re: Modified online command???
Post by: Temar 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();
Title: Re: Modified online command???
Post by: Apexsilverevo8 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!!!!!!!!!
Title: Re: Modified online command???
Post by: Apexsilverevo8 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!
Title: Re: Modified online command???
Post by: Apexsilverevo8 on April 01, 2009, 08:16:41 pm
Anyone have an idea? Please feel free to PM me :) Thanks again!
Title: Re: Modified online command???
Post by: Alreadythere on April 02, 2009, 05:35:57 pm
Quick guess is that you need to replace $count1 with $count1[0][0], same for $count2.
SimplePortal 2.3.7 © 2008-2024, SimplePortal