Rock5's Constellation (Zodiac) Pet scripts

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#141 Post by BillDoorNZ » Wed Jul 25, 2012 5:11 pm

New version (1.3) with a couple of extra options:

local debugWM = true; --set to true to output debug messages
local eventEndText = "bring"; -- the text to match in the npc messages to indicate the event is done
local shuttleText = "shuttle"; -- the text to match in the npc messages to indicate they are asking for shuttles
local threadText = "thread"; -- the text to match in the npc messages to indicate they are asking for thread
local scissorsText = "scissors"; -- the text to match in the npc messages to indicate they are asking for scissors
Attachments
WeavingMachine.xml
v1.3
(10.93 KiB) Downloaded 171 times

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Rock5's Constellation (Zodiac) Pet scripts

#142 Post by kkulesza » Wed Jul 25, 2012 5:21 pm

Here are my two improvment suggestion to BillDoorNZ's WeavingMachine 1.2 or 1.3 script:
1. Sometimes bot clicks the machine a little bit later then some other player.
And then he stands there for ever doing nothing.
So instead of this code:

Code: Select all

player:target_Object(id_WeavingMachine,1000);

if (not buildBoxMap()) then
	error("Could not build map");
break;
I would suggest this:

Code: Select all

repeat
	player:target_Object(id_WeavingMachine,500);
	yrest(50);
	player:updateBuffs()
until player:hasBuff("Cloth Length")
if (not buildBoxMap()) then
	error("Could not build map");
break;
end;
2. Getting maximal score of 21 points and 1 goddess/purple package isn't neccesary the best.
If you end the game with a score of 17 you get 5 functional/white packeges.
To make the cheapest prize transaction at Varanas bridge you need to have 2 goddess or 10 functional packages.
You have to play 2 games to do this, but getting 2*5 functional packages takes less time then 2 goddess packages.
So instead of this code:

Code: Select all

eventDone = string.find(machineMessage, "bring");
I suggest this:

Code: Select all

eventDone=false
eventDone = string.find(machineMessage, "bring");
if (not eventDone) then
    player:updateBuffs();
    for k,v in pairs(player.Buffs) do
--EDITED--if v.Name=="Cloth Length" and v.Level>=END_SCORE then
        if v.Name=="Cloth Length" and v.Level>=END_SCORE-1 then -- -1 because it starts counting from zero  in memmory
            eventDone=true;
        end
    end
end
if (eventDone) then
    rest(7*1000); --wait to end the game
end
plus 1 line in user's option section

Code: Select all

END_SCORE = 21 -- 21=goddess package; 17=5 functional packages
Last edited by kkulesza on Wed Jul 25, 2012 6:01 pm, edited 1 time in total.

dejfit
Posts: 23
Joined: Wed Oct 05, 2011 6:25 am

Re: Rock5's Constellation (Zodiac) Pet scripts

#143 Post by dejfit » Wed Jul 25, 2012 5:57 pm

I have changed debug to "true" but still the same:

Code: Select all

WEAVING MACHINE Version: 1.3
We try to find NPC 121044:
We successfully target NPC Jamie Rayer and try to open the dialog window.
2
Using transport rune to reset
We try to find NPC 121044:
We successfully target NPC Jamie Rayer and try to open the dialog window.
3
Use MACRO: Executing RoMScript "CloseAllWindows()".
We found Magic Weaving Machine and will harvest it.
Shuttle pawn found at 5476.419921875, -2161.8391113281
Thread pawn found at 5492.8017578125, -2209.1169433594
Scissors pawn found at 5542.8881835938, -2240.462890625
ShuttleBox pawn found at 5476, -2161
ThreadBox pawn found at 5492, -2209
ScissorsBox pawn found at 5542, -2240
ExecuteEvent() started
and my char just stands in one place... Something is wrong but i have no idea what.

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#144 Post by BillDoorNZ » Wed Jul 25, 2012 6:23 pm

