• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Pet Toys on Emu Laz with KA

allandallis235

Well-known member
Joined
Sep 12, 2021
RedCents
1,152¢
Howdy,

I've been experiencing this for a while, not sure if anyone else has come across...
My mage (or his pet) does not play nice with automated giving of pet toys. The mage will cast the spells, place the toys/gear in the trade window and then I get get a notice that the pet cancelled the trade. On Laz server you can hail the pet and view what it is wearing. Anyway, this turns into an endless loop and I then end macro and turn pet toys off and give manually. Any advice or is this perhaps just an Emu quark to live with? (does the same with weapons, pet is summoned with plate gear)

Posted my pet ini section too.

Cheers

1663247467969.png

1663247508324.png




[CODE title="KA Pet INI"][Pet]
PetOn=1
PetSpell=Child of Wind
PetFocus=NULL
PetShrinkOn=1
PetShrinkSpell=Tiny Companion|Once
PetBuffsOn=1
PetBuffsSize=8
PetBuffs1=Rathe's Strength
PetBuffs2=Elemental Fury
PetBuffs3=Iceflame Guard
PetBuffs4=Ancient: Burnout Blaze
PetBuffs5=NULL
PetBuffs6=NULL
PetBuffs7=NULL
PetBuffs8=NULL
PetCombatOn=1
PetAssistAt=98
PetAttackDistance=75
PetToysSize=6
PetToysOn=1
PetToys1=Muzzle of Mardu
PetToys2=NULL
PetToys3=NULL
PetToys4=NULL
PetToys5=NULL
PetToys6=NULL
PetToysGave=NULL
PetBreakMezSpell=NULL
PetRampPullWait=0
PetSuspend=0
MoveWhenHit=0
PetHoldOn=0
PetForceHealOnMed=0[/CODE]
 

Attachments

  • 1663247036989.png
    1663247036989.png
    83.1 KB · Views: 0
  • 1663247285627.png
    1663247285627.png
    34.8 KB · Views: 0
There is a problem in the trade code regarding norent items. I did a patch fix on my KA for laz.

I believe this is fixed for trading with pets, though there may still be an issue with inventory related to ninjadvloot.inc If so I can post my fixes for that.

Find the Sub PetToys and replace that entire section with this:

