02-04-2022, 08:14 PM
Okay I have been sitting with this all day but i cant figure out how tables work so i need help, big time alt="Sad" title="Sad" class="smilie smilie_8" />
truly sorry to bother you again but i have nowere to turn!
What i need is a script that checks the sqms around him, except 2(east and north)
If he finds random item, dosnt matter which. (NE, SE, S, SW, W, NW) he uses desinegrate rune on 1x of these sqms (at random)
Just to be clear, he dosnt have to clear all of them, just do 1 use of the rune and move on.
what i got so far so you might get an idea of what i need.
truly sorry to bother you again but i have nowere to turn!
What i need is a script that checks the sqms around him, except 2(east and north)
If he finds random item, dosnt matter which. (NE, SE, S, SW, W, NW) he uses desinegrate rune on 1x of these sqms (at random)
Just to be clear, he dosnt have to clear all of them, just do 1 use of the rune and move on.
what i got so far so you might get an idea of what i need.
if gettile(32339, 32850, 7).itemcount > 1 then Problem1=true else Problem1=false end
Solution1=useitemon(3197, 32339, 32850, 7)
if gettile(32339, 32852, 7).itemcount > 1 then Problem2=true else Problem2=false end
Solution2=useitemon(3197, 32339, 32852, 7)
if gettile(32338, 32852, 7).itemcount > 1 then Problem3=true else Problem3=false end
Solution3=useitemon(3197, 32338, 32852, 7)
if gettile(32337, 32852, 7).itemcount > 1 then Problem4=true else Problem4=false end
Solution4=useitemon(3197, 32337, 32852, 7)
if gettile(32337, 32851, 7).itemcount > 1 then Problem5=true else Problem5=false end
Solution5=useitemon(3197, 32337, 32851, 7)
if gettile(32337, 32850, 7).itemcount > 1 then Problem6=true else Problem6=false end
Solution6=useitemon(3197, 32337, 32850, 7)
if Problem1==true or Problem2==true or Problem3==true or Problem4==true or Problem5==true or Problem6==true then
math.random(Solution1, Solution2, Solution3, Solution4, Solution5, Solution6) end