Horred the Plague Posted March 3, 2006 Share Posted March 3, 2006 I was originally going to do this for the BPSeries by seanas, but TBH, I cannot get them to even work. Since these install, and have only crashed once--I chose them. Currently,I'm doing this for my sole benefit. If my judgements are correct, and I make these scripts run much more efficiently--I will be more than happy to share. Unless you wish to repeat my completed work on your own, or ignore the offer, or disagree with my results. The singlemost important issue I have found, and am changing, is this: I have moved all the HaveSpell and HasItem checks to the very top of the block, above the ActionListEmpty() and its variants. Why? I see it as the most important condition, by far. This differs from what I have done with BP. The reason is: those scripts have been carefully trimmed to offer only the spells and items that any/all of the script users possess. That means there is a fairly decent chance that an individual will have 30-60% of these spells/items. In a PC script, however, the goal is different. These are a "catch-all" script, an attempt at being a good boyscout and preparing for every situation. Thus, a vast array of spells and items are offered. Even an epic-level PC only has a decent chance of having 10% of the available options. You have anywhere from 3-5 conditions at the top of every block, to check aura cleansing, cast n' attack, and so on. This is five checks before they even check to see if they have the spell/item. Every block will do this, and at best maybe 1 in 10 will do something at the end. So, by setting it up this way--I have eliminated 2-4 checks per block, 90% or more of the time. This is bound to be a lot faster parsing. In certain instances, I will put a directly-related CheckStat/StateCheck up top. A clear-cut example: HaveSpell(WIZARD_STONESKIN) CheckStatLT(Myself,1,STONESKINS) If it is a script for self-curing, I also put the HPPercentLT(xxxx) check up top. If you don't have the potion, or you're not injured--who cares if you have the time, or if you're aura cleansed? Smaller details: Your Hill Giant Potion block has no HasItem() check. I broke the huge OR(86) at the bottom down into 9 saller blocks. I added a check for Global("gh_MeleeMissileToggle","LOCALS",0) to the top of each sub-block, and a SmallWait(1) right before the Continue() at the end. Why? Continue() has a lousy habit of not setting Globals before continue()'ing. I'm not 100% sure they don't wait till parsing round is over before setting. The SmallWait(1) is an attempt to give them a slight "hiccup" and time to parse. If successful, and you had a missile weapon that was in the first block of OR(1)--just think of the time saved here. It's worth a 1/15th of a second delay on the chance it works. I swapped the code for cloud spells with the BPDetectStatv1.2 WIZARD_GREATER_MALISON piggyback for Cloud spells, that I reported in a previous thread. Other block orders were changed, moving this/that line up/down a notch. Too many variants to report, emphasis on level of relevance and probability of ringing true. A rarely tru block should be up top--it will save the additional 'parsing for naught' more often than not. EDIT: oh, almost forgot. For the "Scripted Auto-Pause", I removed the HPLT(Myself,20) and upped the % check to LT 25%. The reason: the auto-pause gets highly annoying when you're only first level. 3 scripts down, 4 to go--then I'll see how well this works/doesn't work. Horred Link to comment
This topic is now archived and is closed to further replies.