Rayvolution 
Journeyman

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1
Aetharia

|
RE: Alternative way to control a custom skilltree GUMP?
(09-17-2012 01:59 PM)Skul Wrote: Quote: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.
I didn't know that existed. Looks like I need to update some of my scritps too.
Good to see you got the error solved.
Thanks
Here's the final version of the script if you/anyone wants to look at it.
Note that the @Login Tag is there, and gets removed right at UserSkills fires. For some reason, on=@Login causes a UserSkills fire that I couldn't avoid. So I set UserSkills to stop if NoSkillTree == 1.
That way, when you login, all that happens is Login fires, setting the NoSkillTree 1 and then UserSkills fires immediately after and catches the tag, stops the DIALOG from opening, and deletes the tag so the script will work normally from then on out.
Later I'm going to rewrite my custom skillgain messages for "increases" and "decreases". Right now it'll just tell you if they changed and what they changed to.
The script is highly customized for my server, but at the very least you guys can pick out how all the IF statements are setup and make it fit for your own servers.
Code:
ON=@Login
CTAG.NoSkillTree 1
ON=@UserSkills
IF <CTAG.NoSkillTree> == 1 // I just logged in, DON'T open the Skill Dialog
CTAG.NoSkillTree= // Remove the tag so the player can use the dialog now.
RETURN 1
ENDIF
IF <ARGN1> == -1 //I clicked the Skills button on the paperdoll to open the Skills DIALOG.
SRC.f_skillcolor
SRC.DIALOGCLOSE d_skill_tree
SRC.SDIALOG d_skill_tree <TAG0.SkillTreePage>
RETURN 1
ELSE
IF <ISDIALOGOPEN d_skill_tree> == 1> //I gained skill, and the Skills DIALOG is open. So close/reopen it to emulate an "update".
SRC.f_skillcolor
SRC.DIALOGCLOSE d_skill_tree
SRC.SDIALOG d_skill_tree <TAG0.SkillTreePage>
SRC.SYSMESSAGESKILL Your skill in <SERV.SKILL.<ARGN1>.NAME> has changed, it is now <SRC.<ARGN1>>!
RETURN 1
ENDIF //I passed all the IFs, so I should just give the player the skill message without opening/closing any DIALOGS.
ENDIF
SRC.SYSMESSAGESKILL Your skill in <SERV.SKILL.<ARGN1>.NAME> has changed, it is now <SRC.<ARGN1>>!
RETURN 1
![[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!
(This post was last modified: 09-17-2012 03:13 PM by Rayvolution.)
|
|
09-17-2012 03:10 PM |
|
|