Author Topic: The basics of Runebooks?  (Read 3261 times)

0 Members and 1 Guest are viewing this topic.

Offline silentsentinelTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • silentsentinel has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
The basics of Runebooks?
« on: April 16, 2009, 05:49:57 PM »
0
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.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: The basics of Runebooks?
« Reply #1 on: April 16, 2009, 08:08:59 PM »
0
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
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline silentsentinelTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • silentsentinel has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: The basics of Runebooks?
« Reply #2 on: April 17, 2009, 12:52:01 AM »
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.

Code: [Select]
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
}

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: The basics of Runebooks?
« Reply #3 on: April 17, 2009, 01:26:54 AM »
0
I would Suggest looking at TM's Subs again, for it does Support Gate, Recall wow even Sacred Journey!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: The basics of Runebooks?
« Reply #4 on: April 17, 2009, 07:47:47 AM »
0
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.




« Last Edit: April 17, 2009, 07:54:09 AM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline silentsentinelTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • silentsentinel has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: The basics of Runebooks?
« Reply #5 on: April 17, 2009, 10:07:31 AM »
0
Wait, what? Are runebooks different on different shards? My runebook looks like:



Does yours look different?  ???

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: The basics of Runebooks?
« Reply #6 on: April 17, 2009, 12:20:07 PM »
0
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  ;)
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: The basics of Runebooks?
« Reply #7 on: April 17, 2009, 07:13:40 PM »
0
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)
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: The basics of Runebooks?
« Reply #8 on: April 17, 2009, 07:20:44 PM »
0
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.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: