• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

New TurkReno Compile Swap (1 Viewer)

LexLuthor

New member
Joined
Aug 12, 2006
RedCents
I am having problems in the new compile some macro's are not working propely. It is Constantly scrolling this in a loop that never stops.I think It has something to do with Mq2exchange and swapitem files.

DoD Command -couldnt parase exchange "${itemname}"${slotname}
spell_routines.inc@344(swapitem(itemName,slotName) ):\exch
"${itemname}"${slotname}
AutoEnc.mac@806(checkbuffs):\call swapitem"{Normalmainhand}"Mainhand
AutoEnc.Mac@315(Main):\call CheckBuffs

No such groupmember 'Pet'
AutoEnc.mac@533(checkpet):\varset tempID${Group[${i}].Pet.ID}
AutoEnc.mac@316(Main):\call CheckPet

I have looked in Mq2exchange plugin this is an example

if(!(swapInItem->Classes&(1<<((GetCharInfo2()->Class)-1)))) {
MacroError("Exchange: Cannot equip %s. Class restriction.",swapInItem->Name);
return false;
Sub ItemCast(spellName,mySub)
/declare charges int local
/declare oldItemName string local
/declare slotName string local
/declare swapItemBack bool local false
:cast_item
/if (${FindItem[${spellName}].InvSlot}>21) {
/varset swapItemBack true
/if (${FindItem[${spellName}].WornSlot[1]} && ${FindItem[${spellName}].EffectType.Find[worn]}) {
/varset slotName ${FindItem[${spellName}].WornSlot[1].Name}
} else /if (${FindItem[${spellName}].InvSlot}>29) {
/varset slotName pack8
} else {
/varset slotName ${FindItem[${spellName}].InvSlot.Name}
}
/varset oldItemName ${InvSlot[${slotName}].Item.Name}
/call SwapItem "${spellName}" ${slotName}
}

Where Mq2Exchange uses "SwapInItem" and Spell_Routines.inc uses "swapitem" which one is used?I am confused. I dont know it i should go into a file and change all instances of either swapinItem to swapitem or Vica versa or if it even matters at all :confused:
 
Rich (BB code):
|===================================================| 
|- move.inc | 
| | 
|Simple moving and object-avoidance routines | 
| | 
|Originally by beatnik007 (Who credits Mckorr) | 
| | 
|Revised and converted to MQ2Data by Terramantian | 
|===================================================| 
 
 
| Sub MoveToLoc | 
|---------------------------------------------------| 
|This simply moves the player to within 10 units of | 
|the requested location, while avoiding obstacles | 
| | 
|This is beatnik007's original sub, with a few minor| 
|changes and rewritten in MQ2Data format | 
| | 
|SYNTAX: /call MoveToLoc Y X | 
 
 
Sub MoveToLoc(MoveToY, MoveToX) 
| /echo Moving to Location: ${MoveToY}, ${MoveToX}. 
| /echo Distance: ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
 
/declare running int local 
/declare distanceNow float local 
/declare distanceBefore float local 
/declare distanceModifier int local 
/varset running 0 
/declare distanceTimer timer 0 
/varset distanceModifier 1 
 
:moveToLocation 
 
/face fast nolook loc ${MoveToY},${MoveToX} 
 
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) { 
/keypress forward 
/return 
} 
 
/if (${distanceTimer}==0) { 
/if (${Me.Sneaking}) { 
/varset distanceModifier 2 
} else { 
/varset distanceModifier 1 
} 
 
/varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]} && ${distanceBefore} ) { 
/call strafePastObstacle 
} 
/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
/varset distanceTimer 15 
} 
 
/if (${running}==0) { 
/keypress forward 
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) { 
/varset running 1 
/keypress forward hold 
} 
} else { 
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) { 
/varset running 0 
/keypress forward 
} 
} 
/goto :moveToLocation 
/return 
 
 
| Sub MoveToSpawn | 
|---------------------------------------------------| 
|This moves the player to within a provided distance| 
|of the provided spawn, while avoiding obstacles | 
| | 
|I "wrote" this, but as you can see, it's the same | 
|as MoveToLoc with a few variable replacements. | 
| | 
|The second parameter, Distance, allows for the | 
|player to stop short of the target by a certain | 
|amount, to provide for different aggro radii, etc. | 
| | 
|SYNTAX: /call MoveToSpawn ID Distance | 
 
Sub MoveToSpawn(MoveToID, StopDistance) 
 
/if (!(${Defined[MoveToID]})||(${Spawn[MoveToID].ID})) { 
/echo Spawn ID not found or no ID provided. Aborting... 
/return 
} 
/if (!(${Defined[StopDistance]})) { 
/echo Stopping point not defined, using default distance of 70 
/declare StopDistance int local 
/varset StopDistance 70 
} 
 
/echo Moving to Spawn: ${MoveToID} (${Spawn[${MoveToID}].CleanName}). 
| /echo Current Location: ${Spawn[${MoveToID}].Y}, ${Spawn[${MoveToID}].X} 
| /echo Current Distance: ${Spawn[${MoveToID}].Distance} 
 
/declare running int local 
/declare distanceNow float local 
/declare distanceBefore float local 
/declare distanceModifier int local 
/varset running 0 
/declare distanceTimer timer 15 
/varset distanceBefore ${Spawn[${MoveToID}].Distance} 
/varset distanceModifier 1 
 
:moveToSpawn 
 
/squelch /face fast nolook id ${MoveToID} 
 
/if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
/keypress forward 
/return 
} 
 
/if (${distanceTimer}==0) { 
/if (${Me.Sneaking}) { 
/varset distanceModifier 2 
} else { 
/varset distanceModifier 1 
} 
 
/varset distanceNow ${Spawn[${MoveToID}].Distance} 
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
/call strafePastObstacle 
} 
/varset distanceBefore ${Spawn[${MoveToID}].Distance} 
/varset distanceTimer 15 
} 
 
/if (${running}==0) { 
/keypress forward 
/if (${Spawn[${MoveToID}].Distance}>=${StopDistance}) { 
/varset running 1 
/keypress forward hold 
} 
} else { 
/if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
/varset running 0 
/keypress forward 
} 
} 
/goto :moveToSpawn 
/return 
 
| Only to be used by the previous functions - It's obvious what it does. | 
 
sub strafePastObstacle 
/keypress forward 
| /keypress back hold 
| /delay 5 
| /keypress back 
/if (${Math.Rand[99]}>50) { 
/keypress strafe_right hold 
} else { 
/keypress strafe_left hold 
} 
/delay 1s 
/keypress strafe_right 
/keypress strafe_left 
/keypress forward hold 
/return
 
Last edited by a moderator:
Uhm... At least use [ code ]CODE GOES HERE[ /code ] when pasting wast amounts of code, please? :)
Scrolling through all of the above is kinda ZzzZzz ;) not to mention all the above isn't really needed (and you should really remove the MQ2Exchange source since Wassup has clearly stated that it's only for VIP members of the MQ2 forums) ;)

DoD Command -couldnt parase exchange "${itemname}"${slotname}
I'm guessing it said
Rich (BB code):
DoCommand - Couldn't parse '/exchange "${itemName}" ${slotName}'
Basically that tells me that the /exchange command isn't available to the macro. Did you load the plugin? /plugin MQ2Exchange. That command was called from, well that is shown on the line following it:
spell_routines.inc@344(swapitem(itemName,slotName) ):\exch
"${itemname}"${slotname}
I'm guessing it said
Rich (BB code):
spell_routines.inc@344(SwapItem(itemName,slotName) ):/exchange "${itemName}" ${slotName}
(variables and Subroutines are case sensitive)
It tells you where the command causing the error originates from. It originates from the file spell_routines.inc at line (@) 344, within the subroutine SwapItem which has the parameters "itemName" and "slotName" available to it.
That line looks like this
Rich (BB code):
/exchange "${itemName}" ${slotName}
so it firms my belief that MQ2Exchange isn't loaded. This command in turn was called from:
AutoEnc.mac@806(checkbuffs):\call swapitem"{Normalmainhand}"Mainhand
so, from the file AutoEnc.mac at line 806, within the subroutine CheckBuffs, which looks like this:
Rich (BB code):
/call SwapItem "${normalMainhand}" mainhand
. So this is mostly irrelevant in this case, because this just guides us to where (in the chain of commands) the command that caused the error started. As we can see this was called from within the Main subroutine:
AutoEnc.Mac@315(Main):\call CheckBuffs

No such groupmember 'Pet'
AutoEnc.mac@533(checkpet):\varset tempID${Group[${i}].Pet.ID}
AutoEnc.mac@316(Main):\call CheckPet
Now this I don't really get why is comming..
To show my point, here's the CheckPet subroutine (with proper indentation, I hate when that isn't done).
Rich (BB code):
Sub CheckPet
	/if (${petOff} && ${Me.Pet.ID}) {
		/varset petOff 0
		/if (!${addList.Find[[]}) /varset newAdds 0
	}
	/doevents rageon rageoff
	/if (${Spawn[${petID}].Type.Equal[NPC]} && !${petOff} && ${useCharm} && ${petID}) {
		/echo Pet Off!
		/varset petAttacking false
		/varset newAdds 1
		/varset petOff 1
		/if (${useCharm} && ${Me.Casting.ID} && ${useMez} && ${newAdds} && !${Me.Casting.Name.Equal[${mezSpell}]} && !${Me.Casting.Name.Equal[${pbaeMezSpell}]} && !${Me.Casting.Name.Equal[${charmSpell}]}) /call Interrupt
		/if (${useCharm}) {
			/if (${autoAnnounce}) /docommand ${channelAnnounce} PET OFF!! snare/malo pls!
			/target id ${petID}
			/call Charm ${petID}
		}
	}
	| /declare i int local
	| /declare tempID int local
	| /for i 1 to ${Group}
	|	/varset tempID ${Group.Member[${i}].Pet.ID}
	|	/if ( ${tempID} ) {
	|		/if ( !( ${slowTimer${tempID}}<0 ) ) {
	|			/if ( ${Defined[mezTimer${tempID}]} ) /deletevar mezTimer${tempID}
	|			/if ( ${Defined[slowTimer${tempID}]} ) /deletevar slowTimer${tempID}
	|			/if ( ${Defined[tashTimer${tempID}]} ) /deletevar tashTimer${tempID}
	|			/declare mezTimer${tempID} int outer -1
	|			/declare tashTimer${tempID} int outer -1
	|			/declare slowTimer${tempID} int outer -1
	|		}
	|	}
	| /next i
/return
The line marked in red is the one causing that error, but that line is commented out, so it shouldn't even be parsed.
Anyway, the error is ofcourse that it tries to get the Pet from a groupmember type. No such thing. Pet comes from the Spawn TLO/type.
So to make that line actually work it would have to look something like this:
Rich (BB code):
/varset tempID ${Spawn[pc ${Group.Member[${i}].Name}].Pet.ID}
This part however have nothing whatsoever to do with MQ2Exchange not being loaded (and thereby not having access to the /exchange command).
 
New TurkReno Compile Swap

Users who are viewing this thread

Back
Top