mIRC Home    About    Download    Register    News    Help

Print Thread
A
AzN
AzN
A
I want to make one script text.
The syntax is:
Code:
on *:text:#: { command }

It works with normal characters but does not work with bold characters. Please help me. Thank you.

Joined: Feb 2015
Posts: 241
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 241
You need to use $strip . It... Strips the text from colours,bold,italic,underlined.
Also you missed a part of the on text format
Code:
on *:text:*:#: {
;this is the right one
if ($strip($1) == Yay!!) {
msg $chan Hooray!
}
}

Try it out!! smile

A
AzN
AzN
A
Maybe I am stupid. I have not done.

when someone says (action type):
Code:
 please type !Blackjack and the amount bet for play game 


My script is:
Code:
on *:ACTION:*!blackjack*:#: {
if ($strip($1) == !blackjack) {
msg $chan !blackjack 1000
}
}


But script is not working.What went wrong? Plaese help me. Thank you.

Last edited by AzN; 15/09/15 02:02 AM.
Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
Use a text event, not action.

Joined: Feb 2015
Posts: 241
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 241
Loki is right! Also you don't need to use both an if statement and the text match. Use one only and if you use the text match make it with a "*" only after !blackjack because *!blackjack* will only trigger if it is among other words/text. smile

A
AzN
AzN
A
Sorry OrFeAsGr and Loki. I still can not finish his script.
I have screenshots illustrate:





command to be sent is:
Code:
!xidach 1000 (for the first photo)

and:
!war 1000 (for second image)


In the above case, my script is:
Code:
on *:ACTION:*:#TorViet: {
 if ($strip($3) == !XiDach) {
   msg $chan !xidach 1000
   }
 elseif ($strip($3) == !War) {
   msg $chan !war 1000
   }
}

it does not work.


IF:
Code:
on *:TEXT:*:#TorViet: {
 if ($strip($3) == !XiDach) {
   msg $chan !xidach 1000
   }
 elseif ($strip($3) == !War) {
   msg $chan !war 1000
   }
}

it also does not work

Therefore, the exact script should look like?

Last edited by AzN; 18/09/15 02:09 PM.
Joined: Feb 2015
Posts: 241
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 241
Code:
on *:text:*:#Torviet: {
if (Gõ*!XiDach* iswm $strip($1-)) {
msg $chan !XiDach 1000
}
elseif (*Gõ*!War* iswm $strip($1-)) {
msg $chan !War 1000
}
}

This should work. Although i dont know why yours doesnt.. it seems right. But try this.
-OrFeAsGr-

A
AzN
AzN
A
Thank OrFeAsGr! Thank you very much.
But, it does not work.

frown frown frown

B
BigLamer
BigLamer
B
Try to change if statement:

Code:
on *:TEXT:*:#TorViet: {
 if (!XiDach isin $strip($1-)) {
   msg $chan !xidach 1000
   }
 if (!War isin $strip($1-)) {
   msg $chan !war 1000
   }
if .... { 
and so on
}
return/halt
}


Link Copied to Clipboard