Jump to content
  • 1

Request Custom Refining System


JulianD

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/27/16
  • Last Seen:  

Greetings community,

 

I'm running a Ragnarok project which I will be releasing in some time, and I was planning to have up to Level 5 and Level 6 Weapons and Shields.

So, first, I came up to think about how can I do that, so I realized I can't modify source to have 'em. Or at least, I don't know how to do it.
But, it's okay, that's not the problem, because I have found that making a script which increase atk or matk would work, depending on the weapon or defense or damage taken depending on armor or shield.

So, I added this to item scripts: (one by one)

Spoiler

All kind of weapons:

bonus2 bAddRace,RC_All,(getrefine()*3);                 #Weapon Level 1 - +3% dmg for each refine.
bonus2 bAddRace,RC_All,(getrefine()*6);                 #Weapon Level 2 - +6% dmg for each refine.
bonus2 bAddRace,RC_All,(getrefine()*9);                 #Weapon Level 3 - +9% dmg for each refine.
bonus2 bAddRace,RC_All,(getrefine()*12);               #Weapon Level 4 - +12% dmg for each refine.
bonus2 bAddRace,RC_All,(getrefine()*15);               #Weapon Level 5 - +15% dmg for each refine.
bonus2 bAddRace,RC_All,(getrefine()*18);               #Weapon Level 6 - +18% dmg for each refine.

Staves, Rods & Books:

bonus2 bMagicAddRace,RC_All,(getrefine()*3);                 #Weapon Level 1 - +3% magic dmg for each refine.
bonus2 bMagicAddRace,RC_All,(getrefine()*6);                 #Weapon Level 2 - +6% magic dmg for each refine.
bonus2 bMagicAddRace,RC_All,(getrefine()*9);                 #Weapon Level 3 - +9% magic dmg for each refine.
bonus2 bMagicAddRace,RC_All,(getrefine()*12);               #Weapon Level 4 - +12% magic dmg for each refine.
bonus2 bMagicAddRace,RC_All,(getrefine()*15);               #Weapon Level 5 - +15% magic dmg for each refine.
bonus2 bMagicAddRace,RC_All,(getrefine()*18);               #Weapon Level 6 - +18% magic dmg for each refine.

Alright, that works good so far, has nothing to do with the actual weapon level that would be a max of Weapon Level 4 on item_db.
I also modified refine_db.yml so items won't gain any bonus at all by themselves through refining process. So refine_db.yml has ZERO (0) atk or def bonus on all cases.
For armors and shields I used another scripts so it would be a balanced thing:

Spoiler

{ .@r = getrefine(); if(.@r>=1) { bonus2 bSubRace,RC_All,3; } if(.@r>=6) { bonus2 bSubRace,RC_All,4; } if(.@r>=11) { bonus2 bSubRace,RC_All,5; } if(.@r>=16) { bonus2 bSubRace,RC_All,6; } if(.@r=20) { bonus2 bSubRace,RC_All,7; } }               #Shield Level 1 // +1 to +5 =3% // +6 to +10 =7% // +11 to +15 =12% // +16 to +19 =18% // +20 =25% total dmg taken reduction.
{ .@r = getrefine(); if(.@r>=1) { bonus2 bSubRace,RC_All,5; } if(.@r>=6) { bonus2 bSubRace,RC_All,6; } if(.@r>=11) { bonus2 bSubRace,RC_All,7; } if(.@r>=16) { bonus2 bSubRace,RC_All,8; } if(.@r=20) { bonus2 bSubRace,RC_All,9; } }               #Shield Level 2 // +1 to +5 =5% // +6 to +10 =11% // +11 to +15 =18% // +16 to +19 =26% // +20 =35% total dmg taken reduction.
{ .@r = getrefine(); if(.@r>=1) { bonus2 bSubRace,RC_All,7; } if(.@r>=6) { bonus2 bSubRace,RC_All,8; } if(.@r>=11) { bonus2 bSubRace,RC_All,9; } if(.@r>=16) { bonus2 bSubRace,RC_All,10; } if(.@r=20) { bonus2 bSubRace,RC_All,11; } }               #Shield Level 3 // +1 to +5 =7% // +6 to +10 =15% // +11 to +15 =24% // +16 to +19 =34% // +20 =45% total dmg taken reduction.
{ .@r = getrefine(); if(.@r>=1) { bonus2 bSubRace,RC_All,9; } if(.@r>=6) { bonus2 bSubRace,RC_All,10; } if(.@r>=11) { bonus2 bSubRace,RC_All,11; } if(.@r>=16) { bonus2 bSubRace,RC_All,12; } if(.@r=20) { bonus2 bSubRace,RC_All,13; } }               #Shield Level 4 // +1 to +5 =9% // +6 to +10 =19% // +11 to +15 =30% // +16 to +19 =42% // +20 =55% total dmg taken reduction.
{ .@r = getrefine(); if(.@r>=1) { bonus2 bSubRace,RC_All,11; } if(.@r>=6) { bonus2 bSubRace,RC_All,12; } if(.@r>=11) { bonus2 bSubRace,RC_All,13; } if(.@r>=16) { bonus2 bSubRace,RC_All,14; } if(.@r=20) { bonus2 bSubRace,RC_All,15; } }               #Shield Level 5 // +1 to +5 =11% // +6 to +10 =23% // +11 to +15 =36% // +16 to +19 =50% // +20 =65% total dmg taken reduction.
{ .@r = getrefine(); if(.@r>=1) { bonus2 bSubRace,RC_All,13; } if(.@r>=6) { bonus2 bSubRace,RC_All,14; } if(.@r>=11) { bonus2 bSubRace,RC_All,15; } if(.@r>=16) { bonus2 bSubRace,RC_All,16; } if(.@r=20) { bonus2 bSubRace,RC_All,17; } }               #Shield Level 6 // +1 to +5 =13% // +6 to +10 =27% // +11 to +15 =42% // +16 to +19 =58% // +20 =75% total dmg taken reduction.

Spoiler

{ .@r = getrefine(); if(.@r>=1) { bonus bDefRate,5; } if(.@r>=6) { bonus bDefRate,10; } if(.@r>=11) { bonus bDefRate,15; } if(.@r>=16) { bonus bDefRate,15; } if(.@r=20) { bonus bDefRate,25; } }               #Any Piece of Armor // +1 to +5 =5% // +6 to +10 =15% // +11 to +15 =30% // +16 to +19 =45% // +20 =70% total armor/hard def % bonus.

You can upgrade 4 pieces of equipment (Headgear, Armor, Garment & Shield) to +20
Resulting in a total bonus of:               #4 Pieces of Armor // +1 to +5 =20% // +6 to +10 =60% // +11 to +15 =120% // +16 to +19 =180% // +20 =280% total armor/hard def % bonus.

Alright, I've tested those scripts and are working perfectly, values and that all works for the server class, mobs and other setups. Damage are balanced between players, mob and other players and when I do upgrade the items, bonuses are working just fine.

So, the purpose of this post is about the refining NPCs. 'Cause I want the Blacksmiths NPCs to be able to refine up to Level 5 and 6 weapons and shields. As the emulator can't read those values, I thought about making a whole new NPC that read for the items IDs (I would add one by one) and then returning those values as a custom way to read Item Level.
Also, custom upgrade rates are needed for this, 'cause refine_db.yml won't read  level 5 or 6, so I thought about making the npc pick a random number from 1 to 100.

For example:
-Blacksmith NPC first read the item ID to check its "item level" which would then lead to another part of the script:

if item id (1103,1106,1125,1127,1135) Those are weapons level 1. goto R_WeaponLevel1
if item id (1116,1117,1124) 
Those are weapons level 3. goto R_WeaponLevel3

if item id (1138,1140) Those are weapons level 6. goto R_WeaponLevel6

if item id (2102) Guard goto R_ShieldLevel1

if item id (2148) Rosa Shield goto R_ShieldLevel6

if item id (2302) Cotton Shirt goto R_ArmorLevel1

if item id (2342) Legion Plate Armor goto R_ArmorLevel6

At the end we'll have R_WeaponLevel1, R_WeaponLevel2, R_WeaponLevel3, R_WeaponLevel4, R_WeaponLevel5, R_WeaponLevel6, R_ShieldLevel1, R_ShieldLevel2, R_ShieldLevel3, R_ShieldLevel4, R_ShieldLevel5, R_ShieldLevel6, R_ArmorLevel1, R_ArmorLevel2, R_ArmorLevel3, R_ArmorLevel4, R_ArmorLevel5, R_ArmorLevel6.

-Now NPC would ask for the upgrade items and zeny required to do the upgrade attempt:

Spoiler

Items needed for refining:
Weapons:    /    Lv1 Phracon    /    Lv2 Emveretarcon    /    Lv3 Rough Oridecon    /    Lv4 Oridecon    /    Lv5 Bradium    /    Lv6 Refined Bradium
Armors:        /    Lv1 Iron     /    Lv2 Steel            /    Lv3 Rough Elunium    /    Lv4 Elunium        /    Lv5 Carnium /    Lv6 Carnium
Shields:    /    Lv1 Iron     /    Lv2 Steel            /    Lv3 Rough Elunium    /    Lv4 Elunium        /    Lv5 Carnium /    Lv6 Carnium
Zeny required:
Weapons:    /    Lv1 1000    /    Lv2 2200    /    Lv3 4400    /    Lv4 8800    /    Lv5 17600    /    Lv6 31700
Armors:        /    Lv1 800    /    Lv2 1760    /    Lv3 3520   /    Lv4 7040    /    Lv5 14080    /    Lv6 25360
Shields:     /    Lv1 1500    /    Lv2 3300    /    Lv3 6600    /    Lv4 13200    /    Lv5 26400    /    Lv6 47550

-Now that NPC checked for the items and zeny, it would probably check item's current upgrade level. (I don't know how's that on script language)

-Then depending on +x current upgrade, it would pick a random number from 1 to 100 depending on these customs rates I've made so far: (remember the numbers colors to reference examples given down)

Spoiler

Refine Level:        +1    +2    +3    +4    +5    +6    +7    +8    +9    +10    +11    +12    +13    +14    +15    +16    +17    +18    +19    +20
Armor & Shield:        100    100    100    100    100    95    90    85    80    75    70    65    60    55    50    45    40    35    30    25
Weapon Level 1:        100    100    100    100    100    100    100    100    100    100    95    90    85    80    75    70    65    60    55    50
Weapon Level 2:        100    100    100    100    100    100    100    100    95    90    85    80    75    70    65    60    55    50    45    40
Weapon Level 3:        100    100    100    100    100    100    95    90    85    80    75    70    65    60    55    50    45    40    35    30
Weapon Level 4:        100    100    100    100    100    95    90    85    80    75    70    65    60    55    50    45    40    35    30    25
Weapon Level 5:        100    100    100    100    95    90    85    80    75    70    65    60    55    50    45    40    35    30    25    20
Weapon Level 6:        100    100    100    95    90    85    80    75    70    65    60    55    50    45    40    35    30    25    20    15

So, if we're upgrading for instance a #1138 which is Mysteltainn (Level 6 Sword) from +6 to +7, if the npc picks a number from 1 to 80 upgrade will result in success, but if it picks from 81 to 100 then the upgrade would fail. NPC would take Refined Bradium and 31700z. After this, if success, npc can do @refine 2 +1 (As if GM command)

If we're upgrading #2148 which is Rosa Shield (Level 6 Shield) from +15 to +16, the npc would pick a number, if its from 1 to 45 upgrade will result in success, but if it picks from 46 to 100 then the upgrade would fail. NPC would take Carnium and 31700z. After this, if success, npc can do @refine 32 +1 (As if GM command)

If we're upgrading #2302 which is Cotton Shirt (Level 1 Armor) from +19 to +20, the npc would pick a number, if its from 1 to 25 upgrade will result in success, but if it picks from 26 to 100 then the upgrade would fail. NPC would take Carnium and 31700z. After this, if success, npc can do @refine 16 +1 (As if GM command)

 

