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: AoC attribute trickle-down/stats calculator module  (Read 24152 times)

0 Members and 1 Guest are viewing this topic.

Offline heljeere

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
AoC attribute trickle-down/stats calculator module
« on: July 30, 2009, 02:42:44 pm »
Here's a little module I've made that calculates the actual gains from stat changes.

It's based on the information found here: http://community.ageofconan.com/wsp/conan/frontend.cgi?func=publish.show&template=content&func_id=2904&table=CONTENT

Usage:
Code: [Select]
!attribute <attribute name> <value>
Examples:
Code: [Select]
!attribute int 100
!attribute Wisdom 67

Module code:
Code: [Select]
<?php
  
/*
   * Attribute.php - An Age of Conan attribute calculator Module
   * For BeBot - An Anarchy Online & Age of Conan Chat Automaton Developed by Blondengy (RK1)
   * Copyright (C) 2009 Daniel Holmen
   *
   * As usual place this file in ./modules
   */
   
  /*
    Add a "_" at the beginning of the file (_Attribute.php) if you do not want it to be loaded.
  */

$attribute = new Attribute($bot);

class Attribute Extends BaseActiveModule
{
var $bot;
var $attribute;
var $returnstr;

/*
* Constructor:
* Hands over a referance to the "Bot" class.
*/
function __construct (&$bot)
{
parent::__construct(&$botget_class($this));

$this -> register_command("all""attribute""MEMBER");

$this -> help['description'] = 'Attribute trickle-down calculator';
$this -> help['command']['dummy'] = "";
}

function command_handler($name$msg$origin)
{
$output "";
if (strtolower($msg) == "attribute")
{
$output $this->generate_list();
}
else if (preg_match("/^attribute.*$/i"$msg))
{
// Handle arguments
$cmdparam explode(" "$msg);

$attr $this->get_attribute_name($cmdparam[1]);
if ($attr == "") return "No such attribute name";

$output $this->generate_list($attr$cmdparam[2]);
}
else $output "Invalid arguments";

return $output;
}

function get_attribute_name($name)
{
$aliases = array(
"int" => "Intelligence",
"con" => "Constitution",
"str" => "Strength",
"dex" => "Dexterity",
"wis" => "Wisdom"
);

$lowercasename trim(strtolower($name));
foreach($aliases as $key => $value)
{
if ($lowercasename == $key) return $value;
if ($lowercasename == strtolower($value)) return $value;


return "";
}

function generate_list($attr$value)
{
$output "<font face='HEADLINE' color=#c0c0c0>" $value " " $attr "</font><br>";
$linktitle "Calculated values for ".$value." ".$attr." (Click for info)";

$infolist $this->get_attribute($attr);

foreach ($infolist as $info) {
$output .= $info["Prefix"] . ($info["Factor"] * $value) . " " $info["Title"] ."<br>";
}
return "<a href=\"text://<div align=left>".$output."</div>\">".$linktitle."</a>";
}

function get_attribute($attr)
{
$attributelist = array(
"Strength" => array(
array("Factor" => 3, "Prefix" => "+""Title" => "Combat rating""Description" => "Increases Combat rating when using melee weapons (except daggers)"),
array("Factor" => 2, "Prefix" => "+""Title" => "Armor""Description" => "Increases Armor"),
array("Factor" => 0.05, "Prefix" => "+""Title" => "Natural Stamina regeneration""Description" => "Increases Natural Stamina regeneration"),
array("Factor" => 0.15, "Prefix" => "+""Title" => "OOC Stamina regeneration""Description" => "Increases Out of Combat Stamina regeneration"),
array("Factor" => 2, "Prefix" => "+""Title" => "Stamina""Description" => "Increases Stamina"),
array("Factor" => 0.15"Prefix" => "+""Title" => "OOC Health regeneration""Description" => "Increases Out of Combat Health regeneration")),
"Intelligence" => array(
array("Factor" => 0.6, "Prefix" => "+""Title" => "Spell damage (mage)""Description" => "Increases Spell damage for spells with Intelligence attribute (mage spells)"),
array("Factor" => 3, "Prefix" => "+""Title" => "Mana""Description" => "Increase Mana points"),
array("Factor" => 0.07, "Prefix" => "+""Title" => "Natural Mana regeneration""Description" => "Increases Natural Mana regeneration"),
array("Factor" => 0.5, "Prefix" => "+""Title" => "Protection from Electrical/Fire/Cold""Description" => "Increases protection from Electrical/Fire/Cold magic"),
array("Factor" => 0.38, "Prefix" => "+""Title" => "OOC Mana regeneration""Description" => "Increases Out of Combat Mana regeneration")),
"Constitution" => array(
array("Factor" => 8, "Prefix" => "+""Title" => "Health (Soldier)""Description" => "Increases Health points for Soldiers"),
array("Factor" => 6, "Prefix" => "+""Title" => "Health (Ranger, HoX, Assassin)""Description" => "Increases Health points for Ranger, HoX and Assassin"),
array("Factor" => 5, "Prefix" => "+""Title" => "Health (Other classes)""Description" => "Increases Health points for other classes"),
array("Factor" => 3, "Prefix" => "+""Title" => "Stamina""Description" => "Increase Stamina points"),
array("Factor" => 0.05, "Prefix" => "+""Title" => "Natural Stamina regeneration""Description" => "Increases Natural Stamina regeneration"),
array("Factor" => 0.15, "Prefix" => "+""Title" => "OOC Stamina regeneration""Description" => "Increase Out of Combat Stamina regeneration"),
array("Factor" => 0.15, "Prefix" => "+""Title" => "OOC Health regeneration""Description" => "Increases Out of Combat Health regeneration")),
"Dexterity" => array(
array("Factor" => 0.5, "Prefix" => "+""Title" => "Evade rating""Description" => "Increases Evade rating"),
array("Factor" => 2, "Prefix" => "+""Title" => "Stamina""Description" => "Increases Stamina points"),
array("Factor" => 3, "Prefix" => "+""Title" => "Combat rating (ranged, daggers)""Description" => "Increases Combat rating with ranged weapons and daggers"),
array("Factor" => 0.05, "Prefix" => "+""Title" => "Natural Stamina regeneration""Description" => "Increases Natural Stamina regeneration"),
array("Factor" => 0.15, "Prefix" => "+""Title" => "OOC Stamina regeneration""Description" => "Increases Out of Combat Stamina regeneration")),
"Wisdom" => array(
array("Factor" => 0.6, "Prefix" => "+""Title" => "Spell damage (priest)""Description" => "Increases Spell damage for spells with Wisdom attribute (priest spells)"),
array("Factor" => 3, "Prefix" => "+""Title" => "Mana""Description" => "Increases Mana points"),
array("Factor" => 0.07, "Prefix" => "+""Title" => "Natural Mana regeneration""Description" => "Increases Natural Mana regeneration"),
array("Factor" => 0.38, "Prefix" => "+""Title" => "OOC Mana regeneration""Description" => "Increase Out of Combat Mana regeneration"),
array("Factor" => 0.5, "Prefix" => "+""Title" => "Protection (Holy/Unholy)""Description" => "Increases Protection from Holy/Unholy magic"))
 ); 

return $attributelist[$attr];
}
}
?>
« Last Edit: June 21, 2010, 01:02:59 pm by heljeere »

Offline Poonjab

  • BeBot User
  • **
  • Posts: 59
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #1 on: July 30, 2009, 10:45:12 pm »
Very nice.  I'll be checkin this out when I get a chance.

Offline DJKRose

  • Contributor
  • *******
  • Posts: 38
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #2 on: August 01, 2009, 03:21:42 am »
Looks good! I'm gonna test it soon...
« Last Edit: August 07, 2009, 10:47:21 am by DJKRose »

Offline Poonjab

  • BeBot User
  • **
  • Posts: 59
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #3 on: August 03, 2009, 05:27:24 pm »
This module is working great and is already very popular in my guild.  Thanks again.

Offline heljeere

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #4 on: August 06, 2009, 08:36:37 am »
Happy to hear that. :)

Let me know if you find any mistakes/miscalculations. I do hope Funcom will update the online reference list if they change the values.

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: AoC attribute trickle-down/stats calculator module
« Reply #5 on: August 08, 2009, 12:27:47 am »
thanks for this module ... works perfekt ... my guild love it ;) ... an so what i can see all should be correct

Offline Kore

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #6 on: January 30, 2010, 06:31:31 am »
This is great but you missed somthing..

Increases Protection from Electrical/Fire/Cold magic by 0.5 = INT

Same with Wisdom.

Increases Protection from Holy/Unholy magic by 0.5 = WIS

Offline TBK

  • BeBot User
  • **
  • Posts: 26
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #7 on: June 04, 2010, 01:54:34 am »
Anybody got the trickle-down values for critigation?

Offline heljeere

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #8 on: June 21, 2010, 01:05:40 pm »
This is great but you missed somthing..

Increases Protection from Electrical/Fire/Cold magic by 0.5 = INT

Same with Wisdom.

Increases Protection from Holy/Unholy magic by 0.5 = WIS

Updated the code with elemental protection. The spiritual protection was already there, though.

Offline snyder

  • BeBot User
  • **
  • Posts: 34
  • Karma: +0/-0
  • CRO guild
    • CRO Guild @ Crom
Re: AoC attribute trickle-down/stats calculator module
« Reply #9 on: June 21, 2010, 01:46:49 pm »
thx bebot nub :)

Offline Pituvul

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #10 on: July 22, 2012, 10:27:41 pm »
Edited the Attribute calculator that Heljeere initially posted and added all the important stats, simplified the command and customized the displayed results.
Pit
« Last Edit: July 14, 2013, 11:04:56 pm by Pituvul »

Offline Panther

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: AoC attribute trickle-down/stats calculator module
« Reply #11 on: September 13, 2012, 10:29:03 am »
Very nice, my guild is going to love this one!

 

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