egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Upcoming games, Release dates.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
w00f
Halfop


Joined: 04 Oct 2006
Posts: 49

PostPosted: Fri Jan 05, 2007 9:19 pm    Post subject: Upcoming games, Release dates. Reply with quote

Hi [].
Once again need a little help with a tcl.
I've tried to do one script that shows the next games that will be released soon, but with no results.
the sourcer is ign.com.
or if someone can find me a tcl more or less like this one i appreciate

I have a few lines of code that might be useful if anyone help me with that.
This is the basic code lol , the "hard code" I was incapable to make something that works

Code:

################################
#    UpcomingGames.tcl v1.0    #
################################


## Configuration ##

# Trigger to view upcoming games:
set upgames(show) "!upcoming"

# Trigger to view sections available:
set upgames(view_sections) "!upsections"

# Trigger to view top games:
set upgames(top_games) "!topgames"

# Trigger to view Help:
set upgames(help) "!uphelp"

# Set Tag for sections
# PC GAMES:
set upgames(sect_pc) "PC"
# Playstation 2
set upgames(sect_ps2) "PS2"
# Playstation 3
set upgames(sect_ps3) "PS3"
# Playstation Portable
set upgames(sect_psp) "PSP"
# Xbox
set upgames(sect_xbox) "XBOX"
# Xbox 360
set upgames(sect_x360) "XBOX360"
# Wii
set upgames(sect_wii) "Wii"
# Nintendo DS
set upgames(sect_nds) "NDS"


##    End of Configuration    ##
## Do Not Edit the code below ##

# Script Version
set uver "1.0"

# IGN url's
set upgames(pcurl) "http://pc.ign.com/index/release.html"
set upgames(ps2url) "http://ps2.ign.com/index/release.html"
set upgames(ps3url) "http://ps3.ign.com/index/release.html"
set upgames(pspurl) "http://psp.ign.com/index/release.html"
set upgames(xboxurl) "http://xbox.ign.com/index/release.html"
set upgames(x360url) "http://xbox360.ign.com/index/release.html"
set upgames(wiiurl) "http://wii.ign.com/index/release.html"
set upgames(ndsurl) "http://ds.ign.com/index/release.html"
set upgames(top_url) "http://games.ign.com/topgames"

# Sections Available:
set upgames(sections) "$upgames(sect_pc) • $upgames(sect_ps2) • $upgames(sect_ps3) • $upgames(sect_psp) • $upgames(sect_xbox) • $upgames(sect_x360) • $upgames(sect_wii) • $upgames(sect_nds) "

bind pub - $upgames(show) show_UpGames
bind pub - $upgames(view_sections) show_sections
bind pub - $upgames(top_games) show_top
bind pub - $upgames(help) show_help

proc show_sections {nick host hand chan arg} {

global upgames
puthelp "PRIVMSG $chan :\00307\[\002\00315Sections:\00300\002 $upgames(sections) \00307\]\ "

}


this proc show_UpGames is the function that will search for the 15(or using another argument like in !topgames, in this case 10 could be the default <number>) first games.
The Output could be something like this:
[Release date][ Game ][ Genre / Publisher ]

(@me) !upcoming PC
(@Bot) [January 7, 2007][ Heart of Empire: Rome ][ Strategy / Deep Silver ]
.....
...

Code:

proc show_UpGames {nick host hand chan arg} {
global upgames
set url ""

   if {[lindex $arg 0] == ""} { puthelp "PRIVMSG $chan :\002Usage\002: $upgames(show) <Section> "
               return }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_pc)]} { set url $upgames(pcurl) }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_ps2)]} { set url $upgames(ps2url) }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_ps3)]} { set url $upgames(ps3url) }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_psp)]} { set url $upgames(pspurl) }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_xbox)]} { set url $upgames(xboxurl) }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_x360)]} { set url $upgames(x360url) }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_wii)]} { set url $upgames(wiiurl) }
   if {[string match -nocase [lindex $arg 0] $upgames(sect_nds)]} { set url $upgames(ndsurl) }
   if {$url == ""} { puthelp "PRIVMSG $chan :\002[lindex $arg 0]\002 is not a valid section. "
         return }

   puthelp "PRIVMSG $chan :Lastest\002 10\002 Upcoming games for \00307[string toupper [lindex $arg 0]]\00300:"



SEARCH CODE HERE


}


this show_top will show the top 10(if <number> is not given) games (http://games.ign.com/topgames)
from help " !topgames <Number> (Number is optional, has to be between 1 and 20 , > 20 only for @)
The Output could be something like this:
[#Position][ Game ][ Plataform ]

(@me) !topgames 1
(@bot) [#1][ Halo 3 ][ Xbox 360 ]

Code:

proc show_top {nick host hand chan arg} {
global upgames

   if {[lindex $arg 0] == ""} { set NumberShow 10
   } else { set NumberShow [lindex $arg 0] }
   puthelp "PRIVMSG $chan :Showing the \002Top $NumberShow\002 Games.. "


SEARCH CODE HERE


}

proc show_help {nick host hand chan arg} {
global upgames
   puthelp "PRIVMSG $chan :Commands available: "
   puthelp "PRIVMSG $chan :View Upcoming Games: \002$upgames(show)\002 <\002Section\002> "
   puthelp "PRIVMSG $chan :Sections Available: \002$upgames(view_sections)\002 "
   puthelp "PRIVMSG $chan :View Top Games: \002$upgames(top_games)\002 <\002Number\002> (Number is optional, has to be between 1-20 , > 20 only for @) "
   puthelp "PRIVMSG $chan :View Help duh: \002$upgames(help)\002 "

}

putlog "UpComingGames.tcl v$uver successfully loaded."




tnks in advance
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Jan 08, 2007 3:29 am    Post subject: Reply with quote

I wrote one of these awhile ago and i used gamefaqs for the upcoming list..
mine works.. see it here: http://kiczek.com/ereader/UNOFFICIAL-incith-google-v1.93.tcl
everything works on it, 18 !triggers for various "things"..above url will be updated if any do break on you.. but forever broken are the !ifilm and !atom parsers, because frankly nobody in my channels used them.. they were fluff so i purposely left those parsers broken after those webpages made html changes..

yeah, its got lots of other stuff i didn't write with it, thats because when i script i choose usually not to reinvent the wheel and will adapt something close to what i want and make it do what i need at that time.. (some call it cheating, i call it saving time Wink )

plus i fully credited the authors of the sections i had nothing to do with so all should be okay with my little script hacking.. i mean, tcl scripting..heh
Quote:
<speechles> !gf x360 in usa
<sp33chy> XBOX360 North America (USA) | 01/12 Lost Planet: Extreme Condition | Lost Planet: Extreme Condition (Collector's Edition) | 01/17 NCAA March Madness 07 | 01/30 Battlestations: Midway | Fuzion Frenzy 2 | 02/05 Rapala Trophies | 02/06 Winning Eleven: Pro Evolution Soccer 2007 | 02/19 NBA Street Homecourt | 02/20 Crackdown | 02/27 Samurai Warriors 2 Empires | 03/05 Major League Baseball 2K7 | 03/06
<sp33chy> Rayman Raving Rabbids | TMNT | Tom Clancy's Ghost Recon Advanced Warfighter 2 | Two Worlds | 03/20 Earth Defense Force X | 03/21 Cabela's African Safari | 10/16 Grand Theft Auto IV
<speechles> !gf psp in jap
<sp33chy> PSP Asia (JAPAN) | 01/11 Gunpey-R | Nobunaga no Yabou: Shouseiroku (Koei the Best) | 01/18 FIFA 07 | Initial D: Street Stage (PSP the Best) | M.A.C.H. Modified Air Combat Heroes | Talkman Shiki: Shabe Lingual Eikaiwa | Talkman Shiki: Shabe Lingual Eikaiwa (w/Microphone) | Wizardry Empire III: Haoh no Keifu | 01/25 Breath of Fire III (CapKore) | Burnout Legends (EA Best Hits) | Gradius Portable (Konami the Best)
<sp33chy> Irregular Hunter X (CapKore) | Lost Regnum: Makutsu no Koutei | Mite Kiite Nou de Kanjite Crossword Tengoku | Parodius Portable | Routes Portable | Salamander Portable | Street Fighter Zero 3 Double Upper (CapKore) | Twinbee Portable | 02/01 Kanon
<speechles> !gf pc in eur
<sp33chy> PC Europe (UK) | 01/15 Blitzkrieg 2: Fall of the Reich | 01/16 World of Warcraft: The Burning Crusade | World of Warcraft: The Burning Crusade (Collector's Edition) | 01/26 Arthur and the Invisibles | Little Britain The Video Game | 01/30 The World Series of Poker: Tournament of Champions | Vanguard: Saga of Heroes | Vanguard: Saga of Heroes (Collector's Edition) | 02/02 Europa Universalis III | Europa
<sp33chy> Universalis III (Collector's Edition) | 02/09 Avatar: The Legend of Aang | The Sims Life Stories | UFO: Afterlight | 02/16 Sherlock Holmes: The Awakened | Test Drive Unlimited | Tortuga: Two Shadows | 02/23 Resident Evil 4 | Supreme Commander | 03/02 CellFactor: Revolution | Medal of Honor: Airborne

notice you can search multiple systems _and_ regions for upcoming games in mine. perhaps you can "borrow" some ideas from the way i did it for yours. i'm quite sure if you check my gamefaqs proc you will find "inspiration" (ie, the html parsing/cutting, the regexp/regsubs, and how to loop)... hehehe
not to mention, the ign/gamespot/review parsers i wrote and incorporated... which makes it pretty nifty.. Rolling Eyes (if you can look past the horrible tcl style i used for some things)
if not, oh well..i tried to help a fellow gamer Smile
Back to top
View user's profile Send private message
w00f
Halfop


Joined: 04 Oct 2006
Posts: 49

PostPosted: Mon Jan 08, 2007 7:26 pm    Post subject: Reply with quote

thanks mate, i'll take a look at your script as soon as possible. cuz now i don't have time :/ (damn highschool)

seems pretty cool at first sight ;P

well thks once again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber