FunCommands

By Dark| on Oct 29, 2010

Updated - thanks to Jethro_ .

on $*:text:/^!(hit|touch|clap|poke|b(ow|oom))/iS:#:{
  if (!%f) { inc -u3 %f | if ($regml(1) == hit) { .msg # ACTION: sees $nick hit $$2- }
    elseif ($regml(1) == touch) { .describe # sees: $nick $v1 $$2- in the private area }
    else { .describe # $replace($regml(1),bow,see $nick bows down to,boom,sees: $nick Blows up,clap,claps for,poke,pokes) $$2- }
  }
}

Comments

Sign in to comment.
Phil_FW   -  Dec 01, 2010

Jethro_ you give a lot of helpful suggestions, you helped me on a couple of my scripts here and i appreciate it (: and Dark| you did well on this script by the way, I have no problem with it (:

 Respond  
Dark|   -  Nov 30, 2010

jethro_ i thank you for your help xD
i did this for alot of my little codes xD

 Respond  
cupcake   -  Nov 30, 2010
 Respond  
Jethro   -  Nov 30, 2010

Phil24, I'd love the idea of getting along, but some members don't appreciate the value of it. Instead, he or she makes unconstructive criticism, arises cynicism and incites some sort of bitter commotion toward other folks who actually take their time and give helpful, effective suggestions. What gets me the most is, some of them give out bad coding habits, and they claim it's "one of a kind" and an "unique style." They bite back at you if you pinpoint any opinionated inefficiency in their coding methods and then some.

 Respond  
Phil_FW   -  Nov 30, 2010

can't we all just get along and be friends? we are all the same, this is like a team... we all script so we all should support and help each other no matter how crappy or good the scripts are. So suck it up and move on! :P

 Respond  
Dark|   -  Nov 03, 2010

i saw one on mircscripts...Didnt work

 Respond  
Lucius   -  Nov 03, 2010

Or try using the search at the top of the page to see if there are any already made.
Remember to read the comments before putting it into your irc, there may be edits or improvements to it further down and it's the least that can be done for a free piece of wanted code.

 Respond  
napa182   -  Nov 02, 2010
Dark|   -  Nov 02, 2010

..........
I Dont know?
lol..

 Respond  
Jethro   -  Nov 02, 2010

Dark|, are you being locked out of Hawkee request forum or something? :/

 Respond  
Dark|   -  Nov 02, 2010

Jethro_ Could you / find / make a imdb Quote socket? :) idk if theres any out there..Thought itll be a great idea for a socket :P

 Respond  
Dark|   -  Nov 02, 2010

ill most likely ask ford :)

 Respond  
blackvenomm666   -  Nov 02, 2010

would prolly take writing a music player that plays vids as well and then writing a scoket for it and somehow getting it to play in the music player but if you wanna do sockets an such ask napa ford or someone else i havent bothered to learn em

 Respond  
Dark|   -  Nov 01, 2010

ohk

 Respond  
blackvenomm666   -  Nov 01, 2010

now you might be able to do it and have it play a video on your mirc but not show on anyone elses i unno much bout the video concept i saw a music player that played vids though not too long ago

 Respond  
blackvenomm666   -  Nov 01, 2010

and play the video? i dont think you can actually play vids in a chan getting the links for videos prolly not that hard

 Respond  
Dark|   -  Nov 01, 2010

hmmm would it be hard to make a socket thAT goes to a site and gets a video - like stupidvideos.com?

 Respond  
Jethro   -  Nov 01, 2010

The site I've found for the simple socket script I made above is very easy to pull the info. (it's recommendable that you find sites with simple, clean source codes) Some websites may have complicated ones, which mean you may need to pull 'em off by way of tokenize or by writing the whole source into a text and then filtering out the unneeded strings and html brackets to get to the info you're after.

 Respond  
Dark|   -  Nov 01, 2010

I Wanna learn how to make sockets :P sounds very fun what they can do,

 Respond  
Lucius   -  Nov 01, 2010

a socket works in in most basic form:

connect to site, read page
find one prticular line on the whole page
find two pieces of unique text on the line and save the bit in the middle.

Which mean there is only one way you could just change the link and it would still work... And thats if the site looks identical to the original.

If you want a hint at how different sites can look to a socket, bring up any webpage, even this one:

right click on a blank section
view page source

The text window that pops up will show you the bare code for the site, sometimes the information you may want isn't even on the page, but linked inside something else instead, similar to how a picture of words isn't recognised as word text.

Btw, good to see you've updated and I hope you know a little more for it.

 Respond  
Dark|   -  Nov 01, 2010

Ahhh i see, but what if its another fact site?

 Respond  
Jethro   -  Nov 01, 2010

The answer is NO. Every site has different source code. It'll require a rewrite to make it work for that particular site.

 Respond  
LadySorien   -  Nov 01, 2010

yes you could Dark|

 Respond  
Dark|   -  Nov 01, 2010

i can put a different site in it?

 Respond  
Jethro   -  Nov 01, 2010
on $*:text:/^[.!@]fact$/:#:{
  if !%t [ $+ [ $wildsite ] ] {
    inc -u5 $+(%,t,$wildsite) | $fact
  }
}
alias fact {
  $+(sock,$iif($sock(f),close,$&
    open f www.randomfunfacts.com 80))
  sockmark f msg #
}
on *:sockopen:f:{
  var %f sockwrite -n f 
  %f GET / HTTP/1.1 
  %f Host: $sock(f).addr 
  %f $crlf $crlf
}
on *:sockread:f:{
  var %f | sockread %f 
  $iif($regex(%f,/<i>(.*)</i>/),$&
    $token($sock(f).mark,1-2,32) $regml(1))
}

