Hissing Worms
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Hissing Worms

Welcome all members.
 
HomeLatest imagesSearchRegisterLog in
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» IMPORTANT ANNOUNCEMENT
High/Low Python Script EmptyMon Oct 26, 2020 6:45 pm by Darkprism

» KM / Mitsu's New site
High/Low Python Script EmptySun Jan 05, 2014 2:56 am by Darkprism

» I'm back.
High/Low Python Script EmptyWed Oct 09, 2013 2:54 am by Stadd

» So yeah
High/Low Python Script EmptySun Jan 27, 2013 3:13 am by Darkprism

» Forummotion Chatbox on Every Page Guide!
High/Low Python Script EmptyMon Jul 30, 2012 8:14 pm by Diggy

Top posters
Gr33n
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
Mitsukaru
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
Neverwinter XIII
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
HaZe
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
Zeph
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
Scrubby
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
Avogadro
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
Darkprism
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
Diggy
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
LolICU
High/Low Python Script I_vote_lcapHigh/Low Python Script I_voting_barHigh/Low Python Script I_vote_rcap 
SOTW WINNER(S)
SOTW #4 WINNER(S)

Winner: ZephyR

Partners
TheForumsNG NecroAccuracy PaidTheFastest

EWW


 

 High/Low Python Script

Go down 
3 posters
AuthorMessage
Mitsukaru
Main Administrator
Mitsukaru


Admin '10 : High/Low Python Script Admino10
GFX Crew '10 : High/Low Python Script Gfxoft10
Recruiter '10 : High/Low Python Script Recrui10
Posts : 1328
HWPoints : 1548
Join date : 2008-06-14

High/Low Python Script Empty
PostSubject: High/Low Python Script   High/Low Python Script EmptyFri Feb 18, 2011 9:19 pm

Started scripting in python recently. This is my first real code in it.

Code:
__module_name__ = "High Low"
__module_version__ = "1.0"
__module_description__ = "Yea yea yea"

import xchat,random

checkmsg=0
highlow=0
def check_number(word, word_eol, userdata):
   global checkmsg
   global highlow
   guess = xchat.get_info(word[1])
   server = xchat.get_info('server')
   channel = xchat.get_info('channel')
   if (server == "irc.pawngame.com" and channel == "#Cookies" and checkmsg == 1 and word[1].isdigit()):
      guess =  float(word[1])
      if (highlow > guess):
         xchat.emit_print("Channel Message",word[0],word[1])
         xchat.command("msg #cookies Your number was too low!")
      if (highlow < guess):
         xchat.emit_print("Channel Message",word[0],word[1])
         xchat.command("msg #cookies Your number was too high!")
      if (highlow == guess):
         xchat.emit_print("Channel Message",word[0],word[1])
         xchat.command("msg #cookies Congradulations! " + word[0] + " has guessed the correct answer!")
         checkmsg = 0
      return xchat.EAT_XCHAT


def turn_on(word, word_eol, userdata):
   global checkmsg
   global highlow
   if (checkmsg == 0):
      checkmsg = 1
      print "High Low Turned on"
      xchat.command("msg #cookies High/Low Turned On. Type the number to make a guess. 1-100")
      highlow = random.randint(1,100)
   else:
      checkmsg = 0
      print "High Low Turned Off"
      xchat.command("msg #Cookies High/Low Turned Off")
   return xchat.EAT_ALL

xchat.hook_print("Channel Message", check_number)
xchat.hook_command("turn_on", turn_on)
print "Loaded "+__module_name__+" v"+__module_version__




What does it do?

<@KiLLErMaN99_XC> High/Low Turned On. Type the number to make a guess. 1-100
<@KiLLErMaN99> 50
<@KiLLErMaN99_XC> Your number was too high!
<@KiLLErMaN99> 75
<@KiLLErMaN99_XC> Your number was too high!
<@KiLLErMaN99> 25
<@KiLLErMaN99_XC> Your number was too low!
<@KiLLErMaN99> 40
<@KiLLErMaN99_XC> Your number was too high!
<@KiLLErMaN99> 35
<@KiLLErMaN99_XC> Congradulations! KiLLErMaN99 has guessed the correct answer!

I just wanted to show that off just cause.
Back to top Go down
http://hissingworms.co.nr
Darkprism
Wizard of the Marsh



Posts : 583
HWPoints : 4558
Join date : 2010-10-06

High/Low Python Script Empty
PostSubject: Re: High/Low Python Script   High/Low Python Script EmptyFri Feb 18, 2011 9:47 pm

It spells Congratulations wrong
Back to top Go down
http://funnypics.forumotion.com/forum.htm
Scrubby
Lightning Thief
Scrubby


TDP4 Lead '10 : High/Low Python Script Tdp4cl10
Posts : 783
HWPoints : 1387
Join date : 2010-08-14

High/Low Python Script Empty
PostSubject: Re: High/Low Python Script   High/Low Python Script EmptyFri Feb 18, 2011 10:41 pm

Lul. Can you script these type of things into the HW chat?
Back to top Go down
Mitsukaru
Main Administrator
Mitsukaru


Admin '10 : High/Low Python Script Admino10
GFX Crew '10 : High/Low Python Script Gfxoft10
Recruiter '10 : High/Low Python Script Recrui10
Posts : 1328
HWPoints : 1548
Join date : 2008-06-14

High/Low Python Script Empty
PostSubject: Re: High/Low Python Script   High/Low Python Script EmptyFri Feb 18, 2011 11:00 pm

RedRaver wrote:
Lul. Can you script these type of things into the HW chat?

no.
Back to top Go down
http://hissingworms.co.nr
Sponsored content





High/Low Python Script Empty
PostSubject: Re: High/Low Python Script   High/Low Python Script Empty

Back to top Go down
 
High/Low Python Script
Back to top 
Page 1 of 1
 Similar topics
-
» Char Script(mIRC)
» Simple Power Assigning Script

Permissions in this forum:You cannot reply to topics in this forum
Hissing Worms :: Tech Forum :: Programming-
Jump to:  
Create a forum on Forumotion | ©phpBB | Free forum support | Report an abuse | Forumotion.com