levelupSkills1To10() cause a problem

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

levelupSkills1To10() cause a problem

#1 Post by gloover » Sun Jan 15, 2012 11:57 am

Hey experts,

I've tried to level up one of my characters from 0 to lvl 10 and got everytime on level up or teleporting this error

Code: Select all

5:44pm - scripts\rom/bot.lua:537: Fehler im Profile bei der Zeitpunktverarbeiten: onLeaveCombat 
error D:/RMB/scripts/rom/functions.lua:908: attempt to compare nil with number
I'm using the standard l1-10 prifile with this settings:

Code: Select all

	<onLeaveCombat>
		-- Additional Lua code to execute after a target is finished

			if(player.Level == 10) then
				__WPL:setForcedWaypointType("TRAVEL")
			end;


	</onLeaveCombat>

	<onLevelup>
		-- thats a demo for opening the gift bags from Lvl 1-10
		-- and levelup the skills for a new character (mage or priest recommended)
		-- you can delete that lines if you don't want to use that

			-- single skill would be: sendMacro("SetSpellPoint(4,2);");
			-- or levelupSkill(_skillname, _times)
			levelupSkills1To10();

			-- open giftbag and equipt content
			openGiftbags1To10(player.Level);

	</onLevelup>
Whats going wrong since the last revision?
Last edited by gloover on Sun Jan 15, 2012 3:01 pm, edited 2 times in total.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Error on levelup?!

#2 Post by lisa » Sun Jan 15, 2012 12:22 pm

according to your error it is saying player.TP is nil, which is kind of weird.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: Error on levelup?!

#3 Post by gloover » Sun Jan 15, 2012 12:49 pm

Its really weird, because by leveling a character from lvl 1-10 u always get enough TP so level up 2 or 3 skills to max.

Commenting --levelupSkills1To10(); out seems to solve the problem, but to level a character with lvl1 skill up to lvl 10 is most harder :-/

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: levelupSkills1To10() cause a problem

#4 Post by lisa » Sun Jan 15, 2012 7:49 pm

try using this and see if it helps.
Attachments
functions.lua
(48.46 KiB) Downloaded 83 times
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: levelupSkills1To10() cause a problem

#5 Post by gloover » Mon Jan 16, 2012 2:58 pm

Have tried your function.lua Lisa, but from time to time (Elf Druid lvl up to 4 and to 6, Elf Mage lvl up to 5) got this message again

Code: Select all

8:53pm - D:\RMB\scripts\rom/bot.lua:537: Fehler im Profile bei d
er Zeitpunktverarbeiten: onLeaveCombat error D:/RMB/scripts/rom/functions.lua:912: 
attempt to compare nil with number
:cry:

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

Re: levelupSkills1To10() cause a problem

#6 Post by rock5 » Mon Jan 16, 2012 10:51 pm

Have you tried the latest revision of the bot? It shouldn't get nil values for player variables. Make sure you "revert" any changed files after doing the svn 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: levelupSkills1To10() cause a problem

#7 Post by lisa » Mon Jan 16, 2012 11:05 pm

I think it might be getting nil from

Code: Select all

local name, _, icon, _, rank, type, upgradeCost, isSkillable, isAvailable = RoMScript("GetSkillDetail("..skill_from_db.skilltab..","..skill_from_db.skillnum..")")
because the tab and num don't exist for the skill in database. You get the issue if trying to lvl up skills that arn't actually in the skills database.

I also noticed that the levelupSkills1To10 has skills which can't actually be leveled up at all, like "PRIEST_HOLY_AURA".

It needs a total rewrite, I just haven't got the time for it at the moment.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: levelupSkills1To10() cause a problem

#8 Post by gloover » Wed Jan 18, 2012 9:22 am

EDIT:

Hmm, strange: if you're using openGiftbags1To10(player.Level); AND levelupSkills1To10(); inside of <onlevelup>
thas cause this error. Commenting out one of them seems to solve it.

Now I've deleted the TP-Check and also deleted
if hf_return == true then
settings.updateSkillsAvailability()
end
in functions.lua:

Code: Select all

	for i = 1, _times do
		yrest(600);
		sendMacro("SetSpellPoint("..skill_from_db.skilltab..","..skill_from_db.skillnum..");");
		hf_return = true;
	end
Now everything works fine!

Lisa, rock, can u remove (or if u have time: improve) the TP-Check, as it was in the earlier revision?

THX in advance

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests