Jump to content
  • 0

Need to add MVP ranker Statue


DEsMOn

Question


  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.05
  • Content Count:  172
  • Reputation:   1
  • Joined:  11/16/20
  • Last Seen:  

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(.@name$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$));
    copyarray(.@count,$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
    .@mx = min(.max_show,getarraysize(.@name$));
    if(.@mx <= 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(.@max < .@mx){
        .@max++;
        .@t1 = max(.@count);
        if(.@t1 <= 0) break;
        .@n = inarray(.@count,.@t1);
        if(.@n == -1) break;
        mes "(" + .@t1 + ") " + .@name$[.@n];
        deletearray(.@name$[.@n],1);
        deletearray(.@count[.@n],1);
    }
end;

OnNPCKillEvent:
    .@id = killedrid;
    if(inarray(.mvp_id,.@id) != -1){
        if(inarray(getd(".m_" + .@id + "$"),strcharinfo(3)) != -1){
            if((.@ndx = inarray($MVP_KILL_CID,getcharid(0))) == -1){
                .@ndx = getarraysize($MVP_KILL_CID);
                $MVP_KILL_CID[.@ndx] = getcharid(0);
                $MVP_KILL_NM$[.@ndx] = strcharinfo(0);
            }
            $MVP_KILL_COUNT[.@ndx]++;
        }
    }
end;

    function    AddMvp    {
        .@s = getarraysize(.mvp_id);
        .@id = getarg(0);
        .mvp_id[.@s] = .@id;
        //setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id)) + "]",getarg(1));
        setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id + "$")) + "]",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,{
    .@id = getelementofarray(getvariableofnpc(.npcgid, "Sader MVP Ranker"), getnpcid(0));
    mes "^996600[TOP "+ .@id +"]";
    mes "^006699Name : "+ getelementofarray(getvariableofnpc(.statue_name$, "Sader MVP Ranker"), .@id);
    .@guildname$ = getelementofarray(getvariableofnpc(.statue_guild$, "Sader MVP Ranker"), .@id);
    mes "^00AAAAGuild : "+((.@guildname$ == "null")? "^AAAAAANone": .@guildname$);
    mes "^00AA00Total Kills : ["+ getelementofarray(getvariableofnpc(.statue_kills, "Sader MVP Ranker"), .@id) +"]";
    mes "^70AC11Highest Streaks : ["+ getelementofarray(getvariableofnpc(.statue_streaks, "Sader MVP Ranker"), .@id) +"]";
    mes "^FF0000Deaths : <"+ getelementofarray(getvariableofnpc(.statue_deaths, "Sader MVP Ranker"), .@id) +">";
    close;
OnInit:
    .@id = strnpcinfo(2);
    set getvariableofnpc(.statue[.@id], "Sader MVP Ranker"), getnpcid(0);
    set getvariableofnpc(.npcgid[getnpcid(0)], "Sader MVP Ranker"), .@id;
    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

  • 1

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   2
  • Joined:  12/16/11
  • Last Seen:  

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.05
  • Content Count:  172
  • Reputation:   1
  • Joined:  11/16/20
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   2
  • Joined:  12/16/11
  • Last Seen:  

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

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   2
  • Joined:  12/16/11
  • Last Seen:  

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...