w35l3y / userscripts

Public userscripts to be used with Greasemonkey
http://gm.wesley.eti.br
GNU General Public License v3.0
43 stars 21 forks source link

Inventory - Give to NF #44

Closed jkingaround closed 8 years ago

jkingaround commented 8 years ago

Browser: Firefox
Greasemonkey: 3.7
Script: Includes : Inventory
Error Message: Object { result: "Who do you wish to give this Gorund…" }
Obs.: Giving to neofriend doesn't work? Just asks who to give to. I added the "or_name" into the data object but it didn't work?

invent.list({ callback : function(o){ invent.info({ obj_id : o.response.items[0].obj_id, callback : function(obj){ invent.use({ data : { obj_id : obj.response.item.obj_id, or_name : "username_here", action : "give" }, callback : function(o){ console.log(o.response); } }); } }); } });

w35l3y commented 8 years ago

The default process of giving items is 2-step. You may try to use the action "Give to USERNAME" instead of just "give".

invent.list({
callback: function (o) {
o.response.items.forEach(function (o) {
o.action = "Give to username_here";
invent.use({
data: o,
callback: function (o) {
console.log(o.response);
}
});
});
}
});