Jump to content
  • 0

Skull Collector NPC Ranker?


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Players will exchange the skulls they collected from PvP to a NPC.

 

The NPC will give the players Skull Points.

 

It will rank the highest skull collectors to top 10.

 

Anybody please?

Link to comment
Share on other sites

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

prontera,155,180,0	script	Skull Points	910,{

switch(select("View PVP Skull Points Ladder:" + (countitem(.ITEMID_SKULL_) ?

("Exchange "+countitem(.ITEMID_SKULL_)+" "+((countitem(.ITEMID_SKULL_)==1)?"Skull":"Skulls")+" --> Points") : "")

)) {

case 1:

query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) " +

"FROM global_reg_value " +

"LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id " +

"WHERE global_reg_value.`str`='skull_points' AND CAST(`value` AS UNSIGNED) > 0 " +

"ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 10",

.@name$, .@points;

mes "[Top 10 Skull Points]";

for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) {

mes (.@i+1) +". ^0000FF"+ .@name$[.@i] +"^000000 ("+ .@points[.@i] +((.@points[.@i]==1)?" pt":" pts")+")";

}

break;

case 2:

set .@skulls, countitem(.ITEMID_SKULL_);

if (.@skulls < 1) {

mes "You don't have any PVP Skulls.";

} else {

delitem .ITEMID_SKULL_, .@skulls;

set skull_points, skull_points + .@skulls;

dispbottom "Gained "+.@skulls+" skull points. Total = " + skull_points;

}

break;

}

close;

OnInit:

// should match /src/map/itemdb.h

set .ITEMID_SKULL_, 7420;

end;

}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

sir how to add reset on this ladder and also i would like to get points and tcg at the same time..
mean....... 1 skull = 1point + 1 tcg...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

if (countitem(.ITEMID_SKULL_) < 1) {

mes "You don't have any PVP Skulls.";

} else {

set .@skulls, .ITEMID_SKULL_;

delitem .ITEMID_SKULL_, .@skulls;

getitem 7227,.@skulls;

set skull_points, skull_points + .@skulls;

dispbottom "Gained "+.@skulls+" skull points. Total = " + skull_points;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

When i exchanged the skulls, it doesn't do anything :(

I used @loadnpc btw. am i suppose to reloadscript?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

i'm not getting any items or points whenever i exchange the skulls

Edited by caspa
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

same here :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Make sure you use the skull with ID 7420, not 7005

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

yep i'm using the skull that has names on it.... after being killed the 7420 and still don't get any.



this is the error i get everytime i try to exchange the skulls

post-3034-0-26597900-1362249769_thumb.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

prontera,155,180,0    script    Skull Points    910,{
    switch(select("View PVP Skull Points Ladder:" + (countitem(.ITEMID_SKULL_) ?
     ("Exchange "+countitem(.ITEMID_SKULL_)+" "+((countitem(.ITEMID_SKULL_)==1)?"Skull":"Skulls")+" --> Points") : "")
     )) {
    case 1:
        query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) " +
         "FROM global_reg_value " +
         "LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id " +
         "WHERE global_reg_value.`str`='skull_points' AND CAST(`value` AS UNSIGNED) > 0 " +
         "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 10",
         .@name$, .@points;
        mes "[Top 10 Skull Points]";
        for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) {
            mes (.@i+1) +". ^0000FF"+ .@name$[.@i] +"^000000 ("+ .@points[.@i] +((.@points[.@i]==1)?" pt":" pts")+")";
        }
        break;
    case 2:
        set .@skulls, countitem(.ITEMID_SKULL_);
        if (.@skulls < 1) {
            mes "You don't have any PVP Skulls.";
        } else {
            delitem .ITEMID_SKULL_, .@skulls;
            getitem 7227, .@skulls;
            set skull_points, skull_points + .@skulls;
            dispbottom "Gained "+.@skulls+" skull points. Total = " + skull_points;
        }
        break;
    }
    close;
OnInit:
    // should match /src/map/itemdb.h
    set .ITEMID_SKULL_, 7420;
    end;
}

/?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

lolsss figured it out.... 

its on this part

set .@skulls, .ITEMID_SKULL_;


into
set .@skulls,countitem(.ITEMID_SKULL_);


[solved]

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Yes, it caused the error.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Oh, now I gain the skull points. However, the ranking does not..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

The ranking does not, does not what? It didn't increase?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Nevermind. Working perfectly. Thank you guys so much! [solved[

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