PDA

View Full Version : A bit of trouble with matches labels and possibly more? (Non Gemstone Related)



Lune
10-15-2012, 09:27 PM
So i'm a bit new to Lich and as such i'm used to using Genie and SF for any and all scripting. However I have started using Lich for playing non-Simutronics MUD games. As such it works well except for a couple bits that aren't quite working together. My matches don't match, or if they do I did something wrong for the actual match they jump to... Can someone take a look and help possibly? I'm aware that it's rather sloppy... I havn't written scripts in almost a year.



start:
pause 2
match "battle", "Lune is fighting wild pokemon."
match "wait", "You need to rest a moment,"
put "+hunt"
matchwait
goto "battle"

battle:
match "miss", "and missed!"
match "victory", "TEAM A HAS WON THE BATTLE!!"
match "bite", "There isn't any PP in the move Quick Attack. Aborting."
put "+attack Quick Attack"
matchtimeout 4
goto "battle"

miss:
pause 1
goto "battle"

bite:
match "miss", "and missed!"
match "takedown", "There isn't any PP in the move Bite. Aborting."
match "victory2", "TEAM A HAS WON THE BATTLE!!"
put "+attack Bite"
matchtimeout 4
goto "bite"

takedown:
match "victory2", "TEAM A HAS WON THE BATTLE!!"
match "miss", "and missed!"
put "+attack Take Down"
matchtimeout 4
goto "abort"

victory:
respond " ", "Battle Won", " "
pause 1
respond "Waiting to start new Battle."
pause 2
goto "start"

victory2:
respond " ", "Battle Won", " "
pause 1
respond "Healing."
pause 1
put "+heal"
pause 1
respond " ", "Waiting to start new Battle."
pause 2
goto "start"

abort:
respond " ", "Something went wrong somewhere.", " "
pause 1
!abort

wait:
pause 2
goto "start"

DaCapn
10-16-2012, 12:54 AM
"Certain bits don't work right" isn't particularly descriptive. That aside, take a look and see if it's just going through the script ignoring all matches and honoring other statements (like "goto").

I'm impressed enough that it's not crashing left and right. Don't know that I'd expect it to be able to accept any/most/some/few lines from the game server and be able to interpret them properly.

Xyl
10-16-2012, 12:57 AM
from the looks your good, except I think its fput not regular put. But you look pretty solid, even if its a pokemon script ;)