You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Tuesday, June 12th 2012, 3:32pm

The new Equipment Swap

not a huge change for equipment swap. Now you have:

/run SwapEquipmentItem(0) for the first slot
/run SwapEquipmentItem(1) for the second slot
/run SwapEquipmentItem(2) for the third slot

I haven't figured out how to check which equipment slot you are currently on from a macro, so Its easy to write a macro to swap to you off gear right now, but not as easy to write one that swaps and swaps back.

Edit 1:
/run SwapEquipmentItem(-1) toggles between the last two chosen equipment slots?

2

Wednesday, June 13th 2012, 12:49am

Thank you :D
Deraan
77/77/71 M/W/R
Govinda - Bteam

3

Wednesday, June 13th 2012, 1:05am

yeah i still dont know how to check what equipment slot i currently have equipped. I need helps plz. Been trying all day and my brain is just shot. =(

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

4

Wednesday, June 13th 2012, 2:59pm

Likely no easy answer here. It is doubtful the game bothers to track what you currently have equipped so to do so would get quite involved.

Your options at this point would be:

  1. Find out how the game actually uses SwapEquipmentItem internally. This will involve extracting the files from interface.fdb and seeing how the game uses it. If the game does track what you have equipped, then you might be able to see how it tracks it and figure things out from there.
  2. Track it yourself. Not the most elegant solution, but doable. The biggest problem would be figuring out what you currently have equipped at game start (from that point on you can simply track the swaps). The drawback to this is if someone swaps gear via the standard interface, you'd lose the tracking unless you also intercepted those types of gear swaps. Requires an add-on to pull off.
  3. Figure out what you have equipped by comparing the current gear with what is in the slot (or after swapping). Again, rather involved and would likely require an add-on or at least some custom Lua functions to pull off, though it wouldn't suffer from the problems that the "Track it Yourself" method would.
  4. Just live with it. Basically the "F*** It!" option.



One last thought. Did you try calling SwapEquipmentItem without a parameter? That was how it used to work and may be how it swaps with the previously used slot (this is a big may though, I rather doubt it would work). So the logic here would be to first swap with a given slot (e.g. SwapEquipmentItem(1) ) then to swap back, call it without any parameter (e.g. SwapEquipmentItem() ). Again, I doubt it would work but you never know...
2013... The year from hell....

YomanROM

Professional

Posts: 1,132

Location: Germany

  • Send private message

5

Wednesday, June 13th 2012, 4:19pm

https://forum.runesofmagic.com/showthrea…l=1#post4174693

this one by mcgaerty cycles ascending through your slots.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

6

Wednesday, June 13th 2012, 4:31pm

Aha! Thanks YomanROM.

So apparently there is a function to return the equipment slot currently equipped. Specifically, GetEuipmentNumber() (yes, the name of this function does indeed have a missing 'q')

So to swap between current set and some other one (let's say set 1), you would do:

Source code

1
2
3
/run curset=GetEuipmentNumber()
/run SwapEquipmentItem(1)
/run SwapEquipmentItem(curset)

(the above is for example only, probably needs some delays between swaps and might want to check if you aren't trying to swap with the current set already etc.)
2013... The year from hell....