roguehippo Posted January 7, 2017 Posted January 7, 2017 Hello, i was just wondering how i would initialize a Store variable. after i trade him do i just do 'Store storename = new Store();"? how do i get it to use the correct one
wwwat Posted January 7, 2017 Posted January 7, 2017 Isn't it just getStore()? Then you can do getStore().buy() or whatever.
WiseGoldMan Posted January 7, 2017 Posted January 7, 2017 What is the end goal here? What are you trying to do?
Juggles Posted January 7, 2017 Posted January 7, 2017 (edited) NPC storeKeeper = getNpcs.closest("Name"); if (!getStore.isOpen) { if (storeKeeper!=null) { storeKeeper.interact("Trade"); } }else { getStore.buy("item",amount); } Edited January 7, 2017 by Juggles 1
Team Cape Posted January 7, 2017 Posted January 7, 2017 Hello, i was just wondering how i would initialize a Store variable. after i trade him do i just do 'Store storename = new Store();"? how do i get it to use the correct one It looks like you're trying to cache the items that are held in the store. Just do Item[] cachedStoreItems = getStore().getItems()
Khaleesi Posted January 7, 2017 Posted January 7, 2017 The Store variable is in the client, you don't have to declare and initialize it yourself. You could just do Script#getStore() 2
roguehippo Posted January 7, 2017 Author Posted January 7, 2017 The Store variable is in the client, you don't have to declare and initialize it yourself. You could just do Script#getStore() thank you i didnt know this. solved my problem