I am sure that it is something small but I cannot find my mistake. I am trying to take a container filled with mage spell scrolls and drop the stacks on a rune book one by one and then stop. I have not decided what to do if a scroll type is missing but I just wanted to see if it would start trying to drop scrolls and it does nothing after choosing the spellbook and scroll secure. What did I miss?
,----------------------------------------------------
Display Choose the spellbook that you want to fill...
set #targcurs 1
while #targcurs = 1
wait 5
set %spellbook #ltargetID
set #lobjectid %spellbook
wait 10
display Ok Select your Scroll Secure Container...
set #targcurs 1
while #targcurs = 1
wait 5
set %ScrollSecure #ltargetid
set #lobjectid %ScrollSecure
event macro 17 0
wait 20
gosub DragToSpellbook %ScrollSecure %spellbook QXL ;Clumsy
gosub DragToSpellbook %ScrollSecure %spellbook PXL ;Create_Food
gosub DragToSpellbook %ScrollSecure %spellbook AYL ;Feeblemind
gosub DragToSpellbook %ScrollSecure %spellbook ZXL ;Heal
gosub DragToSpellbook %ScrollSecure %spellbook CYL ;Arrow
gosub DragToSpellbook %ScrollSecure %spellbook NXL ;Reactive_Armor
gosub DragToSpellbook %ScrollSecure %spellbook BYL ;Night_Sight
gosub DragToSpellbook %ScrollSecure %spellbook WXL ;Weaken
gosub DragToSpellbook %ScrollSecure %spellbook VXL ;Agility
gosub DragToSpellbook %ScrollSecure %spellbook YXL ;Cunning
gosub DragToSpellbook %ScrollSecure %spellbook XXL ;Cure
gosub DragToSpellbook %ScrollSecure %spellbook IYL ;Harm
gosub DragToSpellbook %ScrollSecure %spellbook HYL ;Magic_Trap
gosub DragToSpellbook %ScrollSecure %spellbook KYL ;Magic_Untrap
gosub DragToSpellbook %ScrollSecure %spellbook JYL ;Protection
gosub DragToSpellbook %ScrollSecure %spellbook EYL ;Strength
gosub DragToSpellbook %ScrollSecure %spellbook DYL ;Bless
gosub DragToSpellbook %ScrollSecure %spellbook GYL ;Fireball
gosub DragToSpellbook %ScrollSecure %spellbook FYL ;Magic_Lock
gosub DragToSpellbook %ScrollSecure %spellbook STL ;Poison
gosub DragToSpellbook %ScrollSecure %spellbook RTL ;Telekinesis
gosub DragToSpellbook %ScrollSecure %spellbook UTL ;Teleport
gosub DragToSpellbook %ScrollSecure %spellbook TTL ;Unlock
gosub DragToSpellbook %ScrollSecure %spellbook OTL ;Wall_of_Stone
gosub DragToSpellbook %ScrollSecure %spellbook NTL ;Arch_Cure
gosub DragToSpellbook %ScrollSecure %spellbook QTL ;Arch_Protection
gosub DragToSpellbook %ScrollSecure %spellbook PTL ;Curse
gosub DragToSpellbook %ScrollSecure %spellbook AUL ;Fire_Field
gosub DragToSpellbook %ScrollSecure %spellbook ZTL ;Greater_Heal
gosub DragToSpellbook %ScrollSecure %spellbook CUL ;Lightning
gosub DragToSpellbook %ScrollSecure %spellbook BUL ;Mana_Drain
gosub DragToSpellbook %ScrollSecure %spellbook WTL ;Recall
gosub DragToSpellbook %ScrollSecure %spellbook VTL ;Blade_Spirits
gosub DragToSpellbook %ScrollSecure %spellbook YTL ;Dispel_Field
gosub DragToSpellbook %ScrollSecure %spellbook XTL ;Incognito
gosub DragToSpellbook %ScrollSecure %spellbook IUL ;Magic_Reflection
gosub DragToSpellbook %ScrollSecure %spellbook HUL ;Mind_Blast
gosub DragToSpellbook %ScrollSecure %spellbook KUL ;Paralyze
gosub DragToSpellbook %ScrollSecure %spellbook JUL ;Poison_Field
gosub DragToSpellbook %ScrollSecure %spellbook EUL ;Summon_Creature
gosub DragToSpellbook %ScrollSecure %spellbook DUL ;Dispel
gosub DragToSpellbook %ScrollSecure %spellbook GUL ;Energy_Bolt
gosub DragToSpellbook %ScrollSecure %spellbook FUL ;Explosion
gosub DragToSpellbook %ScrollSecure %spellbook QUL ;Invisibility
gosub DragToSpellbook %ScrollSecure %spellbook PUL ;Mark
gosub DragToSpellbook %ScrollSecure %spellbook SUL ;Mass_Curse
gosub DragToSpellbook %ScrollSecure %spellbook RUL ;Paralyze Field
gosub DragToSpellbook %ScrollSecure %spellbook MUL ;Reveal
gosub DragToSpellbook %ScrollSecure %spellbook LUL ;Chain_Lightning
gosub DragToSpellbook %ScrollSecure %spellbook OUL ;Energy_Field
gosub DragToSpellbook %ScrollSecure %spellbook NUL ;Flamestrike
gosub DragToSpellbook %ScrollSecure %spellbook YUL ;Gate_Travel
gosub DragToSpellbook %ScrollSecure %spellbook XUL ;Mana_Vampire
gosub DragToSpellbook %ScrollSecure %spellbook AVL ;Mass_Dispel
gosub DragToSpellbook %ScrollSecure %spellbook UUL ;Polymorph
gosub DragToSpellbook %ScrollSecure %spellbook ZUL ;Meteor_Swarm
gosub DragToSpellbook %ScrollSecure %spellbook TUL ;Earthquake
gosub DragToSpellbook %ScrollSecure %spellbook WUL ;Energy_Vortex
gosub DragToSpellbook %ScrollSecure %spellbook VUL ;Resurrection
gosub DragToSpellbook %ScrollSecure %spellbook GVL ;Air_Elemental
gosub DragToSpellbook %ScrollSecure %spellbook FVL ;Summon_Daemon
gosub DragToSpellbook %ScrollSecure %spellbook IVL ;Earth_Elemental
gosub DragToSpellbook %ScrollSecure %spellbook HVL ;Fire_Elemental
gosub DragToSpellbook %ScrollSecure %spellbook CVL ;Water_Elemental
,----------------------------------------------------
sub DragToSpellbook
set %ScrollSecure %1
set %spellbook %2
set %scrolls %3
finditem %SpellSecure G_2
if #FINDKIND = -1
return N/A
DragToSpellbook_loop1:
finditem %scrolls C_ , %ScrollSecure
if #FINDKIND <> -1
{
exevent drag #FINDID #FINDSTACK
wait 10
exevent dropc %spellbook
wait 10
goto DragToSpellbook_loop1
}
return
,----------------------------------------------------
;-------------------------------------------------
; %1 = GumpWait
; %2 = Gumpname 1
; %3 = Gumpname 2
sub GumpWait
wait 10
set %timedelay #SCNT
loopwait1:
if #CONTNAME = %1 || #CONTNAME = %2
return
if #SCNT > %timedelay + 7
return
goto loopwait1
return