[CODE lang="javascript" title="Sub PetToys"]
Sub PetToys(string petName)
/if (!${Me.Pet.ID}) /return w
DEBUGPET PetToys Enter
/declare i int local
/declare j int local
/declare GrabItem int local 0
/declare PetToySpell string local 0
/declare FullText string local
/declare 2ndPart string local
/declare 3rdPart string local
/declare PetToysTemp string local ${Ini[${IniFileName},Pet,PetToysGave]}
/declare PetToyCheck string local
/declare GaveItem int local 1
/declare CondNo int local 0
/varset BagNum 0
/call OpenInvSlot
/declare petID int local ${Spawn[pet ${petName}].ID}
/if (!${Defined[PetToysOn]}) /return
/if (!${PetToysOn}) /return 0
/if (${BagNumLast}==99) {
/echo Inventory is full
/varset PetToysOn 0
/return X
}
/if (${BagNum}==0) {
/echo You must have an empty Top Inventory slot for Pet Toys to work.
/varset PetToysOn 0
/return X
}
| reset if different pet name only on my pet
/if (!${PetToysTemp.Find[${petName}]} && ${Me.Pet.CleanName.Equal[${petName}]}) {
/ini "${IniFileName}" "Pet" "PetToysGave" "0"
/varset PetToysTemp 0
}
/for i 1 to ${PetToys.Size}
DEBUGPET CHECKING: ${i} - ${PetToys[${i}]}
/if (${ConOn} && ${PetToys[${i}].Find[|cond]}) {
/varset CondNo ${PetToys[${i}].Mid[${Math.Calc[${PetToys[${i}].Find[|cond]}+5]},3]}
} else {
/varset CondNo 0
}
/if (${DebugPet}) {
/echo \atPetDebug PetToys 1: ${PetToys[${i}]}
/echo \atPetDebug PetToys 2: ${PetToysTemp}
/echo \atPetDebug PetToys 3: ${PetToys[${i}].Equal[Null]} || ${PetToysTemp.Find[${petName}]} && ${PetToysTemp.Find[${PetToys[${i}]}]}
/echo \atPetDebug PetToys 4: ${If[${CondNo},${Cond[${CondNo}]},0]}
}
/if (${CondNo}) {
/if (${If[${Cond[${CondNo}]},0,1]}) /continue
}
| Had to add pet name check else it will always skip giving weapons to OTHER pets.
DEBUGPET PetToys ${i} ${PetToys[${i}].Equal[Null]} SkipPetToy 1
/if (${PetToys[${i}].Equal[Null]}) /continue
| Are we handing weapons to the pet
/if (${PetToys[${i}].Arg[2,|].Length} && ${PetToys[${i}].Arg[2,|].NotEqual[null]}) {
/varset FullText ${PetToys[${i}]}
/varset PetToySpell ${PetToys[${i}].Arg[1,|]}
/varset 2ndPart ${PetToys[${i}].Arg[2,|]}
/varset 3rdPart ${PetToys[${i}].Arg[3,|]}
/varset PetToyCheck :${2ndPart}1
} else {
/varset FullText
/varset PetToySpell ${PetToys[${i}]}
/varset 2ndPart
/varset 3rdPart
/varset PetToyCheck ${PetToySpell}:
}
DEBUGPET PetToys ${Me.Pet.CleanName.Equal[${petName}]} && ${2ndPart.Length} && ${PetToysTemp.Find[1]} && ${PetToysTemp.Find[2]} SkipPetToy 2
/if (${Me.Pet.CleanName.Equal[${petName}]} && ${PetToysTemp.Find[${petName}]} && ${PetToysTemp.Find[${PetToyCheck}]}) /continue
/if (${Me.Pet.CleanName.Equal[${petName}]} && ${2ndPart.Length} && ${PetToysTemp.Find[1]} && ${PetToysTemp.Find[2]}) /continue
| Check if spell level less than 76 because mage pets auto equipped after that.
/if (${Me.Pet.CleanName.Equal[${petName}]} && ${Spell[${PetToySpell}].Level}>=76 && (${PetToySpell.Find[muzzle]} || ${PetToySpell.Find[visor]} || ${PetToySpell.Find[belt]})) /continue
| Check for pet toy spells in book to prevent double casting of items
/if (${Me.Book[${PetToySpell}]}) {
/call CastWhat "${PetToySpell}" ${Me.ID} Pet-nomem 0 0
/if (!${PetToysTemp.Find[${petName}]} && ${Me.Pet.CleanName.Equal[${petName}]}) {
/ini "${IniFileName}" "Pet" "PetToysGave" "${petName}"
/varset PetToysTemp ${Ini[${IniFileName},Pet,PetToysGave]}
}
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/echo Casting pet toy spell >> ${PetToySpell} <<
}

