course of terror WP

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: course of terror WP

#361 Post by kenzu38 » Sun Dec 02, 2012 3:37 pm

Thanks a lot for the files. It's all working fine now.

Also downloaded the Malatinarepeat, though I think this will hardly be used as the event repeat tickets are pretty rare. :)

Anyway, if you're not busy, have one more request and that is to optimize the toat xml file so that it has an option to also buy diamonds from Cedric.

Again, thanks a lot for those files you shared. Cheers!

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

Re: course of terror WP

#362 Post by rock5 » Mon Dec 03, 2012 3:02 am

kenzu38 wrote:Anyway, if you're not busy, have one more request and that is to optimize the toat xml file so that it has an option to also buy diamonds from Cedric.
Hm... ok. Now how should it work? Diamonds are shared on an account so I'm thinking of an option where you specify which accounts should buy diamonds. Or you can use "all" to mean all accounts should buy diamonds. What do you think?
  • 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

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: course of terror WP

#363 Post by kenzu38 » Mon Dec 03, 2012 4:58 am

Yes, sure, no objections here. :)

And maybe you can also include the charlist feature from your other scripts so I can specify which specific chars will buy diamonds.

Also, I don't know if the bot is capable of this, but if it can, then I request you also put a code to run a check if the account has already reached the limit for diamond bought that day? So while the limit is not reached it will keep on buying diamonds.

I'm just thinking, it's only once a day now but if they do decide to get it back to 5 diamonds three times a day or even put up new numbers in the future, there will be no need to update this waypoint.

Thanks.

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: course of terror WP

#364 Post by Rickster » Mon Dec 03, 2012 5:54 am

I have a WP file walking by to the diamond NPC and a userfunction to buy the diamonds.
I have all my chars walking by and trying to buy diamonds without excluding any charnames, as I am not always using the same or all chars of an account running this WP file.
The userfunction handels, how many times it buys diamonds. This is set up manually by default values in the userfunction, so has to be updated there, when changes are made to the game, or by function arguments.

Code: Select all

------------------------------------------------
-- buyDiamonds(_byThisManyTimes, _debug_mode)
-- Description: This will buy diamonds at the npc Cedric in Varanas
--   be sure that your char stands near Cedric when calling this userfunction
-- Default usage: buyDiamonds()
--   this will buy diamonds at Cedric one time
-- default times to buy diamonds can be set in the userfunction below
-- Additional arguments:
--  _byThisManyTimes 	-- how many times you want to buy diamands, defaults to 1
--  _debug_mode 		-- true/false, defaults to false
--						-- prints a message before buying and sleeps until key is pressed to continue
------------------------------------------------
function buyDiamonds(_byThisManyTimes, _debug_mode)
	-- default settings
	local byThisManyTimes = 1  -- defaults to buy diamonds one time
	-- end default settings
	
	if not _byThisManyTimes then _byThisManyTimes = byThisManyTimes end
	if not _debug_mode then _debug_mode=false end

	local name_npc = GetIdName(115815); -- Cedric in Varanas
	
	if _debug_mode then
		cprinf_ex("|purple| DEBUG - Going to buy diamonds %s times at %s ...\n", _byThisManyTimes, name_npc)
		player:sleep()
	end
	
	cprintf_ex("|lightgreen| Buying diamonds ...\n");
	for i=1, _byThisManyTimes do
		if player:target_NPC(name_npc) then
			sendMacro("ChoiceOption(1);");	yrest(500);
			sendMacro("CloseWindows()");	yrest(500);
		else
			cprintf_ex("|lightred| NPC not found! Not buying diamonds. Be sure to be near %s in Varanas when trying to buy diamnods.\n", name_npc)
			break
		end
	end;
end

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

Re: course of terror WP

#365 Post by rock5 » Mon Dec 03, 2012 6:06 am

kenzu38 wrote:And maybe you can also include the charlist feature from your other scripts so I can specify which specific chars will buy diamonds.
Why limit to only certain characters on an account? I was going to make it so you can specify which accounts you want diamonds on. Isn't the idea that you want to buy as many diamonds as possible? Therefore you would want all the characters on that account to buy diamonds.
kenzu38 wrote:Also, I don't know if the bot is capable of this, but if it can, then I request you also put a code to run a check if the account has already reached the limit for diamond bought that day? So while the limit is not reached it will keep on buying diamonds
I don't really see how it's possible. I'll probably just leave it to try regardless. It wont waste much time.
Rickster wrote:I have a WP file walking by to the diamond NPC and a userfunction to bye the diamonds.
This would have saved me some time if I had not already written it. Functionally it's not too different to what I already wrote.
  • 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

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: course of terror WP

#366 Post by kenzu38 » Mon Dec 03, 2012 6:52 am

Why limit to only certain characters on an account? I was going to make it so you can specify which accounts you want diamonds on. Isn't the idea that you want to buy as many diamonds as possible? Therefore you would want all the characters on that account to buy diamonds.
I have accounts where there are only 2 chars with high enough level to buy diamonds and the rest are like level 1 storage chars so I was thinking that for those accounts, I would like to specify which chars to login so the bot will not have to waste time logging in the other chars that can't buy diamonds.
I don't really see how it's possible. I'll probably just leave it to try regardless. It wont waste much time.
I see. Nvm then if this is impossible. But like I said before, I like the code to be able to adapt to the daily limits so if it's not too much to ask, maybe you can make a user options line in the code where I can set how many times a char tries to buy diamonds from Cedric.

@Rickster

Hi, thanks for sharing your code. Unfortunately, I'm not good with coding so I don't know how to insert your code into rock5's toat xml file.

But really, thanks for sharing. :)

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: course of terror WP

#367 Post by Rickster » Mon Dec 03, 2012 7:20 am

kenzu38 wrote:I have accounts where there are only 2 chars with high enough level to buy diamonds and the rest are like level 1 storage chars so I was thinking that for those accounts, I would like to specify which chars to login so the bot will not have to waste time logging in the other chars that can't buy diamonds.
If you are relogging with Rocks fastLogin you can define a set of chars cross accounts, and use the wp file to buy the diamonds.
But when I followed your idea right, you want a WP file to go from Malatina to AT, and I guess you wount have lvl 1 chars doing this. So there will be no need to filter out low level chars when buying diamonds.

I agree with
rock5 wrote:I don't really see how it's possible. I'll probably just leave it to try regardless. It wont waste much time.
Thats the way I do it too. Walk by with every char and try to buy. if you already bought diamonds with a char from the same account, it does not matter, it just don´t get diamonds.
kenzu38 wrote:thanks for sharing your code. Unfortunately, I'm not good with coding so I don't know how to insert your code into rock5's toat xml file.
Nevermind, it was just my way of doing this task and you can feel free to use, what you are able to ;)

Ric

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

Re: course of terror WP

#368 Post by rock5 » Mon Dec 03, 2012 7:23 am

kenzu38 wrote:I have accounts where there are only 2 chars with high enough level to buy diamonds and the rest are like level 1 storage chars so I was thinking that for those accounts, I would like to specify which chars to login so the bot will not have to waste time logging in the other chars that can't buy diamonds.
This file is meant to be just a travel file that takes you from Malatina games to AT that buys diamonds along the way if it can. This file doesn't relog. It's up to the last file in your chain to do the relog, such at the survivalnext file. That's where you would decide which characters to log in.

This is what it looks like at the moment.

<<< File deleted. Now it has a home at http://www.solarstrike.net/phpBB3/viewt ... 357#p35357 >>
  • 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

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: course of terror WP

#369 Post by kenzu38 » Mon Dec 03, 2012 12:14 pm

rock5 wrote:This file is meant to be just a travel file that takes you from Malatina games to AT that buys diamonds along the way if it can. This file doesn't relog. It's up to the last file in your chain to do the relog, such at the survivalnext file. That's where you would decide which characters to log in.
I see. So this will be dependent on the settings of other waypoint files?

When you said you were going to put options that specify which accounts were buying diamonds, I assumed you were going to put some logging commands directly into the toat xml file that's why I requested for the charlist feature to be there too. :)

Well, my main concern is that I should be able to specify which chars will buy, and it turns out I have control of that. So no complaints here.

Anyway, I just tested the file you posted and ran it with 2 chars. Both runs worked fine. The option to set number of times it buys diamonds is working as it should. Thanks a lot for this!
Rickster wrote:If you are relogging with Rocks fastLogin you can define a set of chars cross accounts, and use the wp file to buy the diamonds. But when I followed your idea right, you want a WP file to go from Malatina to AT, and I guess you wount have lvl 1 chars doing this. So there will be no need to filter out low level chars when buying diamonds.
Yeah, a complete misunderstanding on my part on how the script works. :)
Rickster wrote:Thats the way I do it too. Walk by with every char and try to buy. if you already bought diamonds with a char from the same account, it does not matter, it just don´t get diamonds.
I see. Well, it's just that I noticed there's a dqcount function that the bot uses and I suppose this one interacts with the game client to ask how many daily quest the char still has left, so I was wondering if there was something similar for diamonds.

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: course of terror WP

#370 Post by Cindy » Mon Dec 03, 2012 5:15 pm

rock5 wrote:
kenzu38 wrote:I have accounts where there are only 2 chars with high enough level to buy diamonds and the rest are like level 1 storage chars so I was thinking that for those accounts, I would like to specify which chars to login so the bot will not have to waste time logging in the other chars that can't buy diamonds.
This file is meant to be just a travel file that takes you from Malatina games to AT that buys diamonds along the way if it can. This file doesn't relog. It's up to the last file in your chain to do the relog, such at the survivalnext file. That's where you would decide which characters to log in.

This is what it looks like at the moment.

Ahah, great minds think alike? I've made and used a WP to get me from malatina to at, load the at script, get it done, then go to snoop, port to OS, Varanas, Silverfall and do goblins :)

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: course of terror WP

#371 Post by kenzu38 » Thu Jan 03, 2013 3:01 pm

Hey guyz, need help with scripting.

You see, I want to skip looting the ordinary chests and only open the 2 special ones.

So I want to know how I should edit the following code to do just that:

Code: Select all

		elseif currentRoom() > 4 then -- Finished. Open chests
			--=== Create table for chests ===--
			chests = {left = {}, right = {}}

			local objectList = CObjectList();
			objectList:update();
			local objSize = objectList:size()

			for i = 0,objSize do
				local obj = objectList:getObject(i);
				if obj.Id == 113114 or obj.Id == 113137 then
					if obj.X > 4081 then -- right side
						table.insert(chests.right, table.copy(obj))
					else -- left side
						table.insert(chests.left, table.copy(obj))
					end
				end
			end

			-- Sort chests
			table.sort(chests.left, function(a,b) return b.Z > a.Z end)
			table.sort(chests.right, function(a,b) return a.Z > b.Z end)

			-- Get left side
			for k,v in pairs(chests.left) do
				player:target(v.Address);
				Attack()
				yrest(2000)
				Attack()
				if k == 1 then yrest(2000) Attack() end
				repeat
					yrest(2000)
					player:update()
				until not player.Casting
				repeat yrest(500) player:update() until player.Stance== 0
			end

			-- Get right side
			for k,v in pairs(chests.right) do
				player:target(v.Address);
				Attack()
				yrest(2000)
				Attack()
				if k == 1 then yrest(2000) Attack() end
				repeat
					yrest(2000)
					player:update()
				until not player.Casting
				repeat yrest(500) player:update() until player.Stance== 0
			end
Thanks.

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

Re: course of terror WP

#372 Post by lisa » Thu Jan 03, 2013 8:26 pm

find this bit of code

Code: Select all

if obj.Id == 113114 or obj.Id == 113137 then
that is for the 2 types of chests, remove one of them and see if you only do thechests you want, if not then switch it so the other Id remains and you will get what you want or you could start MM with commandline and do

Code: Select all

print(GetIdName(113114))

and see which name is printed. Basically you just use the Id you want.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: course of terror WP

#373 Post by rock5 » Fri Jan 04, 2013 2:03 am

I think they are both called "Treasure Chest" according to runesdatabase.
  • 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

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: course of terror WP

#374 Post by kenzu38 » Fri Jan 04, 2013 11:13 am

rock5 wrote:I think they are both called "Treasure Chest" according to runesdatabase.
Yep, checked it using the commandline like lisa suggested. They're both named Treasure Chest.
lisa wrote:find this bit of code

Code: Select all

if obj.Id == 113114 or obj.Id == 113137 then
Thanks a lot, lisa! I got it working now.

And for those who want to know, special chest = 113137.

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: course of terror WP

#375 Post by kenzu38 » Mon Jan 21, 2013 10:29 am

Hey rock, maybe because of the lag or something, there are some rare cases when the pink tiles are directly next to the portal, and when it's like that, the monster sometimes pops up and the char gets stuck after that. It doesn't go into the portal and it doesn't seem to kill the monster or probably can't kill it coz of the obstacle thing. Is there anything I can add to the code to ensure it doesn't get stuck when this happens?

Also, like in the AT waypoint, the char doesn't get ressed when the char gets killed by the monster that pops up. Anything I can add to the code for this problem?

Thanks.

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

Re: course of terror WP

#376 Post by rock5 » Mon Jan 21, 2013 11:00 am

If it happens rarely I wouldn't bother. It's not supposed to trigger the tile near the portal but even if it did, it's coming down from above and should go straight through even if it gets aggro.

Again, it's not supposed to be triggering monster tiles so I don't know how you are dying from them. I think there is a models file somewhere that removes all the non needed tiles which reduces the chance of triggering unwanted tiles.
  • 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
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: course of terror WP

#377 Post by Bot_romka » Tue Jan 22, 2013 12:21 am

New another version of Course of Terror WP by Bot_romka.
Version 1.4.1
--without use swim hack, teleport hack (for teleport player) or model hack. Based on Rock5's cot_tele V1.72
--for enable speed hack uncomment --SpeedUp(59)
--fix finded error and test version on few accaunts. If you find any error in waypoint please PM me.
--For enable same waypoint function need Rock5's Mail Mods userfunction http://www.solarstrike.net/phpBB3/viewt ... =27&t=1561

Read new available option inside waypoint.



_Sorry for my bad English.
Attachments
Course_of_Terror_Wp.xml
without use swim hack, teleport hack (for teleport player) or model hack.
(14.32 KiB) Downloaded 247 times

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

Re: course of terror WP

#378 Post by rock5 » Sat May 11, 2013 5:50 am

Finally updated the first post version of cot_tele. Now version 1.82.

Just a few bug fixes from 1.81 and now compatible with MicroMacro 1.03.
  • 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

CanceR
Posts: 33
Joined: Sun Jul 22, 2012 9:28 am

Re: course of terror WP

#379 Post by CanceR » Sat Jun 08, 2013 9:42 am

hello everyone,
did you found a way how to log data from new "Currency list" after Chapter 6 patch?
thanks in advance

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

Re: course of terror WP

#380 Post by rock5 » Sat Jun 08, 2013 10:12 am

I posted a function in this topic.
http://www.solarstrike.net/phpBB3/viewt ... 196#p50196

I'm going to commit it now.
  • 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: No registered users and 7 guests