Currently Posted February 24, 2013 Posted February 24, 2013 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? Quote
Brian Posted February 26, 2013 Posted February 26, 2013 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; } 1 Quote
caspa Posted February 27, 2013 Posted February 27, 2013 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... Quote
nanakiwurtz Posted February 27, 2013 Posted February 27, 2013 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; } Quote
Currently Posted February 27, 2013 Author Posted February 27, 2013 When i exchanged the skulls, it doesn't do anything I used @loadnpc btw. am i suppose to reloadscript? Quote
caspa Posted March 2, 2013 Posted March 2, 2013 (edited) i'm not getting any items or points whenever i exchange the skulls Edited March 2, 2013 by caspa Quote
nanakiwurtz Posted March 2, 2013 Posted March 2, 2013 Make sure you use the skull with ID 7420, not 7005 Quote
caspa Posted March 2, 2013 Posted March 2, 2013 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 Quote
nanakiwurtz Posted March 2, 2013 Posted March 2, 2013 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; } Quote
caspa Posted March 2, 2013 Posted March 2, 2013 lolsss figured it out.... its on this part set .@skulls, .ITEMID_SKULL_; intoset .@skulls,countitem(.ITEMID_SKULL_); [solved] Quote
Currently Posted March 2, 2013 Author Posted March 2, 2013 Oh, now I gain the skull points. However, the ranking does not.. Quote
nanakiwurtz Posted March 2, 2013 Posted March 2, 2013 The ranking does not, does not what? It didn't increase? Quote
Currently Posted March 3, 2013 Author Posted March 3, 2013 Nevermind. Working perfectly. Thank you guys so much! [solved[ Quote
Question
Currently
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?
14 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.