Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 14th, 2012  |  syntax: JavaScript  |  size: 2.89 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var status = 0;  
  2.          
  3.     function start() {  
  4.         status = -1;  
  5.         action(1, 0, 0);  
  6.     }
  7.          
  8.     function action(mode, type, selection) {
  9.                
  10.         if (mode == -1) {  
  11.             cm.dispose();  
  12.         }  
  13.         else {
  14.             if (status == 0 && mode == 0) {
  15.                 cm.dispose();    
  16.                 return;    
  17.             }    
  18.                    
  19.             if (mode == 1) {  
  20.                 status++;  
  21.             }      
  22.             else {  
  23.                 status--;
  24.             }  
  25.             if (status == 0) {
  26.                 cm.sendNext("Hello, Iam the JQ rewards Exchanging NPC");
  27.            } else if
  28.             (status == 1) {
  29.                 cm.sendSimple("What would you like to do?\r\n#L0#Trade 50 Neverending Snow #i40318754# for 25 Delicious Snow #i4031428##l\r\n#L1# Trade 100 Neverending Snow #i40318754# for 50 Delicioius Snow #i4031428##l\r\n#L2#Trade 50 Neverending Snow  #i40318754# for 1000 Maple Leaves #i4001126##l");
  30.                 cm.dispose();
  31.                 if (selection == 0) {
  32.                     if (cm.haveItem(40318754, 50)) {
  33.                         cm.gainItem(40318754, -50);
  34.                         cm.gainItem(4031428, 25);
  35.                         cm.sendOk("Have fun with the Delicious Snow #i4031428#");
  36.                         cm.dispose();
  37.                     } else {
  38.                         cm.sendOk("Sorry but you do not have enough Neverending Snow #i40318754#");
  39.                         cm.dispose();
  40.                         if (selection == 1) {
  41.                             if (cm.haveItem(40318754, 100)) {
  42.                                 cm.gainItem(40318754, -100);
  43.                                 cm.gainItem(4031428, 50);
  44.                                 cm.sendOk("Have fun with the Delicious Snow #i4031428#");
  45.                                 cm.dispose();
  46.                             } else {
  47.                                 cm.sendOk("Sorry but you do not have enough Neverending Snow #i40318754#");
  48.                                 cm.dispose();
  49.                                 if (selection == 2) {
  50.                                     if (cm.haveItem(40318754, 50)) {
  51.                                         cm.gainItem(40318754, -50);
  52.                                         cm.gainItem(4001126, 1000);
  53.                                         cm.sendOk("Have fun with the Maple Leaves #i4001126#");
  54.                                         cm.dispose();
  55.                                     } else {
  56.                                         cm.sendOk("Sorry but you do not have enough Neverending Snow #i40318754#");
  57.                                         cm.dispose();
  58.                                     }
  59.                                 }
  60.                             }
  61.                         }
  62.                     }
  63.                 }
  64.             }
  65.         }
  66.     }