For your own use, enter: > /fact
For other people to trigger, enter: > !fact, .fact or @fact

!fact Only two people signed the Declaration of Independence on July 4th, John Hancock and Charles Thomson. Most of the rest signed on August 2, but the last signature wasn't added until 5 years later. !fact In 1976, the 10 billionth gallon of "Coca-Cola" syrup was produced. !fact Armadillos, opossums, and sloth's spend about 80% of their lives sleeping. !fact The highest paid CEO in 2004 was Terry Semel of Yahoo. He earned $230 million, or approximately $630,000 per day.
 Respond  
Dark|   -  Nov 01, 2010

Mhm like facts about random topics....Somthing IRChoners would like...lol

 Respond  
Jethro   -  Nov 01, 2010

Kiss facts and other stuff?

 Respond  
Dark|   -  Nov 01, 2010

Jethro_, Can you make a socket do anything? Like i could get Kiss facts and other stuff? :P

 Respond  
Jethro   -  Nov 01, 2010

Right on, GuitarMaster. The second if statement would be better off with elseif and you missed a )> elseif ($1 == !boom) describe $chan ....

 Respond  
GuitarMasterx7   -  Nov 01, 2010

napa182, get a life. why would you waste your time putting others down. No-one else is listening, napa182. Seriously, get a life.

i lol'd... Napa182 has gotten plenty
of respect from scripters a like to
say what he needs to say.
and you lil boy, needa calm your nipples ;]

nigguhs be arrogant nowadays but its whatever i guess
Hawkee.com is NOT a pastebin for crap like this
and yes crap. its leaned more towards the learning
from your bullshit rather then talkin shi back
to the ppl trying to better your skills in mSL.

yes i agree mSL is not a completely legit style of
coding, but it is infact a base of coding. it is the
easiest, and if your learned more you can learn things
that will get you dat money. but idc if you decide to take
the time an learn from others rather then being lame.

but anyways

to make this script LESS uglier then it awready is
if statements or a goto loop would be better then
this basic structure.

ON *:TEXT:*:#: {
  if ($1 == !bow) describe $chan sees: $nick Bows down to $2-
  if ($1 == !boom  describe $chan sees: $nick Blows up  $2-
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.