daily deed for getaway campsite

VladYvhuce

Member
I'm guessing this might be the place to post it, if not let me know. I don't think it's a big thing, but I've been wrong before... If I wanted to make a custom daily deed to gaze at the stars at the getaway campsite, how exactly would I go about that? I'm still very much a novice when it comes to custom deeds.
 

MCroft

Developer
Staff member
So, I am also very much a novice when it comes to custom deeds.

I assume you've found them in Preferences, so you've seen the big help button on the right.

Since the event isn't an item or a skill it's probably best as a command.

In the Builder (the thing that comes up when you press "add custom") ...
1: select - Command (on the left)
2: Add display text (StarGaze)
3: add the preference (I have no idea what preference tracks uses of this)
4: add a gCLI command to do it (probably adv *Location*)
5: if it can be used 6 times, make this 6...
6: add a toolTip ("Click here to StarGaze")
7: add a completion Message ("Stars, man. How do they work?")

Save it. Then make with the clicking!
 

VladYvhuce

Member
Preference is one of those things I never know what to put for any custom deed. But since it's a requirement, I usually just stick a letter or number in there so that Mafia is satisfied and won't reject the creation attempt. Often, I just use the number of uses, in case that has something to do with it.
 

MCroft

Developer
Staff member
Preference is one of those things I never know what to put for any custom deed. But since it's a requirement, I usually just stick a letter or number in there so that Mafia is satisfied and won't reject the creation attempt. Often, I just use the number of uses, in case that has something to do with it.
If there's a real live preference that can be checked, use that. Otherwise use a dummy preference.

For my "I need an autoscend button" Custom deed, I created a preference called "autoscend_button" and set it to false. This keeps my button on the panel at all times.

If there is an actual preference that counted uses, then you could piggyback on that.
 

VladYvhuce

Member
Ok. I've had a migraine much of this afternoon and evening, so I'll look into it further when I can think straight. Many thanks for the help so far.
 

VladYvhuce

Member
Ok. Been trying and for a couple of days and I can say for certain that that's beyond my skills. All roads l've used lead to mafia throwing up a 404 error for place.php. I guess I don't understand what you mean by "craft a url" combined with lack of knowledge of how "visit_url()" works.
 

MCroft

Developer
Staff member
So, based on this wiki page, I think you want something based on visit_url, like this:
visit_url("monkeycastle.php?pwd&action=buyitem&whichitem=3997&quantity=1");

There are lots of examples of visit_url in, for example, the autoscend repository, but you can also turn on verbose logging and see what gets called when you visit that locale in the browser. You can also use the mini-browser to capture the command.

I don't have a getaway campsite, so I can't really help, but once you capture it, the visit_url command should be the way to handle things.
 

AlbinoRhino

Active member
I think you can use the instructions MCroft gave in post #2.
for step 3, the pref needed is '_campAwaySmileBuffs'
for step 4, the command needed is probably: ashq visit_url(\"place.php?whichplace=campaway&action=campaway_sky\")
(notice that the quotes are escaped because this command will actually end up within a larger string that actually comprises the custom deed)

edit: step 5 should be 3 i think.....but you may have to press the button four times b/c i think the first time gives the smoke signal buff which is tracked by a different pref... _campAwayCloudBuffs
 

MCroft

Developer
Staff member
If it gets really complex, or you want logic to it (like "click once if ! CloudBuffs, then once/smile"), then you might want to write a script and have the command be your script's name. That's how I have an autoscend button.
 

VladYvhuce

Member
I think you can use the instructions MCroft gave in post #2.
for step 3, the pref needed is '_campAwaySmileBuffs'
for step 4, the command needed is probably: ashq visit_url(\"place.php?whichplace=campaway&action=campaway_sky\")
(notice that the quotes are escaped because this command will actually end up within a larger string that actually comprises the custom deed)

edit: step 5 should be 3 i think.....but you may have to press the button four times b/c i think the first time gives the smoke signal buff which is tracked by a different pref... _campAwayCloudBuffs
I'm not sure what you mean about the quotes being escaped. But, once I removed the backslashes, it worked like a charm. With the backslashes in place, Mafia threw up an error about an unexpected backslash.

Many thanks to both of you for helping me get this figured out.
 
Top