Page 1 of 1
repairing
Posted: Mon Jan 10, 2011 2:37 am
by mayainverse
okso last few nights i have been in this really easy grind spot. mobs are all neutral so no chance of gang up. its far in corner of map so players never really go there so wont die to pk. and then the mobs themselves barly hit hard at all never drop below 95% almost.
so really only problem I am having now when I wake up in morning both of my weapons are 0% dura hitting for 5dmg. how can i make them repair. I know there is a repair hammer(no not golden just normal one) where can i get them and how can i make bot use at say 40% dura.
Re: repairing
Posted: Mon Jan 10, 2011 3:54 am
by lisa
I usually just have in a run to the nearest repair guy when grinding overnight.
aside from that you can try using
Code: Select all
inventory:getMainHandDurability();
Not sure on the repair hammer you mentioned.
Re: repairing
Posted: Mon Jan 10, 2011 6:01 am
by rock5
The only repair hammers I'm aware of are in the item shop.
Re: repairing
Posted: Mon Jan 10, 2011 8:43 am
by jduartedj
there is a "Master's Simple Repair Hammer" I get these from minigames and stuff like goblin run and malatina. maybe doing something like:
Code: Select all
inventory:useItem("Master's Simple Repair Hammer");
with the code posted by lisa to check dura.
Re: repairing
Posted: Mon Jan 10, 2011 8:52 am
by top1
There are at least 3 more
what you mean is
http://romdata.getbuffed.com/?i=201967
Simple Repair Hammer - Reps simply one item
drops in various malatina and other minigames! (high level!)
should be cheaper than ~10k in the ah
http://romdata.getbuffed.com/?i=201014
Master's Simple Repair Hammer - Reps all items
can get this from the goblin mini game (at the end)
and sometimes in some item shop bundles!
and then finaly there is the
http://romdata.getbuffed.com/?i=203576
Grand Golden Repair Hammer - Golden Repair Hammer for EVERY EQUIP u wear...
Guess where u can get this... -> only sometimes at the itemshop often in bundles!
I would prefer the rep waypoints too...
but if that shouldnt be possible for some reason put the hammer in a slot
and make a script to use it
Code: Select all
local hddura = inventory:getMainHandDurability();
printf("Durability:%s\n", hddura);
if( 20 >= hddura ) then
first pick t up from the slot where it is then klick on slot 16 (should be mainhand) with it
Re: repairing
Posted: Tue Jan 11, 2011 5:48 am
by mayainverse
oh you can do waypoints to a vendor for repair? sounds pretty complicated. can you make it sell stuff too? if so how only certain types of stuff. dont want to sell the important things ha!
Re: repairing
Posted: Tue Jan 11, 2011 6:10 am
by jduartedj
mayainverse wrote:oh you can do waypoints to a vendor for repair? sounds pretty complicated. can you make it sell stuff too? if so how only certain types of stuff. dont want to sell the important things ha!
Yes, Just use "player:merchant" and check out autosell options! Browsing the wiki helps
Re: repairing
Posted: Tue Jun 21, 2016 4:02 pm
by beanybabe
I try to use this to repair with the master simple repair hammer but for some reason it keeps repairing and using up all the hammers. I am not seeing were hammer is defined.
Code: Select all
if ( 50 > inventory:getMainHandDurability() ) then
if hammer > 0 then
cprintf(cli.lightred,"repairing ...");
inventory:useItem(201014);
cprintf(cli.yellow,"done!\n");
inventory:update();
else
cprintf(cli.lightred,"No repair hammers in bag!\n");
player:clearTarget();
player:sleep();
end
end
Re: repairing
Posted: Tue Jun 21, 2016 10:00 pm
by lisa
Code: Select all
if ( 50 > inventory:getMainHandDurability() ) then
if inventory:itemTotalCount(201014) > 0 then
cprintf(cli.lightred,"repairing ...");
inventory:useItem(201014);
cprintf(cli.yellow,"done!\n");
inventory:update();
else
cprintf(cli.lightred,"No repair hammers in bag!\n");
player:clearTarget();
player:sleep();
end
end
keep in mind that if its just a single use hammer that code won't repair the weapon because you need to then click the weapon to repair it. I am sure there is already working code posted for this.
Re: repairing
Posted: Tue Jun 21, 2016 10:14 pm
by lisa
I found the wp where that snippet of code came from, only took a few seconds in forum search.
http://www.solarstrike.net/phpBB3/viewt ... vel#p60248
Re: repairing
Posted: Wed Jun 22, 2016 1:43 pm
by kenzu38
beanybabe wrote:I try to use this to repair with the master simple repair hammer but for some reason it keeps repairing and using up all the hammers. I am not seeing were hammer is defined.
Looking at the code you posted, pretty sure that in that code, hammer is defined as:
Code: Select all
hammer = inventory:itemTotalCount(201014)
As to why, it keeps on repairing, I looked at inventory.lua, and it seems inventory:update() doesn't really update main hand durability as it only updates inventory slots 1 to 240. Equipment slots aren't included.
So the most likely cause is that inventory:update() in the code. You should use equipment:update() instead.
Re: repairing
Posted: Mon Jun 27, 2016 1:28 am
by beanybabe
You can get them running mini game ancient treasures or with honor from siege or guild castle games at stronghold castle in mercenary square. The token and diam shop have hammers.
lisa was right Rock posted the weapon code i put it in the onleave combat part of the profile. Just be warned if you bag gets full it cannot repair and the weapon get stuck in limbo so you may do a inventory check first.
Here is a link to his thread.
viewtopic.php?f=21&t=2870&p=42677&hilit ... and#p42677