So that's the NPC I do want for refining but I do not know how to do it. If you have read so far, let me thank you for your spent time and thank you as well if you do decide to help me making the script or at least telling me how can I do it.

Thank you very much, I appreciate it.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Maybe if you able to do src mod, it'll be easier later. but for scripting, there are steps that crossed in my mind (not tested of course!!)

  1. You need to define the items by ID with custom levels,
  2. define the rates,
  3. define the cost,
  4. edit the refine NPC(s)

So here's the gist https://gist.github.com/cydh/75f5071a0691d393d3cd1c08d57789be

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/27/16
  • Last Seen:  

2 hours ago, Cydh said:

Maybe if you able to do src mod, it'll be easier later. but for scripting, there are steps that crossed in my mind (not tested of course!!)

  1. You need to define the items by ID with custom levels,
  2. define the rates,
  3. define the cost,
  4. edit the refine NPC(s)

So here's the gist https://gist.github.com/cydh/75f5071a0691d393d3cd1c08d57789be

 

That's awesome job you did man, I've been checking the gist, trying to analyze all those codes you made, I'm afraid I did understand like 40% of all things on there.
I'm going to do some research about the commands and variables on there, 'cause I don't really know how setarray or .@commands work.
I'm not really clear about what to do when you say "try just patch" the refine.txt npc. I just add those lines in green and delete red ones?
Sorry if I'm not that smart enough, but I'm a rookie on these scripting things.

EDIT1: I attached my refine_db.yml because I think I have to give values on there based on the script you sent me? I mean, if you look at my file, all of my values are in zeros. Do I have to put values on refine_db for normal lv1 shields lv1 armors and lv1to-v4 weapons as usual?
Or can I do it in with:

$WeaponL1_Zeny = 1000;
$WeaponL1_Material = 1010;
setarray $WeaponL1[0],1103;

setarray $WeaponL1_Rates[0],100,100,100,100,95,90,85,80,75,70,65,60, 55,50,45,40,35,30,25,20;


$ArmorL1_Zeny = 800
$ArmorL1_Material = 998;
setarray $ArmorL1[0],2302;

setarray $ArmorL1_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65, 60,55,50,45,40,35,30,25;


...and so on with the rest of them?

EDIT2: I added the script but gives me this error:

image.png.da84fb82b17f16f074d62fa58958184b.png

This is the file:

Spoiler

-    script    InitCustomLevels    -1,{
OnInit:
    $WeaponL5_Zeny = 17600;
    $WeaponL5_Material = 6224;
    setarray $WeaponL5[0],1139;
    $WeaponL6_Zeny = 31700;
    $WeaponL6_Material = 6090;
    setarray $WeaponL6[0],1138,1140;
    $ArmorL2_Zeny = 1760;
    $ArmorL2_Material = 999;
    setarray $ArmorL2[0],2339;
    $ArmorL3_Zeny = 3520;
    $ArmorL3_Material = 757;
    setarray $ArmorL3[0],0;
    $ArmorL4_Zeny = 7040;
    $ArmorL4_Material = 985;
    setarray $ArmorL4[0],0;
    $ArmorL5_Zeny = 14080;
    $ArmorL5_Material = 6223;
    setarray $ArmorL5[0],0;
    $ArmorL6_Zeny = 25360;
    $ArmorL6_Material = 6223;
    setarray $ArmorL6[0],0;
    $ShieldL2_Zeny = 3300;
    $ShieldL2_Material = 999;
    setarray $ShieldL2[0],2339;
    $ShieldL3_Zeny = 6600;
    $ShieldL3_Material = 757;
    setarray $ShieldL3[0],0;
    $ShieldL4_Zeny = 13200;
    $ShieldL4_Material = 985;
    setarray $ShieldL4[0],0;
    $ShieldL5_Zeny = 26400;
    $ShieldL5_Material = 6223;
    setarray $ShieldL5[0],0;
    $ShieldL6_Zeny = 47550;
    $ShieldL6_Material = 6223;
    setarray $ShieldL6[0],0;
    setarray $WeaponL5_Rates[0],100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25,20;
    setarray $WeaponL6_Rates[0],100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25,20,15;
    setarray $ArmorL2_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ArmorL3_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ArmorL4_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ArmorL5_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ArmorL6_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ShieldL2_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ShieldL3_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ShieldL4_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ShieldL5_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
    setarray $ShieldL6_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25;
end;
}

// callfunc("F_isCustomLevels",.@typevar$,.@levelvar,.@zenyvar,.@materialvar);
// .@typevar$ this variable will be set to "Armor","Weapon","Shield"
// .@levelvar this variable will be set to custom equip level
// .@zenyvar this variable will be set to zeny requirement for refining. or you can use getd later: getd("$"+.@typevar$.+""+.@levelvar)
// .@materialvar this variable will be set to item id of material for refining. or you can use getd later: getd("$"+.@typevar$.+""+.@levelvar)

function    script    F_isCustomLevels    {
    .@itemid = getarg(0,0);
    .@n = getargcount();
    .@zenyvar = (.@n == 3);
    .@materialvar = (.@n == 4);

    .@type$ = "Weapon";
    for (.@lv = 5; .@lv <= 6; .@lv++) {
        .@str$ = "$"+.@type$+"L"+.@lv;
        for (.@i = 0; .@i < getarraysize(getd(.@str$)); .@i++) {
            if (getd(.@str$+"["+.@i+"]") == .@itemid) {
                set getarg(0),.@type$;
                set getarg(1),.@lv;
                if (.@zenyvar) set getarg(2),getd(.@str$+"_Zeny");
                if (.@materialvar) set getarg(3),getd(.@str$+"_Material");
                return 1;
            }
        }
    }
    .@type$ = "Armor";
    for (.@lv = 2; .@lv <= 6; .@lv++) {
        .@str$ = "$"+.@type$+"L"+.@lv;
        for (.@i = 0; .@i < getarraysize(getd(.@str$)); .@i++) {
            if (getd(.@str$+"["+.@i+"]") == .@itemid) {
                set getarg(0),.@type$;
                set getarg(1),.@lv;
                if (.@zenyvar) set getarg(2),getd(.@str$+"_Zeny");
                if (.@materialvar) set getarg(3),getd(.@str$+"_Material");
                return 1;
            }
        }
    }
    .@type$ = "Shield";
    for (.@lv = 2; .@lv <= 6; .@lv++) {
        .@str$ = "$"+.@type$+"L"+.@lv;
        for (.@i = 0; .@i < getarraysize(getd(.@str$)); .@i++) {
            if (getd(.@str$+"["+.@i+"]") == .@itemid) {
                set getarg(0),.@type$;
                set getarg(1),.@lv;
                if (.@zenyvar) set getarg(2),getd(.@str$+"_Zeny");
                if (.@materialvar) set getarg(3),getd(.@str$+"_Material");
                return 1;
            }
        }
    }
    return 0;
}

 

Edited by JulianD
File attached and added info.
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

51 minutes ago, JulianD said:

That's awesome job you did man, I've been checking the gist, trying to analyze all those codes you made, I'm afraid I did understand like 40% of all things on there.
I'm going to do some research about the commands and variables on there, 'cause I don't really know how setarray or .@commands work.
I'm not really clear about what to do when you say "try just patch" the refine.txt npc. I just add those lines in green and delete red ones?
Sorry if I'm not that smart enough, but I'm a rookie on these scripting things.

Edit1: I attached my refine_db.yml because I think I have to give values on there based on the script you sent me? I mean, if you look at my file, all of my values are in zeros. Do I have to put values on refine_db for normal lv1 shields lv1 armors and lv1to-v4 weapons as usual?
Or can I do it in with:

$WeaponL1_Zeny = 1000;
$WeaponL1_Material = 1010;
setarray $WeaponL1[0],1103;

setarray $WeaponL1_Rates[0],100,100,100,100,95,90,85,80,75,70,65,60, 55,50,45,40,35,30,25,20;


$ArmorL1_Zeny = 800
$ArmorL1_Material = 998;
setarray $ArmorL1[0],2302;

setarray $ArmorL1_Rates[0],100,100,100,100,100,95,90,85,80,75,70,65, 60,55,50,45,40,35,30,25;


...and so on with the rest of them?

Yes, the red lines are meant be removed, and the green ones are added. Don't worry, at first I never know what is patch/diff, so I did that manually. As long as you follow it, you did it right (until the console tell you if any error xd)

setarray and .@commands (well it's not command, it's variable), then first open this file doc/script_commands.txt (you also have one in ur local) the press  CTRL+F  then type  *setarray . OK, learn from it. Then u can learn about  getd .

You don't need change anything in refine_db.yml for your desired custom level & refine. Weapon's level never be more than 4, armors always be one level, you can't change anything. Even you try to put WeaponLv5 in that refine_db.yml, it gives nothing. If you try to adjust wlv in item_db and gives "funny" values, it will errors you.

In that script, I only put the values that aren't supported by refine_db.yml. So, only for WeaponL5, WeaponL6, your custom level armors and shields (ArmorL2, ArmorL3, ArmorLN, ShieldL2, ShieldL3, ShieldLN).

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/27/16
  • Last Seen:  

3 minutes ago, Cydh said:

You don't need change anything in refine_db.yml

What about the normal values? I have all of these on zero. Must have impact whenever the npc try to do refine, it is not set even the required items or zeny, so I guess blacksmith'll do nothing.

1 hour ago, JulianD said:

EDIT2: I added the script but gives me this error:

Please help me with Edit2 Above. I don't see any mistake.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

27 minutes ago, JulianD said:

What about the normal values? I have all of these on zero. Must have impact whenever the npc try to do refine, it is not set even the required items or zeny, so I guess blacksmith'll do nothing.

Please help me with Edit2 Above. I don't see any mistake.

1. So then just set back the value to default, just set 0 for StatsPerLevel, RandomBonusStartLevel, and RandomBonusValue (and Bonus if any)

2. Try retype the error line (delete the line, retype manually). it must be strange whitespace while you copy it (better don't use Notepad, at least Notepad++ https://notepad-plus-plus.org/download/v7.5.6.html

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/27/16
  • Last Seen:  

9 minutes ago, Cydh said:

2. Try retype the error line (delete the line, retype manually). it must be strange whitespace while you copy it (better don't use Notepad, at least Notepad++ https://notepad-plus-plus.org/download/v7.5.6.html

I did now, no error shown on console, but when I do try to upgrade, Tirfing (ID:1139) still acts as a lv 4 weapon:

image.png.23edef35905d343e7680a08eae43472e.png 

OnInit:
    $WeaponL5_Zeny = 17600;
    $WeaponL5_Material = 6224;
    setarray $WeaponL5[0],1139;
    setarray $WeaponL5_Rates[0],100,100,100,100,95,90,85,80,75,70,65,60,55,50,45,40,35,30,25,20;
end;
}

Edited by JulianD
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Ok, here tested. Because I like your idea, I have to try this myself.

Look again at my gist https://gist.github.com/cydh/75f5071a0691d393d3cd1c08d57789be. The changes are in

  1. The lines after  // Init dummy val 
  2. All inside  F_isCustomLevels  function



image.png.901262c855b5bfd157f4f90691a1f824.png

image.png.30085807cf86d784bea130a4ffe05be0.png

 

Well, I hope you learning from this, because you need to take care other refiner that maybe not using refine.txt NPC file xd

Edited by Cydh
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/27/16
  • Last Seen:  

19 hours ago, Cydh said:

All inside  F_isCustomLevels  function

Let me ask if I did understand clearly... I must add that function call on the main refiner NPC? Or what do I have to do?
I'm really happy that you made it so far, I'm so glad and grateful for your help.

EDIT: I think it's because I changed npc/merchants/refine.txt not npc/re/merchants/refine.txt... my server is running renewal, so I think that could be it... I'll see it this night, gotta go to work. I'll let you know if I can do it. ?

EDIT2: So, I can't make it work... I don't get what am I doing wrong ?
Does that line have to be commented with //?

// callfunc("F_isCustomLevels",.@itemid,.@typevar$,.@levelvar,.@zenyvar,.@materialvar);
Edited by JulianD
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...