Issue information

Issue ID
#4733
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Jan 28, 2011 1:05
Last Post
Hercules Elf Bot
Jan 28, 2011 1:05
Confirmation
N/A

Hercules Elf Bot - Jan 28, 2011 1:05

Originally posted by [b]Mara[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4733

I tried to make a repair NPC but I don't know why the NPC didn't repair all the items broken.

I got the same result with this code
CODE
prontera,150,150,5    script        Reparador    63,{
    for(set(.@_w,1);.@_w<11;set(.@_w,.@_w+1))
    {
        if(getbrokenid(1)==NULL)break; //checks if any item is broken || i tried also without this line
        repair(.@_w);
    }
    end();
}

and this one:
CODE
prontera,150,150,5    script        Reparador    63,{
    repair(1);
    repair(2);
    repair(3);
    repair(4);
    repair(5);
    repair(6);
    repair(7);
    repair(8);
    repair(9);
    repair(10);
    end();
}

There's any problem with the command and using it in once?
Look, in all the tests, when the math ables to, half of items was repaired, otherwise the items repaired are intercalary
With 2, I got 1 item repaired
With 7, I got 3 not repaired and 4 repaired. (1st repaired, 2nd not, 3rd repaired, 4th not, 5th repaired, 6th not, 7th repaired)
With 5, 1st repaired, 2nd not, 3rd repaired, 4th not, 5th repaired.

But, when using it as the official NPC it works.

Sorry for my English :X

This post has been edited by Mara: Jan 27 2011, 05:44 PM