Configurable Refiner

Getting this error on running the script, Please help!

@@KirieZ

Code:
[Error]:  Loading NPC file: npc/custom/refc.txtscript error on npc/custom/refc.txt line 35    script:add_word: invalid word. A word consists of undercores and/or alphanumeric characters, and valid variable prefixes/postfixes.    30 :	    mes "know what you want me to refine.";    31 :	    next;    32 :    33 :	    setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";    34 :	    .@menu$ = "";*   35 :	    for(.@i = 1; .@i <= 10; '+'+.@i) {    36 :			    if(getequipisequiped(.@i)) {    37 :					    .@menu$ += .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";    38 :					    .@equipped = 1;    39 :			    }    40 :			    .@menu$ += ":"; 
 
Last edited by a moderator:
@@rector Seems like you've modified the code, the problem is probably at '+'+.@i , it should be ++.@i (or as originally, .@i++)

 
@@KirieZ No effect
default_sad.png


 
@@KirieZ

I got this error now and npc is showing up but not refining.

Code:
[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: set (2 parameters):[Debug]: Data: variable name='.AllowMultipleRefines' index=0[Debug]: Data: variable name='true'[Debug]: Source (NPC): Refiner at prontera (145,194)[Warning]: script_get_val: cannot access player variable 'true', defaulting to 0 
 
@@rector If I've checked it right, this seems like a revision from august 2013, true and false constants were added on november 2013, but even if you manually add them you'll probably run into other problems because of a too old version, you should update it,

I can't help too much with these old revisions, but at least for true and false, you have to add this commit to your emulator: https://github.com/HerculesWS/Hercules/commit/463cbc94ea4124a35ad5bf3222b510ad979d8805

 
@@KirieZ That solution worked thanks a ton !!
default_biggrin.png


@@rector If I've checked it right, this seems like a revision from august 2013, true and false constants were added on november 2013, but even if you manually add them you'll probably run into other problems because of a too old version, you should update it,

I can't help too much with these old revisions, but at least for true and false, you have to add this commit to your emulator: https://github.com/HerculesWS/Hercules/commit/463cbc94ea4124a35ad5bf3222b510ad979d8805
 
@@Vlync

hello vlyn. can u add a refiner script where there is a reversion of a  refined item.

example

i'm going to refine my +4 composite bow to +5

there is a 5% chance that it will go back to +0

and there is a 10% chance that it will go back to +3

and 10% chance that it will stay as it is

and 75% chance that it will go to +5..

 
Last edited by a moderator:
@@xlaws27

I made it already together with another request and I'm planning to release it soon, but I have yet to test, as I rewrote most of the code.

Maybe until the end of the week it's done.

This will be the new setting:

// The chance of each special fail result to occur.// If none of them happen, item will be destroyed.// 100 = 100%setarray .FailResults[0], 30, // Stay as is 40, // Go down one level 25; // Go down to +0
and if none of the special fails occur, item will break.

 
@@xlaws27

I made it already together with another request and I'm planning to release it soon, but I have yet to test, as I rewrote most of the code.

Maybe until the end of the week it's done.

This will be the new setting:

// The chance of each special fail result to occur.// If none of them happen, item will be destroyed.// 100 = 100%setarray .FailResults[0], 30, // Stay as is 40, // Go down one level 25; // Go down to +0
and if none of the special fails occur, item will break.
thank you!! ill be waiting for this.

 
I've submited the new version, waiting for review.

 
I've submited the new version, waiting for review.
im very thankful for this...

i was waiting for this and i just saw it now.

can you help me to configure this refiner? i tried it but i dont know if it will work.

i want my refiner just to be an official refiner(normal refiner) with a capability

to do fail results. but i dont know how to configure this its confusing

according to http://ratemyserver.net/index.php?page=misc_table_refine

on +7 level 1 weapon there's a 60% chance that you can refine it to +8

so what if i put    40, // Stay as is so what's gonna happen?

      50, // Go down one level

60% chance to make it to +8

40% chance to stay as is

50% chance to go down one level..???

because on + 9 level 4 weapon there's a 10% chance that you can refine it to +10

that's why i put 40 and 50

and

.DisplayRefineInfo = true;  // Should NPC display information about

                 // refine (such as success chance)

is it possible for you to include the FailResults?

and also i got this warning or debug

hope you could fix it

04LCOoB.png


 
Last edited by a moderator:
@@xlaws27 about the debug, I'll check as soon as possible, do you know exactly when it appears? are you using hercules or rAthena?

I'll include the fail possibilities soon, I would like to add it and fix this debug before submiting a new version.

About the fail settings, it works this way:

Let's say:

--- Refine Success Chance: 60%

--- Fail Results: (they doesn't have to sum any specific value)

----- Stay as is : 40%

----- Go down 1 level : 30%

----- Go down to +0: 10%

By default, a chance is calculated by a random value between 0 and 100, if this value is smaller or equal to the sucess chance, it's a success if not, it is a fail. (this do make sense, as a chance of 60% is 60 numbers in a total of 100)

When fail results are set, it will be this way:

--- Try to refine (60%)

----- Success: Done

----- Fail:

-------- Calculates chance to stay as is

-------- Calculates chance to go down one level

-------- Calculates chance to go to +0

-------- Else: break item

Now I'm thinking if it would be better to make an array where you write fail possibilities
default_tongue.png


like: setarray .fails, 1, 1, 1, 2, 2, 3, 3, 3, 4; (total: 10 items)

so you would have 30% to break (1), 20% to stay as is (2), 30% to go down 1 level (3), 10% chance to go to +0 (4)

I'm accepting suggestions about this 
default_biggrin.png


I hope this makes these settings clear

 
@@xlaws27 about the debug, I'll check as soon as possible, do you know exactly when it appears? are you using hercules or rAthena?

I'll include the fail possibilities soon, I would like to add it and fix this debug before submiting a new version.

About the fail settings, it works this way:

Let's say:

--- Refine Success Chance: 60%

--- Fail Results: (they doesn't have to sum any specific value)

----- Stay as is : 40%

----- Go down 1 level : 30%

----- Go down to +0: 10%

By default, a chance is calculated by a random value between 0 and 100, if this value is smaller or equal to the sucess chance, it's a success if not, it is a fail. (this do make sense, as a chance of 60% is 60 numbers in a total of 100)

When fail results are set, it will be this way:

--- Try to refine (60%)

----- Success: Done

----- Fail:

-------- Calculates chance to stay as is

-------- Calculates chance to go down one level

-------- Calculates chance to go to +0

-------- Else: break item

Now I'm thinking if it would be better to make an array where you write fail possibilities
default_tongue.png


like: setarray .fails, 1, 1, 1, 2, 2, 3, 3, 3, 4; (total: 10 items)

so you would have 30% to break (1), 20% to stay as is (2), 30% to go down 1 level (3), 10% chance to go to +0 (4)

I'm accepting suggestions about this 
default_biggrin.png


I hope this makes these settings clear
it happens when i choose an equipment to refine.

 im using the latest hercules

okay i understand now thnk you.

im looking forward to your updates!!

keep up the good work!!

 
hiya.. @@KirieZ

i just test ur script.

i found something strange..

1. with refine multiple times, i choose 10 times to refine 0 vanargand helm. and viola, i get +10 vanargand helm without fail

2. with safe item, when i go to +8 > +9, or +9 > +10, it say i can just using safe to 7 armor sertificate

maybe you can fix it? ><

its great script btw ^^

keep it up!

 
hiya.. @@KirieZ

i just test ur script.

i found something strange..

1. with refine multiple times, i choose 10 times to refine 0 vanargand helm. and viola, i get +10 vanargand helm without fail

2. with safe item, when i go to +8 > +9, or +9 > +10, it say i can just using safe to 7 armor sertificate

maybe you can fix it? ><

its great script btw ^^

keep it up!
I'll check this as soon as possible, I believe on wednesday I'll have some time so I can do it. Thanks!

 
@@Vlync and everybody

Sorry I'm having lot of personal things (college tasks/exams) to do and not being able to check this, I'll update when possible.

 
Back
Top