Auto Refine (2.0.6 SVN only)

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

Message
Author
Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Auto Refine (2.0.6 SVN only)

#1 Post by Bibian »

OpenKore 2.0.6 (SVN Revision 6400 or HIGHER) ONLY!

What does it do?
This plugin refines the defined item at the defined NPC to the maxRefine number, it also walks to the defined NPC and gets within a 10 block radius.

What does it NOT do?
It does not automaticly restock on elunium, oridecon or other metals nor does it auto-restock on items you wish to upgrade. You'll have to write a macro for that or use the internal autoGet/Buy/Storage

Are there bugs?
Im sure there are, i'v tested it in a controlled enviroment and i fixed the bugs i came across... so if you come across any, please report them and/or fix them (but rememeber to share).

What improvements are needed?
Well... i guess the code can be neater, automaticly choosing the correct sequence would be cool too. Identifying items that are not yet identified is required, i didnt put that in yet cause i need a break now
At the moment the bot just stands there when its done, out of metal or out of items to refine, this should change too. Im not sure to what though

Config

Code: Select all

autoRefine <item> {
	refineStone <elunium, oridecon, etc>
	refineNpc <npc map x y>
	npcSequence <talk sequence>
	zenny <amount>
	maxRefine <max +>
}
Example

Code: Select all

autoRefine Shoes [1] {
	refineStone Elunium
	refineNpc prt_in 63 60
	npcSequence c r5 c r0 c w1 c w1 r0 w1 c c n
	zenny 3000
	maxRefine 9
	disabled 0
}
This config block will (attemp to) refine all the mufflers in your inventory to +9 using elunium at the prontera refiner as long as you have 300 zenny.

NOTE: In the latest version you have to add the ENTIRE sequence, even the sequence you get when the NPC warns you the item can break!

NOTE 2: put "w1" between each command if the npc does not respond to certain commands, like it did on my test server. In this case Kore is sending the commands too fast for the NPC. This usually happens when the refiner warns you that the item can break!

The code
https://openkore.svn.sourceforge.net/sv ... -refine.pl

Cozzie
Spam Generator
Spam Generator
Posts: 499
Joined: 04 Apr 2008, 09:30
Noob?: No
Location: Melbourne, City of beer and awful sushis

Re: Auto Refine (2.0.6 SVN only)

#2 Post by Cozzie »

Can I have multiple blocks? eg: one block for muffler and one for boots and the bot will refine those in a singular act?

Will muffler [1] for example, upgrades all mufflers [1] including those that has been upgraded before(thus with a different name, ie: +4 muffler [1]) or do I have to specify it separately?

Btw, kore for some reason cant autoget more than 3 equipment without closing and reopening the storage.

Oh yeah, what was the problem with auto acquiring the talk sequence? I know this has been asked in IRC but im still confused. And since you have to specify the npc sequence, why not fix the other one =P
Make Openkore Awesome. Join the team.

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: Auto Refine (2.0.6 SVN only)

#3 Post by Bibian »

It only accepts 1 block at the moment.
If you specify Muffler [1] it will ONLY upgrade those and NOT +1 Muffer [1], this is because the name changes when you upgrade an item making it harder to use getByName.

And the problem with auto-selecting the npc sequence is that you need to talk to the npc twice.
The way this plugin works is TasK::NPCTalk, you have to define the entire task afaik in 1 go doing it in 2 times will prolly not work

cause you have to first get a list of all items, then find where this item is located in the menu... although i MIGHT be able to use the itemType to determine where a particular item will be put...
But for classes that can dualwield or for accessories (im not sure if there are any accessories you can upgrade) its harder.

Btw, in THEORY it is possible to refine ori and elu too... but i haven't tested this... but if you set the NPC to a ori maker and the steps to make ori, it should work...
but again, this is totally untested

Cozzie
Spam Generator
Spam Generator
Posts: 499
Joined: 04 Apr 2008, 09:30
Noob?: No
Location: Melbourne, City of beer and awful sushis

Re: Auto Refine (2.0.6 SVN only)

#4 Post by Cozzie »

So any plans to make it automate so that muffler [1] will upgrade all muffs regardless of the upgrade level? =P

