IorakeWarhammer
01-16-2011, 05:42 AM
need help with an easy project and a tougher project.
#1: need a script i can run in ruby that will simply loop the following:
fput "hide"
pause 5
fput "unhide"
dont know how to start the loop
#2:
im writing a script for a game that's similar to GS
here's what I need it to do: the character rests at the inn. the script will be him leaving the inn and entering a barracks. he will then alternate kick/attack on a training dummy. once his fatigue gets to exhausted, he will go to the bank, withdraw a little cash, then rest in the inn. while in the inn, he will order a bowl of stew and a piece of bread to recover his hunger. once his fatigue is gone, he will repeat the process. also, after he eats his food while resting, i want him to alternate hiding/unhiding. can be as simple as: fput hide, wait 5, fput unhide.
here's some details:
from inn to barrack (to begin hunt):
fput "out"
fput "n"
pause 1
fput "go barr"
once in barrack, he just needs to
fput "kill dummy"
pause 7
fput "kick dummy"
pause 5
until the message You are exhausted.. comes up
then he will go to the bank from the barrack, withdraw cash, and go into the inn:
fput "out"
fput "south"
pause 1
fput "west"
fput "go bank"
pause 1
fput "withdraw 13"
fput "out"
pause 1
fput "east"
fput "go inn"
from here, he will order a bowl of stew, and bread, and eat it..
fput "order 2"
fput "order confirm"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "order 1"
fput "order confirm"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
once this finishes, he will simply alternate hide / unhide, until his Fatigue: None (via health command) and then he will repeat the process
some helpful info:
when you type "health" it gives you the following
Current health: 100 Max health: 100
Fatigue: None Hunger: Well-Fed
and then..
fatigue comes in levels:
Levels of fatigue:
None
Winded
Tired
Exhausted
just need help with the strings and tying it all together.
to log in directly via an easy browser-based MUD client, just click:
http://clok.game-host.org/play/hmud/
you start in the town right near the inn. bank is one west of the inn, barracks are one north.
#1: need a script i can run in ruby that will simply loop the following:
fput "hide"
pause 5
fput "unhide"
dont know how to start the loop
#2:
im writing a script for a game that's similar to GS
here's what I need it to do: the character rests at the inn. the script will be him leaving the inn and entering a barracks. he will then alternate kick/attack on a training dummy. once his fatigue gets to exhausted, he will go to the bank, withdraw a little cash, then rest in the inn. while in the inn, he will order a bowl of stew and a piece of bread to recover his hunger. once his fatigue is gone, he will repeat the process. also, after he eats his food while resting, i want him to alternate hiding/unhiding. can be as simple as: fput hide, wait 5, fput unhide.
here's some details:
from inn to barrack (to begin hunt):
fput "out"
fput "n"
pause 1
fput "go barr"
once in barrack, he just needs to
fput "kill dummy"
pause 7
fput "kick dummy"
pause 5
until the message You are exhausted.. comes up
then he will go to the bank from the barrack, withdraw cash, and go into the inn:
fput "out"
fput "south"
pause 1
fput "west"
fput "go bank"
pause 1
fput "withdraw 13"
fput "out"
pause 1
fput "east"
fput "go inn"
from here, he will order a bowl of stew, and bread, and eat it..
fput "order 2"
fput "order confirm"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "eat stew"
pause 1
fput "order 1"
fput "order confirm"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
pause 1
fput "eat bread"
once this finishes, he will simply alternate hide / unhide, until his Fatigue: None (via health command) and then he will repeat the process
some helpful info:
when you type "health" it gives you the following
Current health: 100 Max health: 100
Fatigue: None Hunger: Well-Fed
and then..
fatigue comes in levels:
Levels of fatigue:
None
Winded
Tired
Exhausted
just need help with the strings and tying it all together.
to log in directly via an easy browser-based MUD client, just click:
http://clok.game-host.org/play/hmud/
you start in the town right near the inn. bank is one west of the inn, barracks are one north.