Jump to content

LucianoCP

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by LucianoCP

  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. .@mob_jexp = strmobinfo(7,killedrid); .@exp_gained = .@mob_jexp; .@mob_lvl = strmobinfo(3,killedrid); .@lvl_dif = .@mob_lvl - BaseLevel; if (.@lvl_dif >= 16) {set .@exp_gained, .@exp_gained*40;} if (.@lvl_dif == 15 || .@lvl_dif == 5) {set .@exp_gained, .@exp_gained*115;} if (.@lvl_dif == 14 || .@lvl_dif == 6) {set .@exp_gained, .@exp_gained*120;} if (.@lvl_dif == 13 || .@lvl_dif == 7) {set .@exp_gained, .@exp_gained*125;} if (.@lvl_dif == 12 || .@lvl_dif == 8) {set .@exp_gained, .@exp_gained*130;} if (.@lvl_dif == 11 || .@lvl_dif == 9) {set .@exp_gained, .@exp_gained*135;} if (.@lvl_dif == 10) {set .@exp_gained, .@exp_gained*140;} if (.@lvl_dif == 4) {set .@exp_gained, .@exp_gained*110;} if (.@lvl_dif == 3) {set .@exp_gained, .@exp_gained*105;} if (.@lvl_dif <= 2 && .@lvl_dif >= -5) {set .@exp_gained, .@exp_gained*100;} if (.@lvl_dif <= -6 && .@lvl_dif >= -10) {set .@exp_gained, .@exp_gained*95;} if (.@lvl_dif <= -11 && .@lvl_dif >= -15) {set .@exp_gained, .@exp_gained*90;} if (.@lvl_dif <= -16 && .@lvl_dif >= -20) {set .@exp_gained, .@exp_gained*85;} if (.@lvl_dif <= -21 && .@lvl_dif >= -25) {set .@exp_gained, .@exp_gained*60;} if (.@lvl_dif <= -26 && .@lvl_dif >= -30) {set .@exp_gained, .@exp_gained*35;} if (.@lvl_dif <= -31) {set .@exp_gained, .@exp_gained*10;} set .@exp_gained,.@exp_gained/100; set FishingExp, FishingExp + .@exp_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 "+.@exp_gained+" ("+callfunc("get_decimal", .@exp_gained*100,.FishingLvl[FishingLvl])+"%) mastery points.";} end; } function script get_decimal { .@x = getarg(0); .@y = getarg(1); .@precision = getarg(2,2); // The amount of digits to keep after the dot .@mod = pow(10, .@precision); .@left = .@x / .@y; .@right = (.@x * .@mod / .@y) % .@mod; .@result$ = "" + .@left; if (!.@right) return .@result$; // Removes trailing zeroes, for example: // With .@zeroes set to 0, 5 / 2 will output 2.5 // With .@zeroes set to 1, 5 / 2 will output 2.50 .@zeroes = 1; for (.@i = 0; .@i < .@precision; .@i++) { .@digit = .@right % 10; .@right = .@right / 10; if (!.@zeroes) { if (.@digit == 0) continue; .@output$ = insertchar(.@output$, .@digit + "", 0); .@zeroes = 1; } else { .@output$ = insertchar(.@output$, .@digit + "", 0); } } return .@result$ + "." + .@output$; } 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 .@exp_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 .@exp_gained = X .@exp_gained*100 = .FishingLvl[FishingLvl]*X X = (.@exp_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 "+.@exp_gained+"("+callfunc("porcentagem", (.@exp_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 "+.@exp_gained+" ("+(.@exp_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 .@mob_jexp = strmobinfo(7,killedrid); .@exp_gained = .@mob_jexp; .@mob_lvl = strmobinfo(3,killedrid); .@lvl_dif = .@mob_lvl - BaseLevel; if (.@lvl_dif >= 16) {set .@exp_gained, .@exp_gained*40;} if (.@lvl_dif == 15 || .@lvl_dif == 5) {set .@exp_gained, .@exp_gained*115;} if (.@lvl_dif == 14 || .@lvl_dif == 6) {set .@exp_gained, .@exp_gained*120;} if (.@lvl_dif == 13 || .@lvl_dif == 7) {set .@exp_gained, .@exp_gained*125;} if (.@lvl_dif == 12 || .@lvl_dif == 8) {set .@exp_gained, .@exp_gained*130;} if (.@lvl_dif == 11 || .@lvl_dif == 9) {set .@exp_gained, .@exp_gained*135;} if (.@lvl_dif == 10) {set .@exp_gained, .@exp_gained*140;} if (.@lvl_dif == 4) {set .@exp_gained, .@exp_gained*110;} if (.@lvl_dif == 3) {set .@exp_gained, .@exp_gained*105;} if (.@lvl_dif <= 2 && .@lvl_dif >= -5) {set .@exp_gained, .@exp_gained*100;} if (.@lvl_dif <= -6 && .@lvl_dif >= -10) {set .@exp_gained, .@exp_gained*95;} if (.@lvl_dif <= -11 && .@lvl_dif >= -15) {set .@exp_gained, .@exp_gained*90;} if (.@lvl_dif <= -16 && .@lvl_dif >= -20) {set .@exp_gained, .@exp_gained*85;} if (.@lvl_dif <= -21 && .@lvl_dif >= -25) {set .@exp_gained, .@exp_gained*60;} if (.@lvl_dif <= -26 && .@lvl_dif >= -30) {set .@exp_gained, .@exp_gained*35;} if (.@lvl_dif <= -31) {set .@exp_gained, .@exp_gained*10;} set .@exp_gained,.@exp_gained/100; dispbottom "Experience Gained Mastery: "+.@exp_gained+" ("+(.@exp_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: "+.@exp_gained+" ("+(.@exp_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 .@exp_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: .@exp_gained = strmobinfo(7,killedrid) .@mob_lvl = strmobinfo(3,killedrid) .@lvl_dif = .@mob_lvl - BaseLevel if (.@lvl_dif == 10) { //if the mob has 10 lvls more than you, exp gets buffed by 40% set .@exp_gained, .@expgained*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: .@exp_gained = strmobinfo(7,killedrid)/100; .@mob_lvl = strmobinfo(3,killedrid); .@lvl_dif = .@mob_lvl - BaseLevel; if(.@lvl_dif != 0) { if(.@lvl_dif < 0) .@lvl_dif = MAX_LEVEL + (~(.@lvl_dif) + 1); .@mod = inarray(.penalty,.@lvl_dif); if(.@mod != -1 && .@mod%2 == 0) .@exp_gained*= .penalty[.@mod + 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 .@rates 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(.@exp_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(.@size = getarraysize(.penalty);.@i < .@size;.@i+=2) { .@diff = .penalty[.@i*2]; if(.@diff < 0) .penalty[.@i*2] = min(MAX_LEVEL + (~(.@diff) + 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 .@mob_jexp = strmobinfo(7,killedrid); .@rates = getbattleflag("job_exp_rate"); .@exp_gained = .@mob_jexp*.@rates/100; .@mob_lvl = strmobinfo(3,killedrid); .@lvl_dif = .@mob_lvl - BaseLevel; if(checkre(3) && .@lvl_dif != 0) { if(.@lvl_dif < 0) .@lvl_dif = MAX_LEVEL + (~(.@lvl_dif) + 1); .@mod = inarray(.penalty,.@lvl_dif); if(.@mod != -1 && .@mod%2 == 0) .@exp_gained*= .penalty[.@mod + 1]; set FishingExp, FishingExp + .@exp_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; }
  14. Hey, guys. I want to know if it's possible to set the job experience gained from a killed mob to a variable. Look, the default script is something like this: OnNPCKillEvent: if(killedrid == ID_MOB) {set variable, variable + X_POINTS;} By this way, i have to set the ID_MOB wich will give the X_POINTS, and how many points it will give. I was wonderwing if it's possible to do something like this: OnNPCKillEvent: set variable, variable + X_POINTS; I want to get the X_POINTS exactly the same as shown at @showexp command. It's too much work setting mob by mob and it's X_POINTS. Another problem is the job_exp_rate and the renewal levelling.
  15. it does: i'll test this last code and update this post soon. @edit: i'm still able to use backsliding @edit2: it's the group_id. tried to use with a normal account and it worked, i was unnable to use backsliding. So... Thank you!!!! I'll fix your code at the first post. If any bug appears, i'll contact you (;
  16. i update the files, script and skill_nocast_db.txt and typed @reloadscript and @reloadskilldb ingame. Is this right?
  17. the account group id is 99, does it allows me to use forbidden skills during the countdown or something is wrong?
  18. can you forbid the use of certain skills like backsliding, high jump until the countdown ends? just like the movement permission.
  19. look: when i choose yes on both characters, at dialogue menu, this happens:
  20. When player B types @acceptdd and changes his mind after it, selecting "No" in dialogue menu, player A receives "challenger changed his mind", but player A is the challenger. When i say "Yes" on both char's dialogue menu, the duel is cancelled. Some part of the code is causing this: (don't know where exactly, sorry...)
  21. If player B reloggs after receiveng an invite, the duel isn't cancelled. Player A doesn't receive any message. Eventually he is forced to rellog to create a new @deathduel. And if player A reloggs after sending the @deathduel, player b doesn't receive any warning about it. If player B select "Yes" on the dialogue menu and logs out after it, the dialogue menu appears to player A. I think that's not an issue, but the script keeps rolling as if player B hasn't logged out. I think should be a check before the announcements "there will be a death duel between A vs (null, because there is no player B)" to cancel it. Look: If player B select "No" in the dialogue menu, both players receive a "the duel has been cancelled", but none explication for it. You see, when player A selects "No" on the dialogue menu, player B is warned that the player A has changed his mind. Also, what do you think about this: after duelers get recalled, can they be unable to move until the countdown ends? This will avoid they to hide themselves, something like this, you know? Would be nice to block moving skills likes backsliding/high jump.
  22. First, i'll stablish a simple thing here: Player A: who creates the duel Player B: who accepts/rejects the duel -------------------------------- - If player A creates the duel, he can type @reject. It's not a BUG, because player B can't accept after it, but player A receive a "You reject the duel". I think it's not the best message in this ocasion. I think he would be unnable to use it (like @accept) and wait for the dialogue menu appears to change his mind. - When player B select "No" after @accept, this happens: If player B reloggs after receiveng an invite, the duel isn't cancelled. Player A doesn't receive any message. Eventually he is forced to rellog to create a new @deathduel
×
×
  • Create New...