DazzaJay Posted July 6, 2007 Share Posted July 6, 2007 Hello all, im looking for a little help adjusting some scripts.... mainly cos i suck at scripting.... but yeah, im also looking for a few scripts also.... so i will start with them... (Yes i have searched, and i have come back with no results, well, lots of results, none even matched my search terms) ============= ok, im looking for A Timed Message Script [script to read messages out of a file every few hundred seconds..... yes i know scooby's PRS already has one but it only does a single message, i want to have all different messages, randomly selected] ============= An auto kick script for Characters in peoples names... so not the whole name, just ones that have retarded characters in them... like !^&%*:;|+"<> and so on. ============= an !played command that shows a players played time this session and total time played in the server ============= And now a few things that i will probably need scooby's help with as these are issues And/or changes with/for PRS. !new command..... wanting to change this so it needs only 61% of people to vote to change the map, instead of everyone in the server. Wanting to change the message in PRS that says: "Race: - Ran 20 times" to be like this: "Race: Played 20 Times out of 1072 Total Races" (basically so it shows how many races have been ran since the server began) the !stats command often glitches up..... as this is how it SHOULD look.... [PHS]Dan[AU]: !stats Admin: Full Stats For [PHS]Dan[AU] Admin: Races: 3408 - Finishes: 1529 - Ratio: 0.45 Admin: Placed: 1st: 1065 - 2nd: 357 - 3rd: 74 Admin: Deathmatches: 673 - Wins: 186 - Ratio: 0.28 Admin: TopTimes Held: 75 - Points: 4276 But it Often (like 99% of the time) only replys with this.... [PHS]Dan[AU]: !stats Admin: Full Stats For [PHS]Dan[AU] Admin: Placed: 1st: 1065 - 2nd: 357 - 3rd: 74 Admin: Deathmatches: 673 - Wins: 186 - Ratio: 0.28 Admin: TopTimes Held: 75 - Points: 4276 adjust the "!map random" command, as it often says Starting a random map, and Dosent change the map. (like 70% of the time it does that) Change the message: "This is a Deathmatch Map, Type !new For A New Map." So it comes up at the start of EVERY map as: "Dont like the map? Type !new to vote for a new map" oh, and a dumb problem, PRS dosent store a record if the map takes longer than 20 minutes to complete. ===================== Can anyone help with some of those issues / scripts please? Link to comment
Scooby Posted July 9, 2007 Share Posted July 9, 2007 they are all really simple issues. ok where to start... lol for a random message every 200 secs theres a few ways to do this, u can add the messages directly to ur script, or to an ini and get the script to read it.. so we'll do it that way... make and ini called randommessage.ini and add urs messages to it so it looks like this: [msg] 1=Dont like this map, type !new for a new map 2=visit out site at http://www.uvaclan.com 3=increase your max bid by buying a bidlevel! and so on... then in ur script add, under on *:SIGNAL:mta.connect: { .timerrnd 0 200 randommessage $1 now at the bottom of ur script add: alias randommessage { var %a = $ini(randommessage.ini,msg,0) var %b = $rand(1,%a) mta.text $1 $readini(randommessage.ini,msg,%b) } ok and as for disallowing characters find which characters u want to disallow with an ascii table http://www.asciitable.com/ u need to make a note of the decimal next to the charater ( ! = 33, " = 34, £ = 35 and so on) then under: alias newnick { if (($chr(33) isin $mta.nick($1,$2)) || $chr(34) isin $mta.nick($1,$2)) { mta.msg $1 $2 Invalid Text In Nick!!! mta.kick $1 $2 } add as many as u want... theres also other ways u can do this. the time played and total time spent on the server i'll do another time. as for !new, look in ur script for alias prs.newmap { the vote percentage is set to 1.25, change this to what u want, although 1.7 would give u %60 since it rounds it up. u cant have 61% as it is. Wanting to change the message in PRS that says: "Race: - Ran 20 times" to be like this: "Race: Played 20 Times out of 1072 Total Races" (basically so it shows how many races have been ran since the server began) i cant remember now, but i dont think i added total races. simple enough to add but it wouldnt work out right now without a little help:P i'll have to show u how to do this on msn i guess coz ul need to make a little something temporarily to find out the total which can then be removed. yes the stats did sometimes mess up for others... it depends how much text has to show, this is easily fixed... find the line in the script which displays the stats and add a 1 second timer to the second line, then a 2 second timer to the 3rd i definatly added this to version 1.3 so if u dont have this then u have an old version... the !map random command may have problems if ur maps are missing make sure u use the racelist updater the only other issue could be if ur map names have a - in them. Change the message: "This is a Deathmatch Map, Type !new For A New Map." So it comes up at the start of EVERY map as: "Dont like the map? Type !new to vote for a new map" the line is under startrace: if ($prs.mode($1) == deathmatch) { prs.addalive $1- if ($prs.players($1) == 1) .timershow 1 5 mta.text $1 This Is A Deathmatch Map, Type !new For A New Map. its set for DM just take the single line out and move it to the top of the alias. oh, and a dumb problem, PRS dosent store a record if the map takes longer than 20 minutes to complete. didnt realise any maps would last longer than 20 mins next time u have a question... ask.. dont wait till u have a load... too much to sort out in 1 go really hope this helps... let me know. Link to comment
DazzaJay Posted July 9, 2007 Author Share Posted July 9, 2007 Thanks for the help man, iil start making those adjustments now. (as for the 20 minute race, MSD made a map that goes for roughly 24 minutes..... fairly boring, its like a Nascar track.... (with lots of people its pretty fun) but when people finish, this would appear in the chat, (note, there is no records set on the map) 1st: 24:14.171 (+4:14.171) so basically, whatever over 20 minutes comes up as being behind a record time........ even tho there isnt one, and no record is saved. Link to comment
Scooby Posted July 9, 2007 Share Posted July 9, 2007 its not a major adjustment, but without looking i cant tell u what to alter to fix it. i set everything to a max 120000 (20mins) so ul have to edit this amount in the script. its probably in the script about 20 times. Link to comment
DazzaJay Posted July 9, 2007 Author Share Posted July 9, 2007 then in ur script add, under on *:SIGNAL:mta.connect: { .timerrnd 0 200 randommessage $1 now at the bottom of ur script add: alias randommessage { var %a = $ini(randommessage.ini,msg,0) var %b = $rand(1,%a) mta.text $1 $readini(randommessage.ini,msg,%b) } ok, small quissie about that, do i make my own .mrc file for that, or do i edit PRS? :::EDIT::: Dont worry, all good, i made a .mrc file like this: on *:SIGNAL:mta.connect: { .timerrnd 0 200 randommessage $1 } alias randommessage { var %a = $ini(randommessage.ini,msg,0) var %b = $rand(1,%a) mta.text $1 $readini(randommessage.ini,msg,%b) } and it all works perfectly fine Link to comment
DazzaJay Posted July 9, 2007 Author Share Posted July 9, 2007 ok, looks like i screwed up..... the whole timered message thing works perfectly, but the next part dosent.... on *:SIGNAL:mta.connect: { .timerrnd 0 200 randommessage $1 } alias randommessage { var %a = $ini(randommessage.ini,msg,0) var %b = $rand(1,%a) mta.text $1 $readini(randommessage.ini,msg,%b) } alias newnick { if (($chr(33) isin $mta.nick($1,$2)) || $chr(34) isin $mta.nick($1,$2)) || $chr(94) isin $mta.nick($1,$2)) || $chr(36) isin $mta.nick($1,$2)) || $chr(60) isin $mta.nick($1,$2)) || $chr(62) isin $mta.nick($1,$2)) || $chr(46) isin $mta.nick($1,$2)) { mta.msg $1 $2 Invalid Text In Nick!!! mta.kick $1 $2 } } that is the entireaty of randommsgandcharkick.mrc that i created using the info given.... the random message part works perfectly.... (well, it keeps sending the messages to IRC after everyone leaves the server.... kinda annoying) but the character kick script dosent work attal. what did i do wrong? Link to comment
lil Toady Posted July 9, 2007 Share Posted July 9, 2007 alias newnick { if (($chr(33) isin $mta.nick($1,$2)) || ($chr(34) isin $mta.nick($1,$2)) || ($chr(94) isin $mta.nick($1,$2)) || ($chr(36) isin $mta.nick($1,$2)) || ($chr(60) isin $mta.nick($1,$2)) || ($chr(62) isin $mta.nick($1,$2)) || ($chr(46) isin $mta.nick($1,$2))) { mta.msg $1 $2 Invalid Text In Nick!!! mta.kick $1 $2 } } Why would you disallow so many chars tho? % and $ are the only ones that could spoil anything in mirc Link to comment
DazzaJay Posted July 9, 2007 Author Share Posted July 9, 2007 Really annoied with the amazing increase in cheaters using names like ^_-_^ or $$$PIMP$$$ and so on. and some names are just incompadible with PRS.... like... a chaater joined with a name like Jimmy.James or somthing like that tried !ban "Error, cannot ban self" tried !getip Jimmy.James "No IP found for *.*" and so on. its mainly for dumb shit like that. =============== oo, i found a problem in one of the scripts that i had to adjust (i prolly caused it) this prs.addalive $1- if ($prs.players($1) == 1) .timershow 1 5 mta.text $1 This Is A Deathmatch Map, Type !new For A New Map. well, it Works** But only on the first map played, then it just dosent appear again untill somone new joins.... then it works once... (not sure if i screwd somthing, but it is supposed to happen every map load, i think) Link to comment
Scooby Posted July 10, 2007 Share Posted July 10, 2007 ok im back from work, i take it u managed to get it all working now? Link to comment
DazzaJay Posted July 10, 2007 Author Share Posted July 10, 2007 Well, Close.... the auto special Character name kick script isnt working and the Random message script sends messeges every 200 seconds... (good, but) it keeps sending them to the game chat and IRC even when there is noone in the server. thats about the only 2 things that arnt working properly. :::EDIT::: Oh and the "Dont like the map, type !new to vote for a new map" message only comes up when there is 1 person in the server, if there is more, it wont come up in chat. other than that... everything is working great! Link to comment
Scooby Posted July 10, 2007 Share Posted July 10, 2007 hmm ok look in startrace alias and find this: if ($prs.mode($1) == deathmatch) { prs.addalive $1- if ($prs.players($1) == 1) .timershow 1 5 mta.text $1 This Is A Deathmatch Map, Type !new For A New Map. } change it to: if ($prs.mode($1) == deathmatch) { prs.addalive $1- } if ($prs.players($1) > 0) .timershow 1 5 mta.text $1 Dont Like This Map, Type !new For A New Map. the random message alias changeto this: alias randommessage { var %a = $ini(randommessage.ini,msg,0) var %b = $rand(1,%a) if ($prs.players($1) > 0) mta.text $1 $readini(randommessage.ini,msg,%b) } and the lines u added for dissallowing chars should go at the top of alias newnick the whole alias should look like this: alias newnick { var %a = $mta.nick($1,$2),%b = $mta.ip($1,$2),%c = $gettok(%b,1-2,46) if (($chr(33) isin %a) || ($chr(96) isin %a) || ($chr(34) isin %a) || ($chr(94) isin %a) || ($chr(36) isin %a) || ($chr(60) isin %a) || ($chr(62) isin %a) || ($chr(46) isin %a)) { mta.msg $1 $2 Invalid Text In Nick!!! .timer 1 5 mta.kick $1 $2 } if (%a == Player) .timerannoy $+ $2 0 10 mta.pm $1 $2 Choose A Name! Type /nick !hdel pgstemp loggedin $+ $2 if (($prs.clantag($1) isin %a) || ($hget(prswarns,AdminIP $+ %a) != $null)) { prs.login $1- } !hadd prsseen %a $time $date if (%a != Player) { .timerannoy $+ $2 off if ($numtok($hget(prsalias,%b),44) < 10) !hadd prsalias %b $iif((!$hget(prsalias,%b)),%a,$addtok($hget(prsalias,%b),%a,44)) if ($numtok($hget(prsalias,%c),44) < 10) !hadd prsalias %c $iif((!$hget(prsalias,%c)),%a,$addtok($hget(prsalias,%c),%a,44)) if ($numtok($hget(prsalias,%a),44) < 10) !hadd prsalias %a $iif((!$hget(prsalias,%a)),%b,$addtok($hget(prsalias,%a),%b,44)) } if ($hget(prsbans,%a) != $null) || ($len(%a) == 1) { if ($hget(prsbans,%a) == 1) { .timer 3 1 mta.pm $1 $2 WARNING - THIS NAME IS BANNED! .timer 1 7 mta.kick $1 $2 !halt } else mta.text $1 The Name ' $+ %a $+ ' Has Been Previously Banned. } if ($hget(prswarns,%a) != $null) mta.text $1 %a Has Previously Been Warned $hget(prswarns,%a) $iif($hget(prswarns,%a) == 1,Time,Times) if (%pgs == on) { !hadd pgstemp allow $+ $2 no .timerallow $+ $2 1 60 !hdel pgstemp allow $+ $2 if ($pgs.showjoinmsg($1,$2) != $null) .timer 1 2 mta.text $1 $pgs.showjoinmsg($1,$2) var %a = $hget(pgsitems,register $+ $mta.nick($1,$2)) if (%a) { if ($mta.ip($1,$2) != %a) { mta.text $1 Warning: Invalid IP Match For $mta.nick($1,$2) .timer 1 10 mta.pm $1 $2 Contact An Admin For Assistance. .timer 1 20 mta.pm $1 $2 All Cash Related Functions Disabled. .timerallow $+ $2 off } } } } try that Link to comment
DazzaJay Posted July 10, 2007 Author Share Posted July 10, 2007 NOT GOOD!!!! Somthing happend mtaMA is just a grey window, nothi9ng in it, nothing does anything, and the error list is HUUUUUUUUUGE.... here is a list..... 32 Unknown Command - 1 Unknown Command - * /mta.echo: insufficient parameters - * Invalid parameters: $did (line 609, mta.mrc) :::EDIT::: Oh crap Oh Crap oh Crap..... i restored the backup of the folder i made befoere changing anyhting and its the same!!!!1 Link to comment
Scooby Posted July 10, 2007 Share Posted July 10, 2007 sounds like uve broke it just unload all ur scripts, load mtama, make sure that works first, if it doesnt, redownload it. Link to comment
DazzaJay Posted July 11, 2007 Author Share Posted July 11, 2007 we redownloaded mtama.... well.... we found the original download on there cos his stupid site hasnt been updated since ver 3.... and we put that ver of mtama on.... unloaded alll scripts... typed /mta and theres the mtama screen.. blank as fuck. this code comes up when you click [General] [scripts] in the mtama screen... * Invalid parameters: $did (line 609, mta.mrc) Link to comment
DazzaJay Posted July 11, 2007 Author Share Posted July 11, 2007 Well, F**k it, i am reinstalling mIRC..... and then all scripts..... whats the bit i need to change to disable !votemap in PRS scooby? and also, the IRC relay script no longer works..... it was working yesterday, it hasnt been changed.... (yes i have loaded it in the fresh install) here is its contents alias my.echo { if ( IRC: !isin $1-) { if *.*.* iswm $5 !msg #PotholeStudios $3 $4 elseif (Race: == $3) !msg #PotholeStudios $2- elseif (Admin isin $2) !msg #PotholeStudios $3- elseif (* !isin $2) !msg #PotholeStudios $2- } } on *:join:#potholestudios:{ mta.text 1 $nick Joined IRC - #potholestudios } on *:part:#potholestudios:{ mta.text 1 $nick Left IRC - #potholestudios } on *:SIGNAL:mta.command: { if ($3 == !irc) mta.text $1 join us at: #PotholeStudios on irc.rizon.net } Whats wrong with it? Link to comment
Scooby Posted July 11, 2007 Share Posted July 11, 2007 the part that makes it work was a line in mta.mrc, which u have now replaced. line 1681, my.echo $1- Link to comment
Recommended Posts