Version 7.4.0.2897 progress

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: Version 7.4.0.2897 progress

#241 Post by Ego95 » Sun Mar 01, 2020 4:14 pm

Andre235 wrote: Sun Mar 01, 2020 1:19 pm
Ego95 wrote: Sun Mar 01, 2020 9:31 am pawnDirXUVec_offset = 0x34,
pawnDirYUVec_offset = 0x38,
pawnDirZUVec_offset = 0x3C,
this addresses are already listed, but the name is different:

Code: Select all

	game_root = {
		pawn = {
			rotation_x = 0x34,
			rotation_y = 0x38,
			rotation_z = 0x3c,
		},
	},
so we should change the player.lua :)

i've replaced the line 2917 with the new address 8-) :
player.lua

By the way: the bot will not work with a mounted player
Thank you :) I was looking if the adresses were somewehere with a different name but somehow I must have overlooked them. Thats a better way to do it.
I know that it wont work in mounted state. I just had that function in one of my scripts and do not know if its necessary but I didnt want to delete it :)

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#242 Post by Franchesca » Tue Mar 03, 2020 7:18 am

Hello everybody! thank you to the administrator for the work done. Please tell me when the mini-games malatina Andor, COT Tele, survival will work ?
I have updated the bot, but only uses auto attacks and many waipoint do not work properly for example in Andor after the start of the game nothing happens

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#243 Post by Franchesca » Wed Mar 04, 2020 12:55 am

and the harvest works perfectly! but as soon as I launch malatina Andor bot talks to the NPC, teleports to the mini-game, starts the mini-game and all the bot does nothing else... as for cot tele it does not start but cot from rock5 starts but after passing the 4 stage instead of collecting chests the bot goes further into the room with the keys. Can anyone have working waypoints for all mini games? Lay out please. Lila doesn't work either.

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: Version 7.4.0.2897 progress

#244 Post by Sasuke » Wed Mar 04, 2020 3:16 pm

can we update with tortoise on rom folder?(svn update)?

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#245 Post by Franchesca » Thu Mar 05, 2020 4:31 am

Administrator. You've been updating the code so actively... why were they silent? What is the final result of the bot? What should be done to make the previous waypoints work properly? Maybe something to add to change something? I have read this whole topic 3 times and I still don't understand why you are silent? The bot works, but there is no malatina, in particular Andor for some reason does not work. Does anyone have a working bot with this waypoint? Please post it

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#246 Post by Franchesca » Thu Mar 05, 2020 4:54 am

By the way, I have a problem. The bot always asks me to choose a character to use when it starts, as if 2 game Windows are running. Choose from two identical characters. Any one can be correct randomly. 1 of them starts the bot further on the waypoint selection window, the second one always gives an error that I don't have ingamefunctions in the game in Addons, although there is one. The bot works successfully, but not all waypoints work. Is everyone like this?

Andre235
Posts: 156
Joined: Thu Oct 03, 2019 4:08 am

Re: Version 7.4.0.2897 progress

#247 Post by Andre235 » Thu Mar 05, 2020 10:56 am

The Administrator is very busy. And the Most of the work is done. If you want to run some minigames, you should be creative and write/modify this by yourself. In my opinion the old waypointfiles will not work anymore without a big workaround... you have to modify the files or write them new. The createpath.lua is already fixed. I can run my bot nearly perfect. But wrote my waypointfiles completely new...

morc
Posts: 75
Joined: Thu Jan 02, 2020 7:32 am

Re: Version 7.4.0.2897 progress

#248 Post by morc » Thu Mar 05, 2020 12:16 pm

several basic functions do not work (buffs, mount, ...)
these will not be helped by rewriting the waypoints

a lot of work is still needed, it will be a long time

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#249 Post by Franchesca » Thu Mar 05, 2020 12:30 pm

Andre235 wrote: Thu Mar 05, 2020 10:56 am The Administrator is very busy. And the Most of the work is done. If you want to run some minigames, you should be creative and write/modify this by yourself. In my opinion the old waypointfiles will not work anymore without a big workaround... you have to modify the files or write them new. The createpath.lua is already fixed. I can run my bot nearly perfect. But wrote my waypointfiles completely new...
Andre, thank you for your answer. Tell me whether it is necessary to change/add something to the bot from the first page now? I mean player lua addresses??? I'll fix the waypoints. I think I can do it.

please tell me why when I try to run the bot in windowed mode, it gives me the error rom-bot-version7.4. 0. 2897/functions.lua:2669: bad argument #1 to 'findPatternInProcess' ((null)) and doesn 't start? But as soon as I set the full-screen game mode, the bot starts successfully.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Version 7.4.0.2897 progress

#250 Post by Administrator » Thu Mar 05, 2020 2:16 pm

I do not play the game and have no played it in over 10 years. When things aren't working, I do not know about it until people report it. When you report things, please just post them here on the forum and include as much information as you can.

Things like "X daily waypoints aren't working" doesn't help me; I do not know what that daily is, nor do I know what the waypoint is even supposed to do. Describe exactly what is expected to happen, what actually does happen (both in-game and in the bot window's output), and if possible include the exact waypoint code that it happens at. That is, if you open up the waypoint XML file, copy/paste the code relevant to that exact spot you are experiencing issues.

As for the buffs and mount issues, please explain what isn't working and what you expect to happen. The more detail the better.

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

Re: Version 7.4.0.2897 progress

#251 Post by Ego95 » Fri Mar 06, 2020 10:36 am

Andre235 wrote: Thu Mar 05, 2020 10:56 am The Administrator is very busy. And the Most of the work is done. If you want to run some minigames, you should be creative and write/modify this by yourself. In my opinion the old waypointfiles will not work anymore without a big workaround... you have to modify the files or write them new. The createpath.lua is already fixed. I can run my bot nearly perfect. But wrote my waypointfiles completely new...
Well most of the work is done seems wrong to me. I really appreciate all the hours admin has spend into the bot and I am not asking for fixes because we really need to remember she's doing this for free in her spare time. But compared to what the bot was before the functions are really limited.

-Createpath does not work for me because of a nil value in distance()
-GetPlayerPosition does not work
-Quests cannot be accepted
-harvesting does not work because it doesnt wait for the casting bar to be finished (as a workaround I'm targetting objects with an yrest after it)
-pets do not work
-moving by mount does not work correctly
-in some cases the bot it zooming the camera away until my character dies (it's zooming so far away that the whole zone is on my screen)
-speedhack usercuntion slows my character down to slug speed

Basically if you compare the old list of addresses with the new one you see how many are missing. It's also hard to compare which ones are missing because they have different names than before now.

I didnt't know that I have to rewrite all my waypoint files. This will be hard. Most errors I get are memoryRead errors and I wont be able to fix these myself.

morc
Posts: 75
Joined: Thu Jan 02, 2020 7:32 am

Re: Version 7.4.0.2897 progress

#252 Post by morc » Fri Mar 06, 2020 12:20 pm

Administrator wrote: Thu Mar 05, 2020 2:16 pm I do not play the game and have no played it in over 10 years. When things aren't working, I do not know about it until people report it. When you report things, please just post them here on the forum and include as much information as you can.

Things like "X daily waypoints aren't working" doesn't help me; I do not know what that daily is, nor do I know what the waypoint is even supposed to do. Describe exactly what is expected to happen, what actually does happen (both in-game and in the bot window's output), and if possible include the exact waypoint code that it happens at. That is, if you open up the waypoint XML file, copy/paste the code relevant to that exact spot you are experiencing issues.

As for the buffs and mount issues, please explain what isn't working and what you expect to happen. The more detail the better.
- bot only use primary class skills and do not use secondary class and elite skills and buffs (example: warrior/mage: Lightning Burn Weapon, Fireball, etc...)
- moving by mount does not work correctly
- camerea problems (too far settings)
- function "questgroup" does not work
- many wrong item value error message at the start:
Wrong value returned in update of item id: 211833
Wrong value returned in update of item id: 230761
Wrong value returned in update of item id: 230763
Wrong value returned in update of item id: 200471
Wrong value returned in update of item id: 241480
Wrong value returned in update of item id: 241480
Wrong value returned in update of item id: 241480
Wrong value returned in update of item id: 203241
Wrong value returned in update of item id: 241837
Wrong value returned in update of item id: 203242
Wrong value returned in update of item id: 241842
Wrong value returned in update of item id: 240247
Wrong value returned in update of item id: 240244
Wrong value returned in update of item id: 240257
Wrong value returned in update of item id: 240604
Wrong value returned in update of item id: 241480
Wrong value returned in update of item id: 204653
Wrong value returned in update of item id: 204553
Wrong value returned in update of item id: 201607
Wrong value returned in update of item id: 243265
Wrong value returned in update of item id: 242085
Wrong value returned in update of item id: 242819
Wrong value returned in update of item id: 242087
Wrong value returned in update of item id: 241602
Wrong value returned in update of item id: 242806
Wrong value returned in update of item id: 242692
Wrong value returned in update of item id: 240116
Wrong value returned in update of item id: 242085
Wrong value returned in update of item id: 204922
Wrong value returned in update of item id: 242086
Wrong value returned in update of item id: 242828
Wrong value returned in update of item id: 201087
Wrong value returned in update of item id: 201237
Wrong value returned in update of item id: 242833
Wrong value returned in update of item id: 242693
Wrong value returned in update of item id: 236346
Wrong value returned in update of item id: 236347
Wrong value returned in update of item id: 236348
Wrong value returned in update of item id: 236349
Wrong value returned in update of item id: 236350
Wrong value returned in update of item id: 236351
Wrong value returned in update of item id: 236352
Wrong value returned in update of item id: 242087
Wrong value returned in update of item id: 241453
Wrong value returned in update of item id: 241457
Wrong value returned in update of item id: 241461
Wrong value returned in update of item id: 200464
Wrong value returned in update of item id: 200442
Wrong value returned in update of item id: 200453
Wrong value returned in update of item id: 200451
Wrong value returned in update of item id: 200452
Wrong value returned in update of item id: 200466
Wrong value returned in update of item id: 200439
Wrong value returned in update of item id: 200440
Wrong value returned in update of item id: 200441
Wrong value returned in update of item id: 204717
Wrong value returned in update of item id: 204674
Wrong value returned in update of item id: 242086
Wrong value returned in update of item id: 201925
Wrong value returned in update of item id: 242087
Wrong value returned in update of item id: 203163
Wrong value returned in update of item id: 201477
Wrong value returned in update of item id: 226910
Wrong value returned in update of item id: 200209

maybe fix the auto login or auto character change? ;)

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#253 Post by Franchesca » Fri Mar 06, 2020 3:38 pm

I have such a question to the administrator or knowledgeable . Does the bot need to be updated or is it enough to just download micromacro 1.05 after downloading the rhombot from the first page of this theme?? do I need to change anything? at the moment, the bot only works in full-screen mode, it does not work in window mode. Only the harvest_logar waypoint works perfectly...

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#254 Post by Franchesca » Fri Mar 06, 2020 3:58 pm

can someone help me set up a waypoint for the honor points farm from this topic? viewtopic.php?f=21&t=3851&hilit=Ground&start=60
I tried it, but the bot constantly throws various errors. Any help will be appreciated!

Rommyc
Posts: 4
Joined: Fri Mar 06, 2020 6:22 pm

Re: Version 7.4.0.2897 progress

#255 Post by Rommyc » Fri Mar 06, 2020 6:26 pm

I can't figure out what the error is? Hm

viewtopic.php?f=21&t=3851&hilit=Ground#p38069

Previously this waypoint worked perfectly

Andre235
Posts: 156
Joined: Thu Oct 03, 2019 4:08 am

Re: Version 7.4.0.2897 progress

#256 Post by Andre235 » Sat Mar 07, 2020 1:49 am

Rommyc wrote: Fri Mar 06, 2020 6:26 pm I can't figure out what the error is? Hm

viewtopic.php?f=21&t=3851&hilit=Ground#p38069

Previously this waypoint worked perfectly
What do you mean with „previously“

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#257 Post by Franchesca » Sat Mar 07, 2020 5:20 am

hello everyone I constantly get the error bad argument #2 to 'memoryReadBytePtr' (number expected, got nil) when the code has until memoryReadBytePtr (getProc (), addresses .loadingScreenPtr, addresses .loadingScreen_offset) ~ = 0 Is it possible to replace this somehow to make it work? when I delete this code, the waypoint works, but with limited functions. I use this waypoint

Code: Select all

<waypoints type="TRAVEL"><!-- Honor_points v0.8 -->
<onLoad>
	--== User Option ==--
	--RunningSpeed = 59       -- The speed the character runs, 50 is normal. Recommended 59.

	changeProfileOption("HARVEST_DISTANCE", 350)
	changeProfileOption("USE_PHIRIUS_POTION", false)
	changeProfileOption("EGGPET_ENABLE_ASSIST", false)


	-- speed hack
	local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
	if playerAddress ~= 0 and RunningSpeed then
		memoryWriteFloat(getProc(), playerAddress + 0x40, RunningSpeed)
	end;

	-- Restore HP
	function RestoreHP()
		if( player.Class1 == 5 or player.Class2 == 5 ) then 		-- priest
			if( 50 > player.HP/player.MaxHP*100 ) then
				player:cast("PRIEST_URGENT_HEAL")
			elseif( 80 > player.HP/player.MaxHP*100 ) then
				player:cast("PRIEST_REGENERATE")
			end
		elseif( player.Class1 == 8 or player.Class2 == 8 ) then 	-- druid
			if( 80 > player.HP/player.MaxHP*100 ) then
				player:cast("DRUID_RECOVER")
			end
		elseif( 50 > player.HP/player.MaxHP*100 ) then
			player:checkPotions()	
		end
	end;

	-- Find Sigils
	local lastSigilAddress = 0
	function FindSigils()
		local obj = nil
		local objectList = CObjectList()
		objectList:update()

		for i = 0,objectList:size() do
			obj = objectList:getObject(i)

			if( obj ~= nil and obj.Type == PT_SIGIL and obj.Address ~= lastSigilAddress ) then
				teleport(obj.X, obj.Z, 80)		-- teleport to above seal
				teleport(nil,nil,44)      		-- go down to sigil
				teleport(obj.X, obj.Z, 80)      -- go up
				lastSigilAddress = obj.Address
				RestoreHP()
				return
			end
		end
	end;

	-- Totaltime
	function Totaltime(_time)
		local ttime = os.difftime(os.time(),player.BotStartTime_nr)
		_time = _time or ttime
		hours  =  math.floor(_time/3600)
		minutes = math.floor((_time-(hours*3600))/60)
		seconds = math.floor(_time-((hours*3600)+(minutes*60)))
		return hours, minutes, seconds, ttime
	end;

	-- vars
	RunsST = 0
	StartTrialsTimer = os.clock()
	LastH, LastM, LastS, LastT = Totaltime()
	LastHonorPoint = RoMScript('GetPlayerHonorPoint()')

--[[
	-- check HonorPoint
	if( 53 > player.Level and RoMScript('GetPlayerHonorPoint()') >= 7200 ) then
		local currentChannel = RoMScript("GetCurrentParallelID()")
		printf("Current channel %d\n", currentChannel)
		SetChannelForLogin(currentChannel)
		if( getZoneId() ~= 354 ) then
			sendMacro("Logout();"); yrest(8000);
		end
		LoginNextChar()
		loadPaths(__WPL.FileName);
		return
	end;
]]--

	-- check Zone
	local ZoneId = getZoneId()
	if ZoneId ~= 401 and ZoneId ~= 354 then
		if player:target_NPC(111621) then			-- Guild Castle Manager	in Varanas
			sendMacro("ChoiceOption(2);")
		else
			inventory:useItem(208456) yrest(1000)	-- Только для Руофа (Only for Russian)
			sendMacro("ChoiceOption(4);")
		end
		waitForLoadingScreen(30)
		player:update()
		__WPL:setWaypointIndex(__WPL:findWaypointTag("Guild"))
	end;
</onLoad>

<!-- Start -->
	<!-- #  1 --><waypoint x="5118" z="2526" y="13" tag="Start">
	
	if( os.clock() - StartTrialsTimer > 3600 ) then
		-- Trials Log
		local CurrHonorPoint = RoMScript('GetPlayerHonorPoint()')
		local filename = getExecutionPath() .. "/logs/TrialsLog.log"
		local file, err = io.open(filename, "a+")
		if file then
			file:write("Account: "..RoMScript("GetAccountName()").." \tName: " ..string.format("%-10s",player.Name ).." \tDate: "..os.date().." \tRuns: "..RunsST.." \tHonorPoint: "..(CurrHonorPoint - LastHonorPoint).." \n")
			file:close()
		end
		LastHonorPoint = CurrHonorPoint
		StartTrialsTimer = os.clock()
		RunsST = 0
	end;

--[[
	if( 53 > player.Level and RoMScript('GetPlayerHonorPoint()') >= 7200 ) then
		local currentChannel = RoMScript("GetCurrentParallelID()")
		printf("Current channel %d\n", currentChannel)
		SetChannelForLogin(currentChannel)
		if( getZoneId() ~= 354 ) then
			sendMacro("Logout();"); yrest(8000);
		end
		LoginNextChar()
		loadPaths(__WPL.FileName);
		return
	else
		fly()
	end;
]]--

	fly()
	--teleport_SetStepSize(30)
	--teleport_SetStepPause(300)
	--teleportToWP()
	</waypoint>
	<!-- #  2 --><waypoint x="5138" z="2568" y="114">--teleportToWP()</waypoint>
	<!-- #  3 --><waypoint x="4856" z="2586" y="237">--teleportToWP()</waypoint>
	<!-- #  4 --><waypoint x="2215" z="2426" y="237">--teleportToWP()</waypoint>
	<!-- #  5 --><waypoint x="2206" z="2605" y="191">--teleportToWP()</waypoint>
	<!-- #  6 --><waypoint x="2055" z="2590" y="44">
	player:target_NPC(114269)					-- Master of Trials
	yrest(500)
	sendMacro("ChoiceOption(2);")
	player:rest(2)
	teleport(2030,2460,80)
	
	repeat
		--if( not windowValid(getAttachedHwnd()) ) then error("Ending script",2) end
		player:updateXYZ()
		if 10 > distance(player.X, player.Z, 5121, 2515) then
			break
		end
		FindSigils()
		yrest(200)
	until memoryReadBytePtr(getProc(),addresses.loadingScreenPtr, addresses.loadingScreen_offset) ~= 0

	waitForLoadingScreen(2)
	RunsST = RunsST + 1
	__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"))
	</waypoint>

<!-- Guild -->
	<!-- #  1 --><waypoint x="0" z="-485" y="25" tag="Guild">	</waypoint>
	<!-- #  2 --><waypoint x="177" z="-472" y="26">	</waypoint>
	<!-- #  3 --><waypoint x="183" z="-411" y="29">
	player:target_NPC({112896, 112897, 112898, 112899})			-- Полигон Гильдии l, ll lll и lV уровня
	RoMScript("ChoiceOption(1);")
	waitForLoadingScreen(2)
	__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"))
	</waypoint>
</waypoints>

the function that allows the bot to take sigils does not work , due to the error bad argument #2 to 'memoryReadBytePtr' (number expected, got nil). Can anyone know how to fix it or replace it with a working one?

Andre235
Posts: 156
Joined: Thu Oct 03, 2019 4:08 am

Re: Version 7.4.0.2897 progress

#258 Post by Andre235 » Sat Mar 07, 2020 7:34 am

Franchesca wrote: Sat Mar 07, 2020 5:20 am hello everyone I constantly get the error bad argument #2 to 'memoryReadBytePtr' (number expected, got nil) when the code has until memoryReadBytePtr (getProc (), addresses .loadingScreenPtr, addresses .loadingScreen_offset) ~ = 0 Is it possible to replace this somehow to make it work? when I delete this code, the waypoint works, but with limited functions. I use this waypoint

Code: Select all

<waypoints type="TRAVEL"><!-- Honor_points v0.8 -->
<onLoad>
	--== User Option ==--
	--RunningSpeed = 59       -- The speed the character runs, 50 is normal. Recommended 59.

	changeProfileOption("HARVEST_DISTANCE", 350)
	changeProfileOption("USE_PHIRIUS_POTION", false)
	changeProfileOption("EGGPET_ENABLE_ASSIST", false)


	-- speed hack
	local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
	if playerAddress ~= 0 and RunningSpeed then
		memoryWriteFloat(getProc(), playerAddress + 0x40, RunningSpeed)
	end;

	-- Restore HP
	function RestoreHP()
		if( player.Class1 == 5 or player.Class2 == 5 ) then 		-- priest
			if( 50 > player.HP/player.MaxHP*100 ) then
				player:cast("PRIEST_URGENT_HEAL")
			elseif( 80 > player.HP/player.MaxHP*100 ) then
				player:cast("PRIEST_REGENERATE")
			end
		elseif( player.Class1 == 8 or player.Class2 == 8 ) then 	-- druid
			if( 80 > player.HP/player.MaxHP*100 ) then
				player:cast("DRUID_RECOVER")
			end
		elseif( 50 > player.HP/player.MaxHP*100 ) then
			player:checkPotions()	
		end
	end;

	-- Find Sigils
	local lastSigilAddress = 0
	function FindSigils()
		local obj = nil
		local objectList = CObjectList()
		objectList:update()

		for i = 0,objectList:size() do
			obj = objectList:getObject(i)

			if( obj ~= nil and obj.Type == PT_SIGIL and obj.Address ~= lastSigilAddress ) then
				teleport(obj.X, obj.Z, 80)		-- teleport to above seal
				teleport(nil,nil,44)      		-- go down to sigil
				teleport(obj.X, obj.Z, 80)      -- go up
				lastSigilAddress = obj.Address
				RestoreHP()
				return
			end
		end
	end;

	-- Totaltime
	function Totaltime(_time)
		local ttime = os.difftime(os.time(),player.BotStartTime_nr)
		_time = _time or ttime
		hours  =  math.floor(_time/3600)
		minutes = math.floor((_time-(hours*3600))/60)
		seconds = math.floor(_time-((hours*3600)+(minutes*60)))
		return hours, minutes, seconds, ttime
	end;

	-- vars
	RunsST = 0
	StartTrialsTimer = os.clock()
	LastH, LastM, LastS, LastT = Totaltime()
	LastHonorPoint = RoMScript('GetPlayerHonorPoint()')

--[[
	-- check HonorPoint
	if( 53 > player.Level and RoMScript('GetPlayerHonorPoint()') >= 7200 ) then
		local currentChannel = RoMScript("GetCurrentParallelID()")
		printf("Current channel %d\n", currentChannel)
		SetChannelForLogin(currentChannel)
		if( getZoneId() ~= 354 ) then
			sendMacro("Logout();"); yrest(8000);
		end
		LoginNextChar()
		loadPaths(__WPL.FileName);
		return
	end;
]]--

	-- check Zone
	local ZoneId = getZoneId()
	if ZoneId ~= 401 and ZoneId ~= 354 then
		if player:target_NPC(111621) then			-- Guild Castle Manager	in Varanas
			sendMacro("ChoiceOption(2);")
		else
			inventory:useItem(208456) yrest(1000)	-- Только для Руофа (Only for Russian)
			sendMacro("ChoiceOption(4);")
		end
		waitForLoadingScreen(30)
		player:update()
		__WPL:setWaypointIndex(__WPL:findWaypointTag("Guild"))
	end;
</onLoad>

<!-- Start -->
	<!-- #  1 --><waypoint x="5118" z="2526" y="13" tag="Start">
	
	if( os.clock() - StartTrialsTimer > 3600 ) then
		-- Trials Log
		local CurrHonorPoint = RoMScript('GetPlayerHonorPoint()')
		local filename = getExecutionPath() .. "/logs/TrialsLog.log"
		local file, err = io.open(filename, "a+")
		if file then
			file:write("Account: "..RoMScript("GetAccountName()").." \tName: " ..string.format("%-10s",player.Name ).." \tDate: "..os.date().." \tRuns: "..RunsST.." \tHonorPoint: "..(CurrHonorPoint - LastHonorPoint).." \n")
			file:close()
		end
		LastHonorPoint = CurrHonorPoint
		StartTrialsTimer = os.clock()
		RunsST = 0
	end;

