Achaea's Forums: Swiftcurse Script For Zmud - Achaea's Forums

Jump to content

Page 1 of 1

Swiftcurse Script For Zmud

#1 User is offline   Saadya 

  • Group: Adventurers
  • Posts: 1,900
  • Joined: 16-May 05

Posted 29 July 2010 - 04:27 PM

I wrote this for a shaman character. Any ideas how to make it better? It works okay, but I don't like the look of the code, it surely could be solved more elegantly.
Also needs to be reset when you die.


#CLASS {Shaman|Swiftcurse}
#ALIAS cs {
  #SEND {swiftcurse}
  swiftcursing=1
  }
#ALIAS swiftcursetimer {
  swiftcurrenttime=%time( ss)
  swiftseconds=%eval( @swiftexpirytime-@swiftcurrenttime)
  #IF (@swiftseconds>60) {#MATH swiftseconds @swiftseconds-60}
  #IF (@swiftseconds=6 AND @swifttimerwarning=0) {
	#ECHO Swiftcurse expires in 5 seconds.
	swifttimerwarning=1
	#ALARM +1 {swifttimerwarning=0}
	}
  }
#TRIGGER {^You weave your fingers together, calling upon the swiftcurse to aid you.$} {
  #IF (@swiftcursing=1) {swifttimer=1}
  #IF (@swiftcursing>5) {swiftcursing=1}
  swiftexpirytime=%time( ss)+14
  swiftcursetimer
  #ALARM +1 {swiftcursetimer}
  #ALARM +2 {swiftcursetimer}
  #ALARM +3 {swiftcursetimer}
  #ALARM +4 {swiftcursetimer}
  #ALARM +5 {swiftcursetimer}
  #ALARM +6 {swiftcursetimer}
  #ALARM +7 {swiftcursetimer}
  #ALARM +8 {swiftcursetimer}
  #ALARM +9 {swiftcursetimer}
  #ALARM +10 {swiftcursetimer}
  #ALARM +11 {swiftcursetimer}
  #ALARM +12 {swiftcursetimer}
  #ALARM +13 {swiftcursetimer}
  }
#TRIGGER {^The swiftcurse leaves you.$} {
  #IF (@swiftcursing=1) {swiftcursing=0}
  swiftseconds=0
  }
#BUTTON 96 {in @swiftseconds seconds} {swiftseconds} {- BLIGHT -} {blighting=0} {@swiftseconds} {} {} {Size} {93} {24} {Pos} {625} {91} {30} {78} {Gauge||12|14|4|0} {} "" {Explore|Inset|Right} {} {} {3}
#BUTTON 97 {Swiftcurse expires} {} {} {} {} {} {} {Size} {92} {22} {Pos} {603} {91} {10} {} {Separ} {} "" {} {} {} {3}
#CLASS 0

This post has been edited by Saadya: 29 July 2010 - 04:33 PM

Posted Image
Rodrigo - Concierto Aranjuez, 2. mvt., Adagio * Loreena McKennitt - Carrighfergus

#2 User is offline   Jonathin 

  • Group: Adventurers
  • Posts: 1,762
  • Joined: 12-June 07

Posted 30 July 2010 - 04:11 PM

Instead of using 1 shot timers to count down, just 1 use variable and 1 timer.


#alarm *1 {#math variable timeleft-1;#say %crTime left:@variable} <--give it some ID.
#alias timeset {#variable totaltime}
#alarm timepause {#t- alarmname}

etc etc.
Posted Image

View PostPentharian, on Nov 11 2009, 10:05 PM, said:

Tecton wins achaea.

Share this topic:


Page 1 of 1


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users