Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gump Menu Help, Page switch
Author Message
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #1
Gump Menu Help, Page switch
So I've been working on my level system stuff along with shard welcome and ever since I try do a page witch or add stats the menu just closes.

So let's say for my level menu, I'm trying to stop it from closing everytime I add a stat, I want to be able to just click the buttons and I close it when I'm done (obviously) I have a feeling the mistake is really stupid but..yea.. haha

[DIALOG d_levelm]
0,0
page 0
resizepic 44 60 9390 316 479
text 83 105 1171 0
gumppic 82 264 7015
gumppic 82 344 7008
gumppic 82 425 7030
text 84 131 1257 1
gumppic 67 216 1143
text 163 219 1257 2
text 158 266 0 3
text 158 346 0 4
text 158 426 0 5
text 269 105 1171 6
text 160 283 1257 7
text 160 441 1257 8
text 160 362 1257 9
text 270 131 1257 10
button 161 307 5541 5542 1 0 0
button 161 466 5541 5542 1 0 0
button 161 386 5541 5542 1 0 0
text 83 190 1171 11

[DIALOG d_levelm text]
Character Statisctics
<src.name>
<EVAL <TAG.Ep>> / <EVAL <TAG.ED> -<TAG.EP>>
Strength
Dexterity
Intelligence
Level
<src.str>
<src.int>
<src.dex>
<EVAL <TAG.LVL>>
Experience

[DIALOG d_levelm button]
ON=0
// Str increase
// IF <src.restest1 i_stat_point>
src.consume=1 i_stat_point
src.str=<src.str>+1
else
src.sysmessage You don't have any more @1257 Stat Point(s)
endif
return 1

ON=0
// Int Increase
// IF <src.restest1 i_stat_point>
src.consume=1 i_stat_point
src.int=<src.int>+1
else
src.sysmessage You don't have any more @1257 Stat Point(s)
endif
return 1

ON=0
// Dex Increase
// IF <src.restest1 i_stat_point>
src.consume=1 i_stat_point
src.dex=<src.dex>+1
else
src.sysmessage You don't have any more @1257 Stat Point(s)
endif
return 1
08-10-2015 04:55 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: Gump Menu Help, Page switch
Some extra help:
Code:
button 161 307 5541 5542 1 0 0
button 161 466 5541 5542 1 0 0
button 161 386 5541 5542 1 0 0
The last number there is the Button ID, 0 is the default for 'close' .. like when right click on it so never use it (unless you want to do a close button)

Code:
[DIALOG d_levelm button]
ON=0

You must there change that numbers for the ones of the BUTTON lines, right now they are all the same being overrided because of same ID.

At last, your question, you cannot avoid client to close the dialog since the buttons are closing it themselves ... but what you can do is to call the dialog again with something like this:

Code:
ON=1
// Str increase
// IF <src.restest1 i_stat_point> //btw, although it's commented ... 'restest1' should have a whitespace like this: 'restest 1'
src.consume=1 i_stat_point
src.str += 1
if (<src.restest 1 i_stat_point>)// if we still have stat point's item
src.dialog d_levelm
endif
src.sysmessage You don't have any more @1257 Stat Point(s) //Note: You cannot change the color of a half of the text, you can change the whole text's color or do not change it at all, so the '@1257' color code must be before the text: 'src.sysmessage @1257 You don't have any more Stat Point(s).'

One more thing, are you using one i_stat_point per each earned point? so if you get 10 stat points you have 10 items? I suggest you to use tags instead to reduce the item count.
(This post was last modified: 08-10-2015 05:05 AM by XuN.)
08-10-2015 05:04 AM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #3
RE: Gump Menu Help, Page switch
Woah thanks! Most of the mistakes I found out while trying to figure it out on my own, I realized the last number was giving me issue, lolll all my buttons + when I closed the menu would give me +1 str xD but I didn't know 0 was to close hahaha
And yeah I realized the color wouldn't work too, it was a little experiment.
Thank you lots it's gunna help me with future menus Smile

So hey, about the tags, I've been "dying" to understand how to use them, there's something I'm still missing that makes me not understand them, dunno why o.o
If I could tag stat and skill points to the characters every level up it'd be so much better.
Plus if I am to add quests, it's gunna be a pain in the butt to add invis item to everyquest so it recognizes that this or that quest has been completed and other becomes available ... aaaarrrrhhh... well I could start with the points, wanna help? Tongue
In fact I do have my own idea on how it works now, just not sure how to create it and make it to work.

Oh and, lets say I wanna add a "marker" on how many points are left, what would be the code? If it's an item I thought about <restest i_stat_point> but I think its really just to see if the player has it in the bag, it wouldn't quite tell much about the remaining amount.
(This post was last modified: 08-10-2015 06:04 AM by Osirirs.)
08-10-2015 06:01 AM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #4
RE: Gump Menu Help, Page switch
you can check cloudbrs script pack for quests it can give you idea
08-10-2015 06:04 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)