(09-16-2012 06:31 PM)Skul Wrote: set a tag when you use @userskills to identify if you have opened the gump, here's an example considering that d_skill_list is the name of your gump:
Code:
on=@userskills
ctag.userskills=1 //set tag
dialogclose d_skill_list
dialog d_skill_list
on=@skillgain
if (<isonline>)
if (<ctag0.userskills> == 01) // also tried without == 01
dialogclose d_skill_list
dialog d_skill_list
endif
endif
and in your skill list dialog (assuming d_skill_list):
Code:
on=0
ctag.userskills= //erase tag
(09-16-2012 10:53 PM)Ben Wrote: http://wiki.sphere.torfo.org/index.php/@UserSkills
I'm sure you will find what you are looking for here 
I already tried using @UserSkills.
The problem is for some reason @UserSkills fires when your skill changes, I'd almost think this was a bug.
So, the only way to block it under @UserSkills is to tag the menu when it's opened/closed, the problem is, if you check to see if it's open/closed on @UserSkills it won't be able to open in the first place when you hit the Skills button. :/
Here's my original test-script modified with Skul's code:
Code:
ON=@UserSkills
ctag.userskills=1 //set tag
SRC.f_skillcolor
SRC.DIALOGCLOSE d_skill_tree
SRC.SDIALOG d_skill_tree <TAG0.SkillTreePage>
RETURN 1
ON=@SkillGain
if (<isonline>)
if (<ctag0.userskills>)
SRC.f_skillcolor
SRC.DIALOGCLOSE d_skill_tree
SRC.SDIALOG d_skill_tree <TAG0.SkillTreePage>
endif
endif
It pretty much ends up working exactly like my original code, it'll open the skill menu when you gain/change skill because it's firing @UserSkills on skill changes for some reason.
Here's my original code, with no @SkillGain at all.
Code:
ON=@UserSkills
SRC.f_skillcolor
SRC.DIALOGCLOSE d_skill_tree
SRC.SDIALOG d_skill_tree <TAG0.SkillTreePage>
RETURN 1
EDIT:
Solved!
Digging around in the Sphere Wiki I found a command I didn't know existed... (ISDIALOGOPEN) and with Bens nudge, I noticed <ARGN1> could be helpful. It solved my problem.
Code:
ON=@UserSkills
IF <ARGN1> == -1 //If -1, this trigger fired without a skill being specificed (Skill button was pressed)
SRC.f_skillcolor
SRC.DIALOGCLOSE d_skill_tree
SRC.SDIALOG d_skill_tree <TAG0.SkillTreePage>
RETURN 1
ELSE
IF <ISDIALOGOPEN d_skill_tree> == 1> // If your skill gump is open, go ahead and allow the skillgain to trigger the gump to open/close so it'lll update.
SRC.f_skillcolor
SRC.DIALOGCLOSE d_skill_tree
SRC.SDIALOG d_skill_tree <TAG0.SkillTreePage>
RETURN 1
ENDIF
RETURN 1
Now, if no skills are specified when it fires (You hit the skill button) it'll open the dialog. Also, if the dialog IS already open, it'll close/open it if you do get a skill update.
If the dialog is closed, and you get a skill update, the pesky thing won't pop up at all.
Thanks guys.
![[Image: 4_Logo.png]](http://aetharia.com/public/style_images/4_Logo.png)
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!