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: Research plugin  (Read 9448 times)

0 Members and 1 Guest are viewing this topic.

Offline nebhyper

  • BeBot User
  • **
  • Posts: 62
  • Karma: +0/-0
Re: Research plugin
« Reply #15 on: February 12, 2007, 09:22:13 pm »
I guess the cool way to do it would be to get the level of the person requesting the info and refine the values returned to either xp or sk  :) Might actually do that....


in my tokens.php I have done just this and also ported it over to !level !lvl and a made a new one called !me that has basically the same thing as !lvl but displays in a blob instead of spamming chat.


Anyways, here is the code from !tokens I used to get the persons level.

Code: [Select]
//Find player lvl
$result = $this -> bot -> db -> select("SELECT level FROM members WHERE id = " . $this -> bot -> aoc -> get_uid($name));
if (empty($result))
{
$result = $this -> bot -> db -> select("SELECT level FROM whois WHERE id = " . $this -> bot -> aoc -> get_uid($name));
$lvl = $result[0][0];
}
else
{
$lvl = $result[0][0];
}

if (empty($lvl))
{
return "Unable to find your level.  Please manually enter it. <pre>help tokens";
}
else
{
  return $this -> ShowTokens($lvl, $info[1], $info[2]);
}
Siocuffin (Squad Commander of United Notum Federation)
alts: Nebhyper, Nebalmighty.

 

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