Quick pokeball script
[16:15] <~Kid> !pokeball
[16:15] <~FakeServ> Kid throw a pokeball at Bulbasaur
[16:15] <~FakeServ> the pokeball is glowing
[16:15] <~FakeServ> Kid caught the Bulbasaur !
[16:15] <~Kid> !pokeball
[16:15] -FakeServ- please wait 25 seconds to use another pokeball!
on *:text:!pokeball*:#: {
if ($me == Bot) {
if (%time != $null) { notice $nick please wait %time seconds to use another pokeball! | halt }
set -zc %time 30
set %pokemon $read(pokeball.txt)
.timer 1 1 msg $chan $nick throw a pokeball at %pokemon
.timer 1 2 msg $chan the pokeball is glowing
set %chance $rand(1,3)
if (%chance == 3) { .timer 1 4 msg $chan $nick caught the %pokemon ! | halt }
else { .timer 1 4 msg $chan the %pokemon escaped ! | halt }
[i]
My version does not use notepad [/i] ^_^
on *:TEXT:*:#:{
var %pokemon = 1|2|3|4|5|6, %p = $gettok(%pokemon,$rand(1,$numtok(%pokemon,124)),124), %chance = $rand(1,2)
if ($me == Bot && !pokeball* iswm $strip($1)) {
if (!%flood) {
set -zc %flood 30
.timer 1 1 msg $chan $nick throw a pokeball at %p
.timer 1 2 msg $chan the pokeball is glowing
if (%chance == 1) { .timer 1 4 .msg $chan $nick caught the %p $+ ! }
if (%chance == 2) { .timer 1 4 .msg $chan the %p escaped! }
}
else {
.notice $nick please wait %flood seconds to use another !pokeball
}
}
}
I know that but it's not a nice way of doing it.
Like @Arigateaux said, it's beter if you use textfile if you gonna use large number of pokémons.
ehhh you dont even battle it? the least you could do it make it safari zone, and give it treats or throw rocks at it to increase chances of getting it... like in the original blue version.
just start with a low chance to catch certain pokemon. you could have it where with the name of the pokemon, you have it like bulbasaur::2 and then you split this string on :: and it starts with a difficulty of 1/2 chance to catch it.
but for a kangaskan you could have kangaskan:4 and it starts with a 1/4 chance to catch it, so you have to use rocks or give it treats, and do math to bring it up to a .5 chance to catch it.
you can use variables to keep track of all that.
you could use a variable to keep track how full it is, so keep feeding it treats alone wont work, and also how much it dislikes you, if you keep throwing rocks it will run away.
also, yah, your script isnt closed at all... it wouldnt work like it is as of 2:24 pm april 12th 14
It's beter to use a textfile.