All vehicals gametype with no betrayal or snipers + more
Moderator: Halo Moderators
ApplScript Language GuideSyperium wrote:Before we do that, can someone please direct me to a site in which it discusses learning based Apple Script. I'm gettin' the hang of it, a little. I kinda understand one command, XD. That's to "tell".
ex. If I wanted a web browser to open a website, with a double click of an apple script, can I say something like:
What's wrong with that? If someone can be as so kind to tell me...Code: Select all
tell application "safari" to open target target="http://www.macgamingmods.com" end tell
You don't need to use "tell" if that is all you want to do. You can do everything you want with just the code below.
Code: Select all
set target to "http://www.macgamingmods.com"
open location target
Kansas....Like Paris Hilton: White, Flat, and Easy to Enter. -- Conan O'Brien
Masturbation is like procrastination, they're both great until you realize your screwing yourself.
MGM Discord | MGM Chat

Masturbation is like procrastination, they're both great until you realize your screwing yourself.
MGM Discord | MGM Chat
Or....
Oh, this routine gets rid of duplicates....I am using it in my new application for doing permanent (IP) bans on people for Halo.
For the list "yay", try entering in a random list of values (make sure some of them are duplicates). A list is like an array, and for those of you who don't know what an array is....it's a system of numbers in one variable that can be accessed. So, for instance, to declare an array (NOT IN APPLESCRIPT) you would do something like "int blah[50]" and it will make 50 integers within the variable "blah" that can be accessed individually. A list is applescript's different way of handling arrays. So, to access the number 5, in the list {"1","2","4","1","5"}, i would say item 5 of (whatever my variable is). The nice thing about applescript is not only does it declare the variable, but it initializes it at the same time. And, why the hell did i just type this all up?
Code: Select all
set the_target to the text returned of (display dialog "What site would you like?" default answer "")
open location the_target
Code: Select all
set yay to {"1", "1", "1", "5"}
set no_dups to bye_duplicates(yay)
return no_dups
on bye_duplicates(the_list)
set check to {}
set len_list to count (items in the_list)
set no_duplicates to {}
repeat with z from 1 to len_list
set check to check & {"NO"}
end repeat
repeat with x from 2 to len_list
set first_test to item x of the_list
repeat with y from 1 to x - 1
set second_test to item y of the_list
if first_test = second_test then set item x of check to "YES"
end repeat
end repeat
repeat with n from 1 to len_list
if item n of check is "NO" then set no_duplicates to (no_duplicates & (item n of the_list))
end repeat
return no_duplicates
end bye_duplicates

Yummy wrote:Or....
Oh, this routine gets rid of duplicates....I am using it in my new application for doing permanent (IP) bans on people for Halo.Code: Select all
set the_target to the text returned of (display dialog "What site would you like?" default answer "") open location the_target
For the list "yay", try entering in a random list of values (make sure some of them are duplicates). A list is like an array, and for those of you who don't know what an array is....it's a system of numbers in one variable that can be accessed. So, for instance, to declare an array (NOT IN APPLESCRIPT) you would do something like "int blah[50]" and it will make 50 integers within the variable "blah" that can be accessed individually. A list is applescript's different way of handling arrays. So, to access the number 5, in the list {"1","2","4","1","5"}, i would say item 5 of (whatever my variable is). The nice thing about applescript is not only does it declare the variable, but it initializes it at the same time. And, why the hell did i just type this all up?Code: Select all
set yay to {"1", "1", "1", "5"} set no_dups to bye_duplicates(yay) return no_dups on bye_duplicates(the_list) set check to {} set len_list to count (items in the_list) set no_duplicates to {} repeat with z from 1 to len_list set check to check & {"NO"} end repeat repeat with x from 2 to len_list set first_test to item x of the_list repeat with y from 1 to x - 1 set second_test to item y of the_list if first_test = second_test then set item x of check to "YES" end repeat end repeat repeat with n from 1 to len_list if item n of check is "NO" then set no_duplicates to (no_duplicates & (item n of the_list)) end repeat return no_duplicates end bye_duplicates
On the full version of Halo, you can ban people with this console code:
Code: Select all
sv_ban[space]player's name
well im pretty sure everyone here know's how to make game types but i can make some if u want im gonna make dracs ones first
well that wasnt to hard took me bout 5 mins so any ways with out any delay i present the link ............................................................................................................. k that was enough delay now http://files.filefront.com/blamlst/;651 ... einfo.html
well that wasnt to hard took me bout 5 mins so any ways with out any delay i present the link ............................................................................................................. k that was enough delay now http://files.filefront.com/blamlst/;651 ... einfo.html
Old account!
-
- Green Beret
- Posts: 3470
- Joined: Sat Jun 03, 2006 11:08 am
- Contact:
Got it Syp....
Hey! I got code that gets the IP's of all the players on Halo, although it only gives the IP's.....getting the member names of people will be HARD because I would not only have to program that, but I would have to interact with halo.
This code gets the IP's of people on halo (HOST ONLY of course). If this code is presented, credit must be given to Yummy. NOTE: You need an admin pass. Without it, tcpdump cannot be performed. Credit for the -c 10 option given to macosxhints.com....and credit for knowing how to do "sudo tcpdump" given to look7 (aka UN Lucas).
Hey! I got code that gets the IP's of all the players on Halo, although it only gives the IP's.....getting the member names of people will be HARD because I would not only have to program that, but I would have to interact with halo.
This code gets the IP's of people on halo (HOST ONLY of course). If this code is presented, credit must be given to Yummy. NOTE: You need an admin pass. Without it, tcpdump cannot be performed. Credit for the -c 10 option given to macosxhints.com....and credit for knowing how to do "sudo tcpdump" given to look7 (aka UN Lucas).
Code: Select all
set the_pass to the text returned of (display dialog "What is the admin password for this computer?" default answer "" with hidden answer)
set shell_script to (do shell script "tcpdump -c 10 port 2302" password the_pass with administrator privileges)
set nums to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
set the_dot to "."
set new_script to paragraphs of shell_script
set list_ips to {}
repeat with y from 1 to 10
set dot_count to 0
set AppleScript's text item delimiters to " > "
set test to text items of (item y of new_script as string)
set right_ip to item 2 of test
repeat with z from 1 to length of right_ip
if character z of right_ip is in nums then exit repeat
end repeat
set AppleScript's text item delimiters to {""}
set right_ip to (characters z thru (length of right_ip) of right_ip as string)
set the_ip to ""
repeat with x from 1 to 15
set test_item to (character x of right_ip as string)
if test_item is "-" then set test_item to the_dot
if test_item is the_dot then
set dot_count to dot_count + 1
set the_ip to (the_ip & test_item)
end if
if test_item is in nums then set the_ip to (the_ip & test_item)
if dot_count > 3 then exit repeat
end repeat
set AppleScript's text item delimiters to {""}
if (character (count (items in the_ip)) of the_ip as string) is the_dot or it is "-" then ¬
set the_ip to (characters 1 thru ((count (items in the_ip)) - 1) of the_ip as string)
if length of the_ip ≥ 11 then set list_ips to (list_ips & the_ip)
end repeat
choose from list list_ips

Who is online
Users browsing this forum: No registered users and 34 guests