Prime - Amber Tweaks and Scripting API

Forum for alternative clients, mods & discussions on the same.
User avatar
Paradoxs
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Post by Paradoxs »

Patch 1.1.1 is now live

Fixing the important bug of the script icon not appearing
ydex wrote: I thought it would but all I get is this https://puu.sh/ujECf/47b004f7d9.jpg
User avatar
ydex
Posts: 747
Joined: Mon Apr 11, 2011 4:08 pm

Re: Prime - Amber Tweaks and Scripting API

Post by ydex »

awsome! I'll give it a try now then. thx alot man!
bold
User avatar
Fostik
Posts: 2513
Joined: Tue Jul 05, 2011 4:08 pm
Location: EU

Re: Prime - Amber Tweaks and Scripting API

Post by Fostik »

Is there any examples to work with inventory? Im not sure it works good.

For example, i've got all items, select one of all, and trying to place it to container

Code: Select all

take(Item,Inventory.Player);
drop(Item,Inventory.Container);
Both things won't work - returns false. Tested also lot other variants, but nope. How to make it work properly?
Last edited by Fostik on Mon Feb 27, 2017 12:56 am, edited 5 times in total.
Known as zunzon. Contact discord: zunzon.
My experience of market building in W13
Thedrah
Posts: 943
Joined: Fri Apr 08, 2011 2:20 am
Location: behind you

Re: Prime - Amber Tweaks and Scripting API

Post by Thedrah »

is there any support for combat? such as knowing openers of yourself and opponent
and the new fishing requires the use of clicking on a window, any chance for some help? :D
  ▲
▲ ▲
User avatar
Paradoxs
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Post by Paradoxs »

Fostik wrote:Is there any examples to work with inventory? Im not sure it works good.

For example, i've got all items, select one of all, and trying to place it to container

Code: Select all

take(Item,Inventory.Player);
drop(Item,Inventory.Container);
Both things won't work - returns false. Tested also lot other variants, but nope. How to make it work properly?
What does it do?

Does it pick up but not drop the item?

Item.Container needs a string to be specified

drop("dandelion", Inventory.Container, "Crate");



I havent had time to mess to see if any of the API has broken, My first step right now is to get the JDocs done, fix any API errors, and then add some features, add some extra stuff Iv wanted to add since I left and then release the next version when thats all come together
User avatar
Paradoxs
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Post by Paradoxs »

Thedrah wrote:is there any support for combat? such as knowing openers of yourself and opponent
and the new fishing requires the use of clicking on a window, any chance for some help? :D
Not yet, I'll work on it, I still dont have a character thats combat safe to be able to stand still and collect data to mess with combat. and test combat controls. SInce iv been gone im pretty behind. Its a eventual goal though
User avatar
Fostik
Posts: 2513
Joined: Tue Jul 05, 2011 4:08 pm
Location: EU

Re: Prime - Amber Tweaks and Scripting API

Post by Fostik »

Paradoxs wrote: What does it do?
Does it pick up but not drop the item?
Just nothing. Both functions return false and do nothing.
I will try your method today for drop. But i think problem is that 'Inventory.Player' is not defined, same as 'Inventory.Container'. When i tried to use object there was same false.
Known as zunzon. Contact discord: zunzon.
My experience of market building in W13
User avatar
Paradoxs
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Post by Paradoxs »

Fostik wrote:
Paradoxs wrote: What does it do?
Does it pick up but not drop the item?
Just nothing. Both functions return false and do nothing.
I will try your method today for drop. But i think problem is that 'Inventory.Player' is not defined, same as 'Inventory.Container'. When i tried to use object there was same false.

Inventory.Player is defined, its defined as 0

print(Inventory.Player) shows this
take(Item, Inventory, Name);
take("frog");

Takes it from my inventory

drop("frog", Inventory.Hand, "Crate");

Works as well.
One mistake I made was drop is actually
drop(Item, Inventory item is in, Inventory to drop to)
so drop("frog" Inventory.Hand, "Crate") is the correct way

Make sure you add a sleep inbetween take and drop, or use waitforhand()

Make sure you have the item name correct, you need the item name as defined by the game, print out a list of the items in your inventory to debug and test if needed but Iv messed with it for an hour and can't reproduce any bug causing it to fail, so long as you download the API.js and put it in the scripts folder
kacper022
Posts: 4
Joined: Fri Feb 24, 2012 6:38 pm

Re: Prime - Amber Tweaks and Scripting API

Post by kacper022 »

How can I get free solts in inventory? :oops:
User avatar
Fostik
Posts: 2513
Joined: Tue Jul 05, 2011 4:08 pm
Location: EU

Re: Prime - Amber Tweaks and Scripting API

Post by Fostik »

Paradoxs wrote: so drop("frog" Inventory.Hand, "Crate") is the correct way
Make
This works fine!

And btw, im very bad in coding, so there are some requests:
A way to differ meat.
Some way to exit flower menu(or how can i?)
kacper022 wrote:How can I get free solts in inventory? :oops:
And this! And check container slots too!
Known as zunzon. Contact discord: zunzon.
My experience of market building in W13

Return to “The Wizards' Tower”