Miloch Posted November 3, 2010 Share Posted November 3, 2010 I'm not much of a scripting genius - I try to keep my scripts as simple as possible. I look at stuff like SCS scripts and my eyes go all funny. It doesn't help that the scripting language and the engine are horrid for doing a lot of things. But you could post your script and if I can't see something, probably someone else can. If it's long, just attach it. SCS might be better if you can't attach things here (and you can also put long posts in SPOILER tags there which collapse them rather than blacking them out here). Link to comment
Aliya Posted November 3, 2010 Author Share Posted November 3, 2010 Okays... I really dunno why they won't work. I found a minor typo and corrected it. It's 'castNattack' and I typed 'castattack' timers. This post is such a massive spoiler, I must kick myself, but... oh well. If you have questions, just ask. Follow this link, I edited my earlier post. Link to comment
Ardanis Posted November 3, 2010 Share Posted November 3, 2010 Haven't tested, but you need to negate ~GlobalTimerNotExpired("castnattack","LOCALS")~ check. Otherwise you're trying to cast spells when the aura is NOT cleansed. Link to comment
Aliya Posted November 6, 2010 Author Share Posted November 6, 2010 Okay, I ran through the script and modeled it a little. Now it looks like this: In the beginning... IF OnCreation() THEN RESPONSE #100 SetGlobal("AlacrityEnd","LOCALS",1) // To avoid attacking when aura is cleansed. Because it's immensely...er... out of place. END In the middle I added: IF SpellCast(Myself,WIZARD_ABI_DALZIMS_HORRID_WILTING) // The alacrity ends with the series of Horrid Wiltings. Global("AlacrityEnd","LOCALS",1) // This'll be true, no matter what; it's the beginning. HaveSpell(WIZARD_ENERGY_BLADES) // To give a ranged weapon for starters. THEN RESPONSE #100 SetGlobal("AlacrityEnd","LOCALS",0) // Or IncrementGlobal is better? Spell(Myself,WIZARD_ENERGY_BLADES) SetGlobalTimer("castattack","LOCALS",ONE_ROUND) // He'll attack for the next few seconds. Theoretically. END IF !GlobalTimerExpired("castattack","LOCALS") See(NearestEnemyOf(Myself)) THEN RESPONSE #100 AttackOneRound(NearestEnemyOf(Myself)) END Looking at IESDP makes me feel, that TimerExpired will be more suitable than GlobalTimerExpired. On my run-though I noticed that after the horrid wiltings (until then, everything works marvelously) he just attacks with enhanced claws (which deal 3D6 damage [instead of 1D6] and cause panic, unless target saved versus death with -6 penalty). I'm telling, it seems, that the 'AlacrityEnd' block didn't run. Why? No idea. Link to comment
Ardanis Posted November 6, 2010 Share Posted November 6, 2010 Did ~!GlobalTimerNotExpired("castnattack","locals")~ solve the previous problem? On my run-though I noticed that after the horrid wiltings (until then, everything works marvelously) he just attacks with enhanced claws (which deal 3D6 damage [instead of 1D6] and cause panic, unless target saved versus death with -6 penalty). I'm telling, it seems, that the 'AlacrityEnd' block didn't run. Why? No idea.Was the Alacrity variable set? You can check it by entering CLUAConsole:GetGlobal("alacrityend","locals") while hovering mouse cursor over creature's head. If it wasn't, then I suppose the OnCreation() trigger is better be replaced with Global("alacrityend","locals",0), and later using the value of 2 instead of back to 0.Otherwise, either you don't have Energy Blades memorized (check by ctrl-q'ing), or the SpellCast() is going funny. !GlobalTimerExpired("castattack","LOCALS")Please, decide already whether it's 'castattack' or 'castnattack' Also note that it must be exactly ~!GlobalTimerNotExpired()~, with two 'not'. Link to comment
Aliya Posted November 6, 2010 Author Share Posted November 6, 2010 According to the info at SHS, SpellCast and SpellCastOnMe is a little buggy- they don't work. Turambar solved this issue, but intervening with Specific trigger. Maybe place a LOCALS check under horrid wiltings will solve it? I've read that: GlobalTimerExpired will return true if the timer has expired.!GlobalTimerExpired will return true if the timer has not expired or has not been set GlobalTimerNotExpired will return true if the timer has not expired !GlobalTimerNotExpired will return true if the timer has not been set or has expired. I'd really like to use without 'nots' just GlobalTimerExpired and ! version. It'll be 'castattack' in my script, I believe. I got easily mislead after I forget to type extra 'n'. Energy Blades are memorized and ready to go. Link to comment
Ardanis Posted November 6, 2010 Share Posted November 6, 2010 I'd really like to use without 'nots' just GlobalTimerExpired and ! version.Unless you really know what you're doing, cast and attack stuff should be processed with !GlobalTimerNotExpired.If you're that much inclined, then SetGlobal("castattack","locals",1) at the beginning, otherwise it will not be 'expired'. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.