wannaknow Posted April 29, 2008 Share Posted April 29, 2008 Why i can only use ! inmy scripts here?? Can someone make a script that i can use a ? in the front of my script like on *:SIGNAL:mta.command: { if ($3 == ?lol) mta.text 1 Laughing Out Load if ($3 == ?info) mta.text 1 WannaKnow Script V1 online } Can some one make a script that work with ?command Tnx, WannaKnow Link to comment
[DDC]4:20 Posted April 29, 2008 Share Posted April 29, 2008 Well, it is possible to make commands using ANY character on your keyboard. The thing is, the on *:SIGNAL:mta.command: function is ONLY called when a person uses ! infront of the text. Now I and no great scripter, but I would assume that it's like that so that the function will not be checked everytime someone sends a text in the chatbox. In order for you to use any other character to call your commands, you need to be checking the on *:SIGNAL:mta.text: function. Doing this may cause issues because that function will run everytime someone sends text in the chat window, but I believe it is the only way to accomplish the task. I would like to hear all the leet scripters opinions on this and how badly it would effect server and script stability, and if there may be an alternate way to accomplish the task. Link to comment
wannaknow Posted April 30, 2008 Author Share Posted April 30, 2008 Tnx, but i have tried it with on *:SIGNAL:mta.text: { and that don't worked it only works again with a ! command Can please some one help me?? Tnx, WannaKnow Link to comment
[UVA]Bart Posted April 30, 2008 Share Posted April 30, 2008 use mta text signal and have it checking to see if "?" isin $3 if it is then find the correct command, best off naming the "?" as a char, but a cant remember what it is lol Link to comment
wannaknow Posted April 30, 2008 Author Share Posted April 30, 2008 I do not understand you bart?? Can you explain i some better?? WannaKnow Link to comment
Scooby Posted April 30, 2008 Share Posted April 30, 2008 try this... on *:SIGNAL:mta.text: { if ($left($3,1) == $chr(63)) { if ($3 == ?blaaaaa) mta.text $1 blaaaaa!!! elseif ($3 == ?moo) mta.text $1 Moooooo!!! ;add ur commands beginning with a ? here... } } Link to comment
wannaknow Posted April 30, 2008 Author Share Posted April 30, 2008 Thanks Scooby he is working now very thanks Link to comment
wannaknow Posted April 30, 2008 Author Share Posted April 30, 2008 (edited) And, how can i set a ?startrace command in my own script not in PRS or SLR or some else scipt in my own little made script And can i have a ?nextmap to?? Tnx WannaKnow Edited April 30, 2008 by Guest Link to comment
Scooby Posted April 30, 2008 Share Posted April 30, 2008 well if ur interested in learning, theres a scripting.html file containing just about all of the commands, it came with mtama, if u cant find it... get it here: http://home.deds.nl/~aeron/mtama/4.0/ in this file u can see what commands are availble and how to use them. so for the command ?startrace, u would look in that html file and find the command, it looks like this: /mta.startrace This start race with RaceID on the server. since im sure u dont want to specify the race ID, u need to use another command to 'get the race id from the name given' the command as it stands would look like: if ($3 == ?startrace) mta.startrace $1 $4 $4 is the race ID u specify so to make this work how u want, u need to use another command, it would look like this: if ($3 == ?startrace) mta.startrace $1 $mta.races($1,$4-) u can now add this line to the ?command script i posted earlier. i hope u understand all this... with a little practice, u should be able to make some more baisc commands. ?nextmap is a little more tricky but im sure ul get there with a little work:) Link to comment
wannaknow Posted April 30, 2008 Author Share Posted April 30, 2008 He says /mta.startrace : Insiffucult paramaters I have this on *:SIGNAL:mta.text: { if ($3 == ?startrace) { if ($address($nick,2) == *!*@gtanet-9220466C.swk1.ov.home.nl) { if ($readini($scriptdir $+ botadmin.ini,BOTADMIN,$mta.nick($1,$2)) >= { mta.startrace $1 $mta.races($1,$4-) } else /mta.text 1 You need to be level 8 to use this command } } } Next map? Can i make that with a a Writi ini and then on map change readini an rem ini? And how can i make That Botlevel 9 can use ?kick But cant kick some one whi is higher as botlvl 9 The ini he writes the bot lvl in is botadmin.ini,BOTADMIN My kick script on *:SIGNAL:mta.text: { var %a = $iif((!$4),$2,$iif(($getid($1,$4) == $null),$2,$v1)) if ($left($3,1) == $chr(63)) { if (%admincmd == aan) { if ($3 == ?kick) { if ($4 == $null) { mta.text 1 Please choose a name. } else { if ($readini($scriptdir $+ botadmin.ini,BOTADMIN,$mta.nick($1,$2)) >= { mta.kick 1 %a mta.text 1 $mta.nick($1,%a) has been kick by $mta.nick($1,$2) } else /mta.text 1 You need to be level 8 to use this command! } } } } } Tnx for helping me agian Link to comment
Scooby Posted April 30, 2008 Share Posted April 30, 2008 do u have msn? if u want it'll be faster for me to help u there.... mine is: [email protected] Link to comment
[DDC]4:20 Posted April 30, 2008 Share Posted April 30, 2008 (edited) Since no one responded to my question, I'll ask again. Does using this method cause script/server performance issues? ps "well if ur interested in learning, theres a scripting.html file containing just about all of the commands," what are the commands it doesnt show????? amd "best off naming the "?" as a char" <--- why is it best to use the chr numbers? Edited April 30, 2008 by Guest Link to comment
Scooby Posted April 30, 2008 Share Posted April 30, 2008 Since no one responded to my question, I'll ask again. Does using this method cause script/server performance issues? well u have to bare in mind that everything u add in mta.text, that it gets read by mirc everytime someone types some text, so if u fill it up with loads of commands that could/should be added in the command section, it will slow the response time. however, if its just a few lines, u wont even notice it. usually ul have some checks in mta.text, so if theyre added efficiently u should be fine. Link to comment
Recommended Posts