;=================================================================
; Script Name: Runebook Copier
; Author: slyone
; Version: 1.0
; Public Release: 01/01/2012
; Purpose: Make multiple copies of a runebook...
; Instructions: -Fill your pack full of runes and empty runebooks
; -Get a runebook you want to copy.
; -Hardcode the names of the runes in the
; SetRuneNames sub-routine
;
; Acknowledgements: - Thanks TM for the Travel and Casting Subs!
; - Thanks C2 for the menu tutorial!
;=================================================================
I just found this wonderful script and after a little tinkering around got it to work very smoothly.
Is there a way to automatically name the book you are copying to the name of the book you are copying.
Example the book I am copying is titled "Fel Dungeons"
Can I set up the script somehow to name each book copied the same?
Thanks!!
;START CODE INSERT (just before line 114)
for %curEmptyBook 1 %numEmptyBooks
{
msg $ ; clear any text
OpenRunebook:
set #LOBJECTID %runebookId . %curEmptyBook ; set runebook as last object
event macro 17 0 ; last object
; wait for runebook to open
gosub GumpWait generic_gump generic_gump
if #RESULT = #FALSE
{
goto OpenRunebook
}
; xy coordinates for rename button
set %cx #CONTPOSX + 135
set %cy #CONTPOSY + 25
click %cx %cy f ; click the rename button
wait 10
msg Fel , #SPC , Dungeons , $ ; Change this line to whatever you'd like
}
;END CODE INSERT
display All Done! ; old line 114
halt ; old line 115
The script is working great. Found no hickups or delays.
The problem I seem to have is getting the runes to name.
Here is what I put for 2 runes to test out.....and all I get is "-1" for the rune name when it goes in the runebook.Code: [Select]sub SetRuneNames
set %numRunes 9
set %runeName1 #TRUE The , #SPC , Right , #SPC , Spot
set %runeName2 #TRUE Home
Any assistance would be appreciated. I must be doing something wrong when hard coding.
set %runeName1 #TRUE The , #SPC , Right , #SPC , Spot
set %runeName2 #TRUE Home
set %runeName1 The , #SPC , Right , #SPC , Spot
set %runeName2 Home
gosub ENs_SetVarTooStringWithSpaces runeName1 The Right Spot
display %runename1
halt
sub ENs_SetVarToStringWithSpaces
Set % . %1
If %0 > 1 && %0 <> N/A
{
For !Count 2 %0
set % . %1 % . %1 , #spc , % . !Count
}
return
sub SetRuneNames
set %numRunes 16
set %runeName1 Brit , #SPC , Bank , #SPC , West
set %runeName2 Brit , #SPC , Bank , #SPC , East
set %runeName3 Cove
set %runeName4 Jhelom
set %runeName5 Magincia
set %runeName6 Minoc
set %runeName7 Moonglow
set %runeName8 Nujelm
set %runeName9 Occlo
set %runeName10 Vesper
set %runeName11 Trinsic
set %runeName12 Yew
set %runeName13 Serpents , #SPC , Hold
set %runeName14 Skara , #SPC , Brae
set %runeName15 Bucs , #SPC , Den
set %runeName16 Wind
I am having problems with this. Can anyone help me out?
Script recalls to a spot, marks it, renames the rune, then just loops at renaming the rune.
...
RenameRune:
set #LOBJECTID #FINDID
event macro 17 0 ; last object
wait 10 ; wait for prompt to mark rune
msg %runeName . %curRune , $
wait 10 ; wait for rune to change names
; check that the rune actually was renamed
event property #FINDID <--------- line 99
display #PROPERTY <--------- Added line
if %runeName . %curRune notin #PROPERTY
{
goto RenameRune
}
It does rename it. Problem is the script renames it again and again again and again again and again
Post Merge: July 17, 2013, 03:20:18 PM
this script works exept it doesn't read the current runebook so i need to manually type in what to name the runes, other than that it works great. This get so tireing of typing out each rune every time i want to start copying books. Maybe this code will help you fix it for me.
~snip~
It does rename it. Problem is the script renames it again and again again and again again and again
Post Merge: July 17, 2013, 03:20:18 PM
this script works exept it doesn't read the current runebook so i need to manually type in what to name the runes, other than that it works great. This get so tireing of typing out each rune every time i want to start copying books. Maybe this code will help you fix it for me.
~snip~
Glad that it is working for you then. A few posts ago I posted some test code to try and see if the #PROPERTY variable in EASYUO was working properly. I only meant the test code to be used for debugging.
If #PROPERTY doesn't contain the name you are trying to rename the rune to then the script will go into a loop. On some free shards, the event property doesn't populate #PROPERTY with reliable info. This sounds like it may be the problem you were experiencing.
The script may try to rename the rune a couple of times in a laggy situation but normally it renames the rune within a try or two. As for reading the names of the rune book, I initially stayed away from the optical character recognition (OCR) code. Gonzo's script uses Kal's OCR subs. I tried to use them a while ago with no success. I'll take another look but can't make any guarantees.
-S
can you made this to work on the new Atlas ?
The recipe of Course
24 Blank Scrolls
3 Recall Scrolls
3 Gate Travel
3 Blank Rune
Item Type MFHC
say anyway to put a wait time in for mana to build back up ? thx.
sub checkmana
if #mana < %manatocast
{
event macro 13 46
loop2:
if #mana < #maxmana
{
goto loop2
}
}
return
Thanks for the share