Advertisement
existence_dev92

MvPCard2PvPPoints

Mar 22nd, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. prontera,150,150,0 script MvPCard2PvPPoints 112,{
  2. setarray .@mvp_card, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010;
  3. .@exchange_value = 10;
  4.  
  5. mes .@npc_name$ = "[^0000FF"+strnpcinfo(1)+"^000000]";
  6. mes callfunc("F_Hi")+" "+strcharinfo(0);
  7. mes "I can trade your mvp card to pvp point, do you want to trade with me?";
  8. select(">> Yes");
  9. clear;
  10. for (.@i = 0; .@i < getarraysize(.@mvp_card); .@i++) {
  11. if (countitem(.@mvp_card[.@i])) {
  12. .@count += countitem(.@mvp_card[.@i]);
  13. .@m_id[.@j] = .@mvp_card[.@i];
  14. .@m_qty[.@j] = countitem(.@mvp_card[.@i]);
  15. .@list$ = .@list$ + "- ^7700FF"+countitem(.@mvp_card[.@i])+"x "+getitemname(.@mvp_card[.@i])+"^000000:";
  16. .@j++;
  17. }
  18. }
  19. mes .@npc_name$;
  20. if (!.@j) {
  21. mes "I am sorry, you didn't have the card that I am interested in you.";
  22. close;
  23. }
  24. mes "Well you have ^0000FF"+.@count+"^000000 MvP Card. With detailed info as described bellow : ";
  25. explode(.@data$, .@list$, ":");
  26. for (.@i = 0; .@i < getarraysize(.@data$); .@i++)
  27. mes .@data$[.@i];
  28. next;
  29. mes .@npc_name$;
  30. mes "Please select a card to exchange to PvP Points, each card will be exchanged to ^0000FF"+.@exchange_value+"^000000 pts.";
  31. .@s = select(.@list$)-1;
  32. clear;
  33. mes .@npc_name$;
  34. .@total = .@m_qty[.@s] * .@exchange_value;
  35. mes "You will exchange ^0000FF"+.@m_qty[.@s]+" "+getitemname(.@m_id[.@s])+"^000000 to ^0000FF"+.@total+"^000000 PvP Points.";
  36. select(">> Yes");
  37. clear;
  38. mes .@npc_name$;
  39. if (countitem(.@m_id[.@s]) < .@m_qty[.@s]) {
  40. mes "Are you trying to cheat me? why the card is different from the count before?!";
  41. } else {
  42. delitem .@m_id[.@s], .@m_qty[.@s];
  43. #PVPPOINTS += .@total;
  44. mes "Done! glad to have bussines with you, come around again if you need more points.";
  45. }
  46. close;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement