mIRC Home    About    Download    Register    News    Help

Print Thread
#182998 17/08/07 09:54 AM
Joined: Feb 2007
Posts: 91
S
spermis Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2007
Posts: 91
Hello. Could someone make a script with who i can change news in topic? So if topic is - Web : http://link | News : Some news | Another stuff : Something.

Then if i write !setnews ALOT OF NEWS! then topic will be

Web : http://link | News : ALOT OF NEWS | Another stuff : Something.

So only News: part changes, and also need so i can write !setanotherstuff - so it changes the ANother stuff part, and !setweb - so it changes web part...

ps.

i got this code

Code:
on user:text:*:#:{
  if ($1 == !setnews) { set %news $2- }
  if ($1 == !setweb) { set %web $2- }
  if ($1 == !setanotherstuff) { set %another $2- }

so what i need is to add topic function.


}

Last edited by spermis; 17/08/07 10:35 AM.
spermis #183084 17/08/07 05:04 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on @user:text:*:#:{
  if ($istok(!setnews !setweb !setanotherstuff,$1,32)) {
    if ($1 == !setnews) { set %news $$2- }
    elseif ($1 == !setweb) { set %web $$2- }
    elseif ($1 == !setanotherstuff) { set %anotherstuff $$2- }
    topic $chan Web : %web $chr(124) News: %news $chr(124) Another stuff: %anotherstuff
  }
}

hixxy #183476 20/08/07 10:20 AM
Joined: Feb 2007
Posts: 91
S
spermis Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2007
Posts: 91
mm.. i need that it saves the $web $news and $anotherstuff variables, because i if i quit the bot, then come in and use !setnews news it changes the news variable like it should, and the other 2 shows blank.

spermis #183480 20/08/07 11:29 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What hixxy gave you does save the variables (%news, %web, etc... not $news, $web, etc). If you're losing the variables, check to make sure no other scripts use those variables and that you don't have an unset command being used on those variables. Also make sure that you didn't use all of your hard drive space where mIRC is.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard