mIRC Home    About    Download    Register    News    Help

Print Thread
#137543 13/12/05 09:29 PM
Joined: Dec 2005
Posts: 4
F
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Dec 2005
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..

#137544 13/12/05 10:32 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
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) }
}

#137545 14/12/05 06:34 PM
Joined: Dec 2005
Posts: 4
F
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Dec 2005
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

#137546 14/12/05 07:14 PM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Mar 2005
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

#137547 14/12/05 07:38 PM
Joined: Dec 2005
Posts: 4
F
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Dec 2005
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...

#137548 14/12/05 07:42 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

#137549 14/12/05 08:14 PM
Joined: Dec 2005
Posts: 4
F
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Dec 2005
Posts: 4
Do you have a Paypal account Genius? Im sending you 5 dollars.

Thanks a load.

#137550 14/12/05 10:20 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
:P

-genius_at_work


Link Copied to Clipboard