mozeratti 2 Share Posted September 21, 2020 This topic is to help scripters change their DB2 scripts to DB3. First of all make sure you have the DB3 Client library in your script. just as you did for the DB2 library. If you have done that, Here are some examples of the changes. And these changes are basically for 95% of the new codes. Old code: if (min <= 10000) { if (getShop().isOpen()) { getShop().close(); sleep(Calculations.random(300, 600)); getTabs().open(Tab.LOGOUT); sleep(Calculations.random(1000, 2000)); WidgetChild logOut = getWidgets().getWidgetChild(182, 12); logOut.interact("Logout"); log("Not enough coins"); stop(); } getTabs().open(Tab.LOGOUT); sleep(Calculations.random(1000, 2000)); WidgetChild logOut = getWidgets().getWidgetChild(182, 12); logOut.interact("Logout"); log("Not enough coins"); stop(); } New code: if (min <= 10000) { if (Shop.isOpen()) { Shop.close(); sleep(Calculations.random(300, 600)); Tabs.open(Tab.LOGOUT); Sleep(Calculations.random(400, 600)); WidgetChild logOut = Widgets.getWidgetChild(182, 8); logOut.interact("Logout"); stop(); } Tabs.open(Tab.LOGOUT); sleep(Calculations.random(400, 600)); WidgetChild logOut = Widgets.getWidgetChild(182, 8); logOut.interact("Logout"); stop(); } As you can tell, it's mostly the "getWhatever().something' that just changes to just 'Whatever.something' If you edit the code you might see that there is still an error, this is most likely because the new class has not been imported yet. so make sure to import the new classes. In Eclipse you can do this the following way: I hope this helps. Mozeratti Link to comment Share on other sites More sharing options...
abouhanafy87 4 Share Posted October 2, 2020 what about Inventory Error:(72, 24) java: cannot find symbol symbol: variable Inventory location: class main.Main Link to comment Share on other sites More sharing options...
Uplift 7 Share Posted October 2, 2020 2 hours ago, abouhanafy87 said: what about Inventory Error:(72, 24) java: cannot find symbol symbol: variable Inventory location: class main.Main Make sure you've imported Inventory. Post the code that you are having issues with Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.