lil Toady Posted February 8, 2007 Share Posted February 8, 2007 Well, since nobody have done that before, me and [uVA]Scooby have written this, a script that will be getting missing maps from the server untill it gets all of them so you wont have any missing maps since now. You don't have to do anything, it will start the process as soon as you connect your mtama to a server, but if you think that u still have some maps missing you can do !updateraces. I think thats all, clicky Enjoy Link to comment
Scooby Posted February 8, 2007 Share Posted February 8, 2007 Things are looking good now, b4 we got this working i was getting around 10-15 missing maps on my server, and i know some are getting like 50-100 missing, this fixes the problem dont waste ur time reading this... download it! - load it - and connect job done. unknown maps = 0 Link to comment
BetaDevil Posted February 8, 2007 Share Posted February 8, 2007 Good job guys, I needed this Link to comment
Scooby Posted February 8, 2007 Share Posted February 8, 2007 Good job guys, I needed this i think we all needed it if we had over 200 maps. i know some people on the forums have said they have thousands of maps uploaded and around 800 missing. u might want to run it a few times just to be sure its got them all. i tried it on the tmm server, they had around 80 missing out of 350, took 3 times to get them all updated. Link to comment
Wheelburner Posted February 8, 2007 Share Posted February 8, 2007 Well this is real good script. Many servers need this one. Well done guys Link to comment
Aeron Posted February 8, 2007 Share Posted February 8, 2007 (edited) /* RaceList Updater v1.1 by lil_Toady Special thanks to [uVA]Scooby Updated by Aeron The script will be automaticly updating the races list untill it gets all the maps. If you still think it is missing maps do: !updateraces (admins level 2) If you want to put it into your script here are the aliases you'd want to know: mta.races.check - Checks for missing maps, if so it starts the updater (not accurate) mta.races.update - Starts the updater */ on *:SIGNAL:mta.command:{ if (!updaterace* iswm $3) { if ($mta.level($1,$2) > 1) { mta.text $1 Updating the race list. mta.races.update $1 } } } on *:SIGNAL:mta.racelist:{ mta.races.check $1 } alias mta.races.check { var %a = $ini($mta.dir $+ $1.ini,Races,0),%b = $ini($mta.dir $+ $1.ini,Races,%a) if (%b > %a) mta.races.update $1 } alias mta.races.update { mta.echo $1 * Racelist: Updating... !bset &b 1 109 0 $did(mta,$1 $+ 22) $mta.dex($did(mta,$1 $+ 12)) 124 $mta.dex(mta.races. $+ $rand(1000,9999)) 0 !sockudp -k mta.races.sock. $+ $1 $did(mta,$1 $+ 10) $did(mta,$1 $+ 11) &b !.timermta.races.timer. $+ $1 1 10 !sockclose mta.races.sock. $+ $1 } on *:udpread:mta.races.sock.*: { !sockread &a var %a = $right($sockname,-15),%b = $bvar(&a,3),%c = $bvar(&a,2) if (%c == 1) { mta.echo %a * Racelist: Updating failed. ( $+ $gettok(User:Incorrect password:Already connected:Timed-out:To much connections:Banned:Name in use:Invalid Version,$calc(%b + 1),58) $+ ) if (%b == 5) mta.unban %a $ip elseif (%b == 1) mta.echo %a * Racelist: Updating stopped. else !.timermta.races.timer. $+ $1 1 15 mta.races.check %a !sockclose $sockname } elseif (%c == 2) { !bset &b 1 109 2 !sockudp -k $sockname $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b } elseif (%c == 18) { if ($mta.server(%a).version == 2) { if (%b == 1) { %c = $calc($bvar(&a,5) * 256 + $bvar(&a,4)) if (!$readini($+($mta.dir,%a,.ini),Races,%c)) { !did -i $+ %c mta %a $+ 16 $bvar(&a,6,50).text !writeini -n $+(",$mta.dir,%a,.ini") Races %c $bvar(&a,6,50).text !sockmark $sockname $calc($sock($sockname).mark + 1) } } elseif (%b == 2) { mta.echo %a * Racelist: Updated. ( $+ $sock($sockname).mark missing maps retrieved) !bset &b 1 109 1 !sockudp -k $sockname $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b !sockclose $sockname !.timermta.races.timer. $+ %a off !.signal mta.racelist %a } } } } on *:SIGNAL:mta.disconnect:{ if ($sock(mta.races.sock. $+ $1)) { !bset &b 1 109 1 !sockudp -k mta.races.sock. $+ $1 $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b !sockclose mta.races.sock. $+ $1 !.timermta.races.timer. $+ $1 off } } 'Unofficial v1.1' (100% UNTESTED) - Fixed problems for use of multiple MTA:mA's - Fixed problems with use for Server 10 or more - Makes no use of a global variable - Various optimilizations - All operations/sources prefixed with 'mta.races.' Edited February 8, 2007 by Guest Link to comment
lil Toady Posted February 9, 2007 Author Share Posted February 9, 2007 k Aeron, you're dead Link to comment
{CE}EyeZ Posted February 9, 2007 Share Posted February 9, 2007 is it scripting war's month? Link to comment
lil Toady Posted February 9, 2007 Author Share Posted February 9, 2007 /* RaceList Updater v1.1 by lil_Toady Special thanks to [uVA]Scooby Updated by Aeron The script will be automaticly updating the races list untill it gets all the maps. If you still think it is missing maps do: !updateraces (admins level 2) If you want to put it into your script here are the aliases you'd want to know: mta.races.check - Checks for missing maps, if so it starts the updater (not accurate) mta.races.update - Starts the updater */ on *:SIGNAL:mta.command:{ if (!updaterace* iswm $3) { if ($mta.level($1,$2) > 1) { mta.text $1 Updating the race list. mta.races.update $1 } } } on *:SIGNAL:mta.racelist:{ mta.races.check $1 } alias mta.races.check { var %a = $ini($mta.dir $+ $1.ini,Races,0),%b = $ini($mta.dir $+ $1.ini,Races,%a) if (%b > %a) mta.races.update $1 } alias mta.races.update { mta.echo $1 * Racelist: Updating... !bset &b 1 109 0 $did(mta,$1 $+ 22) $mta.dex($did(mta,$1 $+ 12)) 124 $mta.dex(mta.races. $+ $rand(1000,9999)) 0 !sockudp -k mta.races.sock. $+ $1 $did(mta,$1 $+ 10) $did(mta,$1 $+ 11) &b !.timermta.races.timer. $+ $1 1 10 !sockclose mta.races.sock. $+ $1 } on *:udpread:mta.races.sock.*: { !sockread &a var %a = $right($sockname,-15),%b = $bvar(&a,3),%c = $bvar(&a,2) if (%c == 1) { mta.echo %a * Racelist: Updating failed. ( $+ $gettok(User:Incorrect password:Already connected:Timed-out:To much connections:Banned:Name in use:Invalid Version,$calc(%b + 1),58) $+ ) if (%b == 5) mta.unban %a $ip elseif (%b == 1) mta.echo %a * Racelist: Updating stopped. else !.timermta.races.timer. $+ $1 1 15 mta.races.check %a !sockclose $sockname } elseif (%c == 2) { !bset &b 1 109 2 !sockudp -k $sockname $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b } elseif (%c == 18) { if ($mta.server(%a).version == 2) { if (%b == 1) { %c = $calc($bvar(&a,5) * 256 + $bvar(&a,4)) if (!$readini($+($mta.dir,%a,.ini),Races,%c)) { if (!$didreg(mta,%a $+ 16,$didreg(mta,%a $+ 16,$bvar(&a,6,50).text))) !did -a mta %a $+ 16 $bvar(&a,6,50).text !writeini -n $+(",$mta.dir,%a,.ini") Races %c $bvar(&a,6,50).text !sockmark $sockname $calc($sock($sockname).mark + 1) } } elseif (%b == 2) { mta.echo %a * Racelist: Updated. ( $+ $iif($sock($sockname).mark,$v1,No) missing maps retrieved) !bset &b 1 109 1 !sockudp -k $sockname $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b !sockclose $sockname !.timermta.races.timer. $+ %a off !.signal mta.racelist %a } } } } on *:SIGNAL:mta.disconnect:{ if ($sock(mta.races.sock. $+ $1)) { !bset &b 1 109 1 !sockudp -k mta.races.sock. $+ $1 $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b !sockclose mta.races.sock. $+ $1 !.timermta.races.timer. $+ $1 off } } Fixed the text in mta chat box not returning the value of retrieved maps Fixed the bug with race not being added to the races list in mtama dialog *updated the link Link to comment
robert4392 Posted February 9, 2007 Share Posted February 9, 2007 This would be really usefull. Thanks all Link to comment
Convirion Posted February 9, 2007 Share Posted February 9, 2007 I'm going to test it out, looks very handy Link to comment
DazzaJay Posted February 9, 2007 Share Posted February 9, 2007 The server still cannot retrieve the entire map list with this script running, its only retrieving 46 maps out of the 77 that are on the server. any ideas? Link to comment
lil Toady Posted February 9, 2007 Author Share Posted February 9, 2007 The server still cannot retrieve the entire map list with this script running, its only retrieving 46 maps out of the 77 that are on the server.any ideas? do !updateraces in mta or download an mtama with already built in updater Link to comment
DazzaJay Posted February 9, 2007 Share Posted February 9, 2007 im running MTAMA v4.15 and i tried the command, and same thing, except recived even less maps. Link to comment
lil Toady Posted February 10, 2007 Author Share Posted February 10, 2007 im running MTAMA v4.15 and i tried the command, and same thing, except recived even less maps. Well, it wont get all the maps from the first try. It will be getting them untill it gets all, that could take some time Link to comment
DazzaJay Posted February 10, 2007 Share Posted February 10, 2007 we left it go overnight, and it didnt seem to do anything, its only that computer that does it tho. Link to comment
BetaDevil Posted February 10, 2007 Share Posted February 10, 2007 Isn't it smart to add this?[syntax=mIRC]on *:SIGNAL:mta.adcon:{ if (!updaterace* iswm $3) { mta.text $1 Updating the race list. mta.races.update $1 } }[/lua] Link to comment
lil Toady Posted February 10, 2007 Author Share Posted February 10, 2007 Isn't it smart to add this?[syntax=mIRC]on *:SIGNAL:mta.adcon:{ if (!updaterace* iswm $3) { mta.text $1 Updating the race list. mta.races.update $1 } }[/lua] umm.. its there, but for level 1+ admins Link to comment
CoZ Posted February 15, 2007 Share Posted February 15, 2007 so ... *trying not to sound ungratefull* why didn't anyone make this a year ago ? (and when i asked about it got told it was really hard/impossible to fix the unknown map/will be fixed in next version - even when i specifically asked for a mirc workaround like this) other than that - good job Link to comment
Scooby Posted February 15, 2007 Share Posted February 15, 2007 so ... *trying not to sound ungratefull*why didn't anyone make this a year ago ? (and when i asked about it got told it was really hard/impossible to fix the unknown map/will be fixed in next version - even when i specifically asked for a mirc workaround like this) other than that - good job I Asked the same and was told by a few that it wasnt possible. I'd Never noticed any lost maps/Unknown's Until i wrote the PRS. I put my ideas into play and knowing lil_toady had done a lot more socket work than me, i got him to write what i wanted, and this is what we came up with. Even tho this doesnt work 100%, Its probably the best u can hope for. If its still not retreiving all lost maps then its probably down to ur server or Ur connection to ur server. Link to comment
CoZ Posted February 16, 2007 Share Posted February 16, 2007 well .. i kinda overlooked the mta.level wouldve been gus.level when i included it in my edited gus version but ive still done somthing wrong i guess .. it times out just under 10 secs after connecting to the socket i thought it might be the fact i have 5443 maps so i moved 1/2 .. and then 1/2 more .. and again till i had about 700 maps .. and it still timed out any thoughts ? Link to comment
Scooby Posted February 16, 2007 Share Posted February 16, 2007 well .. i kinda overlooked the mta.level wouldve been gus.level when i included it in my edited gus versionbut ive still done somthing wrong i guess .. it times out just under 10 secs after connecting to the socket i thought it might be the fact i have 5443 maps so i moved 1/2 .. and then 1/2 more .. and again till i had about 700 maps .. and it still timed out any thoughts ? Well i didnt even add it to my script, i left it as a seperate file. maybe u broke it? i know i tried it on my server once and had some connection problems, it turned out, it wouldnt work because i had more than 2 other admins connected. any errors or is it just timing out? Link to comment
SanZoR.Sr Posted February 16, 2007 Share Posted February 16, 2007 Omg, that doesnt works in MTA:SA racing mod, and do you mean this: /* RaceList Updater v1.1 by lil_Toady Special thanks to [uVA]Scooby and Aeron (bastid) Updated by Aeron The script will be automaticly updating the races list untill it gets all the maps. If you still think it is missing maps do: !updateraces (admins level 2) If you want to put it into your script here are the aliases you'd want to know: mta.races.check - Checks for missing maps, if so it starts the updater (not accurate) mta.races.update - Starts the updater */ on *:SIGNAL:mta.command:{ if (!updaterace* iswm $3) { if ($mta.level($1,$2) > 1) { mta.text $1 Updating the race list. mta.races.update $1 } } } on *:SIGNAL:mta.racelist:{ mta.races.check $1 } alias mta.races.check { var %a = $ini($mta.dir $+ $1.ini,Races,$ini($mta.dir $+ $1.ini,Races,0)) if (%a > $ini($mta.dir $+ $1.ini,Races,0)) mta.races.update $1 } alias mta.races.update { mta.echo $1 * Racelist: Updating... !bset &b 1 109 0 $did(mta,$1 $+ 22) $mta.dex($did(mta,$1 $+ 12)) 124 $mta.dex(mta.races. $+ $rand(1000,9999)) 0 !sockudp -k mta.races.sock. $+ $1 $did(mta,$1 $+ 10) $did(mta,$1 $+ 11) &b !.timermta.races.timer. $+ $1 1 10 !sockclose mta.races.sock. $+ $1 } on *:udpread:mta.races.sock.*: { !sockread &a var %a = $right($sockname,-15),%b = $bvar(&a,3),%c = $bvar(&a,2) if (%c == 1) { mta.echo %a * Racelist: Updating failed. ( $+ $gettok(User:Incorrect password:Races updater already connected:Timed-out:To much connections:Banned:Name in use:Invalid Version,$calc(%b + 1),58) $+ ) if (%b == 5) mta.unban %a $ip elseif (%b == 1) mta.echo %a * Racelist: Updating stopped. else !.timermta.races.timer. $+ $1 1 15 mta.races.check %a !sockclose $sockname } elseif (%c == 2) { !bset &b 1 109 2 !sockudp -k $sockname $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b } elseif (%c == 18) { if ($mta.server(%a).version == 2) { if (%b == 1) { %c = $calc($bvar(&a,5) * 256 + $bvar(&a,4)) if (!$readini($+($mta.dir,%a,.ini),Races,%c)) { if (!$didreg(mta,%a $+ 16,$didreg(mta,%a $+ 16,$bvar(&a,6,50).text))) !did -a mta %a $+ 16 $bvar(&a,6,50).text !writeini -n $+(",$mta.dir,%a,.ini") Races %c $bvar(&a,6,50).text !sockmark $sockname $calc($sock($sockname).mark + 1) } } elseif (%b == 2) { mta.echo %a * Racelist: Updated. ( $+ $iif($sock($sockname).mark,$v1,No) missing maps retrieved) !bset &b 1 109 1 !sockudp -k $sockname $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b !sockclose $sockname !.timermta.races.timer. $+ %a off !.signal mta.racelist %a } } } } on *:SIGNAL:mta.disconnect:{ if ($sock(mta.races.sock. $+ $1)) { !bset &b 1 109 1 !sockudp -k mta.races.sock. $+ $1 $did(mta,%a $+ 10) $did(mta,%a $+ 11) &b !sockclose mta.races.sock. $+ $1 !.timermta.races.timer. $+ $1 off } } ??? Link to comment
lil Toady Posted February 16, 2007 Author Share Posted February 16, 2007 omg [FIN]P_X_L, YES... Link to comment
Scooby Posted February 16, 2007 Share Posted February 16, 2007 (edited) OMG all this time.. Me, Toady and Aeron have been working on something that doesnt even work in MTA RACE... OMG We are such n00bs. why did we waste our time... Edited February 16, 2007 by Guest Link to comment
Recommended Posts