Author Topic: Just a silly flow question I think...?  (Read 8365 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Just a silly flow question I think...?
« Reply #15 on: September 12, 2009, 12:39:49 PM »
0
I'm always making tweaks to my scripts as well.  You're never too good to try and streamline things.  It'll definitely will make it faster since each line takes a set amount of time to execute.  So less lines = faster code.  Also you'll start noticing that code executes faster toward the end of a script.  That's why most of my iterative functions are at the end.  Good example of this is the CLAw.  Surprising find there....
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: Just a silly flow question I think...?
« Reply #16 on: September 12, 2009, 12:56:46 PM »
0
Actually this little edit will net me more than a little speed increase... that LS sub gets called ALL the time in my script.  I'm talking almost CONSTANTLY.  After anything happens, that sub needs to set the specials active so that should net me more than a little speed... just the SUB is sped up by 50 percent by cutting the lines in half theoretically... so how much would that affect the script as a whole since that sub is called CONSTANTLY? :)  Wow, that little edit is huge.  Thanks guys.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Just a silly flow question I think...?
« Reply #17 on: September 12, 2009, 01:03:47 PM »
0
Even more reason to always look at the structure of your code.  Especially code that's found in the tightest loops. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: Just a silly flow question I think...?
« Reply #18 on: September 12, 2009, 01:06:46 PM »
0
Even more reason to always look at the structure of your code.  Especially code that's found in the tightest loops. 

That makes a ton of sense.  Why I didn't think of that when I STARTED I have no idea.  I'm not liking learning scripting as much as I'd thought, because I *HATE* doing things twice. haha  Do you know how many times I've redone and redone that LS sub?  It took me AGES to get it where it was, and then to actually make it WORK how I'd envisioned, and now I'm cutting half of it out.  Makes me kind of sad... haha

Scrripty

  • Guest
Re: Just a silly flow question I think...?
« Reply #19 on: September 13, 2009, 07:24:56 AM »
0
If you really want to see where your speed is going just put a timer in. Use a simple display to show the current #sCnt, then have it displayed at various points in your script.

That's not a bad idea.  I could use #sysTime and set it at the beginning and end of a sub and get the ACTUAL time it takes in seconds and fractions of a second to complete a sub and REALLY give me some timing info... :)  I could work on the worst subs to gain some extra speed.  Good idea.   I could do that for the casting subs, and see EXACTLY how long each sub takes to cast each spell, and maybe do that over a period of time for each spell and put that info on the menu.  Time spent casting EOO per min/hour.  :)  I fixed your bandages not firing issue too.  I hadn't even looked at it in ages.  I don't know why Event macro 58 wasn't working...  but it's fixed now.
« Last Edit: September 13, 2009, 07:29:39 AM by Scripty »

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Just a silly flow question I think...?
« Reply #20 on: September 13, 2009, 09:04:44 AM »
0
But next script or even next sub you write .. imagine how how efficeint its going to be from the get go.  you wont need half the edits as you will just write it better the first time around.

And ps your doing fantastic for a first script and people are using it .. what more can you ask..
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Scrripty

  • Guest
Re: Just a silly flow question I think...?
« Reply #21 on: September 13, 2009, 09:10:13 AM »
0
But next script or even next sub you write .. imagine how how efficeint its going to be from the get go.  you wont need half the edits as you will just write it better the first time around.

And ps your doing fantastic for a first script and people are using it .. what more can you ask..

Well first "big" script.  I've written a TON over the years, but just basic stuff, and never really gotten into doing a big project.  I've learned so much about pvm... I think I'll be the board expert. :)  The version posted in the Project E thread is OLD.  I need to update it.  Although I need to have a hit and runner REMOVED before I do.  That's why I'm not updating it.  I'll pm TrailMyx about it so I can update and let you guys look at it again.

Tags: