Script Summary: Course Function
Version: 1.0.3.1
Copyright: 2009, w35l3y (http://gm.wesley.eti.br/includes)
License: GNU GPL

This script was discontinued!
New version : http://userscripts.org/scripts/show/56592
FOR SCRIPTERS/PROGRAMMERS only
If you are neither scripter nor programmer, you're discouraged to install this script directly.But if you are and intend to use this script, please warn your users to install Mason (Firefox plugin) and follow the steps below (BEFORE INSTALLING section).
BEFORE INSTALLING
- Make sure to install Mason (Firefox plugin) first
- Once installed, right-click on Mason icon in statusbar or go to menu Tools > Mason Option...
- Click "Add..."
- Add:
Description : Training School : Course.start URL : ^http:\/\/www\.neopets\.com\/island\/process_training\.phtml$ Content-Type : (leave it blank) Function : referrer to specified site Config... : http://www.neopets.com/island/training.phtml?type=courses (click "Config..." button to type the value above)
Description : Training School : Course.pay URL : ^http:\/\/www\.neopets\.com\/island\/process_training\.phtml\?type=pay&pet_name= Content-Type : (leave it blank) Function : referrer to specified site Config... : http://www.neopets.com/island/training.phtml?type=status (click "Config..." button to type the value above)
- Click OK
- Make sure to have the new option Activated
- Click OK again
- Then you may install the script
Implementing
// @require http://userscripts.org/scripts/source/54389.user.js // @require http://userscripts.org/scripts/source/53965.user.js // @require http://userscripts.org/scripts/source/54528.user.js
Examples
Course.status(function (list) {
var pets = [];
for (var key in list) {
var pet = list[key];
pets.push([
key, // key = pet.Name
pet.Status,
pet.Level,
pet.Strength,
pet.Defence,
pet.Agility,
pet.Endurance,
pet.Time,
"\n" + (function (i) {
var items = [];
for (var key in i) {
items.push([key,i[key].Name,i[key].Quantity].join("-"));
}
return items.join("\n");
})(pet.Items)
]);
}
alert(pets.join("\n"));
});


