Log in

View Full Version : My minor utility scripts



Gnomad
10-15-2015, 12:45 PM
Crappy scripts I've written lately that don't deserve their own threads:

;waypoint: ;go2-s multiple targets in a row. Useful if you're in the landing and you want to ;waypoint nmarket advguild or something similar and don't want to write custom targets for each town's bank/advguild/etc.

;errand: Waits for the next experience pulse, then ;go2-s wherever you told it to. Can't waste that 3x!

;raise: F2P cleric script. Casts 318 for you and keeps track the last 10 bodies you've raised. ;raise add and ;raise list to see who you've raised recently.

;link: F2P empath script. Links and keeps track the last 10 bodies you've healed. ;link add and ;link list to see who you've raised recently.

;prettiernum: fork of ;prettynum to work with BANK ACCOUNT. Right-aligns BANK ACCOUNT.

;forgery: fork of forge-perfect to fix bugs

;drizzleback - For people running Wizard, Avalon, or Profanity, ;drizzleback adds brackets (or other tokens of your choice) around stormfront links. Does not support "clicking".

;fuck-forging: lets you change the line where you nod, satisfied with your work.

;stylebold: adds tokens around monsterbold tags for screen readers and to make your logs prettier(?)

;cman_calc: tells you how much RT your feint or disarm gave a target and how much it lowered its stance by. Will eventually add other RT-inflicting CMANs/Guild Skills to this. Lemme know what you know about other ones (sweep, tackle, shield trample, etc.).

;medwaggle: adds meditation to waggle. Can be in lieu of waggle, or, if you're like me, after waggle is already running and you realize you'll need more mana.

;celeryme: whispers ooc to your group when your 506 cooldown ends

;feint_calc: tells you how much RT your feint gave a target and how much it lowered its stance by. Deprecated, use cman_calc

;betazzherb: fork of ;zzherb with more features. Has its own thread (http://forum.gsplayers.com/showthread.php?91762-zzherb-script-for-anything-forageable).

;ifttt: Send events to your IFTTT.com (If This Then That) account. Replacement for ;twitter. So ugly only its mother can love, but eventually getting more work. See this post (http://forum.gsplayers.com/showthread.php?98882-My-minor-utility-scripts&p=1854382#post1854382) for basic setup.

;twitter: Broken. Twitter pulled the old method I used to access tweets because twitter has yet to make any money and changing how developers access tweets will magically fix that. ONLY MOSTLY DEAD

Tgo01
10-15-2015, 12:49 PM
I love making things prettier.

elcidcannon
10-15-2015, 02:39 PM
You must spread some Reputation around before giving it to Gnomad again.

;waypoint is a script that I've been looking for forever. Thanks!

Fallen
10-15-2015, 02:42 PM
Just to be clear, prettiernum does everything prettynum does and more, right?

Gnomad
10-15-2015, 02:50 PM
Just to be clear, prettiernum does everything prettynum does and more, right?

Yup. I literally just added a few lines to prettynum. I tested it on fame lists and a few other places and it all seems to work the same.

Gnomad
10-16-2015, 11:21 AM
Bump to say I added the rest of my scripts to the OP and linked to the zzherb/betazzherb thread.

Mumblz
10-16-2015, 11:29 AM
RT adders you may consider include subdue, subdual strike, (many) cheapshots...

Nice collection

Gnomad
10-16-2015, 12:28 PM
People use subdual strike? :shocked:

I'll go through and add rogue guild and warrior guild stuff eventually; between me and my buddy we have access to most of the skills. More once he masters cheapshot.

I should point out since Mogonis was asking on lnet that ;forgery is not nearly as tested as most of my scripts are. I've fixed the bugs I've run into, but I'm only using it right now to try to make a perfect hammer. It sounds like there's still a lot of bugs left to fix; I'll get to them as I run into them, or if people post logs here.

Gnomad
10-17-2015, 12:14 PM
Bug fix update for ;raise.

Gnomad
10-21-2015, 09:33 AM
New script: errand.lic

Usage: ;errand 188, ;errand bank.

Waits til you get an experience pulse, then runs off the supernode your ass is using to stack 3x and RPAs on to ;go2 whatever you told it to go2.

Gnomad
11-15-2015, 11:47 PM
Updated raise because I was half asleep when I wrote it and screwed up handling the 11th body. (It would delete body #10, not body #1.) You'll probably want to reset your lists, because they're inaccurate.

Me am good coder person who knows difference between queue and stack, me promise.

Haldrik
12-08-2015, 01:09 PM
New script: errand.lic

Usage: ;errand 188, ;errand bank.

Waits til you get an experience pulse, then runs off the supernode your ass is using to stack 3x and RPAs on to ;go2 whatever you told it to go2.

I like this one!

Gnomad
12-26-2015, 03:46 PM
Fixed a bug in ;raise that would add the body to your list if you tried to cast 318 without enough mana.

Gnomad
01-08-2016, 10:43 PM
;forgery is getting some love and bugfixes. Pretty soon and it won't totally suck any more. I'll push a new version to the repo once I know it's good to go, but I'm changing things rapidly here and it's a little hinky.

My highest level character just got an OTF foraging task, so I guess I'll have to deal with the PCs in the room issue soon too. :sigh:

Gnomad
02-18-2016, 02:23 PM
;forgery is getting some love and bugfixes. Pretty soon and it won't totally suck any more. I'll push a new version to the repo once I know it's good to go, but I'm changing things rapidly here and it's a little hinky.

My highest level character just got an OTF foraging task, so I guess I'll have to deal with the PCs in the room issue soon too. :sigh:

Some lnet messages promted an update.

Both of these are still ongoing. ;forgery has taken my warrior's 3rd weapon skill from 0 to 495, so once it gets to 500 and then makes a few perfect pieces I'll keep it all to myself to corner the market. I mean release it.

The PCs in the room issue for betazzherb is mostly handled, but it doesn't like it when you're leading a group. I'll add logic for that eventually.

I released ;link, which is essentially a clone of ;raise but for F2P empaths now that my buddy rolled one up. It doesn't heal your target, just links, so that you can use your favorite healing script or just test to see if you can link to them.

Gnomad
02-18-2016, 02:26 PM
RT adders you may consider include subdue, subdual strike, (many) cheapshots...

Nice collection
Forgot about this. feint_calc is now cman_calc; it now covers feint and disarm. My buddy is a sweep/cheapshot/subdue master, and my warrior is a master-at-arms, so I'll get cracking on some more eventually.

If someone wants to paste a bunch of messages of being on both the giving and receiving end of a cman, go ahead and do so.

Gnomad
03-05-2016, 09:06 AM
New shitty script that's literally 4 lines:

;celeryme: whispers ooc to your group when your 506 cooldown ends

Gnomad
03-27-2016, 12:48 AM
Pushed a minor update to betazzherb so bards aren't forced to sing Tonis.

Gnomad
04-22-2016, 04:22 PM
forgery has been quietly getting some regular updates, and has fixed almost all the bugs of forge-perfects. It shouldn't try to polish random shit in your inventory, it'll MARK your perfects as unsalable, it has an option to drop crap on the ground instead of binning it if you're on lumnis, and it'll migrate your settings to be per-character if you're crazy enough to have more than one forger. It'll also now actually work with polearms and mauls and any other weapon with a forged head. (How did nobody report that bug until today?)

There's a few undocumented and undertested features: ;forgery rank will ignore your normal settings and toss all products, and ;forgery afk n should stop after every n forging attempts until you check your experience. Can be mixed a la ;forgery rank afk 1.

The afk setting is not mentioned in the script's help menu for a reason. I'm trusting that you, the handsome and intelligent readers of this thread, will pay attention when using it. I've tested it for weeks, and it worked fine for me. IF SHIT FUCKS UP AND YOU GET TAGGED FOR AFK SCRIPTING, I TAKE NO RESPONSIBILITY.

Also pushed a few more updates to betazzherb. They're detailed in Zz's thread.

Gnomad
04-22-2016, 11:11 PM
forgery update: Changed the trash options from drop/bin to drop/bin/auto; auto will check your Gift of Lumnis status and bin only if Lich thinks you're not on Lumnis. Also played around with the settings window a smidge. Don't love it. It'll probably change. Also hopefully fixed a bug when they glyph runs out.

It doesn't know anything about RPAs and will happily bin away in that case.

Gnomad
05-17-2016, 04:20 PM
;forgery success story from my buddy:


In the skill of forging - crafting, you are a highly skilled laborer with 402 ranks.
In the skill of forging - one handed edged, you are a journeyman with 203 ranks.
In the skill of forging - one handed blunt, you are a journeyman with 234 ranks.
In the skill of forging - two handed weapons, you are a journeyman with 200 ranks.
In the skill of forging - pole arms, you are a skilled laborer with 361 ranks.
In the skill of forging - brawling weapons, you are a journeyman with 208 ranks.

Lemme know if folks find any bugs.

Gnomad
05-22-2016, 11:55 PM
New script: ;ifttt

https://twitter.com/Dalnirath/status/734589053941784576

It sends a lich event to the Maker channel. https://ifttt.com/maker

You'll need to open up the script and give it your ifttt key for it to work. I'll eventually store that info in your lich settings and all the good stuff, but I wanted to put a proof of concept out there to make Newsby's life a little easier.

You can either do ;ifttt <message to send as value1 as a lich event on the maker channel>, or call it via Script.start('ifttt', message) in your own apps.

It's based on code from my script to talk to slack, which is a bit more comprehensive and I'm not sure I'll ever release. But hey, you never know.

Luxelle
05-23-2016, 01:49 AM
Memorial Day and I thank you!

.. but I've never used this channel! As useful as it sounds, I think I need to set ... stuff ... up right!

Lil help with that, please?

~L.

Gnomad
05-23-2016, 05:59 PM
This should get people started:

https://ifttt.com/recipes/422096-example-ifttt-recipe

If that's not helpful enough, for now:

0. Make an account at IFTTT if you haven't already.
1. Add this recipe: https://ifttt.com/recipes/422096-example-ifttt-recipe
2. Connect the twitter channel if you haven't already. Connect the maker channel.
3. Finish setting up the recipe.
4. Go to https://ifttt.com/maker and copy your key.
5. Open up ifttt.lic and paste it between the key from step 4 in between the ' 's on line 19 so that it reads something like:

@@IFTTT_KEY = 'seKriT7823Key24Here'
(You can ignore the comment on that line, just putting some code in place to make the process more user friendly later on.)
Read over the code to make sure I'm not doing anything untoward. If you're really hardcore about security, get your own cert file and store it in the data directory rather than let ;ifttt get it over http.
6. ;trust ifttt
7. ;ifttt This is an example tweet from the ifttt script.
8. https://twitter.com/Dalnirath/status/734865766005235713

Gnomad
05-23-2016, 06:09 PM
Also, minor change to ;forgery's AFK mode last night or the night before.

It used to pause before getting the tongs, now it pauses afterwards, in case your GM decides to go by the letter rather than the spirit of the law. (Before, if you walked away after the last pull, it would put the blade away, scribe a new slab, and then wait, rather than stop dead and do nothing.) This new logic occasionally double-pauses; I'm trying to track down why.

I'll look into climatewear issues eventually and probably re-do item movement in general at that point.

m444w
05-23-2016, 08:04 PM
I consolidated all of the Climatewear "success" messages and a few other scripted "put" traps here: https://github.com/ondreian/Olib/blob/master/lib/Olib/dictionary/dictionary.rb#L100

if you find it useful feel free to reuse it.

Erous
05-24-2016, 07:55 AM
Forgery log as requested regarding an issue with climatewear. I skipped the travel and some chatter. It doesn't continue past tucking the bar in the greatcloak:

[forgery]>citizenship
You currently have full citizenship in Zul Logoth.
>
[forgery]>location
You carefully survey your surroundings and guess that your current location is Zul Logoth or somewhere close to it.
>
[forgery]>order 2
You ask about the price of a bronze bar.

>
[forgery]>buy
But you do not have enough silver!
>
--- Lich: go2 active.
[go2: ETA: 0:00:01 (8 rooms to move through)]

[go2: travel time: 0:00:00]
--- Lich: go2 has exited.
[forgery]>order 2
>
You ask about the price of a bronze bar.

Stonehammer barely looks up from his work as he says, "If you want that, it'll cost you 132 silvers. Take it or leave it!"
Stonehammer says, "Since you're a citizen of this town, I'll drop the price to 118."

You may order a QUANTITY of this item, ORDER something else, or BUY this item.
>
[forgery]>buy

Stonehammer exclaims, "Sold for 118 silvers!"
Stonehammer takes the 118 silvers you offer in payment.
He hands you a bronze bar and says, "Here's your purchase. Thanks for your patronage."
>
[forgery]>go workshop
Realizing you still have some time remaining, the clerk directs you to your rented workshop.

[forgery]>measure head-glyph
After careful inspection of the head-glyph, you determine it would be necessary to have 4 pounds of bronze to proceed with your craft.
>
[forgery: ]
[forgery: Your glyph requires 4 pound blocks. saving info...]
[forgery: ]
[forgery]>put bar in greatcloak
You tuck the bronze bar into one of the large pouches lining the inside of your traveler's greatcloak.

Luxelle
05-24-2016, 03:25 PM
Thank you!

Luxelle
05-24-2016, 03:39 PM
Add step 8 to your list:
8. ;trust ifttt

And it works! I think I'm going to hardcode in the #GemStoneIV hash tag to my version.

This is a TERRIF little piece of code.

Gnomad
05-24-2016, 06:48 PM
I consolidated all of the Climatewear "success" messages and a few other scripted "put" traps here: https://github.com/ondreian/Olib/blob/master/lib/Olib/dictionary/dictionary.rb#L100

if you find it useful feel free to reuse it.

Thanks! I didn't write the item handling code (forgery is a fork of forge-perfects) so I think I'm going to try to re-do that code with _drag and object IDs first and foremost, but I might end up falling back on those.

edit: Just started digging through that repo, and damn, that's some good stuff. I've been putting off writing group-handling code for a while for betazzherb and your stuff is elegant as heck.

edit2:

# Class to interact with gems
# overwriting Gem is a bad idea
lol

Gnomad
05-24-2016, 06:49 PM
Forgery log as requested regarding an issue with climatewear. I skipped the travel and some chatter. It doesn't continue past tucking the bar in the greatcloak:[/B]Thanks. That's what I expected, but my only climatewear is completely off-the-shelf.

Gnomad
05-24-2016, 06:56 PM
Add step 8 to your list:
8. ;trust ifttt

And it works! I think I'm going to hardcode in the #GemStoneIV hash tag to my version.

This is a TERRIF little piece of code.Thanks!

I added the trust part to the steps, and added #GemStoneIV to the #IFTTTRecipe for #Branding, #Promotion and #EasierSearching.

m444w
05-25-2016, 11:32 AM
Thanks! I didn't write the item handling code (forgery is a fork of forge-perfects) so I think I'm going to try to re-do that code with _drag and object IDs first and foremost, but I might end up falling back on those.

edit: Just started digging through that repo, and damn, that's some good stuff. I've been putting off writing group-handling code for a while for betazzherb and your stuff is elegant as heck.

edit2:

# Class to interact with gems
# overwriting Gem is a bad idea
lol

Thanks.

Some of it isn't as well-tested as I would have liked, mocking the GS game instance + Lich layers to be able to write rspec tests + CI was a bit more of a time-sink than I wanted to deal with.

If you see encounter any problems feel free to open an issue and should you (or anyone else) be feeling really gung-ho I always accept bugfixes/feature additions via pull-requests.

Luxelle
05-25-2016, 09:28 PM
That's exactly where I put the #GemStoneIV hashtag, in the recipe. Because, well, it's one less thing to type for me :)

I added a char count check before ;ifttt sends it to the recipe, too. :)

Soulance
05-31-2016, 03:47 PM
Where's your bigshot thread? I was going to see if there was something that can be done with Sorcs. I noticed that when I cast the Grasp of the Grave and the arms shoot up, it will sometimes move on. I don't have anything set for # of creatures in the room before taking off. At times I will have arms in the room, it moves out, and then re-casts the arms when it comes back to add more arms!

Gnomad
05-31-2016, 08:25 PM
Where's your bigshot thread? I was going to see if there was something that can be done with Sorcs. I noticed that when I cast the Grasp of the Grave and the arms shoot up, it will sometimes move on. I don't have anything set for # of creatures in the room before taking off. At times I will have arms in the room, it moves out, and then re-casts the arms when it comes back to add more arms!

I'm not the one maintaining bigshot. I've got enough legacy scripts on my hands as-is!

Soulance
05-31-2016, 09:37 PM
I'm not the one maintaining bigshot. I've got enough legacy scripts on my hands as-is!
Ah crap, my bad. You write good stuffs but I mixed it up with Haldrik I think... Sorry.

Gnomad
06-30-2016, 08:09 AM
;medwaggle - There's a medwag script on the repo, but it didn't do what I wanted.

;medwaggle is for clerics and empaths.

First, if ;waggle isn't running, it'll start ;waggle. If ;waggle is already running, it'll wait patiently to do its thing.
If you run out of mana mid-waggle, it'll pause waggle, meditate, and unpause it once your meditation is done.
If you don't run out of mana, it doesn't do anything special.

Gnomad
09-26-2016, 04:02 AM
;drizzleback - For people running Wizard, Avalon, or Profanity, ;drizzleback adds brackets (or other tokens of your choice) around stormfront links. Does not support "clicking".

Gnomad
03-12-2017, 08:23 PM
;lumnis_average - Does what it says on the tin.

Forgery got some updates. Fixed some bugs. Pulled out the whole "don't throw things out" code because it's mostly pointless now. Unless you're using BOOST EXP in the forge. Weirdo.