--[[
	if( 53 > player.Level and RoMScript('GetPlayerHonorPoint()') >= 7200 ) then
		local currentChannel = RoMScript("GetCurrentParallelID()")
		printf("Current channel %d\n", currentChannel)
		SetChannelForLogin(currentChannel)
		if( getZoneId() ~= 354 ) then
			sendMacro("Logout();"); yrest(8000);
		end
		LoginNextChar()
		loadPaths(__WPL.FileName);
		return
	else
		fly()
	end;
]]--

	fly()
	--teleport_SetStepSize(30)
	--teleport_SetStepPause(300)
	--teleportToWP()
	</waypoint>
	<!-- #  2 --><waypoint x="5138" z="2568" y="114">--teleportToWP()</waypoint>
	<!-- #  3 --><waypoint x="4856" z="2586" y="237">--teleportToWP()</waypoint>
	<!-- #  4 --><waypoint x="2215" z="2426" y="237">--teleportToWP()</waypoint>
	<!-- #  5 --><waypoint x="2206" z="2605" y="191">--teleportToWP()</waypoint>
	<!-- #  6 --><waypoint x="2055" z="2590" y="44">
	player:target_NPC(114269)					-- Master of Trials
	yrest(500)
	sendMacro("ChoiceOption(2);")
	player:rest(2)
	teleport(2030,2460,80)
	
	repeat
		--if( not windowValid(getAttachedHwnd()) ) then error("Ending script",2) end
		player:updateXYZ()
		if 10 > distance(player.X, player.Z, 5121, 2515) then
			break
		end
		FindSigils()
		yrest(200)
	until memoryReadBytePtr(getProc(),addresses.loadingScreenPtr, addresses.loadingScreen_offset) ~= 0

	waitForLoadingScreen(2)
	RunsST = RunsST + 1
	__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"))
	</waypoint>

<!-- Guild -->
	<!-- #  1 --><waypoint x="0" z="-485" y="25" tag="Guild">	</waypoint>
	<!-- #  2 --><waypoint x="177" z="-472" y="26">	</waypoint>
	<!-- #  3 --><waypoint x="183" z="-411" y="29">
	player:target_NPC({112896, 112897, 112898, 112899})			-- Полигон Гильдии l, ll lll и lV уровня
	RoMScript("ChoiceOption(1);")
	waitForLoadingScreen(2)
	__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"))
	</waypoint>
</waypoints>

the function that allows the bot to take sigils does not work , due to the error bad argument #2 to 'memoryReadBytePtr' (number expected, got nil). Can anyone know how to fix it or replace it with a working one?
here is the fixed version of your waypoint-file. i fixed the addresses in this file, the script ist starting without errors, but you must test it by your own :-)
WP.xml
(5.24 KiB) Downloaded 163 times

Franchesca
Posts: 28
Joined: Sun Mar 01, 2020 11:35 am

Re: Version 7.4.0.2897 progress

#259 Post by Franchesca » Sat Mar 07, 2020 2:29 pm

You're a wizard! it really works.. but how did you get around to memoryreadbyteptr (getproc (), addresses.client_exe_module_start + addresses.loading.base address.loading.offsets) ~ = 0 ???? please describe to eliminate similar situations

Andre235
Posts: 156
Joined: Thu Oct 03, 2019 4:08 am

Re: Version 7.4.0.2897 progress

#260 Post by Andre235 » Sat Mar 07, 2020 3:44 pm

:D
It’s a little bit „know how“. And a Little Bit Luck. In this case the function is returns itself while the loading screen is visible. The value of the loading screen pointer is 1, while you see the loading screen, and if not the value is 0. the trick is to find the right address in the addresses.lua. So I looked into the functions.lua to the function „waitforloadingscreen“. The rest was copy and paste :oops:

The last 2 months I spent a lot of time in reading, understanding, compare and trying around with the rom code. I am still not good at it, but with „try and error“ it is often successful :)

Locked

Who is online

Users browsing this forum: No registered users and 21 guests