PDA

View Full Version : iSigils



Drunken Durfin
08-20-2010, 01:03 AM
My first GUI for Lich. Just set it up and drop into your active hunting scripts for Bigshot.

;iSigils setup to configure

http://drunkendurfin.webs.com/isigils.png

If you have any problems with it, please post here so I can fix.

Now that it is actually working in beta I am going to go back and have the labels reflect actual bonuses rather than just mana/stamina costs.

Special thanks to Tillmen for helping with the toggle feature so you can't run minor/major bane/protection at the same time by accident.

Also to Alorn for reviewing the code and helping me head off some errors before they cropped up.

Gibreficul
08-20-2010, 05:30 AM
Hey, is there anywhere in particular I should look to find information on writing the GUI shit? Link or tutorial or even a good SIMPLE example script to rip apart?

Drunken Durfin
08-20-2010, 08:02 AM
For the kind of Lich/GS specific programming we do here the short answer is no, the resources are for crap.

I was given a couple of links by people, but the tutorials for GTK are obviously written for professional programmers by professional programmers and the ground up teaching is really poor. If you disagree with me, then you are a not a layman hacker like myself.

This one is ripe with code that errors out as soon as you run it, so read at your own risk:


http://zetcode.com/tutorials/rubygtktutorial/

And although this page looks to be better, finding the information you need is about as easy as pulling your own teeth. I found it hard to navigate and often could not get back to where I started from:


http://ruby-gnome2.sourceforge.jp/

I also stopped by the local B&N looking for a book that could help me on my way. This one was the only one I found and after flipping through the entire book while drinking a cup of coffee I realized it was got to be a great $44 addition to my "worthless programming reference" shelf at home...don't bother:


http://www.amazon.com/Foundations-Development-Experts-Voice-Source/dp/1590597931/ref=pd_sim_b_2

That being said, I managed to pull together this script in about a day, but it was quite painful. I hacked up shattered_empath only to find some things in there that were superfluous and confusing. I tried the same thing with Spiffy's asloot and it was like opening Pandora's box with all his dependencies back on aslib. Too complex for me to grasp this early in the game, I'm sure that down the line it will make complete sense.

I am going to spend about an hour today re-writing this code and HEAVILY commenting it so that you will know what does what. Once the new version is up (hopefully with too tips full of good info) I will post here so you can have a look at it and hopefully your first GUI will be easier to put together than my first one.

~Ifor

Gemstone Shattered, where all the new goodies come from.

kookiegod
08-20-2010, 08:38 AM
Cool bro.

Post when you got it commented, I want to read it too. Comments FTW.

:)

~Paul

Drunken Durfin
08-20-2010, 10:23 AM
Okay, iSigils 1.0 is now on the repo and heavily commented. Screen shots and full code are below as well.

If you have suggestions on how to make some of this stuff more elegant, like the loop and such, you are not going to hurt my feelers. The more you folks who know share the less we will hound you with stupid questions.

Standard:
http://drunkendurfin.webs.com/isigils1.png

Tool Tip:
http://drunkendurfin.webs.com/isigils2.png


# iSigils - GUI Support for upkeep of Guardian's of Sunfist Sigils
#
# Version 1.0
#
# Author: Ifor Get
#
# Lables reflect actions of Sigils
# Tool Tips will display Mana and Stamina costs to cast
#
# Gemstone Shattered, where all the best scripts originate!


def set_reset_check2(w, chk2)
chk2.sensitive = w.active? ? true : false
end
Settings.load #Calls entries for check boxes based on previous save
Settings[Char.name] ||= Hash.new #Bases settings on individual character, if you have multiple that use this script
iSigilContact = Settings[Char.name]['iSigilContact'] #Spell Number 9703 as returned by ;magic
iSigilResolve = Settings[Char.name]['iSigilResolve'] #Spell Number 9704 as returned by ;magic
iSigilMinorBane = Settings[Char.name]['iSigilMinorBane'] #Spell Number 9705 as returned by ;magic
iSigilDefense = Settings[Char.name]['iSigilDefense'] #Spell Number 9707 as returned by ;magic
iSigilOffense = Settings[Char.name]['iSigilOffense'] #Spell Number 9708 as returned by ;magic
iSigilMinorProtection = Settings[Char.name]['iSigilMinorProtection'] #Spell Number 9710 as returned by ;magic
iSigilFocus = Settings[Char.name]['iSigilFocus'] #Spell Number 9711 as returned by ;magic
iSigilMending = Settings[Char.name]['iSigilMending'] #Spell Number 9713 as returned by ;magic
iSigilConcentration = Settings[Char.name]['iSigilConcentration'] #Spell Number 9714 as returned by ;magic
iSigilMajorBane = Settings[Char.name]['iSigilMajorBane'] #Spell Number 9715 as returned by ;magic
iSigilMajorProtection = Settings[Char.name]['iSigilMajorProtection'] #Spell Number 9719 as returned by ;magic

if script.vars.empty? #Runs script based on settings
target_list = [ Char.name ]
elsif script.vars[1].downcase == 'help' #Displays help for script in Story window if ";iSigils help" is entered at command line
respond
respond 'Usage:'
respond " #{$clean_lich_char}#{script.name} help show this message"
respond " #{$clean_lich_char}#{script.name} setup show setup window"
respond
exit
elsif script.vars[1] =~ /^setup$|^options$/i #Pulls up GUI if user enters ";iSigils setup" or ";iSigils options"
window = window_action = nil

Gtk.queue { #Beginning of GUI Setup

saveButton = Gtk::Button.new("_Save and Close")

window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
window.set_title "iSigils 1.0 - Guardians of Sunfist Sigil Upkeep - an Ifor Innovation" #Sets window title
window.border_width = 20 #Sets border width of window

vbox = Gtk::VBox.new(false, 0)
contact_check = Gtk::CheckButton.new("Sigil of Contact: Activates ESP Net") #Adds Check Button with lable
contact_check.active = iSigilContact #Sets iSigilContact to CHECKED when the box is checked

resolve_check = Gtk::CheckButton.new("Sigil of Resolve: Climbing, Swimming, and Survival")
resolve_check.active = iSigilResolve

minbane_check = Gtk::CheckButton.new("Sigil of Minor Bane: HDW and +5 AS")
minbane_check.active = iSigilMinorBane

defense_check = Gtk::CheckButton.new("Sigil of Defense: +1 DS per rank - 5 minutes")
defense_check.active = iSigilDefense

offense_check = Gtk::CheckButton.new("Sigil of Offense: +1 AS per rank - 5 minutes")
offense_check.active = iSigilOffense

minprot_check = Gtk::CheckButton.new("Sigil of Minor Protection: +5 DS and HDP - 1 minute")
minprot_check.active = iSigilMinorProtection

focus_check = Gtk::CheckButton.new("Sigil of Focus: +1 TD per rank - 1 minute")
focus_check.active = iSigilFocus

mending_check = Gtk::CheckButton.new("Sigil of Mending: Increases HP recovery by 15, all Herbs eaten in 3 sec - 10 minutes")
mending_check.active = iSigilMending

concnetration_check = Gtk::CheckButton.new("Sigil of Concentration: +5 mana regeneration - 10 minutes")
concnetration_check.active = iSigilConcentration

majbane_check = Gtk::CheckButton.new("Sigil of Major Bane: Adds +10 AS, HCW (melee/ranged/bolt) - 1 minute")
majbane_check.active = iSigilMajorBane

majprot_check = Gtk::CheckButton.new("Sigil of Major Protection: Adds +10 DS, HCP - 1 minute")
majprot_check.active = iSigilMajorProtection

majbane_check.signal_connect('toggled') { Gtk.queue { minbane_check.active = false if majbane_check.active? } } #Since you cannot have certain Sigils running at the same time, this toggles
minbane_check.signal_connect('toggled') { Gtk.queue { majbane_check.active = false if minbane_check.active? } } # boxes that would cause overlapping sigils to not work.

majprot_check.signal_connect('toggled') { Gtk.queue { minprot_check.active = false if majprot_check.active? } }
minprot_check.signal_connect('toggled') { Gtk.queue { majprot_check.active = false if minprot_check.active? } }

tooltips = Gtk::Tooltips.new #Tool Tips!
tooltips.set_tip(contact_check, "1 Mana", "") #Displays mana cost of sigil when mouse hovers over indicated CheckButton
tooltips.set_tip(resolve_check, "5 Stamina", "")
tooltips.set_tip(minbane_check, "3 Mana, 2 Stamina", "")
tooltips.set_tip(defense_check, "5 Mana, 5 Stamina", "")
tooltips.set_tip(offense_check, "5 Mana, 5 Stamina", "")
tooltips.set_tip(minprot_check, "5 Mana, 10 Stamina", "")
tooltips.set_tip(focus_check, "5 Mana, 5 Stamina", "")
tooltips.set_tip(mending_check, "10 Mana, 15 Stamina", "")
tooltips.set_tip(concnetration_check, "20 Stamina", "")
tooltips.set_tip(majbane_check, "10 Mana, 10 Stamina", "")
tooltips.set_tip(majprot_check, "10 Mana, 15 Stamina", "")


vbox.pack_start(contact_check, false, true, 0) #Now that you have defined everything in the GUI, this actually puts it together
vbox.pack_start(resolve_check, false, true, 0)
vbox.pack_start(minbane_check, false, true, 0)
vbox.pack_start(defense_check, false, true, 0)
vbox.pack_start(offense_check, false, true, 0)
vbox.pack_start(minprot_check, false, true, 0)
vbox.pack_start(focus_check, false, true, 0)
vbox.pack_start(mending_check, false, true, 0)
vbox.pack_start(concnetration_check, false, true, 0)
vbox.pack_start(majbane_check, false, true, 0)
vbox.pack_start(majprot_check, false, true, 0)
vbox.pack_start(saveButton) #Puts the Save & Close button at the bottom of the list

window.add(vbox)
saveButton.signal_connect('clicked') { #Tells the program what to do with the CheckButton data once Save & Close is clicked
Gtk.queue {
iSigilContact = contact_check.active?
iSigilResolve = resolve_check.active?
iSigilMinorBane = minbane_check.active?
iSigilDefense = defense_check.active?
iSigilOffense = offense_check.active?
iSigilMinorProtection = minprot_check.active?
iSigilFocus = focus_check.active?
iSigilMending = mending_check.active?
iSigilConcentration = concnetration_check.active?
iSigilMajorBane = majbane_check.active?
iSigilMajorProtection = majprot_check.active?
window_action = :save #Saves all of the above to your settings
}
}
window.signal_connect('delete_event') {window_action = :cancel} #Deals with you hitting the X to close the window, no changes to settings made (I think)
window.show_all #Displays the GUI
window.resizable = false #Disables the Maximize button and Resize options
}

before_dying { Gtk.queue { window.destroy } }
wait_while { window_action.nil? }
undo_before_dying
Gtk.queue { window.destroy }

Settings[Char.name]['iSigilContact'] = iSigilContact
Settings[Char.name]['iSigilResolve'] = iSigilResolve
Settings[Char.name]['iSigilMinorBane'] = iSigilMinorBane
Settings[Char.name]['iSigilDefense'] = iSigilDefense
Settings[Char.name]['iSigilOffense'] = iSigilOffense
Settings[Char.name]['iSigilMinorProtection'] = iSigilMinorProtection
Settings[Char.name]['iSigilFocus'] = iSigilFocus
Settings[Char.name]['iSigilMending'] = iSigilMending
Settings[Char.name]['iSigilConcentration'] = iSigilConcentration
Settings[Char.name]['iSigilMajorBane'] = iSigilMajorBane
Settings[Char.name]['iSigilMajorProtection'] = iSigilMajorProtection
Settings.save
Script.self.kill #Very important part. This allows you to change the settings, but does not execute the Loop
end # when you hit Save & Close.



loop{ #Begins sigils upkeep during running of the script when you just type ;iSigils
exit if checkdead

if !checkspell(9703) and iSigilContact and checkmana > 1 #Checks to see if Sigil of Contact is not running [!checkspell(9703)] then checks if
Spell[9703].cast # to see if it is supposed to be running [iSigilContact checked in settings?]. If it
end # is supposed to be running, checks to see if there is Mana available to start the
# the spell [checkmana > 1]. If there is available mana, spell is cast [ Spell[9703].cast ]
if !checkspell(9704) and iSigilResolve and checkstamina > 5
Spell[9704].cast
end

if !checkspell(9705) and iSigilMinorBane and checkmana > 3 and checkstamina > 2
Spell[9705].cast
end

if !checkspell(9707) and iSigilDefense and checkmana > 5 and checkstamina > 5
Spell[9707].cast
end

if !checkspell(9708) and iSigilOffense and checkmana > 5 and checkstamina > 5
Spell[9708].cast
end

if !checkspell(9710) and iSigilMinorProtection and checkmana > 5 and checkstamina > 10
Spell[9710].cast
end

if !checkspell(9711) and iSigilFocus and checkmana > 5 and checkstamina > 5
Spell[9711].cast
end

if !checkspell(9713) and iSigilMending and checkmana > 10 and checkstamina > 15
Spell[9713].cast
end

if !checkspell(9714) and iSigilConcentration and checkstamina > 20
Spell[9714].cast
end

if !checkspell(9715) and iSigilMajorBane and checkmana > 10 and checkstamina > 10
Spell[9715].cast
end

if !checkspell(9719) and iSigilMajorProtection and checkmana > 10 and checkstamina > 15
Spell[9719].cast
end

sleep 1 #Runs through the list and checks status of sigils once per second. Might be a bit overkill to do that often.
}

Tillmen
08-20-2010, 10:32 AM
Settings[Char.name]
should be replaced with
CharSettings

The new class saves to a separate file based on character name and game instance, so if you have two characters with the same name in two different games, they still get their own settings. Also, if you're multiaccounting, the two instances of Lich aren't saving to the same file and overwriting the changes from the other.

Also, Settings.load/Settings.save or CharSettings.load/CharSettings.save are no longer needed.

Drunken Durfin
08-20-2010, 10:53 AM
Settings[Char.name]
should be replaced with
CharSettings

The new class saves to a separate file based on character name and game instance, so if you have two characters with the same name in two different games, they still get their own settings. Also, if you're multiaccounting, the two instances of Lich aren't saving to the same file and overwriting the changes from the other.

Also, Settings.load/Settings.save or CharSettings.load/CharSettings.save are no longer needed.

So at the top it should read:




def set_reset_check2(w, chk2)
chk2.sensitive = w.active? ? true : false
end

Settings[CharSettings] ||= Hash.new
iSigilContact = Settings[CharSettings]['iSigilContact']


And just before the loop at the bottom it should read:


Settings[CharSettings]['iSigilMajorProtection'] = iSigilMajorProtection
Script.self.kill

Just trying to be crystal clear here so that everyone, including me, does not make a bad assumption.

SpiffyJr
08-20-2010, 10:56 AM
Just a bit of advice to simplify a few things. There is no reason to copy/paste all those checks for every sigil. The Spell class that Tillmen wrote has all the necessary information. The changes below also include the CharSettings suggestion by Tillmen. Do a find on CHANGED: if you want to see what I updated.



# iSigils - GUI Support for upkeep of Guardian's of Sunfist Sigils
#
# Version 1.0
#
# Author: Ifor Get
#
# Lables reflect actions of Sigils
# Tool Tips will display Mana and Stamina costs to cast
#
# Gemstone Shattered, where all the best scripts originate!


def set_reset_check2(w, chk2)
chk2.sensitive = w.active? ? true : false
end

settings = CharSettings.to_hash #### CHANGED: Replaced Settings[Char.name] with CharSettings hash

if script.vars.empty? #Runs script based on settings
target_list = [ Char.name ]
elsif script.vars[1].downcase == 'help' #Displays help for script in Story window if ";iSigils help" is entered at command line
respond
respond 'Usage:'
respond " #{$clean_lich_char}#{script.name} help show this message"
respond " #{$clean_lich_char}#{script.name} setup show setup window"
respond
exit
elsif script.vars[1] =~ /^setup$|^options$/i #Pulls up GUI if user enters ";iSigils setup" or ";iSigils options"
window = window_action = nil

Gtk.queue { #Beginning of GUI Setup
gtk_checks = Hash.new #### CHANGED: Added new gtk_checks hash to store all checkbuttons in so we can loop through it later

saveButton = Gtk::Button.new("_Save and Close")

window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
window.set_title "iSigils 1.0 - Guardians of Sunfist Sigil Upkeep - an Ifor Innovation" #Sets window title
window.border_width = 20 #Sets border width of window

vbox = Gtk::VBox.new(false, 0)

contact_check = Gtk::CheckButton.new("Sigil of Contact: Activates ESP Net") #Adds Check Button with lable
contact_check.active = settings['9703']#iSigilContact #Sets iSigilContact to CHECKED when the box is checked
gtk_checks['9703'] = contact_check #### CHANGED: Added to gtk_checks

resolve_check = Gtk::CheckButton.new("Sigil of Resolve: Climbing, Swimming, and Survival")
resolve_check.active = settings['9704']#iSigilResolve
gtk_checks['9704'] = resolve_check #### CHANGED: Added to gtk_checks

minbane_check = Gtk::CheckButton.new("Sigil of Minor Bane: HDW and +5 AS")
minbane_check.active = settings['9705']#iSigilMinorBane
gtk_checks['9705'] = minbane_check #### CHANGED: Added to gtk_checks

defense_check = Gtk::CheckButton.new("Sigil of Defense: +1 DS per rank - 5 minutes")
defense_check.active = settings['9706']#iSigilDefense
gtk_checks['9706'] = defense_check #### CHANGED: Added to gtk_checks

offense_check = Gtk::CheckButton.new("Sigil of Offense: +1 AS per rank - 5 minutes")
offense_check.active = settings['9707']#iSigilOffense
gtk_checks['9707'] = offense_check #### CHANGED: Added to gtk_checks

minprot_check = Gtk::CheckButton.new("Sigil of Minor Protection: +5 DS and HDP - 1 minute")
minprot_check.active = settings['9710']#iSigilMinorProtection
gtk_checks['9710'] = minprot_check #### CHANGED: Added to gtk_checks

focus_check = Gtk::CheckButton.new("Sigil of Focus: +1 TD per rank - 1 minute")
focus_check.active = settings['9711']#iSigilFocus
gtk_checks['9711'] = focus_check #### CHANGED: Added to gtk_checks

mending_check = Gtk::CheckButton.new("Sigil of Mending: Increases HP recovery by 15, all Herbs eaten in 3 sec - 10 minutes")
mending_check.active = settings['9713']#iSigilMending
gtk_checks['9713'] = mending_check #### CHANGED: Added to gtk_checks

concnetration_check = Gtk::CheckButton.new("Sigil of Concentration: +5 mana regeneration - 10 minutes")
concnetration_check.active = settings['9714']#iSigilConcentration
gtk_checks['9714'] = concnetration_check #### CHANGED: Added to gtk_checks

majbane_check = Gtk::CheckButton.new("Sigil of Major Bane: Adds +10 AS, HCW (melee/ranged/bolt) - 1 minute")
majbane_check.active = settings['9715']#iSigilMajorBane
gtk_checks['9715'] = majbane_check #### CHANGED: Added to gtk_checks

majprot_check = Gtk::CheckButton.new("Sigil of Major Protection: Adds +10 DS, HCP - 1 minute")
majprot_check.active = settings['9719']#iSigilMajorProtection
gtk_checks['9719'] = majprot_check #### CHANGED: Added to gtk_checks

majbane_check.signal_connect('toggled') { Gtk.queue { minbane_check.active = false if majbane_check.active? } } #Since you cannot have certain Sigils running at the same time, this toggles
minbane_check.signal_connect('toggled') { Gtk.queue { majbane_check.active = false if minbane_check.active? } } # boxes that would cause overlapping sigils to not work.

majprot_check.signal_connect('toggled') { Gtk.queue { minprot_check.active = false if majprot_check.active? } }
minprot_check.signal_connect('toggled') { Gtk.queue { majprot_check.active = false if minprot_check.active? } }

tooltips = Gtk::Tooltips.new #Tool Tips!
tooltips.set_tip(contact_check, "1 Mana", "") #Displays mana cost of sigil when mouse hovers over indicated CheckButton
tooltips.set_tip(resolve_check, "5 Stamina", "")
tooltips.set_tip(minbane_check, "3 Mana, 2 Stamina", "")
tooltips.set_tip(defense_check, "5 Mana, 5 Stamina", "")
tooltips.set_tip(offense_check, "5 Mana, 5 Stamina", "")
tooltips.set_tip(minprot_check, "5 Mana, 10 Stamina", "")
tooltips.set_tip(focus_check, "5 Mana, 5 Stamina", "")
tooltips.set_tip(mending_check, "10 Mana, 15 Stamina", "")
tooltips.set_tip(concnetration_check, "20 Stamina", "")
tooltips.set_tip(majbane_check, "10 Mana, 10 Stamina", "")
tooltips.set_tip(majprot_check, "10 Mana, 15 Stamina", "")

vbox.pack_start(contact_check, false, true, 0) #Now that you have defined everything in the GUI, this actually puts it together
vbox.pack_start(resolve_check, false, true, 0)
vbox.pack_start(minbane_check, false, true, 0)
vbox.pack_start(defense_check, false, true, 0)
vbox.pack_start(offense_check, false, true, 0)
vbox.pack_start(minprot_check, false, true, 0)
vbox.pack_start(focus_check, false, true, 0)
vbox.pack_start(mending_check, false, true, 0)
vbox.pack_start(concnetration_check, false, true, 0)
vbox.pack_start(majbane_check, false, true, 0)
vbox.pack_start(majprot_check, false, true, 0)
vbox.pack_start(saveButton) #Puts the Save & Close button at the bottom of the list

window.add(vbox)
saveButton.signal_connect('clicked') { #Tells the program what to do with the CheckButton data once Save & Close is clicked
Gtk.queue {
#### CHANGED: only one loop is required now to change the settings
# Remember from earlier that settings = CharSettings
gtk_checks.each_pair {
|number,check| settings[number] = check.active?
}

window_action = :save #Saves all of the above to your settings
}
}

window.signal_connect('delete_event') {window_action = :cancel} #Deals with you hitting the X to close the window, no changes to settings made (I think)
window.show_all #Displays the GUI
window.resizable = false #Disables the Maximize button and Resize options
}

before_dying { Gtk.queue { window.destroy } }
wait_while { window_action.nil? }
undo_before_dying
Gtk.queue { window.destroy }

#### CHANGED: no longer need the setting saving that was here because it was done above in signal_connect
Script.self.kill #Very important part. This allows you to change the settings, but does not execute the Loop
end # when you hit Save & Close.

loop{ #Begins sigils upkeep during running of the script when you just type ;iSigils
exit if checkdead

#### CHANGED: competely removed everything below by being able to use
# a loop instead
settings.each_pair { |num,active|
if active and Spell[num].known? and Spell[num].affordable? and not Spell[num].active?
Spell[num].cast

#### CHANGED: Should probably wait for castrt? and rt? too
waitrt?
waitcastrt?
end
}

sleep 1 #Runs through the list and checks status of sigils once per second. Might be a bit overkill to do that often.
}

Tillmen
08-20-2010, 10:56 AM
No, it should be:

def set_reset_check2(w, chk2)
chk2.sensitive = w.active? ? true : false
end
iSigilContact = CharSettings['iSigilContact'] #Spell Number 9703 as returned by ;magic
iSigilResolve = CharSettings['iSigilResolve'] #Spell Number 9704 as returned by ;magic


Except.. I don't see set_reset_check2 being called anywhere. That could probably be removed too.

Drunken Durfin
08-20-2010, 11:07 AM
NOW we're learning!

I'll incorporate these changes and upload them shortly.