sounds like your eventmonitors are not working :(

or someone else has started the event before you and you aren't getting the events as you are not the target

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#145 Post by BillDoorNZ » Wed Jul 25, 2012 6:31 pm

cool, thanks kkulesza, will add that in
kkulesza wrote:Here are my two improvment suggestion to BillDoorNZ's WeavingMachine 1.2 or 1.3 script:
1. Sometimes bot clicks the machine a little bit later then some other player.
And then he stands there for ever doing nothing.
So instead of this code:

Code: Select all

player:target_Object(id_WeavingMachine,1000);

if (not buildBoxMap()) then
	error("Could not build map");
break;
I would suggest this:

Code: Select all

repeat
	player:target_Object(id_WeavingMachine,500);
	yrest(50);
	player:updateBuffs()
until player:hasBuff("Cloth Length")
if (not buildBoxMap()) then
	error("Could not build map");
break;
end;
2. Getting maximal score of 21 points and 1 goddess/purple package isn't neccesary the best.
If you end the game with a score of 17 you get 5 functional/white packeges.
To make the cheapest prize transaction at Varanas bridge you need to have 2 goddess or 10 functional packages.
You have to play 2 games to do this, but getting 2*5 functional packages takes less time then 2 goddess packages.
So instead of this code:

Code: Select all

eventDone = string.find(machineMessage, "bring");
I suggest this:

Code: Select all

eventDone=false
eventDone = string.find(machineMessage, "bring");
if (not eventDone) then
    player:updateBuffs();
    for k,v in pairs(player.Buffs) do
--EDITED--if v.Name=="Cloth Length" and v.Level>=END_SCORE then
        if v.Name=="Cloth Length" and v.Level>=END_SCORE-1 then -- -1 because it starts counting from zero  in memmory
            eventDone=true;
        end
    end
end
if (eventDone) then
    rest(7*1000); --wait to end the game
end
plus 1 line in user's option section

Code: Select all

END_SCORE = 21 -- 21=goddess package; 17=5 functional packages

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Rock5's Constellation (Zodiac) Pet scripts

#146 Post by Jandrana » Wed Jul 25, 2012 6:32 pm

I tried BillDoorNZ's WeavingMachine 1.2 today with 3 chars:

1st char on WinXP - script run up to ~12 pieces of cloth - then MM crashed with an exception
2nd char on Win7 - script run up to 21 pieces of cloth => golden package
3rd char on Win7 - script run up to 17 pieces of cloth => got 5 pieces of materials - didn't watch very closely, but bot seems to have made a mistake, because event was aborted. Maybe some lag? - but my connection is usually very good and the computer is brand new.

Perhaps some fine tuning is necessary - but very cool script so far!!

dejfit
Posts: 23
Joined: Wed Oct 05, 2011 6:25 am

Re: Rock5's Constellation (Zodiac) Pet scripts

#147 Post by dejfit » Wed Jul 25, 2012 6:49 pm

BillDoorNZ wrote:sounds like your eventmonitors are not working :(

or someone else has started the event before you and you aren't getting the events as you are not the target
There was noone except me there so maby something is wrong with this eventmonitors...

I have tried this script on diferent classes and all characters just stand in one place doing nothing. To use this script i dont need any extra functions?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Constellation (Zodiac) Pet scripts

#148 Post by lisa » Wed Jul 25, 2012 7:17 pm

I have a little event monitor test on my topic for GM detection, also a little info on it, it might help you.
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2516
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#149 Post by BillDoorNZ » Wed Jul 25, 2012 9:28 pm

1.4 Added in endScore and enhancements from kkulesza
Attachments
WeavingMachine.xml
v1.4
(11.5 KiB) Downloaded 189 times

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#150 Post by BillDoorNZ » Wed Jul 25, 2012 9:33 pm

freeload80 wrote:Can you add casting buff everytime the new pointbuff is up. Becouse when point buff is on secound place you will get 2 points not one.
define 'casting buff' (will need a generic one that all players can use, or a set of items/spells for each class)

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Constellation (Zodiac) Pet scripts

#151 Post by lisa » Wed Jul 25, 2012 10:02 pm

instead of the

Code: Select all

eventDone = string.find(machineMessage, eventEndText);
you could just check if the buff is still active.

Code: Select all

				if player:hasBuff(623052) then -- cloth length
					for k,v in pairs(player.Buffs) do
the hasBuff does a buff update, so no need for another.

it would work with any language this way.

Also with the shuttle you can use this

Code: Select all

local shuttleText = RoMScript("TEXT(\"SC_2012LOOM_01\")")
thread

Code: Select all

local threadText = RoMScript("TEXT(\"SC_2012LOOM_02\")")
scissors

Code: Select all

local scissorsText = RoMScript("TEXT(\"SC_2012LOOM_03\")")
Not sure if there are any other language dependant things or not.

You can use the Id for transport rune too

Code: Select all

runeCount = inventory:itemTotalCount(202903);
cloth length buff

Code: Select all

until player:hasBuff(623052)
That will leave just the choice option by name for other languages, can do the RoMScript(TEXT) for them aswell I would say.
FYI I get the text straight from memory, I open up CE and just do a Text search and then browse that memory region.
text ce.png
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Constellation (Zodiac) Pet scripts

#152 Post by lisa » Wed Jul 25, 2012 10:40 pm

did some testing and it does work but since you changed the monitor text to lower then you also need to change the other text to lower aswell.

Code: Select all

	local shuttleText = string.lower(RoMScript("TEXT(\"SC_2012LOOM_01\")"))
	local threadText = string.lower(RoMScript("TEXT(\"SC_2012LOOM_02\")"))
	local scissorsText = string.lower(RoMScript("TEXT(\"SC_2012LOOM_03\")"))
Works fine.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#153 Post by BillDoorNZ » Thu Jul 26, 2012 12:00 am

nice :) thx for finding all the id's :)

will update when I get a chance...feeling lazy atm...I was thinking of changing

Code: Select all

   local shuttleText = string.lower(RoMScript("TEXT(\"SC_2012LOOM_01\")"))
to

Code: Select all

   local shuttleText = string.sub(string.lower(RoMScript("TEXT(\"SC_2012LOOM_01\")")),1,10);
just for performance reasons, but theres prolly no point.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Constellation (Zodiac) Pet scripts

#154 Post by lisa » Thu Jul 26, 2012 1:13 am

BillDoorNZ wrote:nice :) thx for finding all the id's :)

will update when I get a chance...feeling lazy atm...I was thinking of changing

Code: Select all

   local shuttleText = string.lower(RoMScript("TEXT(\"SC_2012LOOM_01\")"))
to

Code: Select all

   local shuttleText = string.sub(string.lower(RoMScript("TEXT(\"SC_2012LOOM_01\")")),1,10);
just for performance reasons, but theres prolly no point.
it wouldn't make it much faster as the RoMScripts will only be done once when the WP is first run, from then on it is just the string.find that is repeated. I doubt the string find will have that much performance difference between 10 characters and how ever long the message normally is.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Rock5's Constellation (Zodiac) Pet scripts

#155 Post by kkulesza » Thu Jul 26, 2012 5:12 am

Jandrana wrote:1st char on WinXP - script run up to ~12 pieces of cloth - then MM crashed with an exception
2nd char on Win7 - script run up to 21 pieces of cloth => golden package
3rd char on Win7 - script run up to 17 pieces of cloth => got 5 pieces of materials - didn't watch very closely, but bot seems to have made a mistake, because event was aborted.
I have WinXP.
I always score 21 with every char.
This script is very fast and flawless.
This night i was running it for few hours an i got 100 goddess packages.

-Bear in mind that this weaving machine is buggy when many people try to use it at the same time. For example if someone forgets to take a prize and comes back later for it, when you are playing, then it may end your game.
-Also other players may disturb you purposely. There is another event at central plaza where other people can change your look. It happened to me once i was playing weaving machine. My game has ended at the same moment when my look was changed.

The best way to test it is when no one is around.

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Rock5's Constellation (Zodiac) Pet scripts

#156 Post by Jandrana » Thu Jul 26, 2012 5:29 am

I can only report what happened to me.

I don't know, why MM crashed on WinXP - will try to reproduce. If I remember right, the message contained "ReadProcessMemory failed" or something like that. RoM did not crash. I could continue playing after that.
Did run various scripts (cot_tele, AT, ElfDaily and some of my own scripts) on my XP machine without any problems/crashes. So there is something "unique" with this script.
For example if someone forgets to take a prize and comes back later for it, when you are playing, then it may end your game.
Ok, didn't know that and this could be the reason for the failure for my third char, because another player appeared and was standing near the quest NPC while the script was running.
The best way to test it is when no one is around.
Hardly doable - I don't let any scripts run while I'm not in the room and can watch the game screens. During the evening when I'm usually online, the weaving machine is constantly used by players on three channels.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Constellation (Zodiac) Pet scripts

#157 Post by lisa » Thu Jul 26, 2012 5:31 am

kkulesza wrote:It happened to me once i was playing weaving machine. My game has ended at the same moment when my look was changed.
I had similar but the buff just stayed at 21 and the machine kept going but buff went no higher.

End of the day this is froggy we are talking about and they never truely test things before dumping it on us poor suspecting players. Pretty much everything in the game is buggy in 1 way or another.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#158 Post by Hidden » Thu Jul 26, 2012 9:19 am

v1.4 im having issues with box 1. Sometimes it will run over but not click the box. maybe a fraction to quick? Im not sure what adjustment to make
x being the machine boxes from left to right when facing machine
x
1 2 3

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#159 Post by BillDoorNZ » Thu Jul 26, 2012 1:52 pm

new version: 1.5

-- 1.5 Suggested fixes from Lisa,
-- + added clickDelay to allow adjustment of the time taken for clicks to occurr

I have clickDelay set at 500 for me and it works. If the bot is running over to the box and not quite clicking it in time, then adjust this time.
Attachments
WeavingMachine.xml
v1.5
(11.07 KiB) Downloaded 173 times

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Rock5's Constellation (Zodiac) Pet scripts

#160 Post by BillDoorNZ » Thu Jul 26, 2012 3:22 pm

-- 1.6 Added in 'cheat'
Attachments
WeavingMachine.xml
v1.6
(11.87 KiB) Downloaded 220 times

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests