mIRC Home    About    Download    Register    News    Help

Topic Options
#137543 - 13/12/05 09:29 PM Need help.
facelessrage Offline
Self-satisified door

Registered: 13/12/05
Posts: 4
Okay, I need some help...I really want to make a script but I am a complete idiot when it comes to mIRC scripting.

Basically I want it so that when someone types : !setup mapnamehere -- It executes this command.../rcon map mapnamehere...

But the thing is is that their are different maps...so like someone could type !map lol.bsp and it would execute /rcon map lol.bsp

Any help is highly appreciated..

Top
#137544 - 13/12/05 10:32 PM Re: Need help.
schaefer31 Offline
Fjord artisan

Registered: 27/08/05
Posts: 525
This will work but it does not validate that the map exists. The only error checking I added was to check that the map must be more than 4 characters and the last 4 characters must be ".bsp"

Code:
on 1:TEXT:!map *:[color:red]#YourChannel[/color]:{
  if ($len($strip($2)) > 4 && $right($strip($2),4) == .bsp) { rcon map $strip($2) }
}

Top
#137545 - 14/12/05 06:34 PM Re: Need help.
facelessrage Offline
Self-satisified door

Registered: 13/12/05
Posts: 4
I really just need this a little more simple. If I do !map blah the script doesnt recognize it because it doesnt have .bsp after it....and when I do the !map blah.bsp...it sends the command /rcon map blah.bsp.bsp....but the thing is I just need the /rcon map blah

The server doesnt recognize it if it has .bsp after it...just need the !map whatever and it does /rcon map whatever.

Thanks alot

Top
#137546 - 14/12/05 07:14 PM Re: Need help.
NeUtRoN_StaR Offline
Fjord artisan

Registered: 06/03/05
Posts: 212
the command your referenceing the whole rcon thing
really needs to be entered in the console portion of a valve game like css
or if you arent familiar with it theres a program called hlsw that allows you to enter rcon commands monitor the server and it even has its on irc bot that relays stats into the irc channel you designate

so... what you really need is mirc to take what you say and enter it into hlsw
which im assuming you use, if you dont you should
i could be wrong and maybe have overlooked something
anyways good luck

Top
#137547 - 14/12/05 07:38 PM Re: Need help.
facelessrage Offline
Self-satisified door

Registered: 13/12/05
Posts: 4
I actually have a script for IRC that connects and sends RCON commands through irc...thats the whole ./rcon alias thing laugh

I just need it to be triggered on !map

Thanks alot...

Top
#137548 - 14/12/05 07:42 PM Re: Need help.
genius_at_work Offline
Hoopy frood

Registered: 08/10/05
Posts: 1741
Try this:
Code:
on *:TEXT:!map &:#yourchannel:rcon map $remove($strip($2),.bsp)


If someone types !map blah.bsp it will send the command /rcon map blah If they type !map blah it will send /rcon map blah If they type !map the.cool.map.bsp it will send /rcon map the.cool.map

-genius_at_work

Top
#137549 - 14/12/05 08:14 PM Re: Need help.
facelessrage Offline
Self-satisified door

Registered: 13/12/05
Posts: 4
Do you have a Paypal account Genius? Im sending you 5 dollars.

Thanks a load.

Top
#137550 - 14/12/05 10:20 PM Re: Need help.
genius_at_work Offline
Hoopy frood

Registered: 08/10/05
Posts: 1741
:P

-genius_at_work

Top