Jump to content

sader1992

Content Moderator
  • Posts

    1,613
  • Joined

  • Last visited

  • Days Won

    64

sader1992 last won the day on November 14

sader1992 had the most liked content!

About sader1992

  • Birthday 11/16/1991

Profile Information

  • Gender
    Male
  • Location
    Syria
  • Server
    DEV On : ArenaRO , DigitalRO
  • Github: sader1992
  • Discord: sader1992#3562
  • Interests
    rAthena , C# , C++ , PHP , MMO , Anime , Microsoft , Science , Cooking , Math

Contact Methods

Recent Profile Visitors

14,239 profile views

Mood

  • Ill
  • Currently Feeling Ill

sader1992's Achievements

  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; }
×
×
  • Create New...

Important Information

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