ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: dirtmcgirt on April 24, 2020, 04:29:19 PM

Title: Is there a script to simply just stay active?
Post by: dirtmcgirt on April 24, 2020, 04:29:19 PM
I'm training a pet on a boat, all I need to do is just be there while he is being targeted.  However, I get logged due to inactivity, is there such a thing so i can just stand there, or something that says a word every now and then? Thanks y'all. 
Title: Re: Is there a script to simply just stay active?
Post by: The Ghost on April 24, 2020, 05:25:21 PM
Make a loop to  open backpack, sate ot war mode every 5 min.
Title: Re: Is there a script to simply just stay active?
Post by: dirtmcgirt on April 24, 2020, 08:31:59 PM
I use the 2d client, is there a way to make a loop im not aware of?
Title: Re: Is there a script to simply just stay active?
Post by: Crisis on April 24, 2020, 10:06:23 PM
Make a basic sub to open you backpack and then set the wait for 300 seconds. It will open your backpack every 5 minutes that way. I think timing out is somewhere between 9 and 15 minutes. If you use Razor, you can do the same thing with a macro and set it to repeat.
Title: Re: Is there a script to simply just stay active?
Post by: The Ghost on April 24, 2020, 10:17:22 PM
Someone ask the same question not long ago.  spend 20 min trying to dig up the post, but I cant find it.
Title: Re: Is there a script to simply just stay active?
Post by: dirtmcgirt on April 25, 2020, 05:39:23 AM
I hate to admit this, but i don't know how to write a script.  I tried to cut and paste a section of a script, from a random script, but it didn't work.  Something as easy as just opening a rune book, while im hidden, so i can stay in the room as my pet just eats daemons. 
Title: Re: Is there a script to simply just stay active?
Post by: Gaderian on April 25, 2020, 05:45:08 AM
Here is something that will open your backpack and wait 5 minutes ... forever... nothing more fancy than that.

Gaderian
Title: Re: Is there a script to simply just stay active?
Post by: dirtmcgirt on April 25, 2020, 07:25:56 AM
Dude, thank you!! This is exactly what i was looking for!! Life saver.
Title: Re: Is there a script to simply just stay active?
Post by: Crisis on April 25, 2020, 07:59:04 AM
That is how you learn. Look at scripts and see what functions do. My first script was basically looking at other scripts and trying to figure out what I wanted and how to do it. Here is my first script attempt: http://www.scriptuo.com/index.php?topic=9767.msg83353#msg83353 and then this is what it turned into: http://www.scriptuo.com/index.php?topic=9770.0 My own personal version has expanded even more and my skills have gotten better. I live up to my saying under my avatar, "I script well enough to break things". It is a learning experience that is ongoing. I still learn things all the time.


The EUO wiki has a lot of what you need.

This is an awesome page: http://wiki.easyuo.com/index.php?title=Event_Macro and looking at the event macros you will see there is a event macro to open backpack. The top of that page tells you how to call the event macro.

Then looking up how to use a wait, I used the search box from the event macro page. http://wiki.easyuo.com/index.php?title=Wait That shows you how to work with wait times.

Code: [Select]
sub NoIdle
event Macro 8 7
wait 300s
return

You can also cast a spell on yourself. I looked up "target" on the wiki http://wiki.easyuo.com/index.php?title=Target to see how to target something. Then I used event macros.

Code: [Select]
Sub Bless
event Macro 15 16
wait 10
target
event Macro 23 0
wait 5s
return

Looking into other scripts you can see that calling a sub is "gosub" so to initiate the little sub would look like this:

Code: [Select]
gosub Bless

Sub Bless
event Macro 15 16
wait 10
target
event Macro 23 0
wait 5s
return

This is how you learn. It will allow you to figure out how to edit scripts to do what you need and how to make things on your own that you need. Most won't write things for you but will help you figure out things as long as you are posting what you are trying. Trying things on your own and asking for help will go a long ways here.
Title: Re: Is there a script to simply just stay active?
Post by: dirtmcgirt on April 28, 2020, 06:20:25 PM
Thank you very much for this.  I am interested and I'm willing to learn. I actually tweeked the taming script and ran it while i macroed resist on my pet. It worked like a charm, I was also pretty proud of myself.
Title: Re: Is there a script to simply just stay active?
Post by: Endless Night on May 05, 2020, 12:11:48 PM
My Anti-idle sub -- http://www.scriptuo.com/index.php?topic=2454.msg51906#msg51906