As for the "set_reset_check2" thing. That is an artifact from some other code that I had hacked to make the GUI. I did not know what it did so I just left it in there.

Thanks guys!

Gnomad
08-20-2010, 02:15 PM
One of the little things that Spiffy did that a self-taught program might not pick up on is change the order of your if statements.

In most modern languages, AND and OR are short-circuiting. If anything in an AND statement is false, then whole thing is false. Similarly, if anything in an OR statement is true, the whole thing is true.


if active and Spell[num].known? and Spell[num].affordable? and not Spell[num].active?

Notice that the first thing Spiffy checks is whether or not you've chosen to keep the given sigil going. If you haven't, Ruby will say, "welp, we have a false in an AND statement, I'm not even going to waste my time checking the rest of this." This saves a little bit of time, but when you're looping constantly, every little bit pays off.

BTW, short-circuiting is most useful when you're trying to do something dangerous - the most common example is dividing by zero. if level / ranks < 1 is all well and good unless ranks is zero. Changing the statement to if ranks != 0 AND level / ranks < 1 will keep you from throwing an error on the check.

Drunken Durfin
08-20-2010, 05:26 PM
There was an issue with a typo in the original settings, so you folks who have used iSigils might want to go to your data folder under Lich and delete iSigils.sav and log back into Gemstone. Otherwise you are going to be running Sigils of Bandages when you don't want to.

Everything should be fine now with the Sigil numbers on the current 2.0 version of iSigils on the repo.

Gibreficul
08-24-2010, 09:45 AM
loop{
break unless Society.status =~ /Guardians/i
if running? 'isigils'
stop_script("isigils") unless Room.current.title[0] =~ /warcamp/i
else
start_script("isigils") if Room.current.title[0] =~ /warcamp/i
end
#TILLMEN'S UPDATE HERE VVV
room_count = XMLData.room_count
wait_while { room_count == XMLData.room_count }
}

I wrote that little crappy loop to toggle isigils on and off while I'm doing warcamps. Isigils = awesome script.

Tillmen
08-24-2010, 09:48 AM
Room.current is somewhat slow, since it has to search the huge map database. A better way to detect when you move is

room_count = XMLData.room_count
wait_while { room_count == XMLData.room_count }

Gibreficul
08-24-2010, 10:16 AM
Room.current is somewhat slow, since it has to search the huge map database. A better way to detect when you move is

room_count = XMLData.room_count
wait_while { room_count == XMLData.room_count }

Good shit.

:thanx:

dex
11-09-2017, 10:13 PM
Why would iSigils not be working for me? Menu pops up fine, I check the sigils, and when I run it, nothing happens. I just converted to Sunfist from COL, and iSigns worked just fine for me. Is iSigils broken or there's some issue on my end? I've deleted and reinstalled the script. Nothing changed.

BigWorm
11-09-2017, 10:34 PM
It sounds like Lich might not have your correct society since you converted. First of all, I would log off and back in if you haven't yet. To debug, check the output of:



;e echo Society.status; echo Society.rank

Erous
11-09-2017, 10:45 PM
Clear your Lich!

;magic clear
;spell active
;magic
society
info
skills

The main one being the society command after ;magic clear. This will ensure your script recognizes your new society. Also, info will ensure the script understands your stamina and mana requirements.

dex
11-09-2017, 10:50 PM
The output is this:


;e echo Society.status; echo Society.rank
--- Lich: exec2 active.
[exec2: Guardians of Sunfist]
[exec2: 4]
--- Lich: exec2 has exited.

I've done more testing by selecting the first 5 sigils (contact, resolve, minor bane, as, ds) and of those only contact and resolve activate. Minor bane does not, though I can activate it manually.

dex
11-09-2017, 10:52 PM
Clear your Lich!

;magic clear
;spell active
;magic
society
info
skills

The main one being the society command after ;magic clear. This will ensure your script recognizes your new society. Also, info will ensure the script understands your stamina and mana requirements.

Ohh, the "society" did it. I just typed that because I thought it might not realize I'm rank 5, and sure enough, soon as I did, the sigil of minor bane activated. Thanks!!