Zapping Dungeons of Doom items

TrickyBeta

New member
Alright, here's my script for zapping 4 types of potions and/or a ring of aggravate monster.

There are 4 types of bad potions; the rest are at least marginally good.

Effects from worser to slightly bad: (at least for Oxycore and Teet)
*Sleepy (-30% all stats)
*Confused (- myst, I'm lazy to look up, post in replies)
*Teleportitis (Teleportitis)
*Drunkenness (+3 drunkenness, not harmful for Oxy and Teet)

Now these potions I want zapped IN THIS ORDER. But first, the rings of aggravate. If possible.

Firstly, it zaps your rings (if you have any). Then it zaps each potion in order, from worser to slightly bad. After 1 zap, it stops regardless.

Right now, I have it configured to:
*login playerA
*get A's breakfast
*zap A's stuff
*login playerB
*get B's breakfast
*zap B's stuff

It leaves B logged in so I can eat my food and PvP since B is hardcore Teet. However, it can be configured to exit after B's zapping delightfulness.

Of course, manually configure your potions and the order you want them zapped in. Just a warning.


Code:
void zapstuffA()
{
 if( item_amount( $item[ring of aggravate monster]) > 0)
 {
 cli_execute( "zap 1 ring of aggravate monster");
 return;
 }
 if( item_amount( $item[dark potion]) > 0)
 {
 cli_execute( "zap 1 dark potion");
 return;
 }
 if( item_amount( $item[effervescent potion]) > 0)
 {
 cli_execute( "zap 1 effervescent potion");
 return;
 }
 if( item_amount( $item[swirly potion]) > 0)
 {
 cli_execute( "zap 1 swirly potion");
 return;
 }
 if( item_amount( $item[murky potion]) > 0)
 {
 cli_execute( "zap 1 murky potion");
 return;
 }
}

void zapstuffB()
{
 if( item_amount( $item[ring of aggravate monster]) > 0)
 {
 cli_execute( "zap 1 ring of aggravate monster");
 return;
 }
 if( item_amount( $item[dark potion]) > 0)
 {
 cli_execute( "zap 1 dark potion");
 return;
 }
 if( item_amount( $item[milky potion]) > 0)
 {
 cli_execute( "zap 1 milky potion");
 return;
 }
 if( item_amount( $item[effervescent potion]) > 0)
 {
 cli_execute( "zap 1 effervescent potion");
 return;
 }
 if( item_amount( $item[fizzy potion]) > 0)
 {
 cli_execute( "zap 1 fizzy potion");
 return;
 }
}

void main()
{
 cli_execute( "login playerA");
 cli_execute( "breakfast");
 zapstuffA();
 cli_execute( "login playerB");
 cli_execute( "breakfast");
 zapstuffB();
}
 

macman104

Member
Umm, I'm gonna bet your wand is gonna blow up mighty fast that way. Your wand is only guaranteed for one zap per day, any more than that, and you are risking an asplosion.
 

Nightmist

Member
Any particular reason for the returns??

Code:
void ZapStuffA()
{
 int MaxZapA;
 int CurZapA;
 MaxZapA = 0;
 CurZapA = 0;
 if( item_amount( $item[ring of aggravate monster]) > 0 && CurZapA < MaxZapA)
 {
 cli_execute( "zap 1 ring of aggravate monster");
 CurZapA = CurZapA + 1;
 }
 if( item_amount( $item[dark potion]) > 0 && CurZapA < MaxZapA)
 {
 cli_execute( "zap 1 dark potion");
 CurZapA = CurZapA + 1;
 }
 if( item_amount( $item[effervescent potion]) > 0 && CurZapA < MaxZapA)
 {
 cli_execute( "zap 1 effervescent potion");
 CurZapA = CurZapA + 1;
 }
 if( item_amount( $item[swirly potion]) > 0 && CurZapA < MaxZapA)
 {
 cli_execute( "zap 1 swirly potion");
 CurZapA = CurZapA + 1;
 }
 if( item_amount( $item[murky potion]) > 0 && CurZapA < MaxZapA)
 {
 cli_execute( "zap 1 murky potion");
 CurZapA = CurZapA + 1;
 }
}

void ZapStuffB()
{
 int MaxZapB;
 int CurZapB;
 MaxZapB = 0;
 CurZapB = 0;
 if( item_amount( $item[ring of aggravate monster]) > 0 && CurZapB < MaxZapB)
 {
 cli_execute( "zap 1 ring of aggravate monster");
 CurZapB = CurZapB + 1;
 }
 if( item_amount( $item[dark potion]) > 0 && CurZapB < MaxZapB)
 {
 cli_execute( "zap 1 dark potion");
 CurZapB = CurZapB + 1;
 }
 if( item_amount( $item[milky potion]) > 0 && CurZapB < MaxZapB)
 {
 cli_execute( "zap 1 milky potion");
 CurZapB = CurZapB + 1;
 }
 if( item_amount( $item[effervescent potion]) > 0 && CurZapB < MaxZapB)
 {
 cli_execute( "zap 1 effervescent potion");
 CurZapB = CurZapB + 1;
 }
 if( item_amount( $item[fizzy potion]) > 0 && CurZapB < MaxZapB)
 {
 cli_execute( "zap 1 fizzy potion");
 CurZapB = CurZapB + 1;
 }
}

void main()
{
 cli_execute( "login playerA");
 cli_execute( "breakfast");
 ZapStuffA();
 cli_execute( "login playerB");
 cli_execute( "breakfast");
 ZapStuffB();
}

In response to macman, heres one that can set the maximum amount of turns you want to use your wand for. Change "MaxZapA" to the inv value for maximum wand uses for character A and then "MaxZapB" for maximum wand uses for character B. (Untested of course).

Also note it only zaps one of each item, change if's to whiles if you want to zap more then one of each.
 

macman104

Member
actually I just realized the returns are what prevents you from overzapping. The return tells the function to stop and return, well in this case nothing since its a void function, but yea, I overlooked that.
 
Top