Thanks Crome and smokinjoe26 for your responses to my messages on helping me try to get this script modified for OSI and functioning. I have spent another hour on it trying to go thru it. I have the wait functions changed and the gump size option areas changed. I am just trying to figure out where to paste the GumpQuest function and the GumpChecker section. I think with Smokinjoe's help I pasted correctly at the gumpquest area....but still not sure where the gumpchecker goes....I managed to eliminate the error I kept getting for a missing gumpquest function...now the script is flying....opening gump quest after gump quest....over and over, not stopping at the quest needed....which makes me think the gumpchecker hasn't found it's home yet in my pasting attempts...
Ugh...this stuff gives me a big headache...I love it...but just still cannot get the mechanics of it to understand it.....sure glad raising children is much easier for me lol....or I would have some starving and deprived children. lol
First off if you are modifying this for OSI ... Do yourself a huge favor and go through the entire script and change all your waits to 1000 or more.
A Lua "function" can be called from anywhere. So, it doesn't matter where you put your function. You could get some goffy errors if you have duplicate named different functions, I imagine. You will also want to avoid pasting functions within other functions .... take notice of Crome's "fancy" Function Separations.
--#######################################
Make it neater that way you can better understand it. Keep your additional functions amongst the other functions. Lua doesn't care about blank spaces vertically or horizontally, that being said, space it out best for you to understand it.
you WILL get there if you keep at it. Mechanically what you are doing is the following steps:
1. looking around for a "Bowcrafter" + "Quest Giver" -- sounds like you made it this far
2. getting a quest from the "QuestID" --sounding like you made it this far also
3. then the script SHOULD scan the pixels of the gump to look for the quest name "Lethal Darts"
if your script pulls this quest up and then keeps pulling up other quests ....
then you need to focus on the pixel scan portion of the script
a. Make sure you can see the whole Quest gump
pull up the quest offer then lay out your screen like i have done in the picture. The two UO.NextCPosX and UO.NextCPosY also the UO.ContPosX and UO.ContPosY variables in the pic do not matter ..... everything else of yours should match up.

here is that little portion of code then hit play :
Gumpsum = 0
XStart = UO.ContPosX + 150
YStart = UO.ContPosY + 70
XEnd = UO.ContPosX + 320
YEnd = UO.ContPosY + 80
for a = XStart,XEnd do
for b = YStart,YEnd do
Gumpsum = Gumpsum + (UO.GetPix(a,b))
end
end
print(Gumpsum)
--if(Gumpsum~=7394037874)then -- this commented out for learning purposes
Let me know what you find out Kane