January 7, 20179 yr 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
January 7, 20179 yr NPC storeKeeper = getNpcs.closest("Name"); if (!getStore.isOpen) { if (storeKeeper!=null) { storeKeeper.interact("Trade"); } }else { getStore.buy("item",amount); } Edited January 7, 20179 yr by Juggles
January 7, 20179 yr 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()
January 7, 20179 yr The Store variable is in the client, you don't have to declare and initialize it yourself. You could just do Script#getStore()
January 7, 20179 yr Author 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
Create an account or sign in to comment