{_AntiFreak_} Posted September 6, 2007 Share Posted September 6, 2007 Hello, How can i write an Updater like in GUS to update a Script Link to comment
kevuwk Posted September 7, 2007 Share Posted September 7, 2007 know a little about socket and http requests and probably just look at the script a little, wasn't really that hard to make Link to comment
Oli Posted September 7, 2007 Share Posted September 7, 2007 just rip it out the GUS or GRS script.. its not that hard.. infact thinking about it u could rip it right out of mtama Link to comment
{_AntiFreak_} Posted September 7, 2007 Author Share Posted September 7, 2007 But if I Copy it out of the GUS, it will Update my OWN Script to The new GUS. And it will delete my own Script Link to comment
*SmartiE* Posted September 8, 2007 Share Posted September 8, 2007 you need to edit the script to link to your script host.. Link to comment
{_AntiFreak_} Posted September 8, 2007 Author Share Posted September 8, 2007 But, i don't know how to do This Link to comment
Aeron Posted September 11, 2007 Share Posted September 11, 2007 But, i don't know how to do This Then dont's start it? But yeah you can rip it out of MTA:mA, but don't forget to mention it i wrote that piece of script :) Link to comment
lil Toady Posted September 11, 2007 Share Posted September 11, 2007 But, i don't know how to do This Then dont's start it? But yeah you can rip it out of MTA:mA, but don't forget to mention it i wrote that piece of script :) Or rip it out, change a line and say that it's yours like Sanzor(Lil'San^,^u<3) always does. (Further don't forget to post it on the forum as yours, Sanzor-style) Link to comment
{_AntiFreak_} Posted September 19, 2007 Author Share Posted September 19, 2007 ok, i'll try to do it. and if it doesn't work, i'll stop it. Link to comment
{_AntiFreak_} Posted September 20, 2007 Author Share Posted September 20, 2007 What means if ($exists($scriptdir $+ %b)) && ($md5($scriptdir $+ %b,2) != $readini(gus.update.tmp,n,%b,md5)) { and if ($md5(%a $+ .tmp,2) != $readini(gus.update.tmp,n,%a,md5)) { ??? What is md5? for GUS, the gus.tmp looks like this: [info] Script=MTA:mA:GUS Author=Tommis [mtagus.mrc] Version=x16 Final md5=bf6357aba17fd5b6c16caf4851e9d294 <---There is "md5" Info=Update Now, Final Version! Faster, more efficient. Size=55629 [gus.ico] Version=1.0 md5=4b55c31209731185ee6c44919935e668 <---And here, too. What means it? Info=Icon Size=1406 Link to comment
kevuwk Posted September 21, 2007 Share Posted September 21, 2007 it checks whether the file is there, if it is, it then gets the md5 checksum from the webserver and compares it with that of the file that is currently on your pc, if they match it is fine, if they don't, it will download it from the webserver read more about md5 here Link to comment
{_AntiFreak_} Posted September 21, 2007 Author Share Posted September 21, 2007 so, if i Change the md5-number on my Webspace, it will update, and if not, it will not update the Script? Link to comment
kevuwk Posted September 21, 2007 Share Posted September 21, 2007 you would generate the md5 checksum when you have a new version then put it in that file, gus had a webpage that generated the .tmp file itself, you just put the version and info into a webpage, i would release the source but i can't remember who actually made it Link to comment
{_AntiFreak_} Posted September 21, 2007 Author Share Posted September 21, 2007 the gus.tmp-file and some other Script-Files are in http://mta-xe.com/gus/ Link to comment
kevuwk Posted September 22, 2007 Share Posted September 22, 2007 yes, but there is a php file somewhere else on the site that will generate the gus.tmp file when you go to it, you can also just make a mirc script to do this aswell Link to comment
{_AntiFreak_} Posted September 22, 2007 Author Share Posted September 22, 2007 i cant find this Page. Can you tell me how generate this md5-Code with an mIRC-Script? Link to comment
lil Toady Posted September 22, 2007 Share Posted September 22, 2007 $md5(YOUR_SCRIPT_DIR_HERE,2) Link to comment
{_AntiFreak_} Posted September 22, 2007 Author Share Posted September 22, 2007 can i write $scriptdir instead of C:\Program Files\General Use Scripts\ ? Link to comment
lil Toady Posted September 22, 2007 Share Posted September 22, 2007 yes, don't forget the file name though Link to comment
{_AntiFreak_} Posted September 22, 2007 Author Share Posted September 22, 2007 Yeah, it works! Thank you for help. Link to comment
Recommended Posts