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;
}
Question
rakuzas
Hello,
Edited by rakuzasI 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..
2 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.