/delay 15s ${Cursor.ID}
/if (!${Cursor.ID}) /return 0
| Check if spell has summoned a bag or folded pack
/if (${Cursor.Container} || ${Cursor.Name.Find[Folded]}) {
| If item is in Inv Slot exchange it with bag on cursor
/if (${InvSlot[pack${BagNum}].Item.ID}) /nomodkey /itemnotify pack${BagNum} leftmouseup
/while (1) {
/delay 2s ${Cursor.ID}
| Drop bag or item into inventory
/autoinventory
/delay 1s
| Drop exchanged item into inventory after bag is dropped
/if (${Cursor.ID}) /autoinventory
| If folded pack right click to convert to phantom satchel
/if (${InvSlot[pack${BagNum}].Item.Name.Find[folded]}) {
/nomodkey /itemnotify pack${BagNum} rightmouseup
/echo Opening ${InvSlot[pack${BagNum}].Item.Name}
/delay 3s
} else {
/break
}
}
}
/if (${InvSlot[pack${BagNum}].Item.Container} && (${InvSlot[pack${BagNum}].Item.Name.Find[Phantom Satchel]} || ${InvSlot[pack${BagNum}].Item.Name.Find[Pouch of Quellious]})) {
| Open the bag
/nomodkey /itemnotify pack${BagNum} rightmouseup
/delay 10
DEBUGPET PetToys ${i} - ${PetToySpell} - ${2ndPart} - ${3rdPart} - ${BagNum} - ${PetToysTemp}
| Condition revised to allow for pet weapons to be given to other people's pets.
/if (((${Me.Pet.CleanName.Equal[${petName}]} && !${PetToysTemp.Find[${2ndPart}1]}) && ${2ndPart.Length} && ${FindItemCount[=${2ndPart}]}) || (!${Me.Pet.CleanName.Equal[${petName}]} && ${2ndPart.Length} && ${FindItemCount[=${2ndPart}]})) {
/call GiveTo "${2ndPart}" ${petID}
/varset PetToysTemp ${PetToysTemp}|${PetToySpell}:${2ndPart}1
/if (${Me.Pet.CleanName.Equal[${petName}]}) /ini "${IniFileName}" "Pet" "PetToysGave" "${PetToysTemp}"
}
| Condition revised to allow for pet weapons to be given to other people's pets.
/if (((${Me.Pet.CleanName.Equal[${petName}]} && !${PetToysTemp.Find[${3rdPart}2]}) && ${3rdPart.Length} && ${FindItemCount[=${3rdPart}]}) || (!${Me.Pet.CleanName.Equal[${petName}]} && ${3rdPart.Length} && ${FindItemCount[=${3rdPart}]})) {
/call GiveTo "${3rdPart}" ${petID}
/varset PetToysTemp ${PetToysTemp}|${PetToySpell}:${3rdPart}2
/if (${Me.Pet.CleanName.Equal[${petName}]}) /ini "${IniFileName}" "Pet" "PetToysGave" "${PetToysTemp}"
}
/if (!${2ndPart.Length}) {
/for j 0 to ${InvSlot[pack${BagNum}].Item.Container}
/if (${InvSlot[pack${BagNum}].Item.Item[${j}].ID} && ${InvSlot[pack${BagNum}].Item.Item[${j}].Name.Length}) {
/call GiveTo "${InvSlot[pack${BagNum}].Item.Item[${j}].Name}" ${petID}
}
/delay 10
/next j
/if (${j}>=8 && !${PetToysTemp.Find[${PetToySpell}]} && ${Me.Pet.CleanName.Equal[${petName}]}) {
/varset PetToysTemp ${PetToysTemp}|${PetToySpell}
/ini "${IniFileName}" "Pet" "PetToysGave" "${PetToysTemp}"
}
}
}
/if (${Cursor.Name.Find[Summoned:]}) {
/if (${2ndPart.Length} && !${PetToysTemp.Find[1]}) {
/varset PetToysTemp ${PetToysTemp}|${PetToySpell}:${2ndPart}1
} else /if (${2ndPart.Length} && ${PetToysTemp.Find[1]} ) {
/varset PetToysTemp ${PetToysTemp}|${PetToySpell}:${2ndPart}2
} else /if (!${2ndPart.Length} && !${PetToysTemp.Find[${PetToySpell}]}) {
/varset PetToysTemp ${PetToysTemp}|${PetToySpell}:${Cursor.Name}
}
/call GiveTo "${Cursor.Name}" ${petID}
/if (${Me.Pet.CleanName.Equal[${petName}]}) /ini "${IniFileName}" "Pet" "PetToysGave" "${PetToysTemp}"
/varset GaveItem 0
}
/if (${InvSlot[pack${BagNum}].Item.Name.Find[Phantom Satchel]} || ${InvSlot[pack${BagNum}].Item.Name.Find[Pouch of Quellious]}) /call DestroyBag
}
/next i
| MUST reset PetToysGave after cycle complete in order to stop calling PetToys all the time.
/varset PetToysGave ${PetToysTemp}
/if (${Window[InventoryWindow].Open} && !${GaveItem}) /keypress inventory
/varset PetToysDone 1
/call DoWeMove ${ReturnToCamp} PetToys
DEBUGPET PetToys Leave
/return[/CODE]
 
