View Full Version : Default Stand Command
tallkris3
04-03-2012, 06:14 PM
When using various scripts anytime your sitting or laying it always uses the stand command incuring a variable amount of roundtime if any.
Whenever possible I use the warrior guild trick to stand so it gives me a flat 2 second RT everytime I use it.
Is there anyway to globally change the default stand command from "stand" to "wtrick roll"? (Not in game now to verify that's the exact verbiage)
If not globally is there a way to change go2 since a good number of scripts piggyback off that script.
I've searched the go2 code and find no mention of the stand command.
Thanks in advance for the help.
subzero
04-03-2012, 10:58 PM
I've searched the go2 code and find no mention of the stand command.
I hope no one ever gets lost with only you around to look for them...
A search for "stand" in go2.lic returns 3 instances:
line 612: fput 'stand' unless standing?
line 706: unless result.nil? or (idx != 0) or (Map.current != start_room) or not standing? or muckled? or dead? (it's not this one!)
tallkris3
04-04-2012, 12:28 AM
I hope no one ever gets lost with only you around to look for them...
A search for "stand" in go2.lic returns 3 instances:
line 612: fput 'stand' unless standing?
line 706: unless result.nil? or (idx != 0) or (Map.current != start_room) or not standing? or muckled? or dead? (it's not this one!)
Wow... I must have been drunk when I searched for that... Thanks for pointing out my gross oversight.
DaCapn
04-04-2012, 01:33 AM
If you want it to be universal, I'd suggest writing a script that runs in the background. Have it set up an upstream hook to catch /\Astand\z/i and substitute your warrior trick. Favorite it on your warrior(s) and call it good. That way you don't have to go around patching scripts (and repeatedly patching them as you update). Won't even take 10 lines.
tallkris3
04-04-2012, 05:00 PM
That's a heck of an idea... now just to figure out how to make it happen. I wonder if Krakii has info about upstream hooks, I guess I'm about to find out.
DaCapn
04-04-2012, 09:50 PM
Voodoo would be a great template to work with. It is almost exactly what I described.
Shaelun
05-04-2012, 10:11 AM
Unless Tillmen changed Lich to sandbox scripts specifically so that they can't redefine core methods, it would be easier to just alias "fput()" to "_fput()" or "original_fput()" or something and overwrite it with a method that passes everything right through except "stand." Being able to replace core functions easily is actually part of the original design:
# some script on your favs list
alias :original_fput :fput
def fput(*args)
original_fput(*args.collect { |arg| arg.gsub(/^sta(?:nd)?$/i, "er, some warrior trick here") })
end
True, it isn't as flashy or professional-sounding as an upstream_hook(), but in the end the upstream_hook() would be doing basically the same exact thing. Unless you want to tinker for the sake of tinkering, there's no need to add unnecessary complexity.
But again, if Tillmen's set up some kind of sandboxed environment for running scripts, this wouldn't work anymore.
tallkris3
05-04-2012, 11:50 AM
I took what you pasted above and dropped it into a new ruby script... changing the part about er, some warrrior trick... to wtrick roll (the mnemonic for it) and when I run the script it just runs and exits.
I'm suspecting it's supposed to continue running in the background and catch each stand command? Assuming something's off and I don't know enough to know what.
DaCapn
05-04-2012, 12:53 PM
Add it to your favorites list and trust it (;trust script).
Also, welcome back (or maybe just hi there) Shaelun.
tallkris3
05-04-2012, 12:56 PM
I trusted it and it still keeps starting and exiting. The new script it named warstand.
>;trust warstand
--- Lich: 'warstand' is now a trusted script.
>;warstand
--- Lich: warstand active.
--- Lich: warstand has exited.
If it helps here's the exact code in the script
# some script on your favs list
alias :original_fput :fput
def fput(*args)
original_fput(*args.collect { |arg| arg.gsub(/^sta(?:nd)?$/i, "wtrick roll") })
end
Tillmen
05-04-2012, 02:03 PM
It's supposed to start and exit. To test if it worked, do something like ;e fput 'stand'
Only untrusted scripts are sandboxed, but all the untrusted scripts share the same sandbox. So, even without trusting it this should work for go2. It wouldn't work for something like bigshot though, because bigshot needs to be trusted to use Distributed Ruby.
tallkris3
05-04-2012, 03:40 PM
Ahh gotcha... I thought it was supposed to run to look for the word stand and replace it.
However I just tested it and you are correct does what I was hoping to have happen with go2.
As long as this works with go2 I'm happy.
Thanks for the help and the code, very much appreciated.
I'm guessing from the need to add it to the favorites if I don't add it there or run it each time I login I'll still stand instead of roll?
Gibreficul
05-07-2012, 02:47 AM
Unless Tillmen changed Lich to sandbox scripts specifically so that they can't redefine core methods, it would be easier to just alias "fput()" to "_fput()" or "original_fput()" or something and overwrite it with a method that passes everything right through except "stand." Being able to replace core functions easily is actually part of the original design:
# some script on your favs list
alias :original_fput :fput
def fput(*args)
original_fput(*args.collect { |arg| arg.gsub(/^sta(?:nd)?$/i, "er, some warrior trick here") })
end
True, it isn't as flashy or professional-sounding as an upstream_hook(), but in the end the upstream_hook() would be doing basically the same exact thing. Unless you want to tinker for the sake of tinkering, there's no need to add unnecessary complexity.
But again, if Tillmen's set up some kind of sandboxed environment for running scripts, this wouldn't work anymore.
HOLY FUCKING SHIT! It's SHAELUN!
Can you fix LNet? By "fix" I mean remove the stupid people who have migrated over? Oh, if only these people understood how it used to be.
ME: Hey Shaelun, any chance you can help me with....
YOU: Did you read all the fucking help shit I included, I didn't put them there for me?
ME: Sorry to bother you, thanks for your time.
^^^ The way it used to be ^^^
Shaelun
05-07-2012, 07:18 PM
When you run a Ruby script, the first thing that happens is the entire file getting scanned so that any method or class defs can be stored for later use. So when you start the script, first the old version of fput() gets saved as the alias original_fput, then the new fput() gets stored so that it's available whenever it gets called (by any script, or even the core Lich code itself). Then the end of the file is reached and the script exits, which doesn't matter because the method has already been stored.
That's a pretty simplified explanation of what really happens first when you run a script, but that's really all you need to know in order to understand why that method will still be getting executed even after the script exits. And yeah, you have to run it every time the program starts, since everything resets when the program exits (each char gets their own running copy of the program, and it closes when you log out).
HOLY FUCKING SHIT! It's SHAELUN!
Can you fix LNet? By "fix" I mean remove the stupid people who have migrated over? Oh, if only these people understood how it used to be.
^^^ The way it used to be ^^^
Er, that definitely isn't how I remember reacting when people asked me for help, but I'm not gonna try and claim it never once happened... I actually really enjoy helping people and teaching in general, but even I used to get a little touchy if it sounded like somebody didn't even bother to read the ";help" output or something.
But anyway, no, I can't: I don't have an active GS account. Which isn't to say I'd do something like ban people who asked for help even if I did. Hell, I may not even have admin privileges still after being gone for a year or two. I put a lot of time and a lot of love into Lich, and I still take a peek at the forum sometimes is all. Thanks for the "welcome back," sentiment all the same :)
You more than likely don't. I didn't after I packed the server side stuff up for Tillmen. But I'm sure that he would add you back if he ever comes back from being AFK. ;)
BTW, respond to your IMs!
TheEschaton
05-08-2012, 04:45 PM
Er, that definitely isn't how I remember reacting when people asked me for help, but I'm not gonna try and claim it never once happened... I actually really enjoy helping people and teaching in general, but even I used to get a little touchy if it sounded like somebody didn't even bother to read the ";help" output or something.
But anyway, no, I can't: I don't have an active GS account. Which isn't to say I'd do something like ban people who asked for help even if I did. Hell, I may not even have admin privileges still after being gone for a year or two. I put a lot of time and a lot of love into Lich, and I still take a peek at the forum sometimes is all. Thanks for the "welcome back," sentiment all the same :)
So you're saying Gib's general douchiness towards anyone who asks for help with his scripts is based solely on his delusions and own personality flaws, and not some sort of self-authorizing secret script club?
Weird, didn't see that coming. Oh wait, yeah I did.
Gibreficul
05-08-2012, 06:13 PM
Shaelun, I must have caught you on a bad day (a couple times) then. You were usually really helpful. But it was hit and miss with ya... When I first started using Lich, I was an coding retard. After who knows how many years and having the tables turned, I know how that tests someone's patience. Most of my questions back then were more syntax than anything, and ignorance of regular expressions.
Still, nothing but :love: for ya bro.
Holy shit. Glitter love. Gib, are you feeling well?
TheEschaton
05-09-2012, 07:48 PM
(neg) Default Stand Command 05-08-2012 05:16 PM If your ancestors were worth a shit, you'd still be in India. Fuck you and your sewer rot genetics. I help those willing to help themselves. I don't help self absorbed assholes like you. -Gib
You mad bro? You better take some digitalin.
msconstrew
05-09-2012, 08:17 PM
You mad bro? You better take some digitalin.
[LNet]-GSF:Baswab: "awww, I made someone mad with the bad rep I sent them on the PC... (that they deserve.) http://forum.gsplayers.com/showpost.php?p=1413342&postcount=19"
I'm really unclear on what would make someone "deserve" an ad hominem attack on their race and/or ancestry. Go ahead. Explain it to me. Use small words.
Gibreficul
05-09-2012, 09:12 PM
[LNet]-GSF:Baswab: "awww, I made someone mad with the bad rep I sent them on the PC... (that they deserve.) http://forum.gsplayers.com/showpost.php?p=1413342&postcount=19"
I'm really unclear on what would make someone "deserve" an ad hominem attack on their race and/or ancestry. Go ahead. Explain it to me. Use small words.
The-E decided to take a pot shot at my ancestry a while back, saying his truck driving grandfather in India was superior to any of them. I just stated the facts... if his ancestry was worth a shit, his parents wouldn't have fled that hellhole third world country to come to the country my ancestors established, starting on Plymouth Rock. The-E is the type that leeches off everyone and everything around him, acts like he DESERVES special treatment for whatever reason, and wants people to do work for him. He doesn't appreciate when people do offer their services to him, and only bitches that it should have been more. That's a piece of shit in my world, and exactly the type of person I'd love to put under the wheels of that truck his grandfather was driving.
TheEschaton
05-09-2012, 09:42 PM
I took a pot shot at your ancestry? LOL. I've made fun of Pittsburgh, but that's because Pittsburgh is a shit hole and I'm from Buffalo and we have a hockey rivalry. I don't even know your ancestry. Irish? I'd love to see the post where I insulted your ancestry, and where it took place in the current dialogue we have.
Also, in my immediate family, we have 2 doctorates and 4 masters degrees among 4 people - and that's after my father came to this country, by himself, with $40 in his pocket and a room at the W. Philly YMCA. Among those 4 people, you can include an investment banker, a small business owner/counselor, an executive at a Fortune 500 company, and a lawyer. And we did it all on our smarts. I have no doubt of our prowess intellectually - but yes, you can probably beat me in hockey. GG.
The best thing is, I have a bachelor's in Computer Science. I could code whatever I needed in lich, the problem is, I quit GS long before Lich ever came out, and have not ever gone back, so I don't really see the relevance. I never once asked you to hand me ANYTHING, since I don't use lich or even the game it works in - I was (originally) just commenting on your douchey attitude to someone who asked a question about a .lic program you wrote. I've never even looked at lich extensively - just your idiotic posts.
Furthermore, if you're upset that I've somehow insulted your ancestry by criticizing the current politics of this country in the past 30 years, I'm so sorry that you're delusional.
Also, if me saying "You mad bro?" is making *me* mad, again, you're suffering from some serious delusions of persecution, man.
DaCapn
05-09-2012, 11:37 PM
I took a pot shot at your ancestry? LOL. I've made fun of Pittsburgh, but that's because Pittsburgh is a shit hole and I'm from Buffalo and we have a hockey rivalry. I don't even know your ancestry. Irish? I'd love to see the post where I insulted your ancestry, and where it took place in the current dialogue we have.
Also, in my immediate family, we have 2 doctorates and 4 masters degrees among 4 people - and that's after my father came to this country, by himself, with $40 in his pocket and a room at the W. Philly YMCA. Among those 4 people, you can include an investment banker, a small business owner/counselor, an executive at a Fortune 500 company, and a lawyer. And we did it all on our smarts. I have no doubt of our prowess intellectually - but yes, you can probably beat me in hockey. GG.
The best thing is, I have a bachelor's in Computer Science. I could code whatever I needed in lich, the problem is, I quit GS long before Lich ever came out, and have not ever gone back, so I don't really see the relevance. I never once asked you to hand me ANYTHING, since I don't use lich or even the game it works in - I was (originally) just commenting on your douchey attitude to someone who asked a question about a .lic program you wrote. I've never even looked at lich extensively - just your idiotic posts.
Furthermore, if you're upset that I've somehow insulted your ancestry by criticizing the current politics of this country in the past 30 years, I'm so sorry that you're delusional.
Also, if me saying "You mad bro?" is making *me* mad, again, you're suffering from some serious delusions of persecution, man.
All up in his ancestry, criticizing it:
The red rep I got for this post was "Get the fuck out of my country, we don't owe you shit."
LOL, mad cause you sad, bro?
Edit: Since I see Gib's post mirrors the rep I got, I'm gonna assume it's him. You're a giant douche and I'm more successful than you. My family has done more in two generations in this country than your irrational Pittsburgh loving ass has done in however many your shitstain family has been here, and we're all pretty liberal.
TheEschaton
05-09-2012, 11:39 PM
Please - that's insulting him and his family, not the ancestral race he belongs to. I don't know what his race is, but my 2 best friends are Irish German, and a Polish guy.
Edit: LoL, went to the actual thread, and the post right before it by Gib insinuated my family owns a Slurpee machine. GG on that, Gib, I did take a potshot at your ancestry there. Dumbass.
DaCapn
05-10-2012, 08:26 AM
The-E decided to take a pot shot at my ancestry a while back...
I'd love to see the post where I insulted your ancestry, and where it took place in the current dialogue we have.
My family has done more in two generations in this country than your irrational Pittsburgh loving ass has done in however many your shitstain family has been here, and we're all pretty liberal.
Ancestry
1: line of descent : lineage; especially : honorable, noble, or aristocratic descent
2: persons initiating or comprising a line of descent : ancestors
Ancestry
1. family or ancestral descent; lineage.
2. honorable or distinguished descent: famous by title and ancestry.
3. a series of ancestors: His ancestry settled Utah.
Please - that's insulting him and his family, not the ancestral race he belongs to. I don't know what his race is, but my 2 best friends are Irish German, and a Polish guy.
Edit: LoL, went to the actual thread, and the post right before it by Gib insinuated my family owns a Slurpee machine. GG on that, Gib, I did take a potshot at your ancestry there. Dumbass.
This is all a little semantic (though so far that seems to be your thing). But anyway, I guess now you know what the accepted definition of "ancestry" is. He took a potshot at your ancestral race, then you took a potshot at his ancestry. A better point to contend would have been whether or not your comment constituted a "potshot."
My Random House hardcopy is right in line with dictionary.com as well. A further anecdotal note: ancestry.com's descriptor line is "Discover your family history and start your family tree."
msconstrew
05-10-2012, 09:19 AM
The-E decided to take a pot shot at my ancestry a while back, saying his truck driving grandfather in India was superior to any of them. I just stated the facts... if his ancestry was worth a shit, his parents wouldn't have fled that hellhole third world country to come to the country my ancestors established, starting on Plymouth Rock. The-E is the type that leeches off everyone and everything around him, acts like he DESERVES special treatment for whatever reason, and wants people to do work for him. He doesn't appreciate when people do offer their services to him, and only bitches that it should have been more. That's a piece of shit in my world, and exactly the type of person I'd love to put under the wheels of that truck his grandfather was driving.
LOL. So, if you'll allow me to "translate" this: Two wrongs make a right.
You sure have a lot of strong opinions about someone you've never met. I am half Jewish, white, female, and have a graduate degree. Hate me, too? I sure don't give a shit about your steel town "ancestry".
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.