SphereCommunity
Static interactive dialog box - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Static interactive dialog box (/Thread-Static-interactive-dialog-box)



Static interactive dialog box - Joe Loop - 07-03-2013 05:14 PM

I have a wish, but not quite sure if its possible.

Last night i made simple dialog info scroll, dont quite remember it (i am at work now), but it must have been something like:

[DIALOG d_wr_status]
100,30
NOCLOSE
PAGE 0
DTEXT 15 0 <def.font_general> Unspent WR:
button 20 20 01e 01e 1 0 1
DTEXT 34 41 <def.font_general> <EVAL the world reputation here ..blabla>

[DIALOG d_wr_status BUTTON]
ON=1
SRC.DIALOG d_wr_menu

The WR (World Reputation) is gained on my shard everytime you kill something or complete a quest.

The dream would be that this scroll stayed static up in the corner of the screen, and simply updated the amount of unspent World Reputation points... and when you click it, the wr_menu opens, but scroll still stays up there and keeps on updating avilable amount.

Its easy enough to load the scroll on events like ON=@kill and stuff .. but that just places a lot of scrolls up there .. i only want one, that updates :/

But i dont think its possible.


RE: Static interactive dialog box - amonvangrell - 07-03-2013 05:43 PM

its not that difficult, but you'll have to implement the function to call up the gump in several places, like when you teleport, recall, die, log in etc.

to make it not movable u add below the noclose, nomove. make just to build your gump with this command so you can just the right position on the screen for your gump.

another thing is you can play with tags, like tag gump open, and tag gump closed, so when your players recall or do any that closes the gum the right one will be re-opened.

cya


RE: Static interactive dialog box - darksun84 - 07-03-2013 06:20 PM

For the update on the ON=@Kill etc , you can try to use this inside them

PHP Code:
if <isdialogopen <d_wr_status>> //d_wr_status it's open
    
dialogclose d_wr_status //close 
    
dialog d_wr_status // reopen
else
    
dialog d_wr_status 
endif 

It's not tested and the player reference can be wrong, it depends on which trigger that script is placed can be wrong(like the gump appears to the other player).

Well at the end you can just do

PHP Code:
dialogclose d_wr_status
dialog d_wr_status 



RE: Static interactive dialog box - Joe Loop - 07-03-2013 06:59 PM

Nice!

Thanks