Running WinXP, compiled using MSVC 6.0. I don't know which if any service packs have been installed for MSVC 6.0. Using the current source files.
Code: Select all
[MQ2]Return - Returned to :ForeverLoop
[MQ2]DoEvents: Running event type 2 (Sub Event_ItemCast) = 0x01628030
[MQ2]DoEvents - Called event: Sub Event_ItemCast(string Line)
[MQ2]Echo - [MQ2] ** Attempting to use: Ancient Werewolf Skull
[MQ2]WriteChatColor([MQ2] ** Attempting to use: Ancient Werewolf Skull)
[MQ2]FindInvSlotForContents(0x38E3DEF0) (0x13D28008)
(768.c70): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=38c4be5c ebx=015ce4d0 ecx=000000fc edx=38075c04 esi=38075810 edi=38e3def0
eip=0154dc37 esp=0012b0f4 ebp=38e3def0 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010206
*** WARNING: Unable to verify checksum for C:\Documents and Settings\Owner\Desktop\MQ2\MQ2Main.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Documents and Settings\Owner\Desktop\MQ2\MQ2Main.dll -
MQ2Main!FindInvSlotForContents+0x37:
0154dc37 3938 cmp dword ptr [eax],edi ds:0023:38c4be5c=????????
0:000> .sympath SRV*c:\winnt\symbols*http://msdl.microsoft.com/download/symbols
Symbol search path is: SRV*c:\winnt\symbols*http://msdl.microsoft.com/download/symbols
WARNING: Whitespace at end of path element
0:000> r
eax=38c4be5c ebx=015ce4d0 ecx=000000fc edx=38075c04 esi=38075810 edi=38e3def0
eip=0154dc37 esp=0012b0f4 ebp=38e3def0 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010206
MQ2Main!FindInvSlotForContents+0x37:
0154dc37 3938 cmp dword ptr [eax],edi ds:0023:38c4be5c=????????
0:000> kv
ChildEBP RetAddr Args to Child
WARNING: Stack unwind information not available. Following frames may be wrong.
0012b100 0152d9dd 38e3def0 00000000 0012b9f9 MQ2Main!FindInvSlotForContents+0x37
0012b170 01515615 38e3def0 0012b9f9 0012b1ac MQ2Main!ShutdownMQ2DataTypes+0xbd2d
0012b174 38e3def0 0012b9f9 0012b1ac 0012b9d0 MQ2Main!ParseMQ2DataPortion+0x595
0012b178 0012b9f9 0012b1ac 0012b9d0 0012d22e 0x38e3def0
0012b17c 0012b1ac 0012b9d0 0012d22e 0000002d 0x12b9f9
*** WARNING: Unable to verify checksum for c:\program files\everquest\eqgame.exe
*** ERROR: Module load completed but symbols could not be loaded for c:\program files\everquest\eqgame.exe
0012b9f9 00746f6c 6b636150 00000000 00000000 0x12b1ac
0012b9fd 6b636150 00000000 00000000 00000000 eqgame+0x346f6c
0012ba01 00000000 00000000 00000000 00000000 0x6b636150Here is the sub.
Code: Select all
Sub Event_ItemCast(string Line)
/varset lastevent Event_ItemCast
|- Sanity check parameter
/if (!${Line.Arg[3].Length}) {
/if (${verbosity}>=0) /${channel} ** Improper use of /icast
/if (${verbosity}>=0) /${channel} -- /icast <itemalias>
/if (${verbosity}>=0) /${channel} -- For example:
/if (${verbosity}>=0) /${channel} -- /icast gobby
/return
}
|- Look for that item's section, return if non-existent
/if (!${Ini[MHItems.ini,${Line.Arg[3]}].Length}) {
/if (${verbosity}>=0) /${channel} ** [${Line.Arg[3]}] not in INI file!
/return
}
/declare fullname string local ${Ini[MHItems.ini,${Line.Arg[3]},FullName]}
|- Is it in a Bag?
/if (${verbosity}>=1) /${channel} ** Attempting to use: ${fullname}
/if (${FindItem[${fullname}].InvSlot.Pack}) {
:OpenPack
/if (!${Window[${FindItem[${fullname}].InvSlot.Pack.Name}].Open}) {
/itemnotify ${FindItem[${fullname}].InvSlot.Pack.Name} rightmouseup
/delay 2
/goto :OpenPack
}
/declare camefrom ${FindItem[${fullname}].InvSlot}
:GrabItem
/if (!${Cursor.ID}) {
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/goto :GrabItem
}
/declare clickyID int local ${Cursor.ID}
/declare wornat int local ${Cursor.WornSlot[1]}
:SwapFirst
/if (${Cursor.ID}==${clickyID}) {
/itemnotify ${InvSlot[${wornat}]} leftmouseup
/delay 2
/goto :SwapFirst
}
|- Click it
/delay 2
/if (${verbosity}>=1) /${channel} ** Clicking: ${fullname}
/declare previousID ${Cursor.ID}
/itemnotify ${InvSlot[${wornat}]} rightmouseup
/delay 5
:SwapAgain
/if (${Cursor.ID}==${previousID}) {
/itemnotify ${InvSlot[${wornat}]} leftmouseup
/delay 2
/goto :SwapAgain
}
|- Put it back
:PutItBack
/if (${Cursor.ID}==${clickyID}) {
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/goto :PutItBack
}
:SummonedCheck
/if (${Cursor.ID}) {
|- Something was summoned
/autoinv
/delay 2
/goto :SummonedCheck
}
:ClosePack
/if (${Window[${InvSlot[${camefrom}].Pack.Name}].Open}) {
/itemnotify ${InvSlot[${camefrom}].Pack.Name} rightmouseup
/delay 2
/goto :ClosePack
}
} else {
|- Just click it
/if (${FindItem[${fullname}].InvSlot}) {
/if (${verbosity}>=1) /${channel} ** Clicking: ${fullname}
/itemnotify ${FindItem[${fullname}].InvSlot} rightmouseup
/delay 5 !${Me.Casting.ID}
/delay 2
} else {
/if (${verbosity}>=0) /${channel} ** "${fullname}" not found!
}
}
:CastLoop
/delay 1
/if (${Me.Casting.ID}) /goto :CastLoop
/return

