Masked Crusader Community

Advertisement

Style Selector
Click Color To Change Skin Color

MC - Original MC - Blue AccentMC - Green Accent MC - Orange Accent

Latest Threads
New True Blood Holy crap!...
New need help
New [H] Shadow Priest |...
New WTS WoW Gold US and EU...
New US/EU Gold $3-5 or less...
New CD Key set for 60 Day...
New 80 Death Knight |...
New New Era begins today!...
New 6k GS Kingslayer. 6.1k GS...
New 6300+ GS Rogue | SC2 |...

Advertisement

Top Posters
Masked Crusader  996
guy4game.com  757
Wowguys  723
epicmmoservice  605
skyboy  603
Kuz  564
Xcommiekidx  552
Dudedafool  550
protocall  424
Destiny  391
Holmesdaddy  325
btraill  324
Triplesinner  320
g0hard  319
DarkDeserter  300

Go Back   Masked Crusader > General Forums > Gearscore PHP Class

Gearscore PHP Class - Gearscore PHP Class :: Install Documentation in General Forums

Closed Thread
 
LinkBack Thread Tools
Old 07-04-2010, 12:00 AM   #1
Administrator
Unavailable To Chat
Posts: 996
Join Date: Mar 2010
Game Cash: 4478
TW Loc: Sacramento, California, US
Ratings:
 
Negative: 0
Neutral: 0
Positive: 10
Default Gearscore PHP Class :: Install Documentation

Donations Welcome :: You are using a code source that is available nowhere else on the web. Even though the source is encoded, feel free to take a crack at the class yourself and see how long it takes you! Anything helps!

Donation Paypal :: maskedcrusaderdotcom@gmail.com

----------------------------------------------------------------------------------

Installation


Step 1

After downloading the PHP class from this forum, you will need to ensure that your server has something called the Ioncube Loader installed and enabled. As this file is encrypted to keep from reverse engineering and theft, this is the only way I could ensure that the source code stays in my hands.

There is a package on the Downloads thread for the Ioncube Loader. Instructions on how to install it on your web server can be found in the Readme file in the package. If you are unable to get it installed properly, please make a post in this forum so that someone can help you troubleshoot or contact your host for assistance.

Step 2

If you have reached Step 2, that is because you have Ioncube Loader installed and working properly.

At this point, go ahead and upload the gearScore.class.php to the location on your server where you think it will be best served (recommend the include(s) directory as this is an inclusion file and it is good file structure practice).

Once you have uploaded gearscore.class.php, find and open the file which will call it.

Here is an example of what my index.php file looks like for this call:

Code:
include('includes/gearScore.class.php');

$gearscore = new gearScore();
Step 3

This is where things get a bit tricky. In order for this class file to work properly, you are going to need to pass WoW Armory data to the class file.

If you are not familiar with how to pull WoW Armory data, then I would advise to go do a Google search and figure that out beforehand.

I am using the following armory code :: http://pwneo.googlecode.com/svn/trun...mory.class.php. Mine is more modified, but this will at least get you off the ground.

HUGE NOTE: In the phpArmory.class.php file, find the function called "itemFetch".

Change:
PHP Code:
$url $this->armory."item-tooltip.xml?i=".$itemID
To:
PHP Code:
$url $this->armory."item-info.xml?i=".$itemID
Once you have figured out how to get the character's class and item list, it is time to pass it all to the gearScore.class.php.

Here is an example of my code:

Code:
 //This foreach statement exists because we need to check to see 
//whether the items in slot 15 and 16 are two-handed weapons.  The 
//"itemFetch" function in the phpArmory.class.php allows us to see whether 
//the item is two-handed or not.  We need to know this as the multipliers 
//are dependent on this.
 foreach($characterData['characterinfo']['charactertab']['items']['item'] as $item){
    if($item['slot'] == 15 || $item['slot'] == 16)
    $item_infos[] = $armory->itemFetch($item['id']);
    }
    
    include('includes/gearScore.class.php');
    
    $gearscore = new gearScore();
    //The getScore function requires you to pass the class name, all of the 
//items for the character (can be done via the phpArmory.class.php) and 
//then the item information for slot 15 and 16 (so that we know whether 
//those items are two-handed or not).
    $actual_gs = $gearscore->getScore($charDetails['class'], $characterData['characterinfo']['charactertab']['items']['item'],
    $item_infos);
The $actual_gs variable will contain the final calculated Gearscore. Once you have this, you can insert into your database, display it, etc.

All of this example code is free for you to use.
__________________
AIM: XMaskedCrusaderX
E-mail: maskedcrusaderdotcom@gmail.com
Masked Crusader is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Tags
class, documentation, gearscore, install, php


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 06:33 PM.





Copyright ©2010 Masked Crusader, All Rights Reserved. Use of this website constitutes acceptance of the Masked Crusader - Buy WoW Accounts - Sell WoW Accounts Acceptable Use Policy & Terms of Service.

Masked Crusader is a 100% free-posting MMO account buying, MMO account trading, and MMO account selling community. You can sell wow accounts, buy wow accounts, trade wow accounts, trade aion accounts, sell aion accounts, buy aion accounts, and many more MMORPGs games.

Buy Wow Account | Sell Wow Account | Buy Aion Account | Sell Aion Account | Sell Guild Wars Account | Buy Guild Wars Account | Everquest Accounts | LoTRO Accounts | AoC Accounts | DAoC Accounts

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
Ad Management plugin by RedTyger