Jump to content
  • 0

(Custom Script Help) Item into Cashpoints Exchanger


rakuzas

Question


  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.04
  • Content Count:  459
  • Reputation:   6
  • Joined:  06/29/12
  • Last Seen:  

Hello,

I tried to edit this script to change Gold Coins into Cash Points.. I succeed making display bottom and delitem with amount user input earlier.. But the Cashpoints doesn't add or increasing.. Also I failed to change NPC dialog when input incorrect amount or not enough amount of item.. Below is the script.. Hope someone can help me fix this.. Thanks..

//Original Script : RevelationRO Custom Script by Zeshan.
//Edited by Rakuzas

prontera,147,157,0 script Kafra points 861,{


    mes .NPC$;
    mes "Do you want to exchange your " + getitemname(.ID) + " into Cashpoints?";
mes "The conversion rate is " + .NP + " Cashpoint for each " + getitemname(.ID) + ".";
    next;
    if (select("Yes:No") - 1) close;
mes .NPC$;
    mes "How many " + getitemname(.ID) + " do you have?";
    next;
    input .@amount;
    if (.@amount == 0) {
        mes .NPC$;
        mes "Umm, please enter your amount!";
        close;
    }
.@amount2 = (.@amount * .ID); 
if (.@amount > .@amount2) {
mes .NPC$;
mes "You dont' have enough coins!!!";
close;
}
if (.@amount2 == 0){

mes .NPC$;
mes "You don't have coins!!";
close;
}
mes .NPC$;
    mes "Here you go!";
    set ##CASHPOINTS,##CASHPOINTS += .@amount2;
    delitem .ID,.@amount;
    dispbottom "You got "+.@amount+" Cashpoints!";
    close;

    OnInit:
        set .NPC$,"[ " +strnpcinfo(1)+ " ]"; // NPC Name
        set .ID,671; // Item to take
        set .NP,1; // Amount of Cashpoints to give
        end;
}
Edited by rakuzas
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

change

##CASHPOINTS

to

#CASHPOINTS
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.04
  • Content Count:  459
  • Reputation:   6
  • Joined:  06/29/12
  • Last Seen:  

Thanks.. Now its works.. ^_^

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