תנסה:
קוד PHP:
/*
NX Cash Selling NPC
By V1ral from www.ancient-ms.net
Put it as any NPC you have ******
Change prices and ammounts to your liking
*/
function start() {
cm.sendSimple ("Would you like to buy some NX?\r\n#r#L0##e50,000 NX - 10,000,000 mesos #n");
}
function action(mode, type, selection) {
cm.dispose();
switch(selection){
case 0:
if(cm.getMeso() >=10000000 ){
cm.sendOk("Thanks, 50,000 NX points have been added to your account.");
cm.modifyNx(50000);
cm.dispose();
}else{
cm.sendOk("You do not have 10000000 meso, you must fail.");
cm.dispose();
}
}
}
או אם הראשון לא עובד:
קוד PHP:
/*
NX Cash Selling NPC
By V1ral from www.ancient-ms.net
Put it as any NPC you have ******
Change prices and ammounts to your liking
*/
function start() {
cm.sendSimple ("Would you like to buy some NX?\r\n#r#L0##e50,000 NX - 10,000,000 mesos #n");
}
function action(mode, type, selection) {
cm.dispose();
switch(selection){
case 0:
if(cm.getMeso() >=10000000 ){
cm.sendOk("Thanks, 50,000 NX points have been added to your account.");
cm.gainNX(50000);
cm.dispose();
}else{
cm.sendOk("You do not have 10000000 meso, you must fail.");
cm.dispose();
}
}
}