Page 1 of 1

Player level

Posted: Thu Jul 19, 2012 9:45 am
by Alleexx
Hi I have a problem.
I have a level 43 char but when I use this code:

Code: Select all

	<!-- # 17 --><waypoint x="2844" z="11641" y="132" tag="stonecheck">
	if player.Level > 42 then
	__WPL:setForcedWaypointType("RUN")
__WPL:setWaypointIndex(__WPL:findWaypointTag("BackToCamp"))
end
	if inventory:getItemCount(209457) > 29 then -- Stone Gift
	__WPL:setForcedWaypointType("RUN")
	__WPL:setWaypointIndex(__WPL:findWaypointTag("StoneGiftTurnin"))
	end
	</waypoint>
it won't go to the waypoint with tag "BackToCamp" even if it's above level 42.

Any ideas to why it doesn't work?

Re: Player level

Posted: Thu Jul 19, 2012 12:21 pm
by rock5
I'm assuming it's because inventory:getItemCount(209457) > 29 so those settings overide the previous settings. Maybe you want

Code: Select all

   if player.Level > 42 then
   __WPL:setForcedWaypointType("RUN")
__WPL:setWaypointIndex(__WPL:findWaypointTag("BackToCamp"))
   elseif inventory:getItemCount(209457) > 29 then -- Stone Gift
   __WPL:setForcedWaypointType("RUN")
   __WPL:setWaypointIndex(__WPL:findWaypointTag("StoneGiftTurnin"))
   end

Re: Player level

Posted: Thu Jul 19, 2012 4:46 pm
by Alleexx
Ok thanks alot for the fast answer. I will be away this weekend so can't try it out until monday but I'm sure it will work.

Re: Player level

Posted: Fri Jul 20, 2012 12:52 am
by rock5
Alleexx wrote:Ok thanks alot for the fast answer. I will be away this weekend so can't try it out until monday but I'm sure it will work.
Ah, so you're not aware of my habit of posting with syntax errors? You'll learn. :D

Re: Player level

Posted: Wed Jul 25, 2012 7:19 am
by Alleexx
Ok now I've finally tested this and it works just fine. Thx rock :)