Page 1 of 1
pulling 2 lines of text with #event
Posted: Sat Jul 24, 2004 12:55 am
by NobodyImportant
Is there any possible way to pull 2 lines of txt with an #Event?.. say..
Code: Select all
#Event nofoodanddrink "You are out of food./You are out of Drink."
just some way to pull 2 lines of text that are right above/below each other, with 1 event, or a way to look for the second event after the 1st has been found, but no before, basically 2 events, but it doesnt looks for the second until it finds the 1st.
Any help on this would be appreciated, thanks in advance.[/code]
Posted: Sat Jul 24, 2004 1:52 am
by Sparr
#event outoffood "#*#You are out of food.#*#"
#event outofdrink "#*#You are out of drink.#*#"
--------------------
/declare outoffood int outer
/declare outofdrink int outer
--------------------
/call checkoffsets
--------------------
sub checkevents
/varset outoffood 0
/varset outofdrink 0
/doevents
/if (${outoffood}&&${outofdrink}) {
foo
}
/return
--------------------
sub event_outoffood
/varset outoffood 1
/return
sub event_outofdrink
/varset outofdrink 1
/return
Posted: Sat Jul 24, 2004 2:33 am
by SwiftyMUSE
Could you not use "You are out of #1#", and check for a parameter of "food." or "Drink."?
Posted: Sat Jul 24, 2004 4:03 am
by Sparr
yes you could, but he wants to know when he gets BOTH messages. the only way to do that is to have a variable they can use to 'communicate' with each other
Posted: Sat Jul 24, 2004 6:30 am
by aChallenged1
Never have to buy food/drink again on a caster who can summon food/drink. Useful.
Though I'd never be worried about both, myself. I'd just make it cast a stack of whichever one I needed and autoinventory it.
Posted: Sat Jul 24, 2004 12:22 pm
by dok
Last i checked, you could assisgn multiple events to the same function.
#event FoodDrink "You are out of food."
#event FoodDrink "You are out of drink."
#event FoodDrink "#*#Summon Food"
#event FoodDrink "#*#Summon Drink"
All the above should call the same Function/Sub (Event_FoodDrink)