Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,150,150,0 script MvPCard2PvPPoints 112,{
- setarray .@mvp_card, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010;
- .@exchange_value = 10;
- mes .@npc_name$ = "[^0000FF"+strnpcinfo(1)+"^000000]";
- mes callfunc("F_Hi")+" "+strcharinfo(0);
- mes "I can trade your mvp card to pvp point, do you want to trade with me?";
- select(">> Yes");
- clear;
- for (.@i = 0; .@i < getarraysize(.@mvp_card); .@i++) {
- if (countitem(.@mvp_card[.@i])) {
- .@count += countitem(.@mvp_card[.@i]);
- .@m_id[.@j] = .@mvp_card[.@i];
- .@m_qty[.@j] = countitem(.@mvp_card[.@i]);
- .@list$ = .@list$ + "- ^7700FF"+countitem(.@mvp_card[.@i])+"x "+getitemname(.@mvp_card[.@i])+"^000000:";
- .@j++;
- }
- }
- mes .@npc_name$;
- if (!.@j) {
- mes "I am sorry, you didn't have the card that I am interested in you.";
- close;
- }
- mes "Well you have ^0000FF"+.@count+"^000000 MvP Card. With detailed info as described bellow : ";
- explode(.@data$, .@list$, ":");
- for (.@i = 0; .@i < getarraysize(.@data$); .@i++)
- mes .@data$[.@i];
- next;
- mes .@npc_name$;
- mes "Please select a card to exchange to PvP Points, each card will be exchanged to ^0000FF"+.@exchange_value+"^000000 pts.";
- .@s = select(.@list$)-1;
- clear;
- mes .@npc_name$;
- .@total = .@m_qty[.@s] * .@exchange_value;
- mes "You will exchange ^0000FF"+.@m_qty[.@s]+" "+getitemname(.@m_id[.@s])+"^000000 to ^0000FF"+.@total+"^000000 PvP Points.";
- select(">> Yes");
- clear;
- mes .@npc_name$;
- if (countitem(.@m_id[.@s]) < .@m_qty[.@s]) {
- mes "Are you trying to cheat me? why the card is different from the count before?!";
- } else {
- delitem .@m_id[.@s], .@m_qty[.@s];
- #PVPPOINTS += .@total;
- mes "Done! glad to have bussines with you, come around again if you need more points.";
- }
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement