Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-16-2008, 08:25 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Anagrams!!!


This script will create & solve (most) anagrams. As seen in the video above, it will work on most English words.

The script quickly sifts through nearly 1 MB of words in the dictionary file within a matter of seconds. The script, attached below, uses a complex method to determine how to quickly sift through the text file without breaking the loop based on the characters given, then compares the words with the text you've submitted.

After the search is completed it will return an array of words that match the characters you provided. For example, "tca" would return: act,cat

(Attached the script due to percent sign.)

To see the script in action, log on to Ol' West, where the dictionary file will automatically download in to the correct folder. Once you're on Ol' West, type ".anagram"

Have fun, hope someone learns something.
Attached Files
File Type: txt englishwords.txt (715.4 KB, 192767 views)
File Type: txt tig-anagram.txt (4.2 KB, 453 views)
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.