LucianoCP

Members
  • Content Count

    50
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

Community Reputation

2 Neutral

About LucianoCP

  • Rank
    Santa Poring

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. open script_commands.txt in doc folder and search for "setquest", "checkquest" and "erasequest". Search for these things on rathena github too. You can learn by reading original scripts too.
  2. Hi guys, i'm using navigateto command and i'm stuck in a error. I want to navigate from CustomMapA through CustomMapB to ayo_in01, but i got the message that navi system was unable to find a path. If i try to navi from CustomMapA to CustomMapB, it works. If i try to navi from CustomMapB to ayo_in01, it also works. So, i need a help to know why it doesn't work when i have to get through another map. This is my navi_map_krpri.lub: { "CustomMapA", "Custom Map A", 5003, 60, 60 }, { "CustomMapB", "Custom Map B", 5003, 400, 400 }, (by the way, what this "5003" parameter should mean? This is my navi_link_krpri.lub: { "CustomMapA", 13506, 200, 99999, "CustomMapA_CustomMapB", "", 31, 2, "CustomMapB", 194, 230 }, { "CustomMapB", 13506, 200, 99999, "CustomMapB_CustomMapA", "", 194, 234, "CustomMapA", 31, 6 }, { "ayo_in01", 11932, 200, 99999, "Room_CustomMapB", "", 72, 173, "CustomMapB", 280, 159 }, { "CustomMapB", 11917, 200, 99999, "CustomMapB_Room", "", 280, 163, "ayo_in01", 76, 173 }, (need help to understand these parameters too) Is there another file i have to edit?
  3. By client edits you mean sprites? I'll check later, but i think that all archers classes, except ranger, doesn't have any "worg part" in their sprites. So i guess it needs only source edits. It's weird because the worg is functional, it just stay hidden. I changed ranger's sprite and warg mastery worked, so i guess it's just a source issue. Does anybody knows how to solve it?
  4. Hey, guys. What's up? So, i want to put worg skills in one equip that could be used by every class. When i do this, only in archer classes (archer, hunter, sniper, ranger) the worg appears. You see, in other classes it works, but it stays hidden. If i use skill RA_WUGMASTERY (2240) on every job except archer classes, the skill works but the worg stays hidden and i can tell he stays hidden because i can use worg skills like RA_WUGSTRIKE (2243) and it works, but the attack looks like coming from nowhere hahahahaha So, how can i turn the worg visible to all classes?
  5. Thanks, mate! Running correctly now. Here's the final code: - script Fishing_Exp -1,{ OnInit: setArray .FishingLvl[0], 1, 3800, 6200, 10400, 15200, 22900, 27100, 30000, 32500, 35700, 41300, 45000, 45800, 47600, 50300, 58700, 63900, 67100, 70300, 73500, 90600, 96200, 102700, 110200, 121400, 144700, 152900, 163100, 173300, 183500, 213500, 224700, 236000, 247200, 260700, 299800, 324800, 343600, 362300, 374800, 474400, 497000, 512100, 542200, 564800, 644300, 678200, 712100, 754500, 796900, 873100, 911900, 950600, 989400, 1028100, 1143300, 1199900, 1233800, 1279100, 1324300, 1486900, 1515900, 1603000, 1719200, 1806300, 2040300, 2244300, 2415900, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000; set .MaxFishingLvl, getarraysize(.FishingLvl); end; OnNPCKillEvent: if(fishing != 1 || FishingLvl >= .MaxFishingLvl) {end;} //the (fishing != 1) check let only fisher players to lvl up their fishing mastery. Need to put "set fishing,1" in your Fishing Teacher NPC. [email protected]_jexp = strmobinfo(7,killedrid); [email protected]_gained = [email protected]_jexp; [email protected]_lvl = strmobinfo(3,killedrid); [email protected]_dif = [email protected]_lvl - BaseLevel; if ([email protected]_dif >= 16) {set [email protected]_gained, [email protected]_gained*40;} if ([email protected]_dif == 15 || [email protected]_dif == 5) {set [email protected]_gained, [email protected]_gained*115;} if ([email protected]_dif == 14 || [email protected]_dif == 6) {set [email protected]_gained, [email protected]_gained*120;} if ([email protected]_dif == 13 || [email protected]_dif == 7) {set [email protected]_gained, [email protected]_gained*125;} if ([email protected]_dif == 12 || [email protected]_dif == 8) {set [email protected]_gained, [email protected]_gained*130;} if ([email protected]_dif == 11 || [email protected]_dif == 9) {set [email protected]_gained, [email protected]_gained*135;} if ([email protected]_dif == 10) {set [email protected]_gained, [email protected]_gained*140;} if ([email protected]_dif == 4) {set [email protected]_gained, [email protected]_gained*110;} if ([email protected]_dif == 3) {set [email protected]_gained, [email protected]_gained*105;} if ([email protected]_dif <= 2 && [email protected]_dif >= -5) {set [email protected]_gained, [email protected]_gained*100;} if ([email protected]_dif <= -6 && [email protected]_dif >= -10) {set [email protected]_gained, [email protected]_gained*95;} if ([email protected]_dif <= -11 && [email protected]_dif >= -15) {set [email protected]_gained, [email protected]_gained*90;} if ([email protected]_dif <= -16 && [email protected]_dif >= -20) {set [email protected]_gained, [email protected]_gained*85;} if ([email protected]_dif <= -21 && [email protected]_dif >= -25) {set [email protected]_gained, [email protected]_gained*60;} if ([email protected]_dif <= -26 && [email protected]_dif >= -30) {set [email protected]_gained, [email protected]_gained*35;} if ([email protected]_dif <= -31) {set [email protected]_gained, [email protected]_gained*10;} set [email protected]_gained,[email protected]_gained/100; set FishingExp, FishingExp + [email protected]_gained + 1; if(.FishingLvl[FishingLvl] <= FishingExp){ set FishingLvl, FishingLvl + 1; dispbottom "[Level Up] Congrats! Your Fishing level is now: "+FishingLvl; set FishingExp,0; } if(showmasteryexp) {dispbottom "Gained "[email protected]_gained+" ("+callfunc("get_decimal", [email protected]_gained*100,.FishingLvl[FishingLvl])+"%) mastery points.";} end; } function script get_decimal { [email protected] = getarg(0); [email protected] = getarg(1); [email protected] = getarg(2,2); // The amount of digits to keep after the dot [email protected] = pow(10, [email protected]); [email protected] = [email protected] / [email protected]; [email protected] = ([email protected] * [email protected] / [email protected]) % [email protected]; [email protected]$ = "" + [email protected]; if ([email protected]) return [email protected]$; // Removes trailing zeroes, for example: // With [email protected] set to 0, 5 / 2 will output 2.5 // With [email protected] set to 1, 5 / 2 will output 2.50 [email protected] = 1; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { [email protected] = [email protected] % 10; [email protected] = [email protected] / 10; if ([email protected]) { if ([email protected] == 0) continue; [email protected]$ = insertchar([email protected]$, [email protected] + "", 0); [email protected] = 1; } else { [email protected]$ = insertchar([email protected]$, [email protected] + "", 0); } } return [email protected]$ + "." + [email protected]$; } Here's an atcommand to set the dispbottom exp. Like @showexp, use @showmasteryexp to enable/disable it. - script showmasteryexp -1,{ OnInit: bindatcmd("showmasteryexp", "showmasteryexp::OnAtCmd"); end; OnAtCmd: if (showmasteryexp) { message strcharinfo(0),"Gained Mastery EXP will not be shown."; set showmasteryexp,0; } else { message strcharinfo(0),"Gained Mastery EXP is now shown."; set showmasteryexp,1; } end; }
  6. ok, the function is working, but i think the math is wrong. i have [email protected]_gained telling me the exp gained and i need to know what % this represents compared to the max (100%) exp at the .FishingLvl[FishingLvl] (let's call it X), so: .FishingLvl[FishingLvl] = 100 [email protected]_gained = X [email protected]_gained*100 = .FishingLvl[FishingLvl]*X X = ([email protected]_gained*100)/.FishingLvl[FishingLvl] Now, i think i need to run this math in the function... Because if i run at the callfunction, it goes to natural numbers?
  7. Thanks, mate. It worked, but the showed value is wrong. This is what i've made: dispbottom "Gained "[email protected]_gained+"("+callfunc("porcentagem", ([email protected]_gained*100)/.FishingLvl[FishingLvl])+") mastery points.",0; function script porcentagem { return (getarg(0) / 100)+"."+(((getarg(0) % 100) <= 9) ? "0" : "")+""+(getarg(0) % 100)+"%"; } I killed a mob who gives me 3% exp based on this code: dispbottom "Gained "[email protected]_gained+" ("+([email protected]_gained*100)/.FishingLvl[FishingLvl]+"%) mastery points."; I set the FishingLvl and JobLvl to 12 and this happens:
  8. Wow, just saw it now. I've made manual "if"s too. So, here's my code: - script Fishing_Exp -1,{ OnInit: setarray .FishingLvl[0], 1, 3800, 6200, 10400, 15200, 22900, 27100, 30000, 32500, 35700, 41300, 45000, 45800, 47600, 50300, 58700, 63900, 67100, 70300, 73500, 90600, 96200, 102700, 110200, 121400, 144700, 152900, 163100, 173300, 183500, 213500, 224700, 236000, 247200, 260700, 299800, 324800, 343600, 362300, 374800, 474400, 497000, 512100, 542200, 564800, 644300, 678200, 712100, 754500, 796900, 873100, 911900, 950600, 989400, 1028100, 1143300, 1199900, 1233800, 1279100, 1324300, 1486900, 1515900, 1603000, 1719200, 1806300, 2040300, 2244300, 2415900, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000; set .MaxFishingLvl, getarraysize(.FishingLvl); end; OnNPCKillEvent: if (fishing !=1 || FishingvLvl >= .MaxFishingLvl) {end;} //this will check if he made a quest to learn the mastery [email protected]_jexp = strmobinfo(7,killedrid); [email protected]_gained = [email protected]_jexp; [email protected]_lvl = strmobinfo(3,killedrid); [email protected]_dif = [email protected]_lvl - BaseLevel; if ([email protected]_dif >= 16) {set [email protected]_gained, [email protected]_gained*40;} if ([email protected]_dif == 15 || [email protected]_dif == 5) {set [email protected]_gained, [email protected]_gained*115;} if ([email protected]_dif == 14 || [email protected]_dif == 6) {set [email protected]_gained, [email protected]_gained*120;} if ([email protected]_dif == 13 || [email protected]_dif == 7) {set [email protected]_gained, [email protected]_gained*125;} if ([email protected]_dif == 12 || [email protected]_dif == 8) {set [email protected]_gained, [email protected]_gained*130;} if ([email protected]_dif == 11 || [email protected]_dif == 9) {set [email protected]_gained, [email protected]_gained*135;} if ([email protected]_dif == 10) {set [email protected]_gained, [email protected]_gained*140;} if ([email protected]_dif == 4) {set [email protected]_gained, [email protected]_gained*110;} if ([email protected]_dif == 3) {set [email protected]_gained, [email protected]_gained*105;} if ([email protected]_dif <= 2 && [email protected]_dif >= -5) {set [email protected]_gained, [email protected]_gained*100;} if ([email protected]_dif <= -6 && [email protected]_dif >= -10) {set [email protected]_gained, [email protected]_gained*95;} if ([email protected]_dif <= -11 && [email protected]_dif >= -15) {set [email protected]_gained, [email protected]_gained*90;} if ([email protected]_dif <= -16 && [email protected]_dif >= -20) {set [email protected]_gained, [email protected]_gained*85;} if ([email protected]_dif <= -21 && [email protected]_dif >= -25) {set [email protected]_gained, [email protected]_gained*60;} if ([email protected]_dif <= -26 && [email protected]_dif >= -30) {set [email protected]_gained, [email protected]_gained*35;} if ([email protected]_dif <= -31) {set [email protected]_gained, [email protected]_gained*10;} set [email protected]_gained,[email protected]_gained/100; dispbottom "Experience Gained Mastery: "[email protected]_gained+" ("+([email protected]_gained*100)/.FishingLvl[FishingLvl]+"%)"; if(.FishingLvl[FishingLvl] <= FishingExp){ set FishingLvl, FishingLvl + 1; dispbottom "[Level Up] Congrats! Your Fishing level is now: "+FishingLvl; set FishingExp,0; if(FishingLvl == .MaxFishingLvl) { dispbottom "Your Fishing Mastery is at maximum level."; } } end; } I made a dispbottom similar to @showexp, but if the gained experience is below 1% to lvl up the fishing, it says "0%". Look: dispbottom "Experience Gained Mastery: "[email protected]_gained+" ("+([email protected]_gained*100)/.FishingLvl[FishingLvl]+"%)"; What can i do for it to show something like "Experience Gained Mastery: 318 (0.25%)" instead of "Experience Gained Mastery: 318 (0%)"?
  9. still wrong By [email protected]_gained = strmobinfo(7,killedrid) i get exactly "mob_job_exp" from mob.db * job_rate. From that, we need to improve the "renewal leveling" thing. I could do a bunch of "if"s, but i don't know if this is the best way. something like: [email protected]_gained = strmobinfo(7,killedrid) [email protected]_lvl = strmobinfo(3,killedrid) [email protected]_dif = [email protected]_lvl - BaseLevel if ([email protected]_dif == 10) { //if the mob has 10 lvls more than you, exp gets buffed by 40% set [email protected]_gained, [email protected]*1.4 } I don't know how to work on arrays (neither basic script haha). Hope this provides a north for you.
  10. Ok, it's not 100% right. I'm using this code: [email protected]_gained = strmobinfo(7,killedrid)/100; [email protected]_lvl = strmobinfo(3,killedrid); [email protected]_dif = [email protected]_lvl - BaseLevel; if([email protected]_dif != 0) { if([email protected]_dif < 0) [email protected]_dif = MAX_LEVEL + (~([email protected]_dif) + 1); [email protected] = inarray(.penalty,[email protected]_dif); if([email protected] != -1 && [email protected]%2 == 0) [email protected]_gained*= .penalty[[email protected] + 1]; } I'm killing a 29 lvl mob. If my lvl is higher than 26, this happens: if my lvl is equal or below 26, this:
  11. Mate, i've found the error. It doesn't need to set the [email protected] as multiplier, because when the scripts gets the strmobinfo(7,killerid), the rates are already applied. Look, my rates are 500x. So, 854,750/500 = 1.709,5. The screenshot display jobexp = 1709. (;
  12. I think it's working, but i've got this problem: Script gives me 854,750 exp while i receive only 1709 job exp. dispbottom is @showexp and: dispbottom "You gained "+F_InsertComma([email protected]_gained)+" Fishing exp.";
  13. Mate, still get the same error. This "if" is checking if i'm using renewal_exp or not? Cause if it this, i think it's unnecessary. This code will help me with "mastery" leveling. Instead of typing each monster X_POINTS, code will get their job_exp. I've already set how much experience each level will require to lvl up, just like db\re\job_exp.txt. Here's my code: - script Fishing_Exp -1,{ OnInit: if(checkre(3)) { setarray .penalty[0], 16,40, 15,115, 14,120, 13,125, 12,130, 11,135, 10,140, 9,135, 8,130, 7,125, 6,120, 5,115, 4,110, 3,105, -1,100, -6,95, -11,90, -16,85, -21,60, -26,35, -31,10; for([email protected] = getarraysize(.penalty);[email protected] < [email protected];[email protected]+=2) { [email protected] = .penalty[[email protected]*2]; if([email protected] < 0) .penalty[[email protected]*2] = min(MAX_LEVEL + (~([email protected]) + 1),MAX_LEVEL*2); } } setArray .FishingLvl[0], 1, 3800, 6200, 10400, 15200, 22900, 27100, 30000, 32500, 35700, 41300, 45000, 45800, 47600, 50300, 58700, 63900, 67100, 70300, 73500, 90600, 96200, 102700, 110200, 121400, 144700, 152900, 163100, 173300, 183500, 213500, 224700, 236000, 247200, 260700, 299800, 324800, 343600, 362300, 374800, 474400, 497000, 512100, 542200, 564800, 644300, 678200, 712100, 754500, 796900, 873100, 911900, 950600, 989400, 1028100, 1143300, 1199900, 1233800, 1279100, 1324300, 1486900, 1515900, 1603000, 1719200, 1806300, 2040300, 2244300, 2415900, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000, 2746000; set .MaxFishingLvl, getarraysize(.FishingLvl); end; OnNPCKillEvent: if (fishing !=1) {end;} //this will check if he made a quest to learn the mastery [email protected]_jexp = strmobinfo(7,killedrid); [email protected] = getbattleflag("job_exp_rate"); [email protected]_gained = [email protected]_jexp*[email protected]/100; [email protected]_lvl = strmobinfo(3,killedrid); [email protected]_dif = [email protected]_lvl - BaseLevel; if(checkre(3) && [email protected]_dif != 0) { if([email protected]_dif < 0) [email protected]_dif = MAX_LEVEL + (~([email protected]_dif) + 1); [email protected] = inarray(.penalty,[email protected]_dif); if([email protected] != -1 && [email protected]%2 == 0) [email protected]_gained*= .penalty[[email protected] + 1]; set FishingExp, FishingExp + [email protected]_gained; } set FishingExp, FishingExp + 1; if(.FishingLvl[FishingLvl] <= FishingExp && FishingLvl < .MaxFishingLvl){ set FishingLvl, FishingLvl + 1; dispbottom "[Level Up] Congrats! Your Fishing level is now: "+FishingLvl; set FishingExp,0; if(FishingLvl == .MaxFishingLvl) { dispbottom "Your Fishing Mastery is at maximum level."; } } end; }