Page 1 of 1

Exp Charms

Posted: Mon Dec 19, 2011 8:45 am
by Guest1234
Is there anyway to check is an Experience / talent charm is full, and if so un-equip and equip a new one if one is available?
I can do the check if available, but the first part I have no clue...

Re: Exp Charms

Posted: Mon Dec 19, 2011 10:00 am
by rock5
I couldn't find a command or anything but I found a memory address. Try this

Code: Select all

charmlevel = memoryReadInt(getProc(),0x9CF1BC)
I only tested this with 1 character so I can't guarantee it works in all cases. Try it out and let me know. Of course if the game addresses change this would have to be updated.

Hm.. maybe if you use this instead, it will survice an update.

Code: Select all

charmlevel = memoryReadInt(getProc(),addresses.staticEquipBase + 0x4E0)
And by "survive an update" I mean when staticEquipBase gets updated then this should work again.

Re: Exp Charms

Posted: Mon Dec 19, 2011 10:17 am
by Guest1234
My Charm is alomst full, will try it in a bit.
Thx Rock

Re: Exp Charms

Posted: Mon Dec 19, 2011 10:52 am
by Guest1234

Code: Select all

Fight #1 
Charm not full (  997680 ), keep going.
Fight # 2
Exp Charm Swapped.
Thing is, it didn't swap it.

Here's my onleavecombat event:

Code: Select all

	local charmlevel = memoryReadInt(getProc(),addresses.staticEquipBase + 0x4E0)
	if inventory:itemTotalCount("Superior Experience Charm") >= 1 then
		if ( charmlevel > 999999 ) then
			inventory:useItem("Superior Experience Charm");
			printf("Exp Charm Swapped.\n");
		else
			printf("Charm not full (  %s ), keep going.\n", charmlevel);
		end
	else
		printf("No charms in inventory... Can't swap !\n");
	end

Re: Exp Charms

Posted: Mon Dec 19, 2011 10:54 am
by Guest1234
RoM gives warning:

Canot quip 2 amulets of same type.

How do I unequip first charm so I can equip a new one?

Re: Exp Charms

Posted: Mon Dec 19, 2011 10:57 am
by rock5
Don't you have to take the old one out first? From memory you have to right click it right? So "UseEquipmentItem(19)" should work. I think 19 is correct.

Re: Exp Charms

Posted: Mon Dec 19, 2011 11:10 am
by Guest1234
Item spot was 18.

Code: Select all

RoMScript("UseEquipmentItem(18)")
Thx. Works now !

:)

Re: Exp Charms

Posted: Wed Apr 20, 2016 8:56 am
by cokebot
addresses.staticEquipBase + 0x4E0

this looks like the first slot for charms, anyone who can tell me which code i need for the second slot?
Thy