|
Post by paladiex on Dec 10, 2016 19:58:09 GMT
I've started collaborating with paladiex on development of the script, and I believe I have found what is causing the error to happen, davequest55. The image that it is finding (The part being highlighted in red) is cancel2.png, the script is falsely identifying that is is there, and as the part of the script looking for that image comes before the search for confirming when selling runes it just keeps trying to click on where it thinks cancel2.png is. I'll be working on a fix for this shortly. Edit: I'm going to message you about this to be sure it's find the image I'm thinking of. We'll get this sorted Edit 2: I noticed that the links in the original post are dead, so I'm going to upload the latest version I've been working on Version: Summoners War V2.1.3R03Change log: - Added checkbox option for saving 5* runes - Added code, image, halfres image and stat counter for saving 5* runes when selling - Modified some strings for print and toast - Added Half-Resolution version of NoRevive.png and r6Star.png - Added checkbox option for continue on death - Added checkbox option for saving 6* runes - Basic stat count added (Win, lose, 6* runes saved if selling) - Reworked saving 6* runes a little This version has been released for public testing. If you have any issues using this version, please let me know. Added to the op. I will be testing this today.
|
|
|
Post by davequest55 on Dec 10, 2016 20:04:13 GMT
I've started collaborating with paladiex on development of the script, and I believe I have found what is causing the error to happen, davequest55. The image that it is finding (The part being highlighted in red) is cancel2.png, the script is falsely identifying that is is there, and as the part of the script looking for that image comes before the search for confirming when selling runes it just keeps trying to click on where it thinks cancel2.png is. I'll be working on a fix for this shortly. Edit: I'm going to message you about this to be sure it's find the image I'm thinking of. We'll get this sorted Edit 2: I noticed that the links in the original post are dead, so I'm going to upload the latest version I've been working on Version: Summoners War V2.1.3R03Change log: - Added checkbox option for saving 5* runes - Added code, image, halfres image and stat counter for saving 5* runes when selling - Modified some strings for print and toast - Added Half-Resolution version of NoRevive.png and r6Star.png - Added checkbox option for continue on death - Added checkbox option for saving 6* runes - Basic stat count added (Win, lose, 6* runes saved if selling) - Reworked saving 6* runes a little This version has been released for public testing. If you have any issues using this version, please let me know. I've been running this for a couple hours and it is working flawlessly so far. well done =]
|
|
|
Post by paladiex on Dec 10, 2016 20:45:45 GMT
I've started collaborating with paladiex on development of the script, and I believe I have found what is causing the error to happen, davequest55. The image that it is finding (The part being highlighted in red) is cancel2.png, the script is falsely identifying that is is there, and as the part of the script looking for that image comes before the search for confirming when selling runes it just keeps trying to click on where it thinks cancel2.png is. I'll be working on a fix for this shortly. Edit: I'm going to message you about this to be sure it's find the image I'm thinking of. We'll get this sorted Edit 2: I noticed that the links in the original post are dead, so I'm going to upload the latest version I've been working on Version: Summoners War V2.1.3R03Change log: - Added checkbox option for saving 5* runes - Added code, image, halfres image and stat counter for saving 5* runes when selling - Modified some strings for print and toast - Added Half-Resolution version of NoRevive.png and r6Star.png - Added checkbox option for continue on death - Added checkbox option for saving 6* runes - Basic stat count added (Win, lose, 6* runes saved if selling) - Reworked saving 6* runes a little This version has been released for public testing. If you have any issues using this version, please let me know. I've been running this for a couple hours and it is working flawlessly so far. well done =] Same here, guess I am free today to start on the images for rune evaluation
|
|
|
Post by davequest55 on Dec 10, 2016 20:50:09 GMT
i.imgur.com/utOfmT7.pngI stopped the script and started it again and got this. Then I did a run, hit replay, started script and it worked.
|
|
|
Post by paladiex on Dec 10, 2016 20:57:42 GMT
i.imgur.com/utOfmT7.pngI stopped the script and started it again and got this. Then I did a run, hit replay, started script and it worked. Mine did that earlier, however I am pretty sure it was because I hit play before the script did.
|
|
nurvo
New Member
Posts: 4
|
Post by nurvo on Dec 11, 2016 8:53:04 GMT
kudos to paladiex and Zakun for picking this project up I have since modified the original project mainly for fodder farming, i.e. Run X number of times, Vibrate device for 1 second after completed. Level 1 star monster, it will cycle 4 rounds, 2 star fodder 10 rounds etc. Do you want me to send you my .lua file or are you happy with me pasting the code here?
|
|
|
Post by Zakun on Dec 11, 2016 9:27:11 GMT
Thank you nurvo I was thinking about making a farming option in the near future, but I am currently doing work on the rune evaluation. You can do either, it'll get to us just the same I worry that the amount of code I am adding is slowing the script down quite a bit, I haven't logged it or anything but I feel it's running more slowly since making progress on the rune evaluation system. A basic version of the rune evaluation should be completed before I go off, and I'll be running it for a while to test, but after that I'll release for public testing. EDIT: Hopefully sometime soon we'll also be able to do some optimization to get the script running faster, while maintaining reliability EDIT2: Taking longer than expected to ensure that the rune's * value isn't being incorrectly detected. May not end up having a working version to test before I get some sleep. Been working on this non-stop.
|
|
|
Post by wssn on Dec 11, 2016 12:10:28 GMT
Summoners War V2.1.3R03 work great with me thx u for your hard work
|
|
nurvo
New Member
Posts: 4
|
Post by nurvo on Dec 11, 2016 12:50:42 GMT
I'm just going to paste the extra code I modified and try to explain myself as best as I can lol.
I rewrote the dialogue boxes because most of the functions I almost never use. Original code is commented out. Number of runs is loosely based on Faimon Hell on double XP (3900 xp per run). You can use the radio buttons to choose what fodder you want to level, e.g 1* = 4 runs, 2* = 10 runs etc etc or there is a text box where you can input a custom number of runs. You need the first radio button selected for the counter to use this value
-- Initialise Variables runMax = 0 runLmt = 0
-- Create Dialog Box for Run Settings dialogInit() --addCheckBox("halfRes", "Half resolution for reducing memory usage", false) --newRow() --addTextView("If AnkuLua killed/stopped abnormally, try enabling this.\n") --newRow() --addCheckBox("nextArea", "Goto next area", false) --newRow() addCheckBox("sellRune", "Sell the rune after battle", false) newRow() addCheckBox("refillEnergy", "Refill energy with crystal", false) newRow() addRadioGroup("runType", 0) addRadioButton("Continuous Run (999)", 999) addRadioButton("Fixed No. of Runs", 1) newRow() addTextView("No. of Runs : ") addEditText("runMax") newRow() --addTextView("Use the following as a guide") --newRow() --addTextView("1* = 4, 2* = 10, 3* = 22, 4* = 48") addRadioButton("Level 1 Star Fodder(4)", 4) addRadioButton("Level 2 Star Fodder(10)", 10) addRadioButton("Level 3 Star Fodder(22)", 22) addRadioButton("Level 4 Star Fodder(48)", 48) --newRow() --dimString = "dim the screen when running script" --fiveMinString = "This function is only available for 5 minutes in trial version" --addCheckBox("dim", dimString, true) --newRow() --addTextView(fiveMinString) dialogShow("Settings")
--language = getLanguage() After the dialog box i added this IF loop to determine what counter value to use and initialised the original settings
-- Determine the number of runs required. if runType == 1 then runLmt = runMax else runLmt = runType + runLmt end
-- Set Values for Original Functions (Originally set from dialog box) dim = true -- set to true to dim the screen while script is running halfRes = false -- set to true to half the image recognition resolution. Supposedly improves performance if the script keeps crashing nextArea = false -- set to true if required to run through the screnario Modified the existing IF loop. Added a counter to decrement the counter end of every battle and display momentarily how many runs are remaining.
if (choice == 2 and exists("worldMap.png", 0)) then -- next round if (nextArea and flashRequireRegion:exists("require0.png",0)) then simpleDialog("Warning", "Reach end of curent area.") return end
local requiredFlash = existsMultiMax(flashRequireRegion,{"require3.png", "require4.png", "require5.png", "require6.png", "require7.png", "require8.png"})
if (requiredFlash == -1) then requiredFlash = 9 else requiredFlash = requiredFlash + 2 end
runLmt = runLmt - 1 -- Decrement the loop counter after each battle.
toast("required Flash = "..requiredFlash) -- Display current rounds' energy requirement toast("Remaining Runs : "..runLmt) -- Display Runs remaining if runLmt == 0 then break -- Exit while loop when the required number of rounds is reached end
while (true) do -- check flash if (not flashRequireRegion:existsClick("smallFlash.png")) then waitClick("smallFlash.png") end wait(1) choice, listMatch = waitMulti({"bigFlash.png", "sellButton.png"}, 3) if (choice == 1) then break end if (choice == 2) then if (exists("worldMap.png", 0) and refillEnergy) then refill() break end keyevent(4) toast("Not enough flash, wait 5 minutes") wait(5*60) end if (choice == -1) then keyevent(4) end
end Modified the "refill()" function to increment the counter if crystal refill is required because the IF loop above will decrement the counter again making the total number of runs go out of whack.
function refill() -- flashRequireRegion:click("smallFlash.png") clickButton(Pattern("sellButton.png"):similar(0.9), 1) waitClick("rechargeFlash.png", 3) wait(2) clickButton(Pattern("sellButton.png"):similar(0.9), 1) upperRight:exists(Pattern("cancel.png"):similar(0.6), 5) wait(1) keyevent(4) -- back keyevent(4) wait(1) runLmt = runLmt + 1 -- Increment the loop counter. to prevent duplicate incrementation in the next step
-- clickButton(Pattern("sellButton.png"):similar(0.9), 1) -- waitClick("") -- upperRight:waitClick(Pattern("cancel.png", 2):similar(0.75)) -- wait(1) end
And at the end of the code (outside the main WHILE loop) added this for notification purposes and stops the script.
vibrate(1)
scriptExit("Success!, Run Cycle Complete!")
Change out your fodders and rerun the script again. This way you only have to look at the phone every 5 mins or so (level 1* fodder) instead of looking at the phone every 30-60 seconds.
Not sure if this is the best/efficient way to do it but it was quick and dirty and got the job done. Hope this all makes sense. Feel free to shoot me any questions you might have and I will try to answer them. My level of programming in this language is pretty basic, just read up on the parts that I needed to get this section of the script working lol
|
|
|
Post by Zakun on Dec 11, 2016 15:03:08 GMT
Thank you for sharing and explaining your progress, I have thought of an alternate way to go about this, and will try it out after the first version of the rune evaluation system has been released. However, if the way I attempt doesn't work I'll use your work for sure!
-Zakun
|
|
|
Post by honeygyu on Dec 12, 2016 1:10:02 GMT
Thank you!! In my device LG G2, it is operated greatly. I root you!
|
|
|
Post by honeygyu on Dec 12, 2016 1:30:51 GMT
Features to add:A rune evaluation system to sell runes that do not meet certain criteria. I want to add a window to let individuals choose combinations of substats and mainstats on 2/4/6 runes. If script become complicated, it is enough to get only +% 2/4/6 rune option.
|
|
|
Post by wssn on Dec 12, 2016 12:37:48 GMT
i get errore when refreshing energy with crystall , screenshot m.imgur.com/a/M8Cwzi retry the script and same problems happend every time he need refresh look like it never refreshed ever since i start testing this ver.
|
|
|
Post by wssn on Dec 12, 2016 12:46:16 GMT
i get errore when refreshing energy with crystall , screenshot m.imgur.com/a/M8Cwzi retry the script and same problems happend every time he need refresh look like it never refreshed ever since i start testing this ver. my device is note 4
|
|
|
Post by davequest55 on Dec 12, 2016 15:29:30 GMT
i.imgur.com/utOfmT7.pngI stopped the script and started it again and got this. Then I did a run, hit replay, started script and it worked. I am still getting this error pretty often. Sometimes it doesn't happen and the script works but I have no idea why.
|
|