Advertisement
ereinion

Pantogram1

May 9th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void usepanto(string modreq)
  2. {
  3.     item p = $item[portable pantogram];
  4.    
  5.     #pantogram_items (see item static list above)
  6.     if    ( item_amount(p) == 0 )
  7.     {
  8.         #no iotm
  9.         return;
  10.     }
  11.    
  12.     if    ( get_property("_pantogramModifier") != "" )
  13.     {
  14.         #already used today
  15.         return;
  16.     }
  17.    
  18.     #==========================================================================
  19.     #usage info & example links - pantogram
  20.     #==========================================================================
  21.        
  22.         /* pantogram example - barf farm setup +60 meat
  23.  
  24.         use panto link: inv_use.php?pwd&which=99&whichitem=9573
  25.        
  26.         example creation link:
  27.         mus +10 & st.res & HP +40 & -com & (req porquoise X1 i#706) +60% meat
  28.         params?: m[mus/mys/mox] e[ele res] (sacrifices) s1[left?] s2[right of page] s3[middle?]
  29.         %2C = comma
  30.         negative numbers for non-item sacrifices
  31.         LINK: choice.php?whichchoice=1270&pwd&option=1&m=1&e=5&s1=-1%2C0&s2=706%2C1&s3=-2%2C0
  32.         _pantogramModifier = Muscle: 10, Stench Resistance: 2, Maximum HP: 40, Meat Drop: 60, Combat Rate: 5, Lasts Until Rollover: true
  33.        
  34.          */
  35.     #==========================================================================
  36.     #END usage info & example links - pantogram
  37.    
  38.     boolean use_pp()
  39.     {
  40.         string upp = visit_url("inv_use.php?pwd&which=99&whichitem=9573");
  41.        
  42.         if    ( upp.index_of("You've already summoned") > -1 )
  43.         {
  44.             return false;
  45.         }
  46.        
  47.         return true;
  48.     }
  49.    
  50.     #http://kol.coldfront.net/thekolwiki/index.php/Pantagramming#Pant_Modifiers
  51.     #modreq values
  52.     #barffarm = Muscle: 10, Stench Resistance: 2, Maximum HP: 40, Meat Drop: 30 [taco shell 173], Combat Rate: 5
  53.     #meat+c = Muscle: 10, Stench Resistance: 2, Maximum HP: 40, Meat Drop: 30 [taco shell 173], Combat Rate: 5
  54.     #barffarm60 = Muscle: 10, Stench Resistance: 2, Maximum HP: 40, Meat Drop: 60 [porquoise 706], Combat Rate: 5
  55.     #meat60+c = Muscle: 10, Stench Resistance: 2, Maximum HP: 40, Meat Drop: 60 [porquoise 706], Combat Rate: 5
  56.    
  57.     #%2C = comma
  58.     #mafia will encode a '%' sign as %25 if used in the url - so %2C is submitted as %252C
  59.     #from session log:
  60.     #choice.php?whichchoice=1270&pwd&option=1&m=1&e=5&s1=-1%252C0&s2=706%252C1&s3=-2%252C0
  61.     #this produces pants with only the m= & e= enchantments
  62.    
  63.     #http://wiki.kolmafia.us/index.php?title=Visit_url
  64.     #buffer visit_url(string page ,boolean use_POST (def T) , boolean encoded (def F) )
  65.     #performing a POST request if use_POST is omitted or true, or a GET request if false.
  66.     #encoded is false if the parameter is not used. If set to true, then the url is assumed to be pre-encoded by the user.
  67.    
  68.     string getpants = "";
  69.     #+com, +30% mt
  70.     if    ( modreq == "barffarm" || modreq == "meat+c" )
  71.     {
  72.         if    ( logrtrv(1,$item[taco shell]) )
  73.         {
  74.             if    ( use_pp() )
  75.             {
  76.                 getpants = visit_url("choice.php?whichchoice=1270&pwd&option=1&m=1&e=5&s1=-1%2C0&s2=173%2C1&s3=-2%2C0",true,true);
  77.             }
  78.         }
  79.     }
  80.    
  81.     #+com, +60% mt
  82.     if    ( modreq == "barffarm60" || modreq == "meat60+c" )
  83.     {
  84.         if    ( logrtrv(1,$item[porquoise]) )
  85.         {
  86.             if    ( use_pp() )
  87.             {
  88.                 getpants = visit_url("choice.php?whichchoice=1270&pwd&option=1&m=1&e=5&s1=-1%2C0&s2=706%2C1&s3=-2%2C0",true,true);
  89.             }
  90.         }
  91.     }
  92.    
  93.     #exit choice with nothing (ch#2 ?)
  94.     if    ( getpants == "" )
  95.     {
  96.         getpants = visit_url("choice.php?whichchoice=1270&pwd&option=2");
  97.     }
  98.     else
  99.     {
  100.         bigp("PANTO: "+get_property("_pantogramModifier"),"green",3);
  101.     }
  102.    
  103.     return;
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement