Astrology Stuffs

by Laysus

Back to Mechanic's Corner.

Laysus2005-10-17 00:24:42
Ok, still kinda new to zmud, so you'll have to play around with this before you put it in, but here's my astrology buff/curse tracker that shows you what buffs/curses are available dependant on the date. It's carried over from my system on AL client. Oh, and it takes into account that the dates for the sun positions are 1 off. It displays it all in the status window so if you're already using that you might want to do even more playing around sleep.gif

CODE


triggers off the date line with the following:

Today is the (%a) of (%w), (%d) years after the Coming of Estarra.

#var day %1
#var month %2
datecalc


this's the main alias (Datecalc):

#if (@month =~ "Estar") {
 #if (@day < 15) {
   #STW BUFFS: Skull, Crocodile, Antlers, Glacier, Spider, Dragon, Bumblebee.
   #STW + CURSES: Dolphin, Volcano, Burning Censer, Twin Crystals, Lion.
   } {
   #STW BUFFS: Bumblebee, Twin Crystals, Burning Censer, Dragon, Volcano, Skull, Glacier.
   #STW + CURSES: Lion, Dolphin, Crocodile, Antlers, Spider.
   }
 }
#if (@month =~ "Urlachmar") {
 #if (@day < 15) {
   #STW BUFFS: Bumblebee, Twin Crystals, Burning Censer, Dragon, Volcano, Skull, Glacier.
   #STW + CURSES: Lion, Dolphin, Crocodile, Antlers, Spider.
   } {
   #STW BUFFS: Glacier, Spider, Dolphin, Skull, Antlers, Volcano, Bumblebee.
   #STW + CURSES: Crocodile, Twin Crystals, Dragon, Lion, Burning Censer.
   }
 }
#if (@month =~ "Kiani") {
 #if (@day < 15) {
   #STW BUFFS: Glacier, Spider, Dolphin, Skull, Antlers, Volcano, Bumblebee.
   #STW + CURSES: Crocodile, Twin Crystals, Dragon, Lion, Burning Censer.
   } {
   #STW BUFFS: Antlers, Skull, Crocodile, Dolphin, Glacier, Volcano, Twin Crystals.
   #STW + CURSES: Spider, Lion, Bumblebee, Burning Censer, Dragon.
   }
 }
#if (@month =~ "Vestian") {
 #if (@day < 15) {
   #STW BUFFS: Antlers, Skull, Crocodile, Dolphin, Glacier, Volcano, Twin Crystals.
   #STW + CURSES: Spider, Lion, Bumblebee, Burning Censer, Dragon.
   } {
   #STW BUFFS: Twin Crystals, Burning Censer, Bumblebee, Volcano, Lion, Antlers, Dolphin.
   #STW + CURSES: Dragon, Glacier, Crocodile, Spider, Skull.
   }
 }
#if (@month =~ "Avechary") {
 #if (@day < 15) {
   #STW BUFFS: Twin Crystals, Burning Censer, Bumblebee, Volcano, Lion, Antlers, Dolphin.
   #STW + CURSES: Dragon, Glacier, Crocodile, Spider, Skull.
   } {
   #stw BUFFS: Dolphin, Spider, Glacier, Twin Crystals, Lion, Crocodile, Antlers
   #STW + CURSES: Skull, Volcano, Burning Censer, Dragon, Bumblebee
   }
 }
#if (@month =~ "Dvarsh") {
 #if (@day < 15) {
   #STW BUFFS: Dolphin, Spider, Glacier, Twin Crystals, Lion, Crocodile, Antlers
   #STW + CURSES: Skull, Volcano, Burning Censer, Dragon, Bumblebee
   } {
   #STW BUFFS: Lion, Volcano, Dragon, Twin Crystals, Burning Censer, Dolphin, Crocodile.
   #STW + CURSES: Bumblebee, Spider, Antlers, Skull, Glacier.
   }
 }
#if (@month =~ "Tzarin") {
 #if (@day < 15) {
   #STW BUFFS: Lion, Volcano, Dragon, Twin Crystals, Burning Censer, Dolphin, Crocodile.
   #STW + CURSES: Bumblebee, Spider, Antlers, Skull, Glacier.
   } {
   #STW BUFFS: Crocodile, Antlers, Skull, Spider, Dolphin, Lion, Burning Censer.
   #STW + CURSES: Glacier, Twin Crystals, Dragon, Volcano, Bumblebee.
   }
 }
#if (@month =~ "Klangiary") {
 #if (@day < 15) {
   #STW BUFFS: Crocodile, Antlers, Skull, Spider, Dolphin, Lion, Burning Censer.
   #STW + CURSES: Glacier, Twin Crystals, Dragon, Volcano, Bumblebee.
   } {
   #STW BUFFS: Burning Censer, Twin Crystals, Bumblebee, Lion, Crocodile, Spider.
   #STW + CURSES: Volcano, Dolphin, Skull, Antlers, Glacier
   }
 }
#if (@month =~ "Juliary") {
 #if (@day < 15) {
   #STW BUFFS: Burning Censer, Twin Crystals, Bumblebee, Lion, Crocodile, Spider.
   #STW + CURSES: Volcano, Dolphin, Skull, Antlers, Glacier
   } {
   #STW BUFFS: Spider, Dolphin, Glacier, Skull, Crocodile, Dragon, Burning Censer.
   #STW + CURSES: Antlers, Bumblebee, Lion, Volcano, Twin Crystals
   }
 }
#if (@month =~ "Shanthin") {
 #if (@day < 15) {
   #STW BUFFS: Spider, Dolphin, Glacier, Skull, Crocodile, Dragon, Burning Censer.
   #STW + CURSES: Antlers, Bumblebee, Lion, Volcano, Twin Crystals
   } {
   #STW BUFFS: Dragon, Lion, Volcano, Burning Censer, Bumblebee, Spider, Skull.
   #STW + CURSES: Twin Crystals, Crocodile, Glacier, Antlers, Dolphin.
   }
 }
#if (@month =~ "Roarkian") {
 #if (@day < 15) {
   #STW BUFFS: Dragon, Lion, Volcano, Burning Censer, Bumblebee, Spider, Skull.
   #STW + CURSES: Twin Crystals, Crocodile, Glacier, Antlers, Dolphin.
   } {
   #STW BUFFS: Skull, Crocodile, Antlers, Glacier, Spider, Dragon, Bumblebee.
   #STW + CURSES: Dolphin, Volcano, Burning Censer, Twin Crystals, Lion.
   }
 }


Oh, and this is -only- the sun position, remember it always helps to get a full read before using anything otherwise you may well end up burning power. More will appear as I finish converting it to Zmud!

If someone'll tell me how I can, I'll make what I've written here easier for you to put in, otherwise, tough.
Caffrey2005-10-23 13:48:07
dunno if ayone is interested but i have some code that generates a table of the sphere effects and costs, from a "stargaze"

the end result is this :



now... i'll freely admit I am not a very good coder, so no laughing at me if my code is bloated and badly written...

CODE

#ALIAS zastrosphere {#VAR zeffarr %array("init","+ 4","+ 1","+ 2","- 2","+ 3","- 1","- 3","- 1","+ 3","- 2","+ 2","+ 1");#VAR zcolarr %array("0","green","green","green","red","green","red","red","red","green","red","green","green");#VAR posarray %array("init");#VAR colarray %array("init");#VAR planetno 1;#UNTIL (@planetno > 7) {#VAR planetcount 1;#VAR planetposc %arrget(planetarr,@planetno);#VAR planetpos %arrget(planetarr,@planetno);#UNTIL (@planetcount > 12) {#UNTIL (@planetposc > 12) {#NOOP %arrset(posarray,%eval(%eval(%eval(@planetno - 1) * 12) + @planetposc),%arrget(zeffarr,@planetcount));#NOOP %arrset(colarray,%eval(%eval(%eval(@planetno - 1) * 12) + @planetposc),%arrget(zcolarr,@planetcount));#ADD planetposc 1;#ADD planetcount 1};#IF (@planetpos > 1) {#VAR planetposc 1;#UNTIL (@planetcount > 12) {#NOOP %arrset(posarray,%eval(%eval(%eval(@planetno - 1) * 12) + @planetposc),%arrget(zeffarr,@planetcount));#NOOP %arrset(colarray,%eval(%eval(%eval(@planetno - 1) * 12) + @planetposc),%arrget(zcolarr,@planetcount));#ADD planetcount 1;#ADD planetposc 1}}};#ADD planetno 1};#VAR zcostarr %array("Time","Mana","Will","Endur","Rand","Powr");#VAR zspheff %array("Fire Res","Dexterity","Psychic Res","Intelligence","Charisma","Physical Res","Asphyx Res","Writhe Spd","Magic Res","Constitution","Body Focus","Summon Res");#VAR buttonnumber 1;#VAR xnumber 0;#VAR ynumber 0;#UNTIL (@buttonnumber > 12) {#VAR commstring "#BUTTON (button"@buttonnumber") {Ctrl F"@buttonnumber"   "%arrget(posarray, @buttonnumber)" "%arrget(zspheff, @ynumber)"} {} {} {} {} {} {} {Size} {130} {16} {Pos} {"%eval(@ynumber * 16)"} {16} {} {} {Separ} {} """" {} {} {}";#EXEC @commstring;#NOOP %btncol(button@buttonnumber,black,%arrget(colarray, @buttonnumber));#ADD ynumber 1;#ADD buttonnumber 1};#VAR ynumber 0;#UNTIL (@buttonnumber > 84) {#UNTIL (@xnumber > 5) {#UNTIL (@ynumber > 11) {#VAR commstring "#BUTTON (button"@buttonnumber") {"%arrget(posarray, @buttonnumber)" "%arrget(zcostarr, @xnumber)"} {} {} {} {} {} {} {Size} {50} {16} {Pos} {"%eval(@ynumber * 16)"} {"%eval(%eval(@xnumber * 50) + 146)"} {} {} {Separ} {} """" {} {} {}";#EXEC @commstring;#NOOP %btncol(button@buttonnumber,black,%arrget(colarray, @buttonnumber));#ADD ynumber 1;#ADD buttonnumber 1};#ADD xnumber 1;#VAR ynumber 0}}}


that is the alias that builds/updates the rows of buttons with their values.

CODE

