Jump to content
  • 0

help me to this script


Petey Pablo

Question


  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.03
  • Content Count:  569
  • Reputation:   11
  • Joined:  11/24/11
  • Last Seen:  

how to modify this to cashpoint to TCG? Thanks

<header>{
set .@i, countitem(7227);
mes "[TCG Exchanger]";
mes "You have ^0055FF"+.@i+" TCG^000000.";
if (!.@i) { mes "Please come back later."; close; }
mes "I can trade ^FF00001 TCG^000000 for ^FF00005 Cash Points^000000.";
next;
if(select(" - Trade: - ^777777Leave^000000")==2) close;
mes "[TCG Exchanger]";
mes "How many would you like to exchange?";
next;
input .@j;
mes "[TCG Exchanger]";
if (.@j < 1 || .@j > countitem(7227)) { mes "That's an invalid amount."; close; }
mes "Are you sure you want to exchange ^0055FF"+.@j+" TCG^000000?";
if(select(" - Yes: - No")==2) close;
mes " ";
delitem 7227, .@j;
set #CASHPOINTS, #CASHPOINTS+(.@j*5);
mes "You now have "+#CASHPOINTS+" Cash Points.";
close;
}

Edited by Will Suranol
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

You can do it like this :

MAPNAME,XXX,YYY,Z<tab>script<tab>NPC NAME<tab>NID,{
set .@n$,"^0000FF[ CP to TCT Exchanger ]^000000";
mes .@n$;
mes "You have got a total of "+#CASHPOINTS+".";
next;
mes .@n$;
mes "I can trade ^FF00001 Cashpoint^000000 for ^FF00001 TCG^000000.";
next;
if(select(" - Trade: - ^777777Leave^000000")==2) close;
mes .@n$;
mes "How many TCG's would you like to get?";
next;
input .@j;
mes .@n$;
if (.@j > #CASHPOINTS ) { mes "That's an invalid amount."; close; }
mes "Are you sure you want to get ^0055FF"+.@j+" TCG^000000?";
if(select(" - Yes: - No")==2) close;
mes "...";
getitem 7227, .@j;
set #CASHPOINTS, #CASHPOINTS-(.@j);
mes "Succesfully exchanged Cashpoints to TCG Cards!";
close;
}

This is your Script edited from exchanging TCG's into Cashpoints --> Exchange Cashpoints into TCG's

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