ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: silentsentinel on April 16, 2009, 05:49:57 PM
-
Hi guys,
I'm having some trouble figuring out runebook manipulation. I know how to find the appropriate runebook ID and open it with lastobject, but beyond that I'm not sure of the best way to go about simply recalling and gating to specific runes in the book.
There are a few runebook subs I've found, and most of them are huge, and do a lot of stuff I really don't need such as mana checking, scroll use, etc. etc. I'm mainly curious simply on the best, (most simple/modern) way to navigate throughout the book and initiate a spell cast.
If anyone has a good scaled down code example, or could point me to one, it'd be a huge help! Thanks for any input.
-
I'd consider mine pretty scaled down. You don't need all my subs, but I do include a spellcast sub (which is pretty useful otherwise), and the runebook sub itself. I use them in all my scripts, plus there's lots of scripters that use them without blinking these days. Give'em a test drive.
http://www.scriptuo.com/index.php?topic=18.0
-
Ok, I'm frustratingly close, but not having complete success. I found a runebook sub that is simple enough and am using it, the problem is, when recalling between areas, it recalls find. When it needs to gate an escort though, it doesn't click the gate button.
(It is hitting the gate section of the sub, I can tell due to the event exmsg I put there)
Basically, these coordinate settings are really confusing me. I don't know what numbers this needs to be set to for X and Y coords to successfully reach the button.
The default script didn't work for gating, it hit recall. I've tried adding some to the X coordinate, etc, but I'm not pinpointing it successfully. Any chance someone could take a look and clarify this a bit for me? Thanks guys.
sub useRunebook
{
set %rbAction %1
set %rbRune %2 - 1
set %rb %3
set %dangerousLocation %4
finditem %rb C_ , #backpackid
set #lobjectid #findid
event macro 17
wait 5
set %rbPage ( %rbRune / 2 ) + 1
if %rbPage < 5
set %rbPage %rbPage - 1
set %rbX #contposx + 140 + ( 35 * %rbPage )
set %rbY #contposy + 200
wait 5
click %rbX %rbY dmc
wait 5
if %rbAction = recall
{
event exmsg #charid 0 175 recalling
set %rbX #contposx + 140 + ( 160 * ( %rbRune % 2 ) )
set %rbY #contposy + 145
}
if %rbAction = gate
{
event exmsg #charid 0 175 gating
set %rbX #contposx + 195 + ( 160 * ( %rbRune % 2 ) )
set %rbY #contposy + 145
}
wait 5
click %rbX %rbY dmc
wait 4s
return
}
-
I would Suggest looking at TM's Subs again, for it does Support Gate, Recall wow even Sacred Journey!
-
you code is saying the gate BUTTON is 55 pixels FURTHER RIGHT than the recall BUTTON.
Which is obviously incorrect as the GATE BUTTON is Lower down (higher Y value) not a Higher X value.
-
Wait, what? Are runebooks different on different shards? My runebook looks like:
(http://img26.imageshack.us/img26/9421/runebook.jpg)
Does yours look different? ???
-
You have a perfectly good tool available. There's no reward for smallest script. Why not just use the existing tool TM has put together?
He put a lot of effort into handling all the little things that your efforts are going to fail at. What if you get interrupted while casting? You do have provisions for that right? What if you get delayed at arrival? You know, when you recall/gate sometimes it takes a few seconds for you to arrive at the destination. You have provisions for that? What if your location is blocked? Will your efforts provide for a second, third, etc... if the first is blocked?
Now... if you insist on doing your own, clicking the buttons on the pages isn't the way to go. A better way to handle runebooks is to click only the "SET DEFAULT" button, then cast gate and target the runebook.
Using the page you've shown is the worst way to use a runebook in scripting. How would you provide for Sacred Journey? What happens if your runebook placement is off a bit and you "Drop Rune" instead of gate? What about if your mouse moves while your casting from that page? You'll drag the icon out of the book, which will close and go upper left on screen.
Again, I can appreciate wanting to "streamline" scripting, but sometimes it's best to use the best. TM's runebook subs are the best choice. Just put them at the end of your script and all your gating troubles will fade away ;)
-
Wait, what? Are runebooks different on different shards?
Does yours look different? ???
I would have to say YES and YES to above.
OSI Runebooks sure look differnt you must be on a free shard.. But i disagree with Cerveza... my runebook subs click the apprioprate spot instead of setting "default" and ive yet to have an issue after many 1000s of automated recalls. But each to his own; many ways to skin a cat and all that.
(TMs way is quicker on "repeated" recalling to the same spot or repeated recalling for fizzles interrupts etc... but only factionally so but that maybe a life and death fraction who can say)
-
Perhaps that's another reason to think about my method. Since you don't drill down to another page, the possibility of runebook differences becomes less. I know mine work well on OSI and RunUO. Not sure about Sphere.