Thank you for the help DriveCrash. Unfortunately I'm still having probs. Continues to loop until I end macro. Perhaps there is something up with sub GiveTo. No worries if it's not 100% obvious.

1663282316464.png
 
Here is the GiveTo Sub:

[CODE lang="javascript" title="Sub GiveTo"] Sub GiveTo(string GItem, int GTarget)
DEBUGBUFF GiveTo Enter
/declare ItemSummoned int local 0
/if (${Target.ID}!=${GTarget}) {
/target id ${GTarget}
/delay 2s ${Target.ID}==${GTarget}
}
/if (${Target.Distance}>4 && ${Target.Distance}<=${CampRadius}) {
/moveto id ${Target.ID} mdist 4
/delay 65 ${MoveTo.Stopped}
}
/if (${Me.Mount.ID}) {
/dismount
/delay 20 !${Me.Mount.ID}
}
/if (${Me.Levitating}) {
/removelev
/delay 20 !${Me.Levitating}
}
/if (!${Cursor.ID}) {
/if (${FindItemCount[=${GItem}]}>0) {
/shift /itemnotify "${GItem}" leftmouseup
/delay 2s ${Cursor.ID}
} else {
/echo Item: ${GItem} Not Found in Inventory. Are you sure the Item Name is Correct?
/return
}
}
/while (${Cursor.ID} && ${Cursor.NoRent}) {
/if (${Cursor.ID}==${FindItem[=${GItem}].ID}) {
/varset ItemSummoned 1
/face id ${Target.ID}
/delay 1s
/nomodkey /click left target
} else {
/echo Item: ${GItem} Not Found in Inventory. Are you sure the Item Name is Correct?
/return
}
/delay 1s ${Cursor.ID}
}
/delay 2s ${Window[GiveWnd].Open}
/if (${ItemSummoned} && ${Window[GiveWnd].Open}) {
/delay 1s
/notify GiveWnd GVW_Give_Button leftmouseup
/echo Giving ${GItem} to ${Target.CleanName}
} else {
/echo Item is NOT SUMMONED canceling trade
/notify GiveWnd GVW_Cancel_Button leftmouseup
}
/delay 20
| New pet patch gives back item if pet has equipped. Delete item from cursor.
/if (${Cursor.ID} && (${Cursor.NoRent} || ${Cursor.Name.Find[muzzle]} || ${Cursor.Name.Find[visor]} || ${Cursor.Name.Find[belt]}) && ${Cursor.ID}==${FindItem[=${GItem}].ID}) {
/while (${Cursor.ID}) {
/destroy
/delay 10
}
}
/delay 200 !${Window[GiveWnd].Open}
DEBUGBUFF GiveTo Leave
/return[/CODE]
 
Gonna give you my entire KA setup. I've changed a little bit, where the character INI files needs to have a line added for loot.

NOTE: There are still issues, notably that it will not loot your own corpse after a rez. Haven't nailed that one down yet.

IE:
[General]
KissAssistVer=12.001
Role=Assist
CampRadius=40
CampRadiusExceed=750
ReturnToCamp=1
ChaseAssist=0
ChaseDistance=20
MedOn=1
MedStart=60
MedStop=100
MedCombat=0
LootOn=0
LootFileName=Loot_Tradeskills <----- Add this line, put =Loot if you want it to use the default Loot.ini file
RezAcceptOn=1|90
AcceptInvitesOn=1
GroupWatchOn=1|40
GroupWatchCheck=FALSE
CorpseRecoveryOn=0
EQBCOn=1
 

Attachments

Question - Pet Toys on Emu Laz with KA

Users who are viewing this thread

Back
Top
Cart