mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2006
Posts: 4
G
golden2 Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Nov 2006
Posts: 4
i would like to make a script for runscape chat room so people can get like stats and prices of objects .
i dont know were to start i got mirc , is there anygood sites or could someone post me a runescape bot or a simple bot so i could have a look at it.

Joined: Oct 2006
Posts: 60
M
Babel fish
Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
on *^1:TEXT:!placetrigger*:#: {
msg $chan place the reply
}

msg $chan replys to the channel, the * after the trigger means wildcard so if you want you could use if or ifelse to further that but for a basic thing you could just do

on *^1:TEXT:!rules:#: {
msg $chan the rules for this channel are...}

thats like super basic tho, you could use variables for things like events etc...just type /help in mIRC and read through that

Joined: Nov 2006
Posts: 4
G
golden2 Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Nov 2006
Posts: 4
k thats a start were do i put that in alias or remote and i can get the bot to do the command but others cant want do i put in for it and were.

ps i know i dumb but once i got the hang of it ill be ok

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
There are runescape bot scripts already completed. I am pretty sure that I saw one on http://www.mircscripts.org ... just go there and do a search for runescape.


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2006
Posts: 4
G
golden2 Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Nov 2006
Posts: 4
i did and found nothing id rather do one me self i just need to look at a script so i can see what to do .

ive started one but i can only do commands from the bot not from another nick so can anyone help with that please so other users can use it

Last edited by golden2; 27/11/06 10:37 PM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Those commands would go in the Remotes section.

Due to the fact that they are ON TEXT events, they will only respond when someone else uses the command.

/help on text

Joined: Aug 2006
Posts: 44
X
Ameglian cow
Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44


Newbie Scripter. Learning pretty fast...lol :P
Joined: Nov 2006
Posts: 4
G
golden2 Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Nov 2006
Posts: 4
ty everyone for helping ive got started but ive got this script for doing rs prices just wondering were should i put it like remote or alias and does it look ok,i got it of a site earlier so its not my work.


on $*:TEXT:/^['?]price */Si:#: {
inc %zybez.use
if (%zybez.use >= 3) {
$iif($left($1,1) == ?,msg $chan,notice $nick) Price Guide made possibly by Zybez's Price Guide: http://zybez.com
.unset %zybez.use
}
var %rstr = $+($r(0,9),$r(0,9),$r(0,9),$r(0,9),$r(0,9))
.set %price. $+ $(%rstr,2) $+ .rn $numtok($2-,44)
.set %price. $+ $(%rstr,2) $+ .rc 1
.set %price. $+ $(%rstr,2) $+ .rvmi 0
.set %price. $+ $(%rstr,2) $+ .rvma 0
.set %price. $+ $(%rstr,2) $+ .nick $nick
.set %price. $+ $(%rstr,2) $+ .type $iif($2 == -e,strict,$iif(-s* iswm $2,spend $dcon($remove($2,-s)),free))
.set %price. $+ $(%rstr,2) $+ .item $iif($2 == -e || -s* iswm $2,$3-,$2-)
.set %price. $+ $(%rstr,2) $+ .ret $iif($left($1,1) == ?,msg $chan,notice $nick)
.sockopen price. $+ $(%rstr,2) zybez.com 80
}
alias mcol { return $+($chr(3),02,$1,$chr(3),) }
alias pcol { return $+($chr(3),07,$1,$chr(3),) }
alias icol { return $+($chr(3),04,$1,$chr(3),) }
alias dcon {
if (*.* !iswm $1) {
return $replace($1-,K,000,M,000000,B,000000000)
}
if (*.* iswm $1) && (($right($1,1) == K) || ($right($1,1) == M) || ($right($1,1) == B)) {
var %rdat = $1, %nums = $len($gettok($remove($1,K,M),2,46))
%rdat = $calc($remove($1,.,K,M,B) * $iif($right($1,1) == K,$+(1,$str(0,$calc(3 - %nums))),$iif($right($1,1) == M,$+(1,$str(0,$calc(6 - %nums))),$+(1,$str(0,$calc(9 - %nums))))))
return %rdat
}
else {
return $1
}
}
on *:SOCKOPEN:price.*: {
if ($sockerr) {
$($+(%,price.,$right($sockname,5),.ret),2) SockOpen Error: $sock($sockname).wsmsg
return
}
var %rid = $right($sockname,5)
.unset $($+(%,price.calc.,%rid),1)
tokenize 32 $gettok($($+(%,price.,%rid,.item),2),$($+(%,price.,%rid,.rc),2),44)
if ($remove($1,k,m,.) !isnum) { var %price.tmp.sendname = $replace($1-,$chr(32),+) }
else { var %price.tmp.sendname = $replace($remove($2-,$1),$chr(32),+) | .set %price.calc. $+ %rid $dcon($1) }
;if ($right(%price.tmp.sendname,1) == s) { %price.tmp.sendname = $left(%price.tmp.sendname,-1) }
.sockwrite -n $sockname GET /priceguide.php?search_terms= $+ %price.tmp.sendname $+ &search_area=1&price_low=&price_high=&member=1 HTTP/1.1
.sockwrite -n $sockname Host: zybez.com $+ $crlf $+ $crlf
}
on *:SOCKREAD:price.*: {
if ($sockerr) {
$($+(%,price.,$right($sockname,5),.ret),2) SockRead Error: $sock($sockname).wsmsg
return
}
var %rid = $right($sockname,5)
tokenize 32 $gettok($($+(%,price.,%rid,.item),2),$($+(%,price.,%rid,.rc),2),44)
if ($remove($1,k,m,.) !isnum) { var %price.tmp.sendname = $replace($1-,$chr(32),+) }
else { var %price.tmp.sendname = $replace($2-,$chr(32),+) | .set %price.calc. $+ %rid $dcon($1) }
.sockread %sr
if (*<!-- * iswm %sr || * -->* iswm %sr) && (*<!-- Search Results: End -->* !iswm %sr) && (*<!-- Search Results: Start -->* !iswm %sr) { halt }
if (*<!-- Search Results: End -->* iswm %sr) { .unset %price.read. $+ %rid }
if ($($+(%,price.read.,%rid),2) != $null) && (%sr != $null) {
if (*search did not return any* iswm %sr) {
.set %price. $+ %rid $+ .rs $($+(%,price.,%rid,.rs),2) $+ , $pcol(No price found for) $icol($gettok($($+(%,price.,%rid,.item),2),$($+(%,price.,%rid,.rc),2),44)))
if ($($+(%,price.,%rid,.rc),2) < $($+(%,price.,%rid,.rn),2)) {
.next_price %rid
halt
}
}
else {
if ($($+(%,price.read.,%rid),2) == 4) {
if ($+(*,$($+(%,price.tmp.name.,%rid),2),*) !iswm $($+(%,price.,%rid,.rs),2)) {
if ($gettok($($+(%,price.,%rid,.type),2),1,32) == spend) {
.set %price.calc. $+ %rid $floor($calc($gettok($($+(%,price.,%rid,.type),2),2,32) / $gettok($remove($($+(%,price.tmp.price.,%rid),2),gp,$chr(44)),2,45)))
if ($($+(%,price.calc.,%rid),2) == 0) { .unset $($+(%,price.calc.,%rid),1) }
}
.set %price. $+ %rid $+ .rs $($+(%,price.,%rid,.rs),2) $+ , $+($iif($($+(%,price.calc.,%rid),2) != $null,$+($icol($bytes($ifmatch,b)),$chr(32)),),$mcol($($+(%,price.tmp.type.,%rid),2)),$icol($($+(%,price.tmp.name.,%rid),2)),$chr(32)) $&
$+ $iif($($+(%,price.calc.,%rid),2) != $null, $pcol($+($bytes($calc($remove($gettok($($+(%,price.tmp.price.,%rid),2),1,45),gp,$chr(44)) * $ifmatch),b),gp)) - $pcol($+($bytes($calc($remove($gettok($($+(%,price.tmp.price.,%rid),2),2,45),gp,$chr(44)) * $ifmatch),b),gp)) $+($chr(40),$pcol($($+(%,price.tmp.price.,%rid),2)),$chr(41)), $pcol($($+(%,price.tmp.price.,%rid),2)))

.inc $($+(%,price.,%rid,.rvmi),1) $iif($($+(%,price.calc.,%rid),2) != $null,$calc($remove($gettok($($+(%,price.tmp.price.,%rid),2),1,45),gp,$chr(44)) * $ifmatch),$remove($gettok($($+(%,price.tmp.price.,%rid),2),1,45),gp,$chr(44)))
.inc $($+(%,price.,%rid,.rvma),1) $iif($($+(%,price.calc.,%rid),2) != $null,$calc($remove($gettok($($+(%,price.tmp.price.,%rid),2),2,45),gp,$chr(44)) * $ifmatch),$remove($gettok($($+(%,price.tmp.price.,%rid),2),2,45),gp,$chr(44)))
}
if ($($+(%,price.,%rid,.rc),2) < $($+(%,price.,%rid,.rn),2)) {
.next_price %rid
halt
}
}
if ($($+(%,price.read.,%rid),2) == 3) { .set %price.tmp.price. $+ %rid $nohtml(%sr) | inc $($+(%,price.read.,%rid),1) 1 }
if ($($+(%,price.read.,%rid),2) == 2) {
if ($($+(%,price.,%rid,.type),2) == strict) && ($replace($nohtml(%sr),$chr(32),+) != %price.tmp.sendname) {
.set $($+(%,price.read.,%rid),1) -5
}
else {
.set %price.tmp.name. $+ %rid $nohtml(%sr)
inc $($+(%,price.read.,%rid),1) 1
}
}
if ($($+(%,price.read.,%rid),2) == 1) { .set %price.tmp.type. $+ %rid $iif(*&nbsp;* iswm %sr,,(M)) | .inc $($+(%,price.read.,%rid),1) 1 }
if ($($+(%,price.read.,%rid),2) <= 0) { .inc $($+(%,price.read.,%rid),1) 1 }
}
}
if (*<!-- Search Results: Start -->* iswm %sr) { .set %price.read. $+ %rid 0 }
}
on *:SOCKCLOSE:price.*: {
var %rid = $right($sockname,5)
if ($($+(%,price.,%rid,.rc),2) < $($+(%,price.,%rid,.rn),2)) {
.next_price %rid
halt
}
if ($numtok($right($($+(%,price.,%rid,.rs),2),-1),44) < $($+(%,price.,%rid,.rc),2)) {
.set %price. $+ %rid $+ .rs $($+(%,price.,%rid,.rs),2) $+ , $pcol(No price found for) $icol($+($chr(2),$gettok($($+(%,price.,%rid,.item),2),$($+(%,price.,%rid,.rc),2),44),$chr(2)))
}
$($+(%,price.,%rid,.ret),2) $right($($+(%,price.,%rid,.rs),2),-2)
if ($($+(%,price.,%rid,.rn),2) > 1) { $($+(%,price.,%rid,.ret),2) $pcol(Total Value: $+($bytes($($+(%,price.,%rid,.rvmi),2),b),gp) - $+($bytes($($+(%,price.,%rid,.rvma),2),b),gp)) }
.unset $($+(%,price.*,%rid,*),1)
}
alias -l next_price {
.unset $($+(%,price.read.,$1),1)
var %sn = price. $+ $1
.sockclose %sn
.inc $($+(%,price.,$1,.rc),1) 1
.sockopen %sn zybez.com 80
}
alias nohtml {
var %x,%i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x)
return %x
}


hope you can help


Link Copied to Clipboard