Jump to content

Needs Correction


general

Recommended Posts

Following is the code im trying to use in my script ..but it does not wrokd properly ...i try to make it usefull but cudnt...

in the following code DIALOG boxes are opening proprly ..but Owner,Deowner,host,dehost,kick and Ban options do not works....everything works except above mentioned options...

if someone can make it work ....?

 

on ^*:JOIN:#:{ timer 1 4 modez }
on ^*:MODE:#:{ .timer 1 4 modez }
on ^*:part:#:{ .timer 1 4 modez }
alias mdx { return dlls\mdx.dll }
alias -l timer.now {
  if ($dialog(bar)) { did -ra bar 17 $time(h:nn:ss ) }
  else .timerNOW  OFF
}
alias bar {
  //dialog -m bar bar
}
alias modez { did -ra bar 2 $chan($active).mode }


dialog bar {
  title ""
  size -1 -1 514 35
  option dbu
  button "Away Box", 1, 4 5 30 10
  button "Access", 3, 4 19 30 10
  button "Ban", 6, 72 19 30 10
  button "Owner", 7, 106 5 30 10
  button "C.Map", 8, 72 5 30 10
  button "Host", 11, 106 19 30 10
  button "De-Owner", 12, 139 5 30 10
  button "De-Host", 14, 139 19 30 10
  button "Seen", 19, 38 5 30 10
  button "Kick", 20, 38 19 30 10
  button "Close", 9, 173 6 26 23
  edit "", 10, 406 5 95 10, autohs
  list 15, 406 20 95 12, vsbar
  button "Join", 16, 373 20 26 10
  button "g", 22, 207 17 12 12
  button "Add", 4, 373 6 26 10
  button "Delete", 5, 343 6 26 10
  edit "", 2, 228 20 50 10, disable center
  text "Modes", 13, 229 10 25 8, center
  edit "", 17, 288 20 50 10, disable center
  edit "", 18, 254 6 84 10, disable center
  text "Music", 21, 203 7 22 8, center
  button "Stop", 23, 343 20 26 10
}
on *:dialog:bar:sclick:1: { dialog -m away away }
on *:dialog:bar:sclick:3: { dialog -m msn.access msn.access }
on *:dialog:bar:sclick:4:{ $iif($did(10),write mychats.txt $did(10)) | loadbuf -ro $dname 15 mychats.txt }
on *:dialog:bar:sclick:5: { $iif($did(10),write -ds $+ $did(10) mychats.txt) | loadbuf -ro $dname 15 mychats.txt }
on *:dialog:bar:sclick:6: { .access $comchan($did(14).text,1) add DENY *! $+ $$ial($did(14).text $+ *,1).addr 1440 | .kick $active $did(14).text Banned ( 24 Hour Ban ) }
on *:dialog:bar:sclick:7: { .mode $active +q $did(14).text }
on *:dialog:bar:sclick:8: {  dialog -m ascii ascii }
on *:dialog:bar:sclick:9: { exit }
on *:dialog:bar:sclick:11: { .mode $active +o $did(14).text }
on *:dialog:bar:sclick:12: { .mode $active -q $did(14).text }
on *:dialog:bar:sclick:14: { .mode $active -o $did(14).text }
on *:dialog:bar:sclick:15: { did -ra $dname 10 $did(15).seltext }
on *:dialog:bar:sclick:16: { $iif($did(10),join $did(10)) | /set %test $did(10) | did -ra $dname 10 | loadbuf -ro $dname 15 mychats.txt }
on *:dialog:bar:sclick:19: { dialog -m seen seen }
on *:dialog:bar:sclick:20: { .kick $active $did(14).text Disrupting the chat room. } 
on *:dialog:bar:sclick:22: { splay -p stop }
on *:dialog:bar:sclick:23: { url -an [url="http://www.xyz.com"]http://www.xyz.com[/url] }
on *:dialog:bar:init:*:{
  dll $mdx SetMircVersion $version 
  dll $mdx MarkDialog $dname
  dll $mdx SetControlMDX $dname 1 toolbar list arrows flat wrap nodivider > $dlls(bars)
  dll $mdx SetDialog $dname bgcolor $rgb(0,0,0)
  dll $mdx SetColor $dname 2,13,17,18,21 textbg $rgb(0,0,0)
  dll $mdx SetColor $dname 1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20,21,22,23 background $rgb(0,0,0)
  dll $mdx SetColor $dname 2,13,17,18,21 text $rgb(128,128,128)
  dll $mdx SetControlMDX $dname 1,2 ListView report single noheader showsel > dllx\views.mdx
  dll $mdx SetColor $dname 1 text $rgb(0,0,128)
  dll dlls\rebar.dll Dock $dialog(bar).hwnd > bottom
  dll $mdx SetFont 22 15 0 Webdings
  loadbuf -ro bar 15 mychats.txt
  .timerNOW 0 1 timer.now
  did -ra bar 18 $time(dddd mmmm dd yyyy)
}
on *:start: /bar
}

Edited by X-Fusion
Added [code] box
Link to comment
Share on other sites

id 14 == button

 

and u /mode $active +o the button that can't work ..

 

but there's many mistake in your code.

how do you check nick in the chatroom ?

Edited by Orus
Link to comment
Share on other sites

Well dear i know there is many mistakes in this codes thats y ..it aint wort ...

this is why ...i post it there tat someone help me ..and make it correct for me ...i dont know wat are the mistakes ....so if u can point out them i wud may able to fix it......

Link to comment
Share on other sites

Well dear i know there is many mistakes in this codes thats y ..it aint wort ...

this is why ...i post it there tat someone help me ..and make it correct for me ...i dont know wat are the mistakes ....so if u can point out them i wud may able to fix it......

 

 

hello,

 

is it all your code?

;Miss nicks in combo or edit

;$did(14) == boutton id 14

;you have a bracket at the end of the code, i don't know why

 

helping you is difficult for me because i don't know what you want to put and WHERE.

 

you might explain what you really want to do and probably anyone will help you.

Link to comment
Share on other sites

Guest Travis
on *:dialog:bar:sclick:20: { .kick $active $did(14).text Disrupting the chat room. }

 

the format for kick is /kick $chan $nick reason

 

button "De-Host", 14, 139 19 30 10

 

This is $did(14) and $did(14).text is De-Host. This is why you cannot kick. You need to specify which $nick to kick.

 

It loads info from mychat.txt into the list, are these the nicknames in the room? I;d hope so though this is a weird way of doing it. Regardless .... Then when you select something in the list it appears to put it in the edit box $did(10).

 

So if this is correct, what you want to do is ...

 

if ($did(10) ison $active) kick $active $did(10) reason
if ($did(10) ison $active) mode $active +q $did(10)
if ($did(10) ison $active) mode $active +o $did(10)
if ($did(10) ison $active) mode $active -q $did(10)
if ($did(10) ison $active) mode $active -o $did(10)

if ($did(10) ison $active) access $active deny $address($did(10),2) 0 :reason

 

 

 

 

 

Link to comment
Share on other sites

Thanx Travis & Orus ...for denoting mistakes in my codes....

Well im not a professional scripter...and there are not my codes....

these codes were sent to me by someone els...

I dont know y did he send me such codes which are not correct ...

But its ok now ...i make it working ...in the light of your instructions ...

Thanx Again for help (F)

Link to comment
Share on other sites

I know you said this code was working for you now general, but you can really simplify it by using if, else, else if, and if-then-else statements.

Just some freindly advise from a fellow n00b. There are numerous tutorials for using these statements all over the place in this site. Check 'em out and you may be surprised at how you can make a 300 line code into a 2 line code with full functionality.

Edited by Wiley E.
Link to comment
Share on other sites

on *:dialog:Right:sclick:12:{  echo -a # 14Right click to deop | mode $active +q $snick($active,1) }
on *:dialog:Right:rclick:12:{ echo -a 14dehosting nick | mode $active -q $snick($active,1) }
on *:dialog:Right:sclick:41:{ echo -a # Right click to deop | mode $active +o $snick($active,1) }
on *:dialog:Right:rclick:41:{ echo -a dehosting nick | mode $active -o $snick($active,1) }
on *:dialog:Right:sclick:42:{ echo -a # Right click to deop }
on *:dialog:Right:rclick:42:{ echo -a dehosting nick | mode $active -qo $snick($active,1) }



icon 42, 5 50 15 15,  $mircdir\iconpics\deop.JPG, 0, tab 28 noborder
icon 41, 5 35 15 15,  $mircdir\iconpics\host.JPG, 0, tab 28 noborder
icon 12, 5 20 15 15,  $mircdir\iconpics\owner.JPG, 0, tab 28 noborder

 

http://img221.imageshack.us/my.php?image=myscript.jpg

 

ecample of pic with in tool bars(dialogs)

note : the sclick and rclick can also use dclick

Edited by X-Fusion
Added [code] boxes
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...