Jump to content
  • 0
DEsMOn

Need to add MVP ranker Statue

Question

Hello Scripters,

I've working Script just wondering is it possible to add Top 3 MVP rankers statue on this script?

prontera,187,198,3    script    Sader MVP Ranker    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("TOP MVP Killer:Skip:Reset:Skip")){
        switch(select("Players MVP Ranking:Reset MVP Ranking")){
            case 2:
                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));
        setd(".m_" + [email protected] + "$[" + getarraysize(getd(".m_" + [email protected] + "$")) + "]",getarg(1));
        return;
    }

OnInit:
    .gm_level = 99;
    .max_show = 10;
    AddMvp(1038,"moc_pryd04");
    AddMvp(1039,"prt_maze03");

end;
}

    
 I've Annie MVP statue script but can't merge  with this so asking to guid

Quote

 

-    script    pvp_ladder_statue    FAKE_NPC,{
    [email protected] = getelementofarray(getvariableofnpc(.npcgid, "Sader MVP Ranker"), getnpcid(0));
    mes "^996600[TOP "+ [email protected] +"]";
    mes "^006699Name : "+ getelementofarray(getvariableofnpc(.statue_name$, "Sader MVP Ranker"), [email protected]);
    [email protected]$ = getelementofarray(getvariableofnpc(.statue_guild$, "Sader MVP Ranker"), [email protected]);
    mes "^00AAAAGuild : "+(([email protected]$ == "null")? "^AAAAAANone": [email protected]$);
    mes "^00AA00Total Kills : ["+ getelementofarray(getvariableofnpc(.statue_kills, "Sader MVP Ranker"), [email protected]) +"]";
    mes "^70AC11Highest Streaks : ["+ getelementofarray(getvariableofnpc(.statue_streaks, "Sader MVP Ranker"), [email protected]) +"]";
    mes "^FF0000Deaths : <"+ getelementofarray(getvariableofnpc(.statue_deaths, "Sader MVP Ranker"), [email protected]) +">";
    close;
OnInit:
    [email protected] = strnpcinfo(2);
    set getvariableofnpc(.statue[[email protected]], "Sader MVP Ranker"), getnpcid(0);
    set getvariableofnpc(.npcgid[getnpcid(0)], "Sader MVP Ranker"), [email protected];
    end;
}

prontera,138,170,4    duplicate(mvp_ladder_statue)    mvp_ladder_statue#1    1_F_MARIA
prontera,135,168,4    duplicate(mvp_ladder_statue)    mvp_ladder_statue#2    1_F_MARIA

   

 

If any 1 can guide me for this would be great full..!!

Thanks in Advance..!!

 


    

Edited by Mael
Use codebox
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
9 hours ago, rokimoki said:

Thank you sir, but its counting all MVP the above script I've posted that counts only Default spawn map of MVP.

Is it possible to add like this in script? with GM reset commands?

& getting this in CMD image.png.ae4872af292b67e912ee5f5f2513b890.png

 

Edited by DEsMOn
Updates
Link to comment
Share on other sites

  • 0

Warning are not errors, you should not be afraid of warnings, they usually auto fix and gives the fix specitication that applies.

Anyway, you can adapt those using this extra script: https://github.com/rathena/rathena/blob/master/npc/custom/events/mvp_ladder.txt

It spawns mvp and detect only mvp killed through script, and also has a ladder. Then add statue script from annie ruru that read your ladder.

  • Love 1
Link to comment
Share on other sites

  • 0
10 hours ago, rokimoki said:

Warning are not errors, you should not be afraid of warnings

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 😛

  • Love 2
Link to comment
Share on other sites

  • 0
15 hours ago, sader1992 said:

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 😛

What I wanted to mean, is that you should read warning instead of panicking thinking that is an error. For example, zeny warning, once you read it you realize how can you fix it, etc. 😛

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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