mIRC Home    About    Download    Register    News    Help

Print Thread
#159891 21/09/06 02:35 AM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
Well, isnt a script around that does what I want so Ill ask if you guys/gals can help me.

I'm trying to get a script(I cant make it not a clue how lol frown)to calculate any set xp that a monster gives when its killed and to have that multiplied by a number between 1 - 200. So if some one does !command <number> <monster> it returns like: $nick $+ , <number> <monster> is <the calculated amount>. Also, If you give me a basic on how to I may be able to do it myself. But, has to support more then one monster so I think you have to use regex(I have no real clue on how to work with that sorry frown). :| Anyways, if you have any questions what so ever ask me.

Thanks


Newbie Scripter. Learning pretty fast...lol :P
#159892 21/09/06 03:54 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
How is the number between 1 and 200 arrived at for the multiplier? Is there a process involved, or is it random?

#159893 21/09/06 04:27 AM
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
/me scratches head. huh?

#159894 21/09/06 05:42 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
trying to decypher your request

to calculate any set xp that a monster gives when its killed and to have that multiplied by a number between 1 - 200. So if some one does !command <number> <monster> it returns like: $nick $+ , <number> <monster> is <the calculated amount>.

in channel you would post to the bot
!killpoint (a number in range 1 - 200)
fex:
!killpoint 150 monster1

Code:
on *:text:!killpoint*:#:{
  echo -a $1
  if ($2 isnum 1-200) {
    if ($3 == monster1) { msg $chan $nick $2 times $3 is $calc($2 * 100) }
    elseif ($3 == monster2) { msg $chan $nick $2 times $3 is $calc($2 * 500) }
  }
  else { msg $chan number $qt($2) out of range (1-200) }
}


this version this randomly chooses a number to multiply with

!killpoint monster1

Code:
on *:text:!killpoint*:#:{
  var %mult = $r(1,200)
  if ($1 == monster1) { msg $chan $nick %mult $1 $calc( %mult * 100) }
  if ($1 == monster2) { msg $chan $nick %mult $1 $calc( %mult * 500) }
}
else { msg $chan $qt($1) is not known to me. }
}



Link Copied to Clipboard