mIRC Home    About    Download    Register    News    Help

Print Thread
#240725 23/02/13 02:10 PM
Joined: Dec 2010
Posts: 89
D
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
Okay, well i'm making a script, and it is going to be used for a game server i play on. The channel i join, is an echo channel which echo's certain text to it such as if a player swears. My script will basically be a quick command script, people can input a command they want to quickly enter when a certain event happens. So if someone starts insulting someone else, the script will copy the command to the clipboard, and then the player ingame will be able to CTRL + V (Paste) to quickly and easily mute the player, or kick, or whatever command that instructed it to copy to clipbaord.
now, ofc the script will need to be adaptable, so that when it pastes the script, it will paste it with whatever the players name is, and i'm using [N] as an 'operator' for it kind of thing. So whenever the script reads [N] in the command to paste, it will convert that to whatever the guys name is.
E.g. 'Player Jeremy said: fuck you' - the script would read the command to paste is /mute [N] and copies to clipboard /mute Jeremy. how would i make it convert the text like that?

P.S i'm distributing the script, so i can't just put $2 because everyone may use different commands. I need it to somehow read the ini file (all commands are saved in ini files) and when it comes across [N] it replaces it with $2

Last edited by dominic_eddy; 23/02/13 02:11 PM.
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Read up /help $replace

Basically: $replace($readini(ini,topic,item),[N],$2)

Deega #240728 23/02/13 03:03 PM
Joined: Dec 2010
Posts: 89
D
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
thanks!! laugh


Link Copied to Clipboard