{_AntiFreak_} Posted September 28, 2007 Share Posted September 28, 2007 Hello, i want to create a dialog in my script, but i need some help For example i take the dialog out of PRS: dialog prs { title "MTASA:PRS By [uVA]Scooby" size -1 -1 197 108 option dbu tab "PRS Main", 100, -1 -3 198 111 text "Welcome Msg:", 1, 5 15 35 8, tab 100 edit "Welcome To My Server.", 2, 41 14 154 10, tab 100 autovs } I don't know what these values behind the tabs, texts or edits say (, 2, 41 14 154 10, tab 100 autovs). which number is for what (height, width...) and what is autovs and "option dbu"??? Hope for help, thx Link to comment
lil Toady Posted September 28, 2007 Share Posted September 28, 2007 people have to learn using help, type '/help dialogs' in mirc, everything is explained there. And i'd recommend you a program called dialog studio. It's right for creating dialogs for mirc. (Before i found it making dialogs took so damn long) Link to comment
{_AntiFreak_} Posted September 28, 2007 Author Share Posted September 28, 2007 Error-Message: c:\\...\mirc.hlp File wasn't found Link to comment
lil Toady Posted September 28, 2007 Share Posted September 28, 2007 reinstall mirc with help file included then Link to comment
{_AntiFreak_} Posted September 28, 2007 Author Share Posted September 28, 2007 ah, i found the help file manually, thx Link to comment
Oli Posted September 29, 2007 Share Posted September 29, 2007 yeah dialog studio is what u want.. u can design ure dialogs in hat and export them to a script file.. but i cant remember the link for it.. ill try dig it out when im at home. Link to comment
[TbO]Gr00vE Posted October 2, 2007 Share Posted October 2, 2007 hey truth, i think i found it here: http://www.softlookup.com/download.asp?id=47851 Link to comment
{_AntiFreak_} Posted October 7, 2007 Author Share Posted October 7, 2007 Groove, you are TOO late! i already found it myself.^^ Link to comment
{_AntiFreak_} Posted October 7, 2007 Author Share Posted October 7, 2007 now, i made a dialog, but it doesn't really work. The dialog is shown, but the buttons don't work. Here, the dialog: alias empty !halt $input(Error - Empty $1 Field,douw,MRS - Error!) alias w_n { if (!$dialog(w_n)) { !dialog -md w_n w_n } } on *:start: { mta !dialog -md w_n w_n } dialog w_n { title "[MRS]Mega-RCON-Script by !!TheTruthGER - Messages" size -1 -1 290 57 option dbu text "Welcome-Message:", 2, 8 8 48 8 text "News:", 3, 8 24 25 8 edit "", 4, 56 8 177 10, autovs button "Welcome: On", 5, 248 8 37 12 edit "", 6, 56 24 178 10, autovs button "News: On", 7, 248 24 37 12 button "Save Changes", 1, 8 40 128 12 button "Close", 9, 144 40 141 12, ok cancel } on *:DIALOG:w_n:sclick:*: { if ($did == 1) { if (!did(w_n,4)) && ($did(w_n,5) == Welcome: On) empty Welcome-Message elseif (!$did(w_n,6)) && ($did(w_n,7) == News: On) empty News else { !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" !write " $+ $scriptdir $+ welcomemsg.txt" $did(w_n,4) !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" !write " $+ $scriptdir $+ newsmsg.txt" $did(w_n,6) !halt $input(Welcome/News-Msg Saved,dou,Welcome/News-Msg Saved) } } elseif ($did == 5) { if ($did(prs,5) == Welcome: On) { !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" !write " $+ $scriptdir $+ welcomemsg.txt" Off !did -a w_n 5 Welcome: Off !did -a w_n 4 Off } else { !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" !write " $+ $scriptdir $+ welcomemsg.txt" $did(w_n,4) !did -a w_n 5 Welcome: On } } elseif ($did == 7) { if ($did(prs,7) == News: On) { !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" !write " $+ $scriptdir $+ newsmsg.txt" Off !did -a w_n 7 News: Off !did -a w_n 6 Off } else { !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" !write " $+ $scriptdir $+ newsmsg.txt" $did(w_n,6) !did -a w_n 7 News: On } } } on *:DIALOG:w_n:init:*: { if ($read($scriptdir $+ welcomemsg.txt,1)) !did -ra w_n 4 $v1 if ($read($scriptdir $+ newsmsg.txt,1)) !did -ra w_n 6 $v1 } on *:SIGNAL:mta.adcon: { if ($3 == !w_n) w_n } What is wrong? Can someone help me, please??? Link to comment
lil Toady Posted October 7, 2007 Share Posted October 7, 2007 cause you have 'prs' in some of the button $did's? Link to comment
{_AntiFreak_} Posted October 9, 2007 Author Share Posted October 9, 2007 alias empty !halt $input(Error - Empty $1 Field,douw,MRS - Error!) alias w_n { if (!$dialog(w_n)) { !dialog -md w_n w_n } } dialog w_n { title "[MRS]Mega-RCON-Script by !!TheTruthGER - Messages" size -1 -1 290 57 option dbu text "Welcome-Message:", 2, 8 8 48 8 text "News:", 3, 8 24 25 8 edit "", 4, 56 8 177 10, autovs button "Welcome: On", 5, 248 8 37 12 edit "", 6, 56 24 178 10, autovs button "News: On", 7, 248 24 37 12 button "Save Changes", 1, 8 40 128 12 button "Close", 9, 144 40 141 12, ok cancel } on *:DIALOG:w_n:sclick:*: { if ($did == 1) { if ($did(w_n,5) == Welcome: On) { !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" !write " $+ $scriptdir $+ welcomemsg.txt" $did(w_n,4) } else { !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" !write " $+ $scriptdir $+ welcomemsg.txt" Off } if ($did(w_n,7) == News: On) { !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" !write " $+ $scriptdir $+ newsmsg.txt" News: $did(w_n,6) } else { !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" !write " $+ $scriptdir $+ newsmsg.txt" Off } !halt $input(Messages have been saved,dou,Messages have been saved) } elseif ($did == 5) { if ($did(w_n,5) == Welcome: On) { !did -a w_n 5 Welcome: Off !did -ra w_n 4 Off } else { !did -a w_n 5 Welcome: On } } elseif ($did == 7) { if ($did(w_n,7) == News: On) { !did -a w_n 7 News: Off !did -ra w_n 6 Off } else { !did -a w_n 7 News: On } } } on *:DIALOG:w_n:init:*: { if ($read(welcomemsg.txt,1)) !did -ra w_n 4 $v1 if ($read(newsmsg.txt,1)) !did -ra w_n 6 $v1 } on *:SIGNAL:mta.adcon: { if ($3 == !messages) w_n } NOW IT WORKS!!!!! I'm so good^^ Link to comment
[UVA]Bart Posted October 9, 2007 Share Posted October 9, 2007 small error unless you want it to do that look elseif ($did == 5) { if ($did(w_n,5) == Welcome: On) { !did -a w_n 5 Welcome: Off [color=#FF0000]!did -ra w_n 4 Off[/color] } else { !did -a w_n 5 Welcome: On } } elseif ($did == 7) { if ($did(w_n,7) == News: On) { !did -a w_n 7 News: Off [color=#FF0000] !did -ra w_n 6 Off[/color] } else { !did -a w_n 7 News: On } } } ?? why do you want the red bit to show that the button is "off" in the edit box ? Link to comment
{_AntiFreak_} Posted October 19, 2007 Author Share Posted October 19, 2007 Yes, i wanted it to look so Link to comment
Recommended Posts