only Sins will have problem as accessories cant be upgraded although on some servers they are enabled.

Disregarding that, how are the information regarding itemType managed by the server/client? I assume the server sends an ID to the client and the client has to decipher it along with every type of information right including itemType right? I see that the openkore's itemType.txt that it dosent have the full detail needed and is weird. ie: there are only armour, not footgear/shield/etc. However there are different types of headgear such as mask, headgear, helmet. I assume that is probably necessary since headgear is client viewable. So then I think it is hard coded into the client.

Why is there a need to talk twice in the first place and as well as the need for it to be done in one go?

I know it wont be as simple as get list - get location - refine, so yeah am just curious.

Thanks for explaining! really appreciate it. =D
Make Openkore Awesome. Join the team.

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: Auto Refine (2.0.6 SVN only)

#5 Post by Bibian »

THere :P those are the item types sent by the server
Could just check what ID it is and predict where it will be equiped
0 Item
1 Lower Mask
2 One-Handed Weapon
4 Cape
8 Right Accessory
10 Arrow
16 Armour
32 Shield
34 Two-Handed Weapon
64 Foot Wear
128 Left Accessory
136 Accessory
256 Helmet
512 Eye Mask
513 Mid-Lower Mask

andy12345
Moderators
Moderators
Posts: 174
Joined: 04 Apr 2008, 10:21
Noob?: No
Location: In your dreams...

Re: Auto Refine (2.0.6 SVN only)

#6 Post by andy12345 »

Thanks vivi, ./kis
@offtopic guess what?I am joining KoreRO again :P

ishi
Noob
Noob
Posts: 2
Joined: 26 Jun 2008, 07:06
Noob?: Yes

Re: Auto Refine (2.0.6 SVN only)

#7 Post by ishi »

i can't make this plugin work. I have copied the code in my plugins folder and named it auto-refine.pl and copied the configuration code to my config.txt:
my config.txt
autoRefine gobine's spaulders {
refineStone Elunium
refineNpc prt_in 63 60
npcSequence c w1 r4 w1 c w1 r1 w1 c w1 t=7 w1 c w1 c w1 c w1 c w1 c c c c c c c
zenny 14000
maxRefine 7
}

am i missing something here? how can i trigger the plugin? hope you guys can help me with my problem. thx in advance.

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: Auto Refine (2.0.6 SVN only)

#8 Post by Bibian »

what are all the c c c c c c c c for?
didnt i say you do NOT need to put in the sequence for upgrading past the danger level? (+4 to +5 for armor for instance)

and how is it not working? lil more details cause "its not working" doesnt help

ishi
Noob
Noob
Posts: 2
Joined: 26 Jun 2008, 07:06
Noob?: Yes

Re: Auto Refine (2.0.6 SVN only)

#9 Post by ishi »

Bibian wrote:what are all the c c c c c c c c for?
didnt i say you do NOT need to put in the sequence for upgrading past the danger level? (+4 to +5 for armor for instance)

and how is it not working? lil more details cause "its not working" doesnt help
nevermind the c's because im playing on a private server where you can refine your equips to a certain degree at once.

this picture shows that it loaded the plugin
Image

in this picture the bot is doing nothing. i can't figure out whats the problem.
Image

i think that once then plugin is loaded it should start refining.

OneThing
Noob
Noob
Posts: 5
Joined: 26 Jun 2008, 23:56
Noob?: No
Location: malay-asia

Re: Auto Refine (2.0.6 SVN only)

#10 Post by OneThing »

ya it's helping me..
just use the same as what he gave already above, cause i tried it already and it work succefly!!

autoRefine Boots [1] { --------if u already got +4 eq, just put it like this eg; +4 Boots [1]
refineStone Elunium
refineNpc prt_in 63 60
npcSequence c w1 r5 w1 c w1 r0 w1 c -------- better remove the w1 cz its too slow.. :P
zenny 3000
maxRefine 9
}

w1 r5 w1 is for foot,if u want to refine headgear change it to 0..if u want to know more..use manual by using command like this; talknpc 63 60 c r0 c r0 c r0 c
r0 is headgear :P
----------------------
Learn & try = Successful http://www.velocity-ro.com/# --try this privet server
Image

Post Reply