Official ScriptUO EasyUO Scripts > Script Debug

Need help with optimization, LPC, spell timers, and FC/FCR/LMC calcs of dual bot

(1/5) > >>

zaan:
Hello! this is my first script! =] So fun! I just took a bunch of awesome scripts and smashed them all together.
Can you help my with the more complex stuff, and optimizing it?
I think I need to dynamically change LPC depending upon the sub being run. What are some good LPC values for different subs? Also, I think I need a couple different spell/action timers to be dynamically set depending on the character, and type of spell/action. Finally, I'd like support implementing some subs for calculating FC/FCR/LMC for these timers.

Also, I notice most scripts don't have many comments. Do ;comments slow the script down?   
Maybe someone already has a script like this? (Twinkle McNugget?, Cervesa?)  ;D Thank you in advance!!

; Thank you scriptuo.com, easyuo.com, and uoguide.com!
; Merely a bunch of amazing work smashed together!
; Thank you so much! to these smart generous people:                                 ;
; Twinkle McNugget - Scanbar sub, inspiration, and blog posts
; --> http://www.easyuo.com/forum/viewtopic.php?p=392597
; Cerveza - Cerv's UOXL Swap Bot script, outline, and idea for script
; --> http://www.scriptuo.com/index.php?topic=4543.0
; dxrom - LAME 3.0 sampire script, idea, and menu
; --> http://www.scriptuo.com/index.php?topic=7538.180
; Einstein - Duo Sampire Healer bot idea
; --> http://www.scriptuo.com/index.php?topic=10509.0
; Felix - Warriors assistant
;--> http://www.easyuo.com/forum/viewtopic.php?t=40116&sid=5d1bf9d51f55afa026d7c21dcb51a078
; Endless Night - uoXL setup and swap, and scanbuffbar
; --> http://www.easyuo.com/forum/viewtopic.php?p=247583&sid=21e86aba8d10afa672a1b7eda6e006b7
; Trailmyx (TM) - Journal subs and blog posts.
;--> http://www.scriptuo.com/index.php?topic=33.0
; Tecmo - Tecmo's Creature ID (c)
; -->http://www.easyuo.com/forum/viewtopic.php?t=235&sid=8b60691e1a85040466803d81096298fb
; CEO - CEO Medic
; --> http://www.easyuo.com/forum/viewtopic.php?p=13869

The Ghost:
I disn't run the script I just  give it a read real quick.

First off,
Also, I notice most scripts don't have many comments. Do ;comments slow the script down?   
   They do not slow down script.     If small comment add you understand the flow, you can add so.

Second.
I read you main loop and you are missing alot of you end statement.
Let take this for example. 
 if %autotrapbox
     gosub trapbox

It is not going to do anything because you have set up anything.

You need to said this instead
if %autotrapbox = #true
     gosub trapbox

The #true is set when you put the check in the box.  that #true statement come from line 181 and line 1374  (menu get autotrapboxbox)

Have a look at the  rest of the main loop and if statement.

Good job


freddy:
I've only ever really needed to adjust the default LPC when processing strings/data; adjusting the LPC isn't going to make your script faster, and in some cases, it can cause errors. If you're just doing timers you shouldn't need to adjust LPC. combat events can benefit from faster processing, but you need to know what to speed up. i'd say work on getting your script stable before you worry about speeding it up

zaan:
Thank you The Ghost and freddy!! I really appreciate the replies!! =]

The Ghost: Good news about comments! I love comments! =]
Also, I thought like you that I needed "if %variable = #true" and "if %variable = #false", but then I noticed that easyuo can interpret booleans as just %variable or ! %variable respectively! =] So, I took out all = #true and = #false. Seems to work well without them. =]

freddy: OK! So, should I leave everything at the default LPC of 10? Except for the processing subs like the scanbuffbar? Or, should I leave the default LPC at 60 like LAME 3.0 uses? What about the wait 10 that is peppered about? after using spells/abilities? Should I make those dynamic to change with the LPC? Also, obviously i need 2 spell timers since i have 2 characters, but should i use a different timer for spells vs abilities and whatnot?

ALSO! I like to make my menu dynamic so it just iterates through my boolean variables, and creates the menu itself.  Was a pain to manually order and change my menu items as it grew. Was looking for some kind of loop like

--- Code: ---for %i in "list of strings or variables"
{
     blah %i
}

--- End code ---
Is there anything like that I can use?

The Ghost:
To help you with your menu   you can go to https://www.easyuo.com/downloads.php#euo15 
look for this,  that will help you build menu. 

--- Code: --- Old EasyUO 1.42
This is the older version of EasyUO. It is no longer supported. Do NOT ask questions about it. It is available here for those that desire to use the older version and/or need it in order to use Scriptfellow's Menu Designer.

EasyUO V1.42 Menu Designer (UO 2D Client )
EasyUO V1.42 [Build 00B4] (UO 2D Client 5.0.0b or lower)
--- End code ---


I will have to test that booleans value in some other build ;)

Navigation

[0] Message Index

[#] Next page

Go to full version