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: noob question ;) is it possible to get the online stat chars?  (Read 14105 times)

0 Members and 1 Guest are viewing this topic.

Offline Zorrna

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
noob question ;) is it possible to get the online stat chars?
« on: February 26, 2011, 06:11:06 pm »
Hi

Is it possible to get the online state of any char on the server via bot?

I need it to make my Friendslist better to use that i can see on my list if the player is on or not

I´am working on this http://bebot.link/module-requests/alternative-friendslist-for-aoc/

by the way is it also possible to get the class of any char on my server?

LG


« Last Edit: February 26, 2011, 06:21:52 pm by Zorrna »

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: noob question ;) is it possible to get the online stat chars?
« Reply #1 on: February 26, 2011, 07:13:08 pm »
try .... !is charname ... this would give u feedback if the char is online
!yg charname ... this would give u feddback of the yg profile of the char

hop i could help

drizz

Offline Zorrna

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: noob question ;) is it possible to get the online stat chars?
« Reply #2 on: February 26, 2011, 11:38:44 pm »
i know th !is funktion but i want to use it in a script


Code: [Select]
function freund_liste($name)
{
//finde den mainchar von $name
$findmain = $this -> bot -> db -> select("SELECT main FROM alts WHERE alts.alt='$name'");
if (empty($findmain)) {$main=$name;}
else {$main = current($findmain[0]);}

//finde alle freunde und liste in scriptbox
$output ="<Center>##ao_infoheadline##:::: Freundesliste von $main und Twinks ::::##end##</Center>".$this->brfix(2);
$freunde = $this -> bot -> db -> select("SELECT * FROM  `#___friends` WHERE mainchar =  '$main'");
if (!empty($freunde)) {
foreach ($freunde as $aa) {
$fname = $aa[1];
$fdatum = $aa[2];
$fnotiz = $aa[3];
$output .= "##Lime##$fname##end##    $fdatum    $fnotiz".$this->brfix();
}
}
$output = $this -> bot -> core("tools") -> make_blob("Freundesliste f?r $main", $output);
return $output;
}

u see i make a list with my buddy´s and make a blob to show it but i want to check if the char wit the name $fname is online if not i don´t add him to the list can i use !is for this?


Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: noob question ;) is it possible to get the online stat chars?
« Reply #3 on: February 27, 2011, 08:49:06 am »
i think so .... just try and error ;) .... on our bot the !is funktion works with no botmembers either

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: noob question ;) is it possible to get the online stat chars?
« Reply #4 on: February 27, 2011, 04:09:46 pm »
If you get your friends added to the bot somehow, perhaps as guests, then I suppose you could use this sniplet to some extent? (It's from the guildinfo.php mod)

Code: [Select]
$online = $this -> bot -> core("online") -> get_online_state('Wood');
      $txt.= "##GI_highlight##".$online['content']." :: <a href='chatcmd:///tell Wood Im interested in joining Exalted'>Wood</a> - Guild leader##end##\n";

I don't know how you could implement it fully to your use, but it might be a clue.
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
  • Karma: +0/-0
    • AoC>TV
Re: noob question ;) is it possible to get the online stat chars?
« Reply #5 on: March 01, 2011, 11:32:21 am »
Here's what I've used for a module of mine:
Code: [Select]
$online_users = $this -> bot -> core('online') -> list_users('gc');

Do some looping of your friends list and get the $char_name somehow, then do:
Code: [Select]
$output .= sprintf("##%s##%s##end##\n", (in_array($char_name, $online_users) ? 'green' : 'red'), $char_name);
Online users will be green, offline will be red.

As for class, you will either have to check your whois table or use yg functionality.

Edit: list_users('gc') might just list online guild members though... so it might be better to check the online status in the whois table.
« Last Edit: March 02, 2011, 12:40:47 pm by Kentarii »

Offline Zorrna

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: noob question ;) is it possible to get the online stat chars?
« Reply #6 on: March 07, 2011, 05:26:11 pm »
okay with the
Code: [Select]
$this -> bot ->core("whois") -> lookup($user);
i become the online state for each user but it isn`t up to date (only bot members will be updated) a user not in guildbot as member will be shown as online long after they will be loged out. (testet it with a second testbot of me)

now how i can force a update of the whois table?

LG




 

* 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: 97
  • 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