zora
New Member
Posts: 22
|
Post by zora on Sept 16, 2017 23:53:48 GMT
Hi guys, anyone can help with below image train orb script, how to make script accept only if desired stats added to hp for example? now health -1, will not accept that try again till health has green added stats.
|
|
|
Post by AnkuLua on Sept 17, 2017 0:23:09 GMT
Use Region and make sure that it' not -, or it's +. That is, the score of + is bigger than that of -.
|
|
zora
New Member
Posts: 22
|
Post by zora on Sept 17, 2017 3:19:29 GMT
can u please show me example?
|
|
zora
New Member
Posts: 22
|
Post by zora on Sept 17, 2017 3:28:11 GMT
what i want that if region of Health has green sign then accept...
this is in word can i get this converted in code pls? i am not pro here but i can handle everything apart from this function
|
|
|
Post by Exilereven on Sept 17, 2017 14:37:57 GMT
What's the game name, resolution, stuff like that?
|
|
zora
New Member
Posts: 22
|
Post by zora on Sept 17, 2017 22:21:47 GMT
Game name: Haki Legend Resolution: Settings:setCompareDimension(true, 1020) Settings:setScriptDimension(true, 1020)
But wait i can handle all these things i just want function do this below: if region of Health has green sign then accept..if not then cancel
|
|
|
Post by Exilereven on Sept 18, 2017 2:49:13 GMT
This is just one way I could think of for someone learning to try but there are many methods to get done what your wanting.
FIRST:
just for ease of finding a solution, try to crop out just a section of the + sign that is attached to the green numbers, then set a region foe it to search on , needs to be a little bigger than the area the numbers can appear. Then, setup a function to return true if thst green plus sign ia found anywhere within that region.
Example: this is example only not tested code
function checkGreen() if region:exists("your_+_pic",1) then return true end return false end
----main program----
if checkGreen() then --do whatever end
|
|
zora
New Member
Posts: 22
|
Post by zora on Sept 18, 2017 3:27:55 GMT
thanks alot, but how to define region location or something? I write before some small scripts but never used region before
|
|
|
Post by AnkuLua on Sept 18, 2017 10:03:19 GMT
|
|
zora
New Member
Posts: 22
|
Post by zora on Sept 19, 2017 20:28:55 GMT
thx for help i am working on it now
|
|
zora
New Member
Posts: 22
|
Post by zora on Feb 6, 2018 22:00:39 GMT
sorry for being stopped for while, i did that and it worked but the issue do it unlimited times, can i make it read number of energy for example and compare like if energy is less than 50 stop the script? how to make the script read number in game?
|
|
|
Post by Exilereven on Feb 7, 2018 4:29:30 GMT
|
|
zora
New Member
Posts: 22
|
Post by zora on Feb 7, 2018 14:00:38 GMT
can you help me with code? i did below:
local p = numberOCR(r,"power") i set region but i get error cant open image power0
|
|
zora
New Member
Posts: 22
|
Post by zora on Feb 10, 2018 22:31:39 GMT
pls help
|
|
|
Post by AnkuLua on Feb 11, 2018 1:18:03 GMT
There isn't power0.png.
|
|