Advertisement
exiled-bot_net

orbs

Jan 22nd, 2014
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.82 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <sstream>
  5.  
  6. using namespace std;
  7.  
  8. int orbid[7];
  9. int nOrbs[7];
  10. int bOrbs[7];
  11. bool sell[7];
  12.  
  13. void loadOrbUpg();
  14. int checkalts();
  15.  
  16. int config()
  17. {
  18.     loadOrbUpg();
  19.     //upgrade currency
  20.     if(bOrbs[0] != -1) //Trans
  21.     {
  22.         //code to move currency to inventory
  23.         //code to go to vendor
  24.         //code to search vendor inventory for upgraded currency type
  25.         //code to move mouse to the upgraded currency type
  26.         for(int i = 0; i < bOrbs[0]; i++)
  27.         {
  28.             //code to control click
  29.         }
  30.     }
  31.     else if(bOrbs[1] != -1) //Aug
  32.     {
  33.         //code to move currency to inventory
  34.         //code to go to vendor
  35.         //code to search vendor inventory for upgraded currency type
  36.         //code to move mouse to the upgraded currency type
  37.         for(int i = 0; i < bOrbs[1]; i++)
  38.         {
  39.             //code to control click
  40.         }
  41.     }
  42.     else if(bOrbs[2] != -1) //Alt
  43.     {
  44.         //code to move currency to inventory
  45.         //code to go to vendor
  46.         //code to search vendor inventory for upgraded currency type
  47.         //code to move mouse to the upgraded currency type
  48.         for(int i = 0; i < bOrbs[2]; i++)
  49.         {
  50.             //code to control click
  51.         }
  52.     }
  53.     else if(bOrbs[3] != -1) //Jeweler
  54.     {
  55.         //code to move currency to inventory
  56.         //code to go to vendor
  57.         //code to search vendor inventory for upgraded currency type
  58.         //code to move mouse to the upgraded currency type
  59.         for(int i = 0; i < bOrbs[3]; i++)
  60.         {
  61.             //code to control click
  62.         }
  63.     }
  64.     else if(bOrbs[4] != -1) //Fusing
  65.     {
  66.         //code to move currency to inventory
  67.         //code to go to vendor
  68.         //code to search vendor inventory for upgraded currency type
  69.         //code to move mouse to the upgraded currency type
  70.         for(int i = 0; i < bOrbs[4]; i++)
  71.         {
  72.             //code to control click
  73.         }
  74.     }
  75.     else if(bOrbs[5] != -1) //Scouring
  76.     {
  77.         //code to move currency to inventory
  78.         //code to go to vendor
  79.         //code to search vendor inventory for upgraded currency type
  80.         //code to move mouse to the upgraded currency type
  81.         for(int i = 0; i < bOrbs[5]; i++)
  82.         {
  83.             //code to control click
  84.         }
  85.     }
  86.     else if(bOrbs[6] != -1) //Regret
  87.     {
  88.         //code to move currency to inventory
  89.         //code to go to vendor
  90.         //code to search vendor inventory for upgraded currency type
  91.         //code to move mouse to the upgraded currency type
  92.         for(int i = 0; i < bOrbs[6]; i++)
  93.         {
  94.             //code to control click
  95.         }
  96.     }
  97. }
  98. void loadOrbUpg()
  99. {
  100.     ifstream orbupgs("upgorb.odb");
  101.     int i = 0;
  102.     while(i < 7)
  103.     {
  104.         string temp;
  105.         getline(orbupgs, temp);
  106.         if(temp.find(";") == string::npos)
  107.         {
  108.             orbid[i] = stoi(temp);
  109.         }
  110.         else
  111.         {
  112.             i++;
  113.         }
  114.     }
  115.     nOrbs[0] = checkport();
  116.     nOrbs[1] = checktrans();
  117.     nOrbs[2] = checkaugs();
  118.     nOrbs[3] = checkalts();
  119.     nOrbs[4] = checkjews();
  120.     nOrbs[5] = checkchance();
  121.     nOrbs[6] = checkscour();
  122.     for(int i = 0; i < 7; i++)
  123.     {
  124.         bOrbs[i] = -1;
  125.     }
  126.     if(orbid[0] >= checkport())
  127.     {
  128.         bOrbs[0] = nOrbs[0]/7;
  129.     }
  130.     if(orbid[1] >= checktrans())
  131.     {
  132.         bOrbs[1] = nOrbs[1]/4;
  133.     }
  134.     if(orbid[2] >= checkaugs())
  135.     {
  136.         bOrbs[2] = nOrbs[2]/4;
  137.     }
  138.     if(orbid[3] >= checkalts())
  139.     {
  140.         bOrbs[3] = nOrbs[3]/4;
  141.     }
  142.     if(orbid[4] >= checkjews())
  143.     {
  144.         bOrbs[4] = nOrbs[4]/2;
  145.     }
  146.     if(orbid[5] >= checkchance())
  147.     {
  148.         bOrbs[5] = nOrbs[5]/4;
  149.     }
  150.     if(orbid[6] >= checkscour())
  151.     {
  152.         bOrbs[6] = nOrbs[6]/2;
  153.     }
  154. }
  155.  
  156. int checkalts()
  157. {
  158.     int stashcount = 0;
  159.     //code to get number of fusings in stash, and assign the total amount to stashcount
  160.     return stashcount;
  161. }
  162. //do the same for each orb type in the following functions
  163. int checkport()
  164. {
  165.     int stashcount = 0;
  166.     return stashcount;
  167. }
  168. int checktrans()
  169. {
  170.     int stashcount = 0;
  171.     return stashcount;
  172. }
  173. int checkaugs()
  174. {
  175.     int stashcount = 0;
  176.     return stashcount;
  177. }
  178. int checkjews()
  179. {
  180.     int stashcount = 0;
  181.     return stashcount;
  182. }
  183. int checkchance()
  184. {
  185.     int stashcount = 0;
  186.     return stashcount;
  187. }
  188. int checkscour()
  189. {
  190.     int stashcount = 0;
  191.     return stashcount;
  192. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement