ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Crisis on March 10, 2015, 08:19:30 PM
-
Ok, I am using EN's snippet for finding the queen
gosub ENs_findAntQueen
halt
sub ENs_FindAntQueen
If %QueenLoopValueMax = N/A
gosub SetupQueenLoopValues
set !queenfound #False
set !Loopvalue 0
repeat
gosub queenmove !loopvalue
gosub findqueen
until #result ; queen found
wait 5
Return
sub FindQueen
set #result #false
finditem OHB G_7
If #Findcnt > 0
{
set !exit 15
Repeat
finditem OHB G_7
Event Pathfind #findx #findy #findz ; the queen
wait 1
set !exit !exit -1
finditem OHB G_2
Until !exit < 1 || #findcnt > 0
set #result #findcnt > 0
}
Return #Result
Sub QueenMove
set !x %QueenLoopValuex . %1
set !y %QueenLoopValuey . %1
set !z %QueenLoopValuez . %1
set !Exit 20
Repeat
set !Exit !exit - 1
event pathfind !x !y !z
wait 1
Until ( #Charposx = !x && #charposy = !y ) || !exit < 1
set !loopvalue !loopValue + 1
If !loopvalue >= %QueenLoopValueMAx
set !LoopValue 1
REturn
sub SetupQueenLoopValues
gosub AddQueenloopvalue 5805 1908 3
gosub AddQueenloopvalue 5803 1896 2
gosub AddQueenloopvalue 5796 1889 2
gosub AddQueenloopvalue 5788 1881 2
gosub AddQueenloopvalue 5779 1872 0
gosub AddQueenloopvalue 5770 1872 1
gosub AddQueenloopvalue 5761 1876 0
gosub AddQueenloopvalue 5755 1885 0
gosub AddQueenloopvalue 5752 1895 2
gosub AddQueenloopvalue 5756 1905 2
gosub AddQueenloopvalue 5759 1910 5
gosub AddQueenloopvalue 5769 1919 1
gosub AddQueenloopvalue 5776 1924 3
gosub AddQueenloopvalue 5780 1931 1
gosub AddQueenloopvalue 5788 1933 4
gosub AddQueenloopvalue 5796 1925 2
gosub AddQueenloopvalue 5805 1915 3
gosub AddQueenloopvalue 5810 1918 1
gosub AddQueenloopvalue 5806 1925 3
gosub AddQueenloopvalue 5799 1930 2
gosub AddQueenloopvalue 5794 1926 4
gosub AddQueenloopvalue 5797 1918 3
gosub AddQueenloopvalue 5790 1913 3
gosub AddQueenloopvalue 5781 1907 2
gosub AddQueenloopvalue 5772 1904 1
gosub AddQueenloopvalue 5764 1897 3
gosub AddQueenloopvalue 5769 1889 1
gosub AddQueenloopvalue 5775 1887 4
gosub AddQueenloopvalue 5782 1894 1
gosub AddQueenloopvalue 5777 1899 20
gosub AddQueenloopvalue 5784 1900 0
gosub AddQueenloopvalue 5789 1906 0
gosub AddQueenloopvalue 5795 1912 4
gosub AddQueenloopvalue 5801 1918 2
gosub AddQueenloopvalue 5803 1916 5
gosub AddQueenloopvalue 5807 1911 3
Return
sub AddQueenLoopValue
if %QueenLoopValueMAx = N/A
set %QueenLoopValueMax 0
set %QueenLoopValueMAx %QueenLoopValueMax + 1
set %QueenLoopValuex . %QueenLoopValueMax %1
set %QueenLoopValuey . %QueenLoopValueMax %2
set %QueenLoopValuez . %QueenLoopValueMax %3
Return
I had to use goto commands to get to the hole that he uses as his starting point as mine recalls in and runs through the Trinsic hole and then related holes to get there but I have one other question. I need to drop the seed onto the matriarch. His snippet has it stop on the queen, does this snippet follow the queen if she moves or does it stop once it finds here? I cannot tell I need to add in another sub to drop the seed onto her to start the quest if his snippet stops there and if it doesn't I guess I need to add it in??
-
IT stop at the queen, You need to add a new gosub to follow and drop a seed. It snippet is make to start front the hold at bottom right.
-
You working on a powder script Crisis?
-
Yes, I am trying anyways lol.
-
I started on one... didn't get far. I could always resurrect it or give you what i have. NOt sure what all i did on it though...
-
I started on one... didn't get far. I could always resurrect it or give you what i have. NOt sure what all i did on it though...
That would be great!
-
So I can't find my most recent of it.. but this is where I made it... looks to be as far as you did.. LOL
-
I am trying to drop a seed onto the matriarch queen. I know I am way off (yeah I tested it lol) so how far off am I?
sub dropseed
finditem %matriarch G_2
If #Findcnt > 0
{
exevent drag %seed
exevent dropc %matriarch
wait 5
gosub acceptquest
}
return
-
i think it has to do with that the Queen is not a container.... I will have to think about this when I am lucid
-
I thought about that but I also thought that since it was only dropped on the queen it might work. Well I guess I was more hoping it would work.
-
Okay, this little snippet didn't work either but I think I am on the right path
set %seed PDF
set %matriarch OHB
wait 5
gosub feed
sub feed
finditem %seed C_ , %container
wait 10
if #findkind > 0
exevent drag #findid
wait 20
exevent dropc %matriarch
wait 1s
-
You need to get the matriarch's id before that
Finditem %Matriarch G_2
Exevent dropc #Findid
-
I also found out that I had container instead of backpackid but unfortunately it is still not working :(
set %seed PDF
set %matriarch OHB
wait 5
gosub feed
sub feed
finditem %seed C_ , %backpackid
wait 10
if #findkind > 0
{
exevent drag #findid
wait 20
Finditem %matriarch G_2
Exevent dropc #Findid
wait 1s
}
-
%backpackid should be #backpackid
-
Thanks Tidus And Manwinc, I made both of those changes and still had no luck. I knew there had to be something else I was missing in addition to those things.
I got looking at if #Findkind > 0
and was wondering if it should be findcnt because it was looking for a count of the item so I changed it to if #findcnt > 0
and it worked.
I had also added in set %backpackid XXXXXX
just in case it needed that. I didn't think it should but I wasn't sure. Do I need that in there or is that something that I can take out?
so my sub now looks like
sub dropseed
Finditem %seed C_ , #backpackid
wait 10
if #Findcnt > 0
{
Exevent drag #Findid
wait 10
Finditem %matriarch G_2
Exevent dropc #Findid
wait 1s
}
return
This will be set at the beginning of the script
set %seed PDF
set %matriarch OHB
set %backpackid QNVOUND
I am not sure why I named it feed originally other than when I was thinking about it not working because of the npc not being a container, I started thinking that dropping the seed on the queen would be similar to feeding a pet. I just caught it now that I had named the sub feed lol.
One more question along with the backpackid
Do I need the { } around the action of dropping the seed? I was not sure but it seemed like I should so I added them in there but on other drag and drop things I have looked at they are not there.
-
U mihgt have to try to do a LTARGETID. and drop it on it. THat what you have to do for a blue bettle.
-
The last sub I posted worked great and it will drop the seed on the queen and bring up the quest gump. I am going to modify your quest acceptance gump from the seed script yo accept this.
Here is where I am at with what I have done (Still want to do tweaks and adjustments though):
1. Recall sub in place (Thanks TM - though I need to make the changes that he suggested so that if a hole is blocked, it won't go on to the next rune)
2. Recalls to the Trinsic Solen Hole, drops in and travels through the different routes/holes and gets to the area with the Matriarch. (Thanks EN for the Enter Ant Hole sub)
3. EN's rails running around the area looking for the queen. (It works but I may be missing something because the movement looks like someone is having a seizure while controlling the character and it spams pathfinding non-stop)
4. Working sub to drop seed onto the queen bringing up the quest. (final version will have the choice for Friend of the Solens (quests using seed to become friendly which upon completion will start looping with just talking to the matriarch to keep getting powder) and the the looping powder quest.
Here is what I have left: (might take me quite a while lol)
1. Accept quest (thanks Ghost)
2. Recall to wind and autofight solens to kill 7 and then stay and fight until it collects 200 zoogi)
3. Recall and rail to matriarch, turn in quest killing 7 solens and accept next part needing pitchers (8 pitchers will be a prerequisite and a rune must be marked with access to a water trough to refill empty pitchers - Thanks EN for the Fill Pitcher Sub)
4. Turn in that quest then accept powder quest and target and turn in zoogi for powder
5. Start over
-
3. EN's rails running around the area looking for the queen. (It works but I may be missing something because the movement looks like someone is having a seizure while controlling the character and it spams pathfinding non-stop)
LOL good description... That ground is very rocky, the trick is to find rail spots that have simular Z positions so you dont go up and down so much.
The rail system that i use in my character toolbox probably is a better fit for running the ants nest as it doesn't use z axis at all and only uses simple movement based commands. Sadly i didn't release those subs as a separate module but they can be found in my "character toolbox" script search for "simple movement recording"
Good luck on the ant project...