Jump to content

sader1992

Content Moderator
  • Posts

    1,613
  • Joined

  • Last visited

  • Days Won

    64

Everything posted by sader1992

  1. i think this should work OnPCLogoutEvent: setlook LOOK_BODY2,false; end;
  2. I think you can simply just edit this https://github.com/rathena/rathena/blob/master/db/item_randomopt_db.yml just remove the mode line "Mode: Renewal"
  3. I didn't understand but I guess you are talking about the [email protected] look how I used it in the example above, you assigned it in your script but you never used it
  4. this is a reference for you if(getd("#wqeqwe_" + gettime(DT_YYYYMMDD)) < .day_limit){ [email protected] = .day_limit - getd("#wqeqwe_" + gettime(DT_YYYYMMDD)); mes "Input how many"; input [email protected],0,[email protected]; delitem [email protected],[email protected]; getitem [email protected]_coin,[email protected]; setd("#wqeqwe_" + gettime(DT_YYYYMMDD),getd("#wqeqwe_" + gettime(DT_YYYYMMDD)) + [email protected]); end; } mes "You cannot exchange anymore today!"; end;
  5. I can see a problem in the code without testing it not sure if there is more , will leave it for you to test
  6. most errors break the code most warnings does not break the code if there is a bug , there is a higher chance to abuse it if it was a warning like for example a shop that sell item for zeny less then the sell price you will get a warning , still players can abuse it, if you messed up the shop writing you will get and error and the shop wont work
  7. https://github.com/rathena/rathena/blob/22c7f3988dd0b8f0b8089acb2f1e2cd11ca008ee/doc/script_commands.txt#L2305 --------------------------------------- *countinarray <array name>{[<start index>]},<array name>{[<start index>]}; This command will check for matches between the array values and return the number of matches. While being optional, if [<start index>] is supplied, the search will begin from the given index value. setarray [email protected][0], 100, 200, 300, 400, 500, 600; [email protected] = 100; if(countinarray([email protected][0], [email protected])) mes "The number 100 was found in the array [email protected]"; countinarray([email protected][0], [email protected]); //return 1 because the number 100 is an element of the array [email protected] setarray [email protected][0],100,500; countinarray([email protected][0], [email protected][0]); //return 2 because the numbers 100 and 500 are elements of the array [email protected] setarray [email protected][0],100,700; countinarray([email protected][0], [email protected][0]); //return 1 because the number 100 is an element of the array [email protected] //but the number 700 is not an element of the array [email protected] //also you can change the position between the arrays in the command if(countinarray([email protected][0], [email protected][0]) == countinarray([email protected][0], [email protected][0])) //This is true For more details, see the sample in 'doc/sample/inarray.txt'. --------------------------------------- Example: //creating an array with the values with no duplication for([email protected]=0;[email protected]<getarraysize($account_id);[email protected]++){ if(inarray([email protected],$account_id[[email protected]]) == -1){ [email protected][getarraysize([email protected])] = $account_id[[email protected]]; } } //now [email protected] have all the values without duplication //counting for([email protected]=0;[email protected]<getarraysize([email protected]);[email protected]++){ [email protected] = [email protected][[email protected]]; [email protected][[email protected]] = countinarray($account_id,[email protected]); } //now [email protected] have all the values count with the index of the value //the result for([email protected]=0;[email protected]<getarraysize([email protected]);[email protected]++){ debugmes [email protected][[email protected]] + " = " + [email protected][[email protected]]; } //burning the array but extracting only the first 3 (less if there is less then 3 in the array) [email protected]_count = min(getarraysize([email protected]),3); while([email protected] < [email protected]_count){ [email protected]++; [email protected] = max([email protected]); [email protected] = inarray([email protected],[email protected]); [email protected] = getarraysize([email protected]_value); [email protected]_value[[email protected]] = [email protected][[email protected]]; [email protected]_count[[email protected]] = [email protected][[email protected]]; deletearray([email protected][[email protected]],1); deletearray([email protected][[email protected]],1); } //end result for([email protected]=0;[email protected]<getarraysize([email protected]_value);[email protected]++){ debugmes [email protected]_count[[email protected]] + " = " + [email protected]_value[[email protected]]; }
  8. oh i see , line 47 from setd(".m_" + [email protected] + "$[" + getarraysize(getd(".m_" + [email protected])) + "]",getarg(1)); to setd(".m_" + [email protected] + "$[" + getarraysize(getd(".m_" + [email protected] + "$")) + "]",getarg(1));
  9. oh I see , when I fixed the warning , I also changed the function call , didn't notice that will update it the fix is from sprintf(mobname, "Mob Name - %s", mob_db(pet_db_ptr->class_)->jname); to std::string temp_name = "Mob Name - " + mob_db.find(pet_db_ptr->class_)->jname; strcpy(mobname, temp_name.c_str()); Thank you for notifying me!
  10. on what hash? , I use petstats rAthena Cpp 25_04_2020 on around 1 month old rathena and still work with a small warning for string
  11. yes, yes #THQ_DELAY/60 = minutes
  12. I already did consider the multi field AddMvp(1785,"ra_fild02","ra_fild03","ra_fild04","ve_fild01","ve_fild02"); to AddMvp(1785,"ra_fild02"); AddMvp(1785,"ra_fild03"); AddMvp(1785,"ra_fild04"); AddMvp(1785,"ve_fild01"); AddMvp(1785,"ve_fild02");
  13. replace the line with if(inarray(getd(".m_" + [email protected] + "$"),strcharinfo(3)) != -1){ i edited the script in the first post
  14. prontera,0,0,0 script mvp_kill_count 444,{ copyarray([email protected]$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$)); copyarray([email protected],$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT)); [email protected] = min(.max_show,getarraysize([email protected]$)); if([email protected] <= 0){ mes "No records found"; end; } if(getgmlevel() >= .gm_level){ switch(select("Skip:Skip:Reset:Skip")){ case 3: deletearray($MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT)); mes "Done"; end; } } while([email protected] < [email protected]){ [email protected]++; [email protected] = max([email protected]); if([email protected] <= 0) break; [email protected] = inarray([email protected],[email protected]); if([email protected] == -1) break; mes "(" + [email protected] + ") " + [email protected]$[[email protected]]; deletearray([email protected]$[[email protected]],1); deletearray([email protected][[email protected]],1); } end; OnNPCKillEvent: [email protected] = killedrid; if(inarray(.mvp_id,[email protected]) != -1){ if(inarray(getd(".m_" + [email protected] + "$"),strcharinfo(3)) != -1){ if(([email protected] = inarray($MVP_KILL_CID,getcharid(0))) == -1){ [email protected] = getarraysize($MVP_KILL_CID); $MVP_KILL_CID[[email protected]] = getcharid(0); $MVP_KILL_NM$[[email protected]] = strcharinfo(0); } $MVP_KILL_COUNT[[email protected]]++; } } end; function AddMvp { [email protected] = getarraysize(.mvp_id); [email protected] = getarg(0); .mvp_id[[email protected]] = [email protected]; setd(".m_" + [email protected] + "$[" + getarraysize(getd(".m_" + [email protected] + "$")) + "]",getarg(1)); return; } OnInit: .gm_level = 99; .max_show = 10; //AddMvp(<Monster ID>,<"Map Name">); //AddMvp(<Monster ID>,<"Map Name">); //AddMvp(<Monster ID>,<"Map Name">); end; }
  15. [email protected] = 600; //delay in seconds , 600 = 5 min if(gettimetick(2) < #THQ_DELAY){ mes "Call in " + gettimestr("%H:%M:%S",21,#THQ_DELAY); end; } #THQ_DELAY = gettimetick(2) + [email protected];
  16. My internet was down and I was stuck with my 3g internet which was expensive and slow I needed something to waste my free time xD this is the result Muse Dash is a rhythm game (which i play a lot of) I tried to make something like that in Ragnarok ofc now that my internet is back I won't complete it the plan was to create more ways not just up and down , to add bosses etc also to complete the rhythm of the game , but well , who care The song is Punai Punai Taisou (プナイプナイたいそう) (if you like the song , you might like the 2 follow up to the sung , they also called punai punai) here is a clip of gura playing it inside of muse dash
  17. it depend on what your #THQ_DELAY is if it's only the time left use this mes "Call in " + gettimestr("%H:%M:%S",21,#THQ_DELAY);
  18. you get a warning or an error ?
  19. Maybe the problem is that specific map you are in while testing bloody branch does not edit the monsters it spawn.
  20. the short answer is no the npc config allow you to sort out the options for the equipment , however the UI is the list of what the player is wearing while talking to the npc , similar to the refine npc , so the player cannot choose an equipment in his inventory , he must equip it, and he will see one option for left hand and one option for right hand , he wont see one option for weapon and one option for shield.
  21. View File Ragnarök Login Background Generator resize , convert , slice , sort and rename the image to fit Ragnarök Login Background Drag and drop the image you want on the program , there will be a new folder created Next to the image , data , put it in your GRF Require .Net Framwork 4.7.2 I know there is other tools, however it didn't work for me, and I am bored of debugging every time I want to create a login background Source Code: https://github.com/sader1992/Sader-Ragnarok-Login-Background https://sader1992.com/ Submitter sader1992 Submitted 10/07/2021 Category Client Tools Video Content Author sader1992  
  22. Version 1.0.0

    132 downloads

    resize , convert , slice , sort and rename the image to fit Ragnarök Login Background Drag and drop the image you want on the program , there will be a new folder created Next to the image , data , put it in your GRF Require .Net Framwork 4.7.2 I know there is other tools, however it didn't work for me, and I am bored of debugging every time I want to create a login background Source Code: https://github.com/sader1992/Sader-Ragnarok-Login-Background https://sader1992.com/
    Free
  23. prontera,0,0,0 script delay 444,{ [email protected] = #DELAY_ERGHLKJ + 60;//60 seconds if([email protected] < gettimetick(2)){ mes "Try again after " + (gettimetick(2) - [email protected]) + " seconds"; end; } #DELAY_ERGHLKJ = gettimetick(2); mes "Hello!"; end; } #ACCOUNT_VARIABLE
  24. as a start do not use addrid and do not set the exp variable , use getexp command , and you can provide the char id to it so player attaching is not needed and this is wrong (.mobid = killedrid;) , just use it as it is or set it to "[email protected]" var like ([email protected] = killedrid;) and what you want is just math , [email protected] = (original_exp/100)*70;
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.