Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/08/24 in all areas

  1. Use a variable to track when the player delivers all the items. Put a if statement for said variable so that the NPC skips the whole items code and teleport the player directly. if (my_variable == 0) { mes "You don't have the variable..."; mes "You didn't do the quest!"; mes "Let's do the quest now."; my_variable = 1; close; } //Player can only get to this part if they have my_variable set. mes "You did the quest!"; mes "Go ahead."; lhz_dun03,239,78,4 script Bio Entrance 651,{ function F_Warp; if (countitem(501) > 0) goto case_1; end; case_1: //F_Warp("<map>",<x>,<y>,<item 1 ID>,<item 1 amount>{,<item 2 ID>,<item 2 amount>{...}} F_Warp("lhz_dun04",244,61,501,1,971,1,6471,1,7347,2,7345,3,6470,1); end; function F_Warp { .@map$ = getarg(0,""); .@x = getarg(1,0); .@y = getarg(2,0); if (bio_entrance_unlocked == false) { //This loop fills a array with all the needed items for(.@i = 3; .@i < getargcount(); .@i += 2) { .@items[.@i2] = getarg(.@i); .@amount[.@i2] = getarg(.@i + 1); .@i2++; } //This loop checks for each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) { if (countitem(.@items[.@i]) < .@amount[.@i]) { if (!.@header) { mes "I don't have enough items to use this warp. I still need:"; .@header = true; } mes .@amount[.@i] + " " + mesitemlink(.@items[.@i]); .@missing = true; } } if (.@missing) return; //This loop removes each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) delitem .@items[.@i], .@amount[.@i]; bio_entrance_unlocked = true; //warp unlocked! } warp .@map$, .@x, .@y; return; } }
    1 point
  2. You are trying to register an account using _M or _F and log in. This feature may nt be enabled here. // Can you use _M/_F to make new accounts on the server? // Note: This only works if client side password encryption is not enabled. new_account: no https://github.com/rathena/rathena/blob/5928ad75c6d3f2e4e261fc3472095067abada77e/conf/login_athena.conf#L54
    1 point
  3. Find and edit this line. F_Warp("lhz_dun04",244,61,501,1,971,1,6471,1,7347,2,7345,3,6470,1); Each value is separated by "," (comma). The 1st value is for which map to teleport. In this case "lhz_dun04". The 2nd value is the x coordenate to warp the player in the map: 244. The 3rd value is the y coordenate to warp the player in the map: 61. The 4th value is the ID of the item requirement: 501 (Red Potion) The 5th value is the amount of the item in the previous parameter: 1 (need 1 Red Potion) The following values are for other items. This is where you put any item you want. 6th: 971 (Detrimindexta) 7th: 1 (need 1 Detrimindexta) 8th: 6471 (Goast_Chill) 9th: 1 (need 1 Goast_Chill) 10th: 7347 (Research Chart) 11th: 2 (need 2 Research Chart) Example: I want to make a warp to Geffen, the player need 15 Jellopy (item ID 909) and 84 Coals (item ID 1003). F_Warp("geffen",50,40,909,15,1003,84);
    1 point
  4. Make the function support more items, using arrays and loops. lhz_dun03,239,78,4 script Bio Entrance 651,{ function F_Warp; if (countitem(501) > 0) goto case_1; end; case_1: //F_Warp("<map>",<x>,<y>,<item 1 ID>,<item 1 amount>{,<item 2 ID>,<item 2 amount>{...}} F_Warp("lhz_dun04",244,61,501,1,971,1,6471,1,7347,2,7345,3,6470,1); end; function F_Warp { .@map$ = getarg(0,""); .@x = getarg(1,0); .@y = getarg(2,0); //This loop fills a array with all the needed items for(.@i = 3; .@i < getargcount(); .@i += 2) { .@items[.@i2] = getarg(.@i); .@amount[.@i2] = getarg(.@i + 1); .@i2++; } //This loop checks for each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) { if (countitem(.@items[.@i]) < .@amount[.@i]) { if (!.@header) { mes "I don't have enough items to use this warp. I still need:"; .@header = true; } mes .@amount[.@i] + " " + mesitemlink(.@items[.@i]); .@missing = true; } } if (.@missing) return; //This loop removes each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) delitem .@items[.@i], .@amount[.@i]; warp .@map$, .@x, .@y; return; } }
    1 point
  5. Added: Arrow Vulcan, skill_animation.txt, Monster Facing Please adjust the facing for the monster rotation of the Sonic Blow skill. +// Directions for animation steps; assuming 0 = right, 3 = down, 6 = left, and 9 = up +int get_direction_for_step(int step) { + // Adjust according to your coordinate system + switch (step) { + case 1: return 0; // Right + case 2: return 3; // Down + case 3: return 6; // Left + case 4: return 9; // Up + case 5: return 12; // Right + case 6: return 3; // Down + case 7: return 6; // Left + case 8: return 9; // Up + default: return 0; // Default direction if step is invalid + } +} Video_2024_08_04-7_edit_0 (1).webm Video_2024_08_04-5_edit_0.webm sonic blow v3.patch
    1 point
  6. script - script RateSelect -1,{ OnPCLoginEvent: switch (individual_rate) { case 1: .@exp_rate_multiplier = 100; .@jexp_rate_multiplier = 100; set .@rate_description$, "x1 (Low Rate)"; break; case 2: .@exp_rate_multiplier = 2500; .@jexp_rate_multiplier = 2500; set .@rate_description$, "x25 (Mid Rate)"; break; case 3: .@exp_rate_multiplier = 5000; .@jexp_rate_multiplier = 5000; set .@rate_description$, "x50 (High Rate)"; break; case 4: .@exp_rate_multiplier = 10000; .@jexp_rate_multiplier = 10000; set .@rate_description$, "x100 (Super High Rate)"; break; default: mes "[Rate Selector]"; mes "Select your preferred server rate for this character."; mes "BE CAREFUL: YOU CAN'T CHANGE IT AFTERWARD!"; individual_rate = select("Low Rate:Mid Rate:High Rate:Super High Rate"); close2; goto OnPCLoginEvent; // Return to case evaluation after selection } // Save the multipliers to the player variables set #exp_rate_multiplier, .@exp_rate_multiplier; set #jexp_rate_multiplier, .@jexp_rate_multiplier; fakeIcon(getcharid(0),2002,0,1); dispbottom "You have chosen the " + .@rate_description$ + " for your character."; end; OnNPCKillEvent: // Retrieve the stored multipliers .@exp_rate_multiplier = #exp_rate_multiplier; .@jexp_rate_multiplier = #jexp_rate_multiplier; .@base_exp = getmonsterinfo(killedrid, MOB_BASEEXP) * .@exp_rate_multiplier; .@job_exp = getmonsterinfo(killedrid, MOB_JOBEXP) * .@jexp_rate_multiplier; // Debug messages to track values dispbottom "[Debug] Base EXP: " + .@base_exp; dispbottom "[Debug] Job EXP: " + .@job_exp; if (.@base_exp > 0 || .@job_exp > 0) { // Use getcharid(0) to specify the character ID getexp2(.@base_exp, .@job_exp); } else { dispbottom "[Error] Experience values are zero."; } end; } stateiconinfo.lub StateIconList[EFST_IDs.EFST_RATE_UP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { { "RATE UP", COLOR_TITLE_BUFF }, { "%s", COLOR_TIME }, { "Increases your Bonus EXP and Job Exp" }, { "x1 / x25 / x50 / x100" }, { "Grants players different rewards" }, { "depending on what they choose." } } } efstids.lub EFST_VIPSTATE1 = 2000, EFST_VIPSTATE2 = 2001, EFST_RATE_UP = 2002, __newindex = function() error("unknown state") end } setmetatable(EFST_IDs, EFST_IDs) stateiconimginfo.lub -- Other official effects [EFST_IDs.EFST_VIPSTATE1] = "SI_VIP.tga", [EFST_IDs.EFST_VIPSTATE2] = "SI_VIP2.tga", [EFST_IDs.EFST_RATE_UP] = "RATE_UP.tga", [EFST_IDs.EFST_YGGDRASIL_BLESS] = "vitata500.tga", [EFST_IDs.EFST_PERIOD_RECEIVEITEM_2ND] = "ITEM_G.tga", [EFST_IDs.EFST_PERIOD_PLUSEXP_2ND] = "EXP_G.tga" } } status.hpp /// @APIHOOK_END /// Do not modify code above this, since it will be automatically generated by the API again EFST_VIPSTATE1 = 2000, EFST_VIPSTATE2 = 2001, EFST_RATE_UP = 2002, EFST_MAX, script_constants.hpp /// @APIHOOK_END /// Do not modify code above this, since it will be automatically generated by the API again export_constant(EFST_VIPSTATE1); export_constant(EFST_VIPSTATE2); export_constant(EFST_RATE_UP); export_constant(EFST_MAX); Install fakeicon: https://rathena.org/board/files/file/4034-fake-icon-stats/ RATE_UP.tga RATE_UP.tga
    1 point
  7. Version 1.0.0

    4635 downloads

    This commands allow you to add fake icon stats. Right now the command does not clean the effect automatically after the time, cause who order this command want to be like this, so you can add sleep and remove the icon. Sample Script: prontera,150,150,5 Script FakeIcon 90,{ mes "[Fake Icon Stats]"; mes "Hey."; switch(select("Receive Fake Icon 1 with 5 seconds (display only)","Receive Icon 2 for 10 seconds (display only)","Disable Icon 1 and 2")) { case 1: fakeIcon(getcharid(0),1,5000,1); break; case 2: fakeIcon(getcharid(0),2,10000,1); break; case 3: fakeIcon(getcharid(0),1,0,0); fakeIcon(getcharid(0),2,0,0); break; } close; }
    Free
    1 point
×
×
  • Create New...