level up the weapon ability

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

level up the weapon ability

#1 Post by gloover » Mon May 14, 2012 6:59 am

Hey rock, hi lisa.

I want to level up the weapon ability by hitting on frog-eggs in tergothen bay and also using simple repair hammer.

Have created a script for a long time for leveling my weapons on "Mendoza Ayekin" so it works fine, but it doesnt in tergothen bay - I cannot get this f... eggs in target. Have u any solutions, whats going wrong there?

Here is my script:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>

	changeProfileOption("MAX_TARGET_DIST", 25);
	changeProfileOption("COMBAT_DISTANCE", 25);
	

	local timetowait = 43200  --43200 sec. = 12 Hours
	local starttime = os.time()
	repeat
		player:clearTarget();
		player:target(player:findNearestNameOrId(106062))  --106062 Tergothen bay frog egg, 104146 Mendoza Ayekin
		if player:haveTarget() then
			sendMacro("UseSkill(1,1)");
			yrest(10000)
			if ( 5 > inventory:getMainHandDurability() ) then
				cprintf(cli.lightred,"Durability decreased down to: %s\n", inventory:getMainHandDurability());
				if inventory:itemTotalCount(201967) > 0 then
					cprintf(cli.lightgreen,"Using simple repair hammer....")
					inventory:useItem(201967);
					RoMScript("PickupEquipmentItem(15)")
					cprintf(cli.yellow,"DONE!\n")
					inventory:update()
				else
					cprintf(cli.lightred,"NO REPAIR HAMMER LEFT!\n")
					player:clearTarget();
					player:sleep()
				end	
			end
		end	
	until os.time() - starttime >= timetowait
	cprintf(cli.lightred, "Time out!\n")
	RoMScript("QuitGame()");
</onLoad>
</waypoints>


thx in advance

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: level up the weapon ability

#2 Post by rock5 » Mon May 14, 2012 7:44 am

Are you talking about the fact that it keeps clearing the target after the egg has taken some damage? That might be because the egg doesn't target you. It may have worked with Mendoza if that mob targeted you.

The problem is "player:haveTarget". That does the regular checks so the ANTI_KS value comes into play. You can set ANTI_KS to false. That should work. Or you could not use haveTarget. Something like.

Code: Select all

local egg = player:findNearestNameOrId(106062)
if egg then
    player:target(egg.Address)
    Attack() -- You can use "Attack()" instead of "sendMacro("UseSkill(1,1)")"
    yrest(10000)
    ....etc
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: level up the weapon ability

#3 Post by gloover » Mon May 14, 2012 9:01 am

Ah, ok thx rock.

One problem exist by this - if the egg was destroyed, the bot search for another one and running to them.

How can I decrease the range of "FindNearestNameorID"?

decreasing wandar radius, combat and target range also the harvest distance, all of the down to 10, but the bot ist still runing to the next egg :-(

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: level up the weapon ability

#4 Post by rock5 » Mon May 14, 2012 9:19 am

findNearestNameOrId on its own doesn't limit it's range but you could check it's range after it searches. So,

Code: Select all

if egg and 50 > distance(egg.X, egg.Z, player.X, player.Z) then
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: level up the weapon ability

#5 Post by gloover » Mon May 14, 2012 9:37 am

great rock, thank u very much!

If you also know how to type the "weapon ability value" in the bot window, I would be very very glad!

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: level up the weapon ability

#6 Post by rock5 » Mon May 14, 2012 9:49 am

gloover wrote:If you also know how to type the "weapon ability value" in the bot window, I would be very very glad!
I found this
http://www.theromwiki.com/API:GetPlayer ... SkillValue

So something like

Code: Select all

print("Sword skill is "..RoMScript("GetPlayerCurrentSkillValue(\"BLADE\")"))
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: level up the weapon ability

#7 Post by gloover » Mon May 14, 2012 10:07 am

yea, rock - you are my hero. Thats exactly I was searching for.

Last question: how can I check the type of equiped Item in the main hand? For example: if mainhand equiped item is sword then ...


Sorry, for so stupid questions, but I found nothing about this in repository.

Thanx again!

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: level up the weapon ability

#8 Post by rock5 » Mon May 14, 2012 10:23 am

Maybe something like,

Code: Select all

local mainhand = inventory.EquipSlots[16]
local weapon
if mainhand:isType("1-Handed Swords") then
    weapon = "BLADE"
elseif mainhand:isType("2-Handed Swords") then
    weapon = "CLAYMORE"
etc.
...

print("Weapon skill is "..RoMScript("GetPlayerCurrentSkillValue(\""..weapon.."\")"))
You can get the rest of the weapon type names from "rom\cache\itemtypestable.lua".
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: level up the weapon ability

#9 Post by rock5 » Mon May 14, 2012 11:19 am

Hey, I'd double check to see if durability makes any difference to the weapon skill you gain. I've been doing a bit of testing and durability has dropped to about 35 and the weapon skill gained still seems the same.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: level up the weapon ability

#10 Post by Ego95 » Mon May 14, 2012 6:35 pm

Hey, I'd double check to see if durability makes any difference to the weapon skill you gain. I've been doing a bit of testing and durability has dropped to about 35 and the weapon skill gained still seems the same.
Yes, that's right. It doesn't matter, if the durability is 35, 120 or maybe just 1. But after 12 hours (like in the script) the durability will be at 0 and if it's 0 you only level up the Weaponless Skill. It's the same if you hit a mob, when it's at 0, you will make damage like you don't wear a weapon ;)

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: level up the weapon ability

#11 Post by gloover » Tue May 15, 2012 1:59 am

AlterEgo95 wrote:
Hey, I'd double check to see if durability makes any difference to the weapon skill you gain. I've been doing a bit of testing and durability has dropped to about 35 and the weapon skill gained still seems the same.
Yes, that's right. It doesn't matter, if the durability is 35, 120 or maybe just 1. But after 12 hours (like in the script) the durability will be at 0 and if it's 0 you only level up the Weaponless Skill. It's the same if you hit a mob, when it's at 0, you will make damage like you don't wear a weapon ;)
Thats right, after the durability of the weapon going down to 0, you will start leveling the weaponless ability - therefore it should use simple repair hammer (also in my script) - it works fine; repair every 2-3 hours, depending on the main durability.

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: level up the weapon ability

#12 Post by pman » Fri May 18, 2012 9:41 am

rock5 wrote:

Code: Select all

local mainhand = inventory.EquipSlots[16]
local weapon
if mainhand:isType("1-Handed Swords") then
    weapon = "BLADE"
...
I got an error when using this maybe not existing isType() method... attampt to call a nil value. I tried to find that function, but without luck :)

Furthermore I have the problem, that Im using the german version, so my cachefile is german, and I think I have to use the english ones.

If I get this done I will upload the file, so that everyone can use it...

have a nice day, pman

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: level up the weapon ability

#13 Post by rock5 » Fri May 18, 2012 10:10 am

The item type names are language specific. If you want to use them in german you will have to translate them.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: level up the weapon ability

#14 Post by Hidden » Sat May 19, 2012 2:50 am

There is an easier way.

In Ravenfell the Deadland Sand Scorpion Pupa regen so they cant be killed just attack them no scripting required your character will hit them 24/7.

Although you should probably add something to repair the weapon when dura is lowered.

**EDIT**
If your hitting them to hard go to logar buy the crappiest weapon you can get naked and hit them.

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: level up the weapon ability

#15 Post by pman » Sat May 19, 2012 8:11 am

Hidden wrote:There is an easier way.

In Ravenfell the Deadland Sand Scorpion Pupa regen so they cant be killed just attack them no scripting required your character will hit them 24/7.

Although you should probably add something to repair the weapon when dura is lowered.

**EDIT**
If your hitting them to hard go to logar buy the crappiest weapon you can get naked and hit them.
lol, so you have no clue whats going on here :D

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: level up the weapon ability

#16 Post by Hidden » Sat May 19, 2012 1:32 pm

pman wrote:
Hidden wrote:There is an easier way.

In Ravenfell the Deadland Sand Scorpion Pupa regen so they cant be killed just attack them no scripting required your character will hit them 24/7.

Although you should probably add something to repair the weapon when dura is lowered.

**EDIT**
If your hitting them to hard go to logar buy the crappiest weapon you can get naked and hit them.
lol, so you have no clue whats going on here :D
Your raising the weapon ability for your class. That's whats going on unless i missed something?

ALL my characters weapon abilities are maxed from using this method. The target regenerates health so hitting it with lvl 8 weapons and no gear you hit it for less than it regens.
You can hit the same target all day long 24/7 as long as you repair the weapon every hour or so.

Weapon lvl, dura (unless its 0) and target have nothing to do with raising the weapon skill of your character.

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: level up the weapon ability

#17 Post by pman » Sun May 20, 2012 8:15 am

yeah of course, but its about lvling the weapon in tergothen bay, there are eggs too, but lvl 67-68, so the lvling process is much faster than your eggs in ravenfell. read the first post, its about using the bot to autoattack those eggs, reattack if someone kills them and automatically repair the weapon(s) when dura is near zero. ;)

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: level up the weapon ability

#18 Post by pman » Sun May 20, 2012 9:04 am

rock, it's not possible for me to call the isType() function, can u tell my why this I cannot use it in the onload section?
Edit: it looks like (local mainhand = inventory.EquipSlots[16]) mainhand is no CItem... maybe I have to use another call?

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: level up the weapon ability

#19 Post by pman » Sun May 20, 2012 10:00 am

So, i have played a bit with it, should work.
Edit this two variables to your needs, put your character infront of an egg, and start it. And dont forget to put some simple repair hamers in your bag. Furthermore if you use 2 weapons, the dura of them should be nearly the same... if not, equip the lower dura weapon in the mainhand ;)

Code: Select all

local weapons = 2;
local weapontype = "BLADE"; -- AXE, AXE2H, BLADE, BLUDGEON, CLAYMORE, DAGGER, HAMMER, POLEARM, STAFF, WAND
Attachments
xeggs.xml
(3.52 KiB) Downloaded 293 times

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: level up the weapon ability

#20 Post by rock5 » Sun May 20, 2012 10:17 am

pman wrote:rock, it's not possible for me to call the isType() function, can u tell my why this I cannot use it in the onload section?
Edit: it looks like (local mainhand = inventory.EquipSlots[16]) mainhand is no CItem... maybe I have to use another call?
You are right. isType() is not available to equipment slots. It's really annoying that equipment slots was done as a separate class. The problem is the item class starts with the slot number which is specific to the inventory. If it was based off the address then we could use it for any item located anywhere. I actually started doing work a while ago on making a general item class that other classes could use but it was taking too much time so I didn't finish it. So for instance you would have a inventoryitem class that would use the item class as it's base similar to how the player class uses pawn as it's base. So equipslots would use it as a base too so all the functions would be available and there would be no repetition of code such as there is now. I was also including a bankitem class. Maybe I'll look into that again.

For now maybe we can use an ingame function instead. Nope can't find one. Hm.. Maybe we could trick it into thinking the item is in the inventory. I just tried this and it works.

Code: Select all

inventory.BagSlot[61].Address = inventory.EquipSlots[17].Address
inventory.BagSlot[61]:update()
if inventory.BagSlot[61]:isType("1-Handed Swords") then ...
To restore the inventory slot address just set

Code: Select all

inventory.BagSlot[61].BagId=0
Then it will update the address on the next inventory:update()
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 27 guests