VIP Hopping! Quick clanhop to BAfH for all VIP room goodies!

Actually, you can each define the other as leader_replacement. It will switch to leader_replacement at any time that the person running the script is leader of the clan.

The only time you'd need to define alternate_replacement is if you're running both characters on the same mafia installation. (The feature is designed for a 1 person clan of multis.) Since your clannie is on a different computer than yourself, you don't need to worry about that.
 
Last edited:
So, I tried to use your script example up there. I actually copied it verbatim into a script. However when i just ran it I got the following output:
Code:
Hopping over to Bonus Adventures from Hell.
Unable to invoke 90485
Returning to home clan.
Visiting Crimbo Tree in clan VIP lounge
Visiting Looking Glass in clan VIP lounge
Approaching pool table with a stylish stance.
Huh? Unknown response.
Approaching pool table with a stylish stance.
Huh? Unknown response.
Approaching pool table with a stylish stance.
Huh? Unknown response.
Executing request...
Jumping into Awesome Ball Pit in clan rumpus room
You acquire an effect: Having a Ball! (duration: 20 Adventures)
End index 5 out of bounds (bafh.ash, line 83)

I think the problem is that it failed to actually switch clan and thus tried to do everything in my original clan, also indicated by the fact that I got a 10% bonus from the ball pit since my clan have 1000 balls.
 
The actual problem is that my brain "timed out" when I was making that example script. Try this:

Code:
import <bafh.ash>

int origin = origin_clan();
goto_clan(90485);
visit_vip("crimbotree get");
visit_vip("glass");
visit_vip("pool 3");
visit_vip("pool 3");
visit_vip("pool 3");
visit_vip("ballpit");
goto_clan(origin);

At least now I know how many people wanted to do use the script that way. ;)
 
Last edited:
Thank you :)

And yes... I don't need to be in bafh during rollover since my clan has all +adv furniture already and so a script I can run when I need it is probably the best version :)
 
I figured that there would be people in your situation. Yet you're the first to notice my code was screwed up.
 
Hmm... Script today exited with a "End index 5 out of bounds (bafh.ash, line 83)" shortly before hopping back to original clan (i.e. did everything else but the hopping back which I then did manually). Any idea of why?
 
Hmm... Script today exited with a "End index 5 out of bounds (bafh.ash, line 83)" shortly before hopping back to original clan (i.e. did everything else but the hopping back which I then did manually). Any idea of why?

I haven't looked at this script, but one place that tends to generate such an error is when trying to parse a string without regex, when said string ends up empty. Tends to happen in laggy times, ie close to rollover. If this script uses any non-regex string searching, this would probably be something to look into.

If not, I'm just being crazy (again). (I must like being crazy in threads where Bale has recently posted :P )
 
I haven't looked at this script, but one place that tends to generate such an error is when trying to parse a string without regex, when said string ends up empty. Tends to happen in laggy times, ie close to rollover. If this script uses any non-regex string searching, this would probably be something to look into.
This is probably worthy of a new thread but... Could you elaborate? I have a script that gets a page from JickenWings.org and then parses it. It consistently fails to find something on the first run of a session but when I re-run it immediately it succeeds. It calls visit_url and then calls index_of on the result. Have I come across a known feature or should I, perhaps, put some effort into gathering more data?
 
Hmm... Script today exited with a "End index 5 out of bounds (bafh.ash, line 83)" shortly before hopping back to original clan (i.e. did everything else but the hopping back which I then did manually). Any idea of why?

Could you tell me exactly what you were doing? I can think of several ways that might have happened if you were attempting to call bafh() directly, instead of using the entire script, but you didn't say enough that I can figure out exactly what you did. Did you vary at all from the suggestion in post#23? (Actually, you must have varied from that or else you wouldn't have called bafh() at all.)
 
This is probably worthy of a new thread but... Could you elaborate? I have a script that gets a page from JickenWings.org and then parses it. It consistently fails to find something on the first run of a session but when I re-run it immediately it succeeds. It calls visit_url and then calls index_of on the result. Have I come across a known feature or should I, perhaps, put some effort into gathering more data?

Trying a few things out currently, but I can't seem to reproduce my original problem (I honestly can't remember what it was...). To be safe, you should always test a string before looking for something at a specific index. I personally find regex matches safer, as they have built-in ability to handle matching without needing to specify a position, and it's the position that usually causes problems.

For example, if you hard-code into a script that it should look up the index of something in a visit_url() result, and take the text X characters afterwards, you'll run into problems when the result has timed-out.
 
Could you tell me exactly what you were doing? I can think of several ways that might have happened if you were attempting to call bafh() directly, instead of using the entire script, but you didn't say enough that I can figure out exactly what you did. Did you vary at all from the suggestion in post#23? (Actually, you must have varied from that or else you wouldn't have called bafh() at all.)

I ran the script just as you posted it in #23. I can't retest it at the moment though as I forgot my USB-stick at work and I have all my mafia things on there...

I've made a script, currently called login.ash since I figured I'd use it for breakfasting sometime, with that content. I called it from the scripts menu and it jumped to bafh, did all the fun things and then failed while trying to jump back.
 
I cannot see how that could have generated the error you descibe since it never would have gotten near line 83. My earlier mistaken version could have possibly had that error (if you'd also used "ball" instead of "ballpit"), so perhaps you aren't using it correctly. When you get your USB stick, please check to see what commands you are using and post them here.
 
I will check in an hour or so when I get to work and get access to my forgotten USB-stick :)

Edit: So, I've found the error. I had forgot to change the last line and so that was still the faulty bafh(origin);. Should probably work now :)
 
Last edited:
Ok. I just thought of a thing that is probably mainly my fault but it would be nice if the script wouldn't let me do it :)

Being in Badmoon stops you from accessing the VIP-room and as such it is quite pointless to clanjump. Is there any check one could add to the top of the script to abort if the player is in badmoon?
 
Line 1,
Code:
if(in_bad_moon()){
   print("You're in BM, so clan-jumping is useless.");
   exit;
}
should do the trick. (Exit used here instead of abort because abort is messy and stops all automation.)
 
Ok. I just thought of a thing that is probably mainly my fault but it would be nice if the script wouldn't let me do it :)

Being in Badmoon stops you from accessing the VIP-room and as such it is quite pointless to clanjump. Is there any check one could add to the top of the script to abort if the player is in badmoon?
LoLoLoL! Hee-hee.

"Doctor, it hurts if I hit myself in the head." Doctor replies, "Then stop doing that!"

Updated!

The new version will save you from doing that.
 
Yay! Thanks :)

I was fooling around on the wiki trying to find a funciton for it but only found can_interact() and in_hardcore(). Maybe add in_bad_moon() to the "see also" of those funcitons?
 
in_bad_moon() is there. You needed to look a little lower. Also, the wiki has a very useful search function.
 
Back
Top