IRC 타자 스크립 질문입니다. 꼭 부탁드립니다.

rinizim의 이미지

정말 프로그래밍에 대해서는 무지한 =_= 영문과 전공한 놈입니다.

단군넷에 상주하면서 사람들도 만나고 이야기도 하면서 즐겁게 지내고 있는데요, 아얄씨 내에서 즐길 수 있는 타자게임 스크립을 새로 받아 설치했습니다.

아래는 타자스크립의 한 부분입니다.
>>>>>>>>>>>>>>>>>>>>>>>>>

n124=;==============================================[문제출제]
n125=alias -l 문제출제 {
n126= if ($me !ison %타자방) { unset %타자방 | 타자종료 | halt }
n127= inc %타자문수
n128= set %타자자간
n129= set %타자문구
n130= var %타자데이터 = $lines($scriptdir $+ %타자출제 $+ .txt)
n131= set %타자문제 $read -l $+ $rand(1,%타자데이터) $scriptdir $+ %타자출제 $+ .txt
n132= var %nSCount = 0
n133= while (%nSCount < $numtok(%타자문제,32)) {
n134= inc %nSCount
n135= set %타자문구 %타자문구 $+ $gettok(%타자문제,%nSCount,32)
n136= }
n137= set %타자타임 $calc($gettok($calc($len(%타자문제) / 2) ,1,46) + %타자난이도)
n138= 타수계산
n139= 출제 %타자문제
n140=}
n141=alias -l 출제 {
n142= if ($me !ison %타자방) { unset %타자방 | 타자종료 | halt }
n143= var %타자복금 = 2문제 $+ %타자문수 $+ 3▶1 $1
n144= var %nSCount = 0
n145= while (%nSCount < $numtok($2-,32)) {
n146= inc %nSCount
n147= var %타자복금 = %타자복금 $+ 0|1 $+ $gettok($2-,%nSCount,32)
n148= }
n149= var %타자복금 = %타자복금 $+ 0|
n150= msg %타자방 4[1제한시간 $+ %타자타임 $+ 초4]
n151= msg %타자방 %타자복금
n152= set %타자완료 0
n153= 타임진행
n154= .timer타자 1 %타자타임 결과
n155=}
n156=alias -l 타임진행 {
n157= if ($me !ison %타자방) { unset %타자방 | 타자종료 | halt }
n158= if (%타자완료 == %타자타임) { halt }
n159= inc %타자완료
n160= .timer완료 1 1 타임진행
n161=}
n162=;================================================[결과출력]

>>>>>>>>>>>>>>>>>>>>>>>>>

제 무지한 프로그래밍 지식으로는 어떻게 할 줄을 몰라,
여기저기 떠돌면서 여쭤보다가 결국 여기까지 찾아들어왔습니다.

위 스크립 중 바로 이 부분인데요

n131= set %타자문제 $read -l $+ $rand(1,%타자데이터) $scriptdir $+ %타자출제 $+ .txt

제 생각에는 rand() 이 부분이 문제 출제가 될 때, 무작위로 문제가 출제되게 하는 스크립인 것 같습니다.
문제가 그냥 txt 파일 제일 위에서부터 차례대로 출제되게끔 소스를 편집해주실 분을 찾습니다. 꼭 도와주세요.

고맙습니다. (_ _)

kkung의 이미지

안녕하세요..^^ mIRC스크립을 오랜만에 다시 보니
반갑군요..^^

n130= var %타자데이터 = $lines($scriptdir $+ %타자출제 $+ .txt)
n131= set %타자문제 $read -l $+ $rand(1,%타자데이터) $scriptdir $+ %타자출제 $+ .txt

이 부분에서..
131 라인을

set %타자문제 $read -l $+ %타자데이터 $scriptdir $+ %타자출체 $+ .txt

이렇게 바꾸시구요..^^;

그리고 131라인 밑에
inc %타자데이터

해두시면 될듯 합니다..^^

정확한건 보질 않아서 모르겠구요~ 아마 되지 않을까 싶네요.

홍홍..예전에 eggdrop으로 타자봇 만들던 생각이 나서
답장 달아봤습니다..

후다닥 =3=3=3

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.