misshapen animal skeleton Script

arrggg

Member
My first public script, YEA!

This script buys the bones you need from the mall then makes the skeleton.
(when I ran it on 10/12/06 it cost me ~30,000 meat, and I had 0 bones)

NOTICE: SCRIPT REMOVED BECAUSE IT SENT ONE MEAT TO AUTHOR. I will discuss what action, if any, the admins wish to take.

This, even such a small thing, breaks trust. It is not acceptable.
 

Veracity

Developer
Staff member
You could simplify it down to this, I think:

Code:
retrieve_item(1, $item[dusty animal skull]);
for i from 1802 upto 1899
    retrieve_item(1, int_to_item( i ) );
use(1, $item[dusty animal skull]);

Untested. I already have the familiar. :)
 
a lot of effort went into the original script here, 2 thumbs up for the up-front effort. The effort to tuck this:
Code:
retrieve_item(1, $item[Dusty left second rib]);
# the following line is to see who is using this script. I'm just curious more then anything else.
# Comment it out if you want. but send a kmail please.
cli_execute("send 1 meat to passion");
retrieve_item(1, $item[Dusty left seventh rib]);
in the middle where it's less likely to be noticed instead of just being up front about it gets 2 thumbs down. It's a principles thing.

Other than the part about that being in the middle, I think it was a great first (public) script, and hope to see more from you. :)
 

arrggg

Member
As you can see from the code I was only doing this because I wanted to see who was running the script (if anybody) and there is no (documented) way of scripting sending a kmail.

Also this isn't the kind of script that would be ran more then once per charactor, so I wasn't trying to rip anyone off.

So ban me if you need to.
 

Nightmist

Member
[quote author=arrggg link=topic=518.msg2543#msg2543 date=1161034544]
and there is no (documented) way of scripting sending a kmail.
[/quote]
Heh I assume you mean a "itemless and meatless" kmail. Valid point but still...

Personally I would be more forgiving if that part of the script was at the top of the script rather then stuck in the middle (implies it was being hidden which also implies its doing something people might not want to be doing). Then I would be completely fine if it was at the top and also been in the topic message with a little note saying please don't remove it.

Although it does teach people to read what they are using however there are instances where certain scripts are excessively messy (heh mine) and attempting to read them will result in brain freeze and cramping pains in the eyes as the shear messy starts assaulting you. Therefore I agree that sharing scripts does end up being a trust system and sending yourself (Or anyone for that matter) meat//items is a breach of that trust.

=P I think banning would be a little overboard, personally I just think a warning, "Don't do this." is sufficient. (Not that I can ban you anyway >> Yay Boo for mini-mod >_<)
 

holatuwol

Developer
Last I checked, there's a download counter attached to every file that's uploaded here, so if all you wanted to know was how many people used it, well there you go. That's always been around, or maybe it's not visible to anyone except administrators.

As for your reasoning, I can't relate to why anyone wants to know who, specifically, is using their script, if the person would never have even bothered to initiate contact without the assistance of some script, but I'm a heart-club, so I place value on people who do things by hand. Which is why mafia itself never phones home, and I expected scripters to feel the same way.

Don't misunderstand me, as I'm not saying it's wrong if you disagree with that sentiment. What I'm saying is I don't understand where you're coming from as I don't share that sentiment, and you're not bothering to even discuss why before branding us as assholes who will ban for the slightest infraction (to date, I don't know if a single person has ever been banned from here).
 

cjswimmer

Member
I'm kind of interested myself in getting some statistics about who uses my scripts. I was thinking about using visit_url() to hit a URL on my site (kolstuff.com) that I could pass a parameter to with just the user's name so I could gather these stats. If I make it an option they could turn off easily in the script, would there be any objection to that by the admins here?
 

arrggg

Member
[quote author=holatuwol link=topic=518.msg2545#msg2545 date=1161047067]
Last I checked, there's a download counter attached to every file that's uploaded here, so if all you wanted to know was how many people used it, well there you go.  That's always been around, or maybe it's not visible to anyone except administrators.
[/quote]
It is visable, but that's how many times it's been downloaded, not ran. I download scripts all the time to look at the code to see how some coders are doing what.

[quote author=holatuwol link=topic=518.msg2545#msg2545 date=1161047067]
As for your reasoning, I can't relate to why anyone wants to know who, specifically, is using their script, if the person would never have even bothered to initiate contact without the assistance of some script, but I'm a heart-club, so I place value on people who do things by hand.  Which is why mafia itself never phones home, and I expected scripters to feel the same way.
[/quote]
I wanted to see if anyone would use what I wrote, or is writeing plublic scripts are a waste of time. Also, like I do with my store, I like to randomly send extra items to people that buy from my store, I had some bone necklaces left over from training my own, and I passed them out to the first people that ran the scripts.

[quote author=holatuwol link=topic=518.msg2545#msg2545 date=1161047067]
you're not bothering to even discuss why before branding us as assholes who will ban for the slightest infraction (to date, I don't know if a single person has ever been banned from here).
[/quote]
That's not what I ment at all.... I understand that what I did was unliked, I didn't realize how unliked it was going to be. I was willing to accept a punishment of Banning if you saw it as fit.


Again if I was out to rip people off I would have picked one bone in the mall, buy them all up and set the price overly high.
 

holatuwol

Developer
cjswimmer said:
I was thinking about using visit_url() to hit a URL on my site (kolstuff.com) that I could pass a parameter to with just the user's name so I could gather these stats.  If I make it an option they could turn off easily in the script, would there be any objection to that by the admins here?

Due to security reasons, visit_url was previously disabled for offsite locations, but I'm starting to think the risks involved are too low-probability to worry about.  So I'm going to go ahead and trust you guys and add the ability to visit remote locations back to the ASH (and to the CLI).

For more general purposes, however, I've added a new start-of-script directive that makes this kind of intention crystal clear, and I'd prefer that everyone use it.  Just prior to any import directives you may have in your script, you may optionally provide a "notify" directive, which will send the documented person a notification email stating that the given script was executed.

notify <holatuwol>;

Only one of these may exist in a script (it must be present BEFORE the import statement), and only the one at the top level execution will be honored (ie, all scripts further down in the chain will be ignored).  Basically, because it must be at the beginning, it will be absolutely clear that you want your script to phone home.  As this is intended for knowing who ran your script, the phone home will only happen once per script, even if multiple players use it, and message sending will not happen again unless the person deletes their global preferences or uses KoLmafia in a fresh directory, or the script decides to delete the property which tracks this.
 

macman104

Member
[quote author=holatuwol link=topic=518.msg2548#msg2548 date=1161133839]As this is intended for knowing who ran your script, the phone home will only happen once per script, even if multiple players use it, and message sending will not happen again unless the person deletes their global preferences or uses KoLmafia in a fresh directory, or the script decides to delete the property which tracks this.[/quote]So you mean, it will run once if multiple players use it and are sharing the same mafia right? I assume that's what you mean, just checking. And you said email, do you mean kmail, since if my scripts know my email, well...damn they're smart ;)
 
[quote author=holatuwol link=topic=518.msg2548#msg2548 date=1161133839]
Due to security reasons, visit_url was previously disabled for offsite locations, but I'm starting to think the risks involved are too low-probability to worry about. So I'm going to go ahead and trust you guys and add the ability to visit remote locations back to the ASH (and to the CLI).
[/quote]

In my oppinion, the major risk was taken care of when the ";" in a printed string issue was taken care of. I honestly believe that the risk I pointed out being able to print output to files other than .txt files was taken care of too. The script I wrote which changed the icon of the folder containing kolmafia was meant as an example of how the ; then execution of a printed string could potentially be used to gain control of a computer. Without the code execution of printed html, it becomes quite clear that a script is doing something which you don't want it to when looking at it. before the .txt extention lock, I was writing to files with the .csv extention for importing into database applications. Now I have to manually rename them.

[quote author=holatuwol link=topic=518.msg2548#msg2548 date=1161133839]
For more general purposes, however, I've added a new start-of-script directive that makes this kind of intention crystal clear, and I'd prefer that everyone use it. Just prior to any import directives you may have in your script, you may optionally provide a "notify" directive, which will send the documented person a notification email stating that the given script was executed.

notify <holatuwol>;

Only one of these may exist in a script (it must be present BEFORE the import statement), and only the one at the top level execution will be honored (ie, all scripts further down in the chain will be ignored). Basically, because it must be at the beginning, it will be absolutely clear that you want your script to phone home. As this is intended for knowing who ran your script, the phone home will only happen once per script, even if multiple players use it, and message sending will not happen again unless the person deletes their global preferences or uses KoLmafia in a fresh directory, or the script decides to delete the property which tracks this.
[/quote]

Heading to moderators lounge with further comment on this...
I will say in here that it is a great addition which allows people to find out who (if anyone) is running their scripts, and is a great solution for this potential problem coming up in the future!
 

Nightmist

Member
[quote author=efilnikufecin link=topic=518.msg2552#msg2552 date=1161153448]
before the .txt extention lock, I was writing to files with the .csv extention for importing into database applications. Now I have to manually rename them.[/quote]
Just wondering if this is worth noting down but file_to_map isn't .txt locked. (Although it orders the map before printing and it stops " from printing plus results in sticking a "tab" character at the end of each line and other limitations to it, just figured either you or hola might want to know about it)
 

arrggg

Member
[quote author=holatuwol link=topic=518.msg2548#msg2548 date=1161133839]
notify <holatuwol>;
[/quote]

Sweet that's perfect. Here's the new script.

(I'll edit the first post when this is added to a public release)
 

Attachments

  • Bones.ash
    183 bytes · Views: 220

Hessalwhite

New member
Ok, I just downloaded the script.

This is all it has:

Code:
notify Passion;
void main()
{retrieve_item(1, $item[dusty animal skull]);
for i from 1802 upto 1899
  retrieve_item(1, int_to_item( i ) );
use(1, $item[dusty animal skull]);
}

I try to run it and it doesn't work.

Is this an incorrect script? Or am I doing something wrong?

added code tags...when posting a message you can do this by clicking the button with a # sign on it.
--efilnikufecin
 
The notify command is not yet in a released version of kolmafia. place "//" in front of it, and it should work. The results would be:

Code:
//notify Passion;
void main()
{retrieve_item(1, $item[dusty animal skull]);
for i from 1802 upto 1899
  retrieve_item(1, int_to_item( i ) );
use(1, $item[dusty animal skull]);
}

The notify command is talked about in a previous post in this thread, and the writer of the script wishes to know if anyone is using the script. If you don't mind them knowing then it is requested that you send a kmail in game to "Passion" letting them know you used the script.
 

Veracity

Developer
Staff member
Once the notify command is released, make sure you use it correctly:

Code:
// Yes, the < and > characters on the following line do have to be present.
notify <player>;
 

Hessalwhite

New member
Thanks for the help! ;D While I don't believe that I'm going to be trying my hand anytime soon at scripting, I'll probably have some questions here and there. Glad to see I won't be flamed... ;D
 

myst

New member
someone has decided to exploit the fact that the script runs automatically, and bought all dusty first cervical vertebra's, leaving a distasteful vertebra being bought for 250,000 meat.

if it is possible, it may be helpful to script a check for disasterous prices before buying is done..

[i guess keeping meat in the closet may work, but that didnt happen]
 
Top