Indented it to make it easier to read.
Code:
Trigger Intended Assignment: Objects
Trigger Type: Command , Numeric Arg: 2, Arg list: catch release
Commands:
if %cmd% == release
if (%self.varexists(captured)%)
%teleport% %captured.name% %self.in_room%
%echoaround% %actor% %actor.name% tosses his pokeball into the middle of the room.
- eval releasespeech %random.4%
+ set releasespeech %random.4%
switch %releasespeech%
case 1
%echoaround% %actor% %actor.name% says, " %captured.name%, I choose you!"
%send% %actor% You toss your pokeball and shout, " %captured.name%, I choose you!"
break
case 2
%echoaround% %actor% tosses a pokeball and shouts, " %captured.name%, let's go!"
%send% %actor% you toss your pokeball and shout, " %captured.name%, let's go!"
break
case 3
%echoaround% %actor% tosses a pokeball and shouts, "Lets go %captured.name%!"
%send% %actor% you toss your pokeball and shout, "Let go %captured.name%!"
break
case 4
%echoaround% %actor% tosses a pokeball and shouts, " %captured.name%! I need your help!"
%send% %actor% you toss your pokeball and shout, " %captured.name%! I need your help!"
break
default
%echoaround% %actor% %actor.name% says, " %captured.name%, I choose you!"
%send% %actor% You toss your pokeball and shout, " %captured.name%, I choose you!"
break
done
%echo% %captured.name% appears in a bright flash!
unset captured
else
%send% %actor.name% there is no pokemon in your ball.
end
halt
end
if !(%arg%)
%send% %actor% Who do you want to catch?
halt
end
makeuid target %arg.id%
%echoaround% %actor% %actor.name% clutches his %self.name% and stares at %target.name%
%send% %actor% You clutch the %self.name% and target %target.name%
case %target.is_pc%
switch %target.is_pc%
case 1
%send% %actor% You can't put players inside pokeballs.
halt
break
default
if %target.room% != %actor.room%
%send% %actor% They must be in the same room as you!
halt
end
if %target.id% == %actor.id%
%send% %actor% You can't fit in there!
halt
end
%send% %actor% You toss %self.shortdesc% at %target.name%
%echoaround% %actor% %actor.name% tosses %self.shortdesc% at %target.name%
- eval catchem %random.3%
+ set catchem %random.3%
switch %catchem%
case 1
%force% %target.name% follow %actor.name%
%echo% A bright flash of light envelopes %target.name% and %self.shortdesc% closes around %target.himher% !
dg_affect %target.id% charm on 99
makeuid captured %arg.id%
global captured
%teleport% %target.name% 8299
break
case 2
%echo% %target.name% narrowly escapes being caught in %self.shortdesc%!
break
case 3
%echo% %self.shortdesc% bounces two times and releases %target.name%
break
default
%echo% %self.shortdesc% bounces on the ground 1 time and then releases %target.name%
+ break
done
break
done
Also found a few things that should probably be changed in it while doing so which are shown in the code box above.
I'd probably change the way it's written more than that if I were to use it, but those three changes don't change the way it's fundamentally written, just minor changes, one default case lacked a break, and eval was used in two spots where set was a better option.