![](templates/Classic/images/spacer.gif) |
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Dec 13, 2006 10:09 pm
feature request |
when i am running a bot i like to cut down on the spam, so i gag as much as i can. when i tried to gag my input however, i found the only way to do this really was to turn off echo scripts. however, this would also turn off the input from the other scripts that i would like to know if they are going off. so i tried to append the line from within my bot scripts that were send to the mud with something like this setup. i have a class called "gagger" with the triggers from the mud that i want gagged that are related to my bot. so i would want to put a #if (%class(gagger)) {#gag} in my scripts that i want on normally if i am not botting just by turning off the gagger class. so in my mover/killer/corpse for my bot i tried to put something along these lines in:
#if (%class(gagger)) {#send {#slow %pop(botpath)}} however, this wouldn't work because of how #send works.
so what i am requestion is a command that works similarly to #send but allows for code execution within it and sends that output silently to the mud. i also don't want to have to create a #oninput {(*)} {#gag} that is constantly flickering between on/off to do this. |
|
|
![](templates/Classic/images/spacer.gif) |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Dec 14, 2006 1:06 am |
Umm.. Ok firstly Turn your echo back on.
Why are you not putting a gag after the command?
#slow %pop(botpath)
#gag
This has the effect of gagging each command. Since you are only sending one command at a time this is not a problem. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
![](templates/Classic/images/spacer.gif) |
Fang Xianfu GURU
![](images/avatars/1763170544a2093e7e85da.gif)
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Dec 14, 2006 1:56 am |
The problem with that is that it also gags the line the command was entered on, which I don't think he wants. We talked about it in IRC for a bit.
|
|
|
![](templates/Classic/images/spacer.gif) |
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu Dec 14, 2006 4:08 am |
i'm also sending a lot more than 1 command at a time. also that will just gag the pattern and the command will still show in yellow, that is the part i want to get rid of.
|
|
|
![](templates/Classic/images/spacer.gif) |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Dec 14, 2006 2:36 pm |
Ah, I have a work around for those issues as well...
#show ""
#slow %pop(botpath)
#gag
Other command
#gag
What I meant by you were only sending one command at a time is had you used the "#walk place" syntax you would have been sending a LOT of commands by only entering one #command, and this method would not have worked. With this setup #show "" should be the FIRST command in the trigger unless you use #col, #cw or #pcol. Example
#cw high,blue
#show ""
#forall @botpath
{
#slow %pop(botpath)
#gag
Other command
#gag
{
Do this other thing.
#gag
Give this a try and if you got more troubles please do comment. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
![](templates/Classic/images/spacer.gif) |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Dec 14, 2006 3:03 pm |
You can also use #cr instead of #show "".
Also if it still does not gag the commands themselves when doing this it sounds like a bug... Would you mind posting the contents of your trigger on here if it does NOT work so I can look at it and write you up something? |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
![](templates/Classic/images/spacer.gif) |
Larkin Wizard
![](images/avatars/169979204542c57c7448618.gif)
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Thu Dec 14, 2006 4:01 pm |
Using #CR sends a carriage return to the MUD. Using #SHOW "" just displays a new line locally and sends nothing to the MUD.
|
|
|
![](templates/Classic/images/spacer.gif) |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Dec 14, 2006 4:06 pm |
Ah, thanks Larkin forgot about that one. I use it cause I like to have a prompt after some of my scripts fire.
Or you could do this.
Make your oninput trigger.
#oninput cgag {*} {#gag}
#cw high,blue
#show “”
#T+ cgag
#forall @botpath
{
#slow %pop(botpath)
Other command
}
Do this other thing.
#T- cgag |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
![](templates/Classic/images/spacer.gif) |
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu Dec 14, 2006 7:08 pm |
just sending blank lines to the mud would just make my buffer fill up with blank lines, pushing information that i would like to see out. without this line i run the risk of gagging something that could result in a lot of deaths for my character. while i'm scripting i like to just see the chatlines and a few other things from immortals, pk things, ect.. so i really don't see #gag as being a viable option, hence why i just simply asked if zugg could consider making a command exactly like #send but just evaluated what is sent before sending.
|
|
|
![](templates/Classic/images/spacer.gif) |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Dec 14, 2006 7:11 pm |
Have you TRIED what I suggested? The whole point is to get rid of the commands that your bot is sending from your screen. Try it before you knock it.
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
![](templates/Classic/images/spacer.gif) |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Dec 14, 2006 7:18 pm |
And, have you tried?
$Temp = (your command and stuff that you want evaluated)
#send $temp
Also the idea is NOT to send blank lines to the mud OR to fill up your buffer.
Picture this output from the mud.
The day is nice and bright.
When you send a command you get this.
The day is nice and bright. Your command here.
That is why when you use #gag it kills the text from the mud that you want to see.
If you create a trigger with #show "" as the first line however you get this.
The day is nice and bright.
Your command here.
Then you can gag the line.
Your command here
That is the basic idea behind my script above. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
![](templates/Classic/images/spacer.gif) |
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu Dec 14, 2006 7:38 pm |
yes i tried what you suggested, however it didn't work as i wanted. commands still showed at times and my mud output was gagged instead. the system of making the next direction in a variable would be nice to get rid of the movements in an area, and is the only real way i can see of doing it with the accuracy i want. also when transversing zones when the mobcount is low in one area would be a task and a half, just off the top of my head id imagine it would have to be something like #gag %numitems(%pathexpand(%pathfrom(%roomnum(),x))) then #walk x, also not being a good solution as information from the mud can wind up in that scroll and get gagged instead of the commands.
|
|
|
![](templates/Classic/images/spacer.gif) |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Dec 14, 2006 9:18 pm |
Couple more things.
Instead of #show, try #say For some reason #say executes faster than #show does it could be the whole answer.
Since you know all about the %path functions you could step through them with a loop like in the above code and use the variable trick.
+++++++++++++
Edit I just realized how stupid the idea I had in this spot was so removed it.
+++++++++++++
Ultimately it would be sweet to have this new feature you are asking for. Or something like this.
#EchoOff
send a bunch of commands
#echoOn
I'm just trying to help you now as I know Zugg doesn't have time to add anything cool at the moment. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4717 Location: Pensacola, FL, USA
|
Posted: Thu Dec 14, 2006 10:30 pm |
#ONINPUT {^} {#IF (%class(gagger)) {#GAG}}
Or if all you want is some flags to show your script is working... you could just have an @scripttracker variable, then just set the variable at each important stage in the script and display the current value of the variable in a button or on the status bar, ect. Then you can leave echo on, and let CMUD handle the work for you. |
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Fri Dec 15, 2006 9:17 am |
thanks for all the suggestions and input, i learned a few new tricks that will definately help out in other scrips. at the end i decided to just set it up in all variables and an index system so i could make use of #send @var.
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|