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: AoC YG player profile module  (Read 35429 times)

0 Members and 1 Guest are viewing this topic.

Offline Sudoka

  • BeBot User
  • **
  • Posts: 22
  • Karma: +0/-0
AoC YG player profile module
« on: July 25, 2009, 06:57:34 pm »
Here is my module for fetching player profiles from the aoc.yg.com website.

Put it in the custom/modules directory

First of all you need a password for accessing Yg's xml data. Here is the procedure for that :
Quote
To request an XML password please create a YG Member account at http://members.yg.com. Then on the My Account page click the Age of Conan tab and you will be able to request your password.
Once you have a password, insert it on line 76 in the module.

You can search for player profiles on all servers, but it defaults to the server the bot is running on, that is set in the Bot.conf file under $dimension.

To show usage and check the default server name, use:
!yg

To get player profile from the default server, use:
!yg name

To get player profile from another server, use:
!yg name servername

Edit :
2009-10-23 : New procedure for getting xml password from YG.
2009-09-24 : Added "last updated", and an auto-check ,and load, if curl is disabled.

Yg.php
Code: [Select]
<?php
/*
* Yg.php - Display player profiles from the Yellow Gremlin Database (http://aoc.yg.com/)
*
* BeBot - An Anarchy Online & Age of Conan Chat Automaton
* Copyright (C) 2004 Jonas Jax
* Copyright (C) 2005-2007 Thomas Juberg Stensås, ShadowRealm Creations and the BeBot development team.
*
* Developed by:
* - Alreadythere (RK2)
* - Blondengy (RK1)
* - Blueeagl3 (RK1)
* - Glarawyn (RK1)
* - Khalem (RK1)
* - Naturalistic (RK1)
* - Temar (RK1)
*
* See Credits file for all aknowledgements.
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; version 2 of the License only.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
*  USA
*/

/*
* Module made by Elyissa from Fury (PvP) EU
* Layout idea by Kentarii from Fury (PvP) EU
* Fetching of xml data without cURL by Getrix from Fury (PvP) EU
*/



$Yg = new Yg($bot);

class 
Yg extends BaseActiveModule
{

function __construct(&$bot)
    {
parent::__construct(&$botget_class($this));

$this -> register_command('all''yg'"GUEST");

$this -> help['description'] = "Display player profile from Yellow Gremlin Database";
$this -> help['command']['yg <name>']="Display player profile from default server";
        
$this -> help['command']['yg <name> <server>']="Display player profile from <server>";
        
$this -> help['notes'] = "Yellow Gremlin Database url : http://aoc.yg.com";
}

function command_handler($name$msg$origin)
    {
        if (
preg_match('/^yg (.+) (.+)$/i'$msg$info)) {
return $this -> showprofile($msg$info[1], $info[2]);
        }
        else if (
preg_match('/^yg (.+)$/i'$msg$info)) {
return $this -> showprofile($msg$info[1], "");
        }
else {
            return (
"##lightyellow##Usage:##end## ##white##<pre>Yg Name Server##end## ##gray##(Default Server: ".$this->bot->dimension.")##end##");
}
}

function showprofile($msg$profilename$servername)
{
    /* Password to access YG xml data */
    $password '';
        if (
$servername == "")
            
$servername $this->bot->dimension;

        
/* Check for cURL, and load xml profile data */
        
if ($this -> curl_check()) {
            
$ch curl_init ("http://aoc.yg.com/profilexml?n=$profilename&srv=$servername&pwd=$password");
            
curl_setopt($chCURLOPT_USERAGENT"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
            
curl_setopt($chCURLOPT_RETURNTRANSFER,1);
            
$xmlprf curl_exec($ch);
            
curl_close($ch);
        }
        else {
            
$yg_link "http://aoc.yg.com/profilexml?n=$profilename&srv=$servername&pwd=$password";
            
$ch $this -> bot -> core("tools") -> get_site($yg_link1);
            if (!empty(
$ch["content"])) { $xmlprf $ch["content"]; }
            else { 
$xmlprf ""; }
        }

        
$xmlobj simplexml_load_string($xmlprf);

        
/*  Done loading xml profile data */

        
if($xmlobj->aocygplayerprofile->name)
        {
            
/* Some text formating */
            
$pvpkills str_replace(".00"""$xmlobj->aocygplayerprofile->pvpkills);
            
$pvpdeaths str_replace(".00"""$xmlobj->aocygplayerprofile->pvpdeaths);
            
$classarray = array("(Priest)""(Rogue)""(Soldier)""(Mage)");
            
$class str_replace($classarray""$xmlobj->aocygplayerprofile->class);
            
$murderer ucfirst($xmlobj->aocygplayerprofile->murderer);

            
/* Player info blob */
            
$blobname "<center><font face='hyborianlarge' color='yellow'>Yellow Gremlin</font></center>\n";
            
$blobname .= "<font face='hyboriansmall' color='orange'>Character Profile</font>\n";
            
$blobname .= "##seagreen##Name##end## :: ##seablue##".$xmlobj->aocygplayerprofile->name."##end## :: ##yellow##".$xmlobj->aocygplayerprofile->link."##end##\n";
            if(
$xmlobj->aocygplayerprofile->guild)
                
$blobname .= "##seagreen##Guild##end## :: ##seablue##".$xmlobj->aocygplayerprofile->guild."##end## :: ##yellow##".$xmlobj->aocygplayerprofile->guildlink."##end##\n";
            
$blobname .= "##seagreen##Level##end## :: ##seablue##".$xmlobj->aocygplayerprofile->level."##end##\n";
            
$blobname .= "##seagreen##Server##end## :: ##seablue##".$xmlobj->aocygplayerprofile->server."##end##\n";
            
$blobname .= "##seagreen##Race##end## :: ##seablue##".$xmlobj->aocygplayerprofile->race."##end##\n";
            
$blobname .= "##seagreen##Class##end## :: ##seablue##".$xmlobj->aocygplayerprofile->class."##end##\n";
            
$blobname .= "##seagreen##Gender##end## :: ##seablue##".$xmlobj->aocygplayerprofile->gender."##end##\n";
            
$blobname .= "##seagreen##PvP Level##end## :: ##seablue##".$xmlobj->aocygplayerprofile->pvplevel."##end##\n";
            
$blobname .= "##seagreen##K/D Ratio##end## :: ##seablue##".$pvpkills."/".$pvpdeaths." = ".$xmlobj->aocygplayerprofile->kdratio."##end##\n";
            
$blobname .= "##seagreen##Professions##end## :: ##seablue##".$xmlobj->aocygplayerprofile->professions."##end##\n";
            
$blobname .= "##seagreen##Murderer##end## :: ##seablue##".$murderer."##end##\n";
            
$blobname .= "##seagreen##Last Updated##end## :: ##seablue##".$xmlobj->aocygplayerprofile->last_updated."##end##\n<center> </center>";
            
$blobname .= "<font face='hyboriansmall' color='orange'>Equipped Items</font>\n";
            for(
$i=0$i<=16$i=$i+1) {
                if (
$xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname)
                    
$blobname .= "##seagreen##".$xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname."##end## :: ##seablue##".$xmlobj->aocygplayerprofile->equipment->slot[$i]->itemname."##end##\n";
            }

            
/* If member of a guild, fetch Guild xml data */
            
if($xmlobj->aocygplayerprofile->guild)
            {
                
/* Text formating */
                
$guildid =  str_replace("guild""guildxml"$xmlobj->aocygplayerprofile->guildlink);

                
/* Check for cURL, and load xml guild data */
                
if ($this -> curl_check()) {
                    
$ch curl_init ("$guildid&pwd=$password");
                    
curl_setopt($chCURLOPT_USERAGENT"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
                    
curl_setopt($chCURLOPT_RETURNTRANSFER,1);
                    
$xmlgld curl_exec($ch);
                    
curl_close($ch);
                }
                else {
                    
$yg_link "$guildid&pwd=$password";
                    
$ch $this -> bot -> core("tools") -> get_site($yg_link1);
                    if (!empty(
$ch["content"])) { $xmlgld $ch["content"]; }
                    else { 
$xmlgld ""; }
                }

                
$xmlguild simplexml_load_string($xmlgld);

                
/*  Done loading xml guild data */

                /* Guild info blob */
                
$blobguild "<center><font face='hyborianlarge' color='yellow'>Yellow Gremlin</font></center>\n";
                
$blobguild .= "<font face='hyboriansmall' color='orange'>Guild Profile</font>\n";
                
$blobguild .= "##seagreen##Guild##end## :: ##seablue##".$xmlguild->aocygguild->name."##end## :: ##yellow##".$xmlguild->aocygguild->guildlink."##end##\n";
                
$blobguild .= "##seagreen##Server##end## :: ##seablue##".$xmlguild->aocygguild->server."##end##\n";
                
$blobguild .= "##seagreen##Members##end## :: ##seablue##".$xmlguild->aocygguild->member_count."##end##\n";
                
$blobguild .= "##seagreen##Murderers##end## :: ##seablue##".$xmlguild->aocygguild->murderers."##end##\n";
                
$blobguild .= "##seagreen##Average Level##end## :: ##seablue##".$xmlguild->aocygguild->averagelvl."##end##\n";
                
$blobguild .= "##seagreen##Average PVP Level##end## :: ##seablue##".$xmlguild->aocygguild->averagepvplvl."##end##\n";
                
$blobguild .= "##seagreen##Total Kills##end## :: ##seablue##".$xmlguild->aocygguild->totalkills."##end##\n";
                
$blobguild .= "##seagreen##Total Deaths##end## :: ##seablue##".$xmlguild->aocygguild->totaldeaths."##end##\n";
                
$blobguild .= "##seagreen##Average PVP Kills##end## :: ##seablue##".$xmlguild->aocygguild->averagepvpkills."##end##\n";
                
$blobguild .= "##seagreen##Average PVP Deaths##end## :: ##seablue##".$xmlguild->aocygguild->averagepvpdeaths."##end##\n";
                
$blobguild .= "##seagreen##K/D Ratio##end## :: ##seablue##".$xmlguild->aocygguild->kdratio."##end##\n";
            }

            
/* Output info */
            
$result "##yellow##[-YG-]##end## ##white##:: ".$this->bot->core("tools")->make_blob($xmlobj->aocygplayerprofile->name$blobname);
            if(
$xmlobj->aocygplayerprofile->guild)
                
$result .= " / ".$this->bot->core("tools")->make_blob($xmlobj->aocygplayerprofile->guild$blobguild);
            
$result .= " :: [ ##seagreen##L".$xmlobj->aocygplayerprofile->level."##end## | ##seagreen##";
            
$result .= $class."##end##| ##seablue##L".$xmlobj->aocygplayerprofile->pvplevel."##end## | ##seablue##";
            
$result .= $pvpkills."/".$pvpdeaths."##end## | ##seablue##".$xmlobj->aocygplayerprofile->kdratio."##end## ]##end##";

            return 
$result;
        }
        else
        {
            
/* No profile found */
            
$profilename ucfirst(strtolower($profilename));
            
$servername ucfirst(strtolower($servername));
            
$blob "##yellow##[-YG-]##end## ##white##::##end## ##red##No profile found for ##lightyellow##$profilename##end## on server ##lightyellow##$servername##end##.##end##";
    return $blob;
        }

}

    function 
curl_check() {
    if (in_array ('curl'get_loaded_extensions()))
    return true;
    else
    return false;
    }
}
?>

« Last Edit: April 01, 2010, 10:26:19 pm by Sudoka »

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: AoC YG player profile module
« Reply #1 on: July 25, 2009, 07:18:17 pm »
You should be able to bypass the issue with $ in password issue entirely by using:
Code: [Select]
  $password = '';

This means php won't try to parse anything between the quotes.
« Last Edit: July 29, 2009, 08:59:14 pm by Khalem »
BeBot Founder and Fixer Kingpin

Offline Getrix

  • Contributor
  • *******
  • Posts: 509
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #2 on: July 25, 2009, 07:44:51 pm »
Your module will only work if its runned with CURL enabled..

Replace both CURL stuff with:

$yg_link = "http://aoc.yg.com/profilexml?n=$profilename&srv=$servername&pwd=$password";
$ch = $this -> bot -> core("tools") -> get_site($yg_link, 1);
if (!empty($ch["content"])) { $xmlprf = $ch["content"]; }
else { $xmlprf = ""; }

$yg_link = "$guildid&pwd=$password";
$ch = $this -> bot -> core("tools") -> get_site($yg_link, 1);
if (!empty($ch["content"])) { $xmlgld = $ch["content"]; }
else { $xmlgld = ""; }


Should be something like this tested and working with CURL disabled:

Code: [Select]
<?php
/*
* Yg.php - Display player profiles from the Yellow Gremlin Database (http://aoc.yg.com/)
*
* BeBot - An Anarchy Online & Age of Conan Chat Automaton
* Copyright (C) 2004 Jonas Jax
* Copyright (C) 2005-2007 Thomas Juberg Stensås, ShadowRealm Creations and the BeBot development team.
*
* Developed by:
* - Alreadythere (RK2)
* - Blondengy (RK1)
* - Blueeagl3 (RK1)
* - Glarawyn (RK1)
* - Khalem (RK1)
* - Naturalistic (RK1)
* - Temar (RK1)
*
* See Credits file for all aknowledgements.
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; version 2 of the License only.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
*  USA
*
*/

/*
* Module made by Elyissa from Fury (PvP) EU
* Layout idea by Kentarii from Fury (PvP) EU
* Fixed bug when CURL is disabled by Getrix from Fury (PvP) EU
*/



$Yg = new Yg($bot);

class 
Yg extends BaseActiveModule
{

    function 
__construct(&$bot)
    {
        
parent::__construct(&$botget_class($this));

        
$this -> register_command('all''yg'"GUEST");

        
$this -> help['description'] = "Display player profile from Yellow Gremlin Database";
        
$this -> help['command']['yg <name>']="Display player profile from default server";
                
$this -> help['command']['yg <name> <server>']="Display player profile from <server>";
                
$this -> help['notes'] = "Yellow Gremlin Database url : http://aoc.yg.com";
    }

    function 
command_handler($name$msg$origin)
    {
        if (
preg_match('/^yg (.+) (.+)$/i'$msg$info)) {
            return 
$this -> showprofile($msg$info[1], $info[2]);
        }
        else if (
preg_match('/^yg (.+)$/i'$msg$info)) {
            return 
$this -> showprofile($msg$info[1], "");
        }
        else {
            return (
"##lightyellow##Usage:##end## ##white##<pre>Yg Name Server##end## ##gray##(Default Server: ".$this->bot->dimension.")##end##");
        }
    }

    function 
showprofile($msg$profilename$servername)
    {
        
/* Password to access YG xml data */
        
$password '';
        if (
$servername == "")
            
$servername $this->bot->dimension;

        
$yg_link "http://aoc.yg.com/profilexml?n=$profilename&srv=$servername&pwd=$password";
    
$ch $this -> bot -> core("tools") -> get_site($yg_link1);
    if (!empty(
$ch["content"])) { $xmlprf $ch["content"]; }
        else { 
$xmlprf ""; }
    
        
$xmlobj simplexml_load_string($xmlprf);

        
/*  Done loading xml profile data */

        
if($xmlobj->aocygplayerprofile->name)
        {
            
/* Some text formating */
            
$pvpkills str_replace(".00"""$xmlobj->aocygplayerprofile->pvpkills);
            
$pvpdeaths str_replace(".00"""$xmlobj->aocygplayerprofile->pvpdeaths);
            
$classarray = array("(Priest)""(Rogue)""(Soldier)""(Mage)");
            
$class str_replace($classarray""$xmlobj->aocygplayerprofile->class);
            
$murderer ucfirst($xmlobj->aocygplayerprofile->murderer);

            
/* Player info blob */
            
$blobname "<center><font face='hyborianlarge' color='yellow'>Yellow Gremlin</font></center>\n";
            
$blobname .= "<font face='hyboriansmall' color='orange'>Character Profile</font>\n";
            
$blobname .= "##seagreen##Name##end## :: ##seablue##".$xmlobj->aocygplayerprofile->name."##end## :: ##yellow##".$xmlobj->aocygplayerprofile->link."##end##\n";
            if(
$xmlobj->aocygplayerprofile->guild)
                
$blobname .= "##seagreen##Guild##end## :: ##seablue##".$xmlobj->aocygplayerprofile->guild."##end## :: ##yellow##".$xmlobj->aocygplayerprofile->guildlink."##end##\n";
            
$blobname .= "##seagreen##Level##end## :: ##seablue##".$xmlobj->aocygplayerprofile->level."##end##\n";
            
$blobname .= "##seagreen##Server##end## :: ##seablue##".$xmlobj->aocygplayerprofile->server."##end##\n";
            
$blobname .= "##seagreen##Race##end## :: ##seablue##".$xmlobj->aocygplayerprofile->race."##end##\n";
            
$blobname .= "##seagreen##Class##end## :: ##seablue##".$xmlobj->aocygplayerprofile->class."##end##\n";
            
$blobname .= "##seagreen##Gender##end## :: ##seablue##".$xmlobj->aocygplayerprofile->gender."##end##\n";
            
$blobname .= "##seagreen##PvP Level##end## :: ##seablue##".$xmlobj->aocygplayerprofile->pvplevel."##end##\n";
            
$blobname .= "##seagreen##K/D Ratio##end## :: ##seablue##".$pvpkills."/".$pvpdeaths." = ".$xmlobj->aocygplayerprofile->kdratio."##end##\n";
            
$blobname .= "##seagreen##Professions##end## :: ##seablue##".$xmlobj->aocygplayerprofile->professions."##end##\n";
            
$blobname .= "##seagreen##Murderer##end## :: ##seablue##".$murderer."##end##\n<center> </center>";
            
$blobname .= "<font face='hyboriansmall' color='orange'>Equipped Items</font>\n";
            for(
$i=0$i<=16$i=$i+1) {
                if (
$xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname)
                    
$blobname .= "##seagreen##".$xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname."##end## :: ##seablue##".$xmlobj->aocygplayerprofile->equipment->slot[$i]->itemname."##end##\n";
            }

            
/* If member of a guild, fetch Guild xml data */
            
if($xmlobj->aocygplayerprofile->guild)
            {
                
/* Text formating */
                
$guildid =  str_replace("guild""guildxml"$xmlobj->aocygplayerprofile->guildlink);


                
$yg_link "$guildid&pwd=$password";
        
$ch $this -> bot -> core("tools") -> get_site($yg_link1);
        if (!empty(
$ch["content"])) { $xmlgld $ch["content"]; }
        else { 
$xmlgld ""; }

                
$xmlguild simplexml_load_string($xmlgld);

                
/*  Done loading xml guild data */

                /* Guild info blob */
                
$blobguild "<center><font face='hyborianlarge' color='yellow'>Yellow Gremlin</font></center>\n";
                
$blobguild .= "<font face='hyboriansmall' color='orange'>Guild Profile</font>\n";
                
$blobguild .= "##seagreen##Guild##end## :: ##seablue##".$xmlguild->aocygguild->name."##end## :: ##yellow##".$xmlguild->aocygguild->guildlink."##end##\n";
                
$blobguild .= "##seagreen##Server##end## :: ##seablue##".$xmlguild->aocygguild->server."##end##\n";
                
$blobguild .= "##seagreen##Members##end## :: ##seablue##".$xmlguild->aocygguild->member_count."##end##\n";
                
$blobguild .= "##seagreen##Murderers##end## :: ##seablue##".$xmlguild->aocygguild->murderers."##end##\n";
                
$blobguild .= "##seagreen##Average Level##end## :: ##seablue##".$xmlguild->aocygguild->averagelvl."##end##\n";
                
$blobguild .= "##seagreen##Average PVP Level##end## :: ##seablue##".$xmlguild->aocygguild->averagepvplvl."##end##\n";
                
$blobguild .= "##seagreen##Total Kills##end## :: ##seablue##".$xmlguild->aocygguild->totalkills."##end##\n";
                
$blobguild .= "##seagreen##Total Deaths##end## :: ##seablue##".$xmlguild->aocygguild->totaldeaths."##end##\n";
                
$blobguild .= "##seagreen##Average PVP Kills##end## :: ##seablue##".$xmlguild->aocygguild->averagepvpkills."##end##\n";
                
$blobguild .= "##seagreen##Average PVP Deaths##end## :: ##seablue##".$xmlguild->aocygguild->averagepvpdeaths."##end##\n";
                
$blobguild .= "##seagreen##K/D Ratio##end## :: ##seablue##".$xmlguild->aocygguild->kdratio."##end##\n";
            }

            
/* Output info */
            
$result "##yellow##[-YG-]##end## ##white##:: ".$this->bot->core("tools")->make_blob($xmlobj->aocygplayerprofile->name$blobname);
            if(
$xmlobj->aocygplayerprofile->guild)
                
$result .= " / ".$this->bot->core("tools")->make_blob($xmlobj->aocygplayerprofile->guild$blobguild);
            
$result .= " :: [ ##seagreen##L".$xmlobj->aocygplayerprofile->level."##end## | ##seagreen##";
            
$result .= $class."##end##| ##seablue##L".$xmlobj->aocygplayerprofile->pvplevel."##end## | ##seablue##";
            
$result .= $pvpkills."/".$pvpdeaths."##end## | ##seablue##".$xmlobj->aocygplayerprofile->kdratio."##end## ]##end##";

            return 
$result;
        }
        else
        {
            
/* No profile found */
            
$profilename ucfirst(strtolower($profilename));
            
$servername ucfirst(strtolower($servername));
            
$blob "##yellow##[-YG-]##end## ##white##::##end## ##red##No profile found for ##lightyellow##$profilename##end## on server ##lightyellow##$servername##end##.##end##";
            return 
$blob;
        }

    }

}
?>

« Last Edit: July 25, 2009, 07:47:33 pm by Getrix »
Success is not final, failure is not fatal: it is the courage to continue that counts.
- Sorry, i dont have time to reply question on PM. Make a topic.

Offline Sudoka

  • BeBot User
  • **
  • Posts: 22
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #3 on: July 25, 2009, 07:49:35 pm »
You should be able to bypass the password issue entirely by using:
Code: [Select]
   $password = '';

This means php won't try to parse anything between the quotes.

Thanks, post updated :D

Your module will only work if its runned with CURL enabled..

I guess I just presumed everyone had it enabled ;) Thanks for fixing tho.

Offline keirou

  • BeBot Apprentice
  • ***
  • Posts: 90
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #4 on: July 26, 2009, 02:55:50 am »
<-- noob.

whats curl
whats so good about it
why do some use it others not?

Offline keirou

  • BeBot Apprentice
  • ***
  • Posts: 90
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #5 on: July 26, 2009, 03:24:06 am »
btw ty :) got it up and running on gwahlur now :)

just curious.

given the scripts layout, would it be possible to steal the !whois alt information and have that listed under ALTS on the yg script.
and or removing the KD Ratio (i am on a pve server after all)

Im assuming i get rid of these lines
110
111
113
157 (or atleast the 2nd part of it)
158


Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: AoC YG player profile module
« Reply #6 on: July 26, 2009, 11:48:45 am »
<-- noob.

whats curl
whats so good about it
why do some use it others not?

cURL (Client for URLs) or to be more precice libcURL is a library available for PHP which provides a way for PHP scripts like BeBot to access URL's. The advantage of using libcURL for BeBot is that it should be faster than our own native solution and should be more robust.

The reason some use it and others not is that cURL is not present in all PHP installations. In addition to this, you have to specifically enable cURL within BeBot using !settings tools (this is going to change in the future as it will be automatically detected)

In any case, BeBot provides a wrapper for obtaining URL's which should be used whenever possible
get_site() which Getrix mentioned.
BeBot Founder and Fixer Kingpin

Offline keirou

  • BeBot Apprentice
  • ***
  • Posts: 90
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #7 on: July 26, 2009, 01:05:18 pm »
so using curl is better?
and is there is a specific version to use?
Im think im running bebot 6.3

Does using curl allow pulling other data then that which Getrix posted?

if not I might stay with the work-around listed.


Offline Getrix

  • Contributor
  • *******
  • Posts: 509
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #8 on: July 26, 2009, 01:17:31 pm »
You get the same data, but with different ways of getting them.

Easy way to explain:
With CURL = Sportscar to get your kid from school
Without CURL = Family car to get your kid from school

You get your kid home from school, but in different speed. Not sure how much faster..

The work-around is working ok if you dont want to buy a sportscar (Install CURL)
Success is not final, failure is not fatal: it is the courage to continue that counts.
- Sorry, i dont have time to reply question on PM. Make a topic.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: AoC YG player profile module
« Reply #9 on: July 26, 2009, 01:18:09 pm »
cURL is slightly better, but as an end user you really should not notice any real difference.

Use Getrix's code and you will be fine. It works the exact same way as the original module posted with the exception that it does not require cURL.
[edit]
Getrix beat me to it :P
BeBot Founder and Fixer Kingpin

Offline keirou

  • BeBot Apprentice
  • ***
  • Posts: 90
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #10 on: July 26, 2009, 02:48:01 pm »
and thats why it says im a rookie :D hehe
thx guys :) and thanks heaps for the module, working like a charm

Offline Poonjab

  • BeBot User
  • **
  • Posts: 59
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #11 on: July 26, 2009, 10:28:29 pm »
Lovin this module.  Works well after I installed the non-curl version.

Offline Huesos

  • BeBot User
  • **
  • Posts: 45
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #12 on: July 27, 2009, 03:13:16 am »
Not sure why but profiles are not found, and knw mytoon is there on yg

Offline Poonjab

  • BeBot User
  • **
  • Posts: 59
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #13 on: July 27, 2009, 03:59:45 am »
Not sure why but profiles are not found, and knw mytoon is there on yg

Did you contact the guy at YG to get a password for XML access?

Offline Margon

  • BeBot Apprentice
  • ***
  • Posts: 80
  • Karma: +0/-0
Re: AoC YG player profile module
« Reply #14 on: July 27, 2009, 05:33:32 pm »
is it possible to fix some german letters like ä ( &auml; ) ö( &ouml; ) ü ( &uuml; ) ß ( &szlig; ) in this script? if i use the german xml data i get some letters like "ä"  (ä)  in the item/charakter names

 

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