![]() |
Help with Dynamic Dialogs? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Help with Dynamic Dialogs? (/Thread-Help-with-Dynamic-Dialogs) |
Help with Dynamic Dialogs? - Reflex - 04-29-2012 11:00 PM Hello, Thanks in Advance.. and to those who feel like helping please give in-depth answers explaining your post. 1. How do I make these dynamic where they re-size themselves dependent upon how many commands are available? or something like that.. without having to always manually re-size dialog backgrounds? resizepic 12 14 5054 203 200 gumppictiled 19 22 187 185 5124 2. How do I make a dialog recognize the page its on for example Page 1 of 2 without manually typing in the numbers? 3. What is the best way to have the dialog load information in accordance to your plevel? Example. I would like players who click commands have "variable" commands listed. If Counselor clicks commands have it list only counselor commands and all of player's commands. Seers show seers commands and counselors and players commands? dhtmlgump 75 26 175 100 0 0 <DEF.CENTER><DEF.BFONT_RED>Page 1 of 1<DEF.CENTER></BFONTE> resizepic 12 14 5054 203 200 gumppictiled 19 22 187 185 5124 Code: [DIALOG d_commands] RE: Help with Dynamic Dialogs? - RanXerox - 04-30-2012 07:48 AM Quote:1. How do I make these dynamic where they re-size themselves dependent upon how many commands are available? or something like that.. without having to always manually re-size dialog backgrounds? Try this: resizepic 12 14 5054 <LOCAL.ResizepicWidth> <LOCAL.ResizepicHeight> gumppictiled 19 22 <LOCAL.GumppictiledWidth> <LOCAL.GumppictiledHeight> 5124 Figuring out how to calculate those variables... that is the tricky part. Quote:3. What is the best way to have the dialog load information in accordance to your plevel? Example. I would like players who click commands have "variable" commands listed. If Counselor clicks commands have it list only counselor commands and all of player's commands. Seers show seers commands and counselors and players commands? By Default, the sphere_admin.scp has some definitions for the PLEVELs: Code: [DEFNAME admin_strings] lets add a few more to make the code more readable... Code: // Titles for privilege levels So make some basic functions that check for the minimum PLEVEL for a given command... maybe like this: Code: [FUNCTION f_PLevelAtLeastGM] Then in the DIALOG itself, do stuff like this: Code: //dtext x y colour text |