#TRIGGER {Aapek is in the sign of (%w)} {#if (%1 = "Volcano") {#NOOP %arrset(planetarr,7,1)};#if (%1 = "Antlers") {#NOOP %arrset(planetarr,7,2)};#if (%1 = "Twin") {#NOOP %arrset(planetarr,7,3)};#if (%1 = "Dolphin") {#NOOP %arrset(planetarr,7,4)};#if (%1 = "Lion") {#NOOP %arrset(planetarr,7,5)};#if (%1 = "Crocodile") {#NOOP %arrset(planetarr,7,6)};#if (%1 = "Burning") {#NOOP %arrset(planetarr,7,7)};#if (%1 = "Spider") {#NOOP %arrset(planetarr,7,8)};#if (%1 = "Dragon") {#NOOP %arrset(planetarr,7,9)};#if (%1 = "Skull") {#NOOP %arrset(planetarr,7,10)};#if (%1 = "Bumblebee") {#NOOP %arrset(planetarr,7,11)};#if (%1 = "Glacier") {#NOOP %arrset(planetarr,7,12)};zastrosphere}
#TRIGGER {Eroee is in the sign of the (%w)} {#if (%1 = "Volcano") {#NOOP %arrset(planetarr,3,1)};#if (%1 = "Antlers") {#NOOP %arrset(planetarr,3,2)};#if (%1 = "Twin") {#NOOP %arrset(planetarr,3,3)};#if (%1 = "Dolphin") {#NOOP %arrset(planetarr,3,4)};#if (%1 = "Lion") {#NOOP %arrset(planetarr,3,5)};#if (%1 = "Crocodile") {#NOOP %arrset(planetarr,3,6)};#if (%1 = "Burning") {#NOOP %arrset(planetarr,3,7)};#if (%1 = "Spider") {#NOOP %arrset(planetarr,3,8)};#if (%1 = "Dragon") {#NOOP %arrset(planetarr,3,9)};#if (%1 = "Skull") {#NOOP %arrset(planetarr,3,10)};#if (%1 = "Bumblebee") {#NOOP %arrset(planetarr,3,11)};#if (%1 = "Glacier") {#NOOP %arrset(planetarr,3,12)}}
#TRIGGER {Moon is in the sign of the (%w)} {#if (%1 = "Volcano") {#NOOP %arrset(planetarr,2,1)};#if (%1 = "Antlers") {#NOOP %arrset(planetarr,2,2)};#if (%1 = "Twin") {#NOOP %arrset(planetarr,2,3)};#if (%1 = "Dolphin") {#NOOP %arrset(planetarr,2,4)};#if (%1 = "Lion") {#NOOP %arrset(planetarr,2,5)};#if (%1 = "Crocodile") {#NOOP %arrset(planetarr,2,6)};#if (%1 = "Burning") {#NOOP %arrset(planetarr,2,7)};#if (%1 = "Spider") {#NOOP %arrset(planetarr,2,8)};#if (%1 = "Dragon") {#NOOP %arrset(planetarr,2,9)};#if (%1 = "Skull") {#NOOP %arrset(planetarr,2,10)};#if (%1 = "Bumblebee") {#NOOP %arrset(planetarr,2,11)};#if (%1 = "Glacier") {#NOOP %arrset(planetarr,2,12)}}
#TRIGGER {Papaxi is in the sign of the (%w)} {#if (%1 = "Volcano") {#NOOP %arrset(planetarr,6,1)};#if (%1 = "Antlers") {#NOOP %arrset(planetarr,6,2)};#if (%1 = "Twin") {#NOOP %arrset(planetarr,6,3)};#if (%1 = "Dolphin") {#NOOP %arrset(planetarr,6,4)};#if (%1 = "Lion") {#NOOP %arrset(planetarr,6,5)};#if (%1 = "Crocodile") {#NOOP %arrset(planetarr,6,6)};#if (%1 = "Burning") {#NOOP %arrset(planetarr,6,7)};#if (%1 = "Spider") {#NOOP %arrset(planetarr,6,8)};#if (%1 = "Dragon") {#NOOP %arrset(planetarr,6,9)};#if (%1 = "Skull") {#NOOP %arrset(planetarr,6,10)};#if (%1 = "Bumblebee") {#NOOP %arrset(planetarr,6,11)};#if (%1 = "Glacier") {#NOOP %arrset(planetarr,6,12)}}
#TRIGGER {Sidiak is in the sign of the (%w)} {#if (%1 = "Volcano") {#NOOP %arrset(planetarr,4,1)};#if (%1 = "Antlers") {#NOOP %arrset(planetarr,4,2)};#if (%1 = "Twin") {#NOOP %arrset(planetarr,4,3)};#if (%1 = "Dolphin") {#NOOP %arrset(planetarr,4,4)};#if (%1 = "Lion") {#NOOP %arrset(planetarr,4,5)};#if (%1 = "Crocodile") {#NOOP %arrset(planetarr,4,6)};#if (%1 = "Burning") {#NOOP %arrset(planetarr,4,7)};#if (%1 = "Spider") {#NOOP %arrset(planetarr,4,8)};#if (%1 = "Dragon") {#NOOP %arrset(planetarr,4,9)};#if (%1 = "Skull") {#NOOP %arrset(planetarr,4,10)};#if (%1 = "Bumblebee") {#NOOP %arrset(planetarr,4,11)};#if (%1 = "Glacier") {#NOOP %arrset(planetarr,4,12)}}
#TRIGGER {Sun is in the sign of the (%w)} {#VAR planetarr %array(0);#if (%1 = "Volcano") {#NOOP %arrset(planetarr,1,1)};#if (%1 = "Antlers") {#NOOP %arrset(planetarr,1,2)};#if (%1 = "Twin") {#NOOP %arrset(planetarr,1,3)};#if (%1 = "Dolphin") {#NOOP %arrset(planetarr,1,4)};#if (%1 = "Lion") {#NOOP %arrset(planetarr,1,5)};#if (%1 = "Crocodile") {#NOOP %arrset(planetarr,1,6)};#if (%1 = "Burning") {#NOOP %arrset(planetarr,1,7)};#if (%1 = "Spider") {#NOOP %arrset(planetarr,1,8)};#if (%1 = "Dragon") {#NOOP %arrset(planetarr,1,9)};#if (%1 = "Skull") {#NOOP %arrset(planetarr,1,10)};#if (%1 = "Bumblebee") {#NOOP %arrset(planetarr,1,11)};#if (%1 = "Glacier") {#NOOP %arrset(planetarr,1,12)}}
#TRIGGER {Tarox is in the sign of the (%w)} {#if (%1 = "Volcano") {#NOOP %arrset(planetarr,5,1)};#if (%1 = "Antlers") {#NOOP %arrset(planetarr,5,2)};#if (%1 = "Twin") {#NOOP %arrset(planetarr,5,3)};#if (%1 = "Dolphin") {#NOOP %arrset(planetarr,5,4)};#if (%1 = "Lion") {#NOOP %arrset(planetarr,5,5)};#if (%1 = "Crocodile") {#NOOP %arrset(planetarr,5,6)};#if (%1 = "Burning") {#NOOP %arrset(planetarr,5,7)};#if (%1 = "Spider") {#NOOP %arrset(planetarr,5,8)};#if (%1 = "Dragon") {#NOOP %arrset(planetarr,5,9)};#if (%1 = "Skull") {#NOOP %arrset(planetarr,5,10)};#if (%1 = "Bumblebee") {#NOOP %arrset(planetarr,5,11)};#if (%1 = "Glacier") {#NOOP %arrset(planetarr,5,12)}}


are the triggers

CODE

#TRIGGER {Aapek is in the sign of} {#CAP 7 combat}


is what i use to send the information to the "combat" window...

note.. the Aapek trigger in the combat window is the one that fires up the alias.

Saran2006-04-01 06:19:58
hehe sorry for the necro. But... is there anyway to move your stuff into a separate window or something caffery?
Unknown2006-04-02 00:17:20
i have a new appreciation for all astrology users...
Caffrey2006-04-09 22:33:48
All those buttons are already on a seperate "combat" window, and behind which all of that code lies. The only code in the main lusternia window is the aapek trigger line that sends the last 7 lines to the combat window.

The window named "combat" just happens to be docked in my layout, so that i can use the tabs to switch between that and my map.

Create a window called whatever you want, create the trigger for the aapek line in your main lusternia window and point it at this name.
CODE
#TRIGGER {Aapek is in the sign of} {#CAP 7 nameofwindow}


Put all that other code behind that new window. The alias and the 7 planet triggers are all you need. The alias will generate all the variables and buttons for you.

When you stargaze in game, the main window aapek trigger sends the 7 lines to your new window, which in turn fires all the other triggers behind it, these updates the position variables then launches the alias which generates +/- values for all the sphere effects and creates the buttons with the values and colours. Hope this helps.

QUOTE
now... i'll freely admit I am not a very good coder, so no laughing at me if my code is bloated and badly written...