Axe Software Forums
  QuestNet Forum
  NPC's


Author Topic:   NPC's
Jakk posted 07-06-2003 01:42 BST     
Non playable characters ( I pray to god I spelled that right). Does everyone know how to make one? Good. I was wondering if anyone wanted to have some fun with me and goof around with NPC's. We could post the code here and take a look at them. Any takers? I'm going to post my NPC here in a hour or so.
Jakk posted 07-06-2003 02:26 BST          
This is my NPC. It isnt full proof since I codded the whole freakin' thing by hand. I used whizz's ASL editor. It is great whizz, nice job. here it is:

quote:

' Created with QDK 3.12

define game <>
asl-version <311>
start <Sally's Shoe'a'ramma>
game info <Created with QDK 3.12>
beforeturn set numeric <random; $rand(1;10)$>
define variable <random>
type numeric
value <$rand(1;10)$>
display <you feel very fond of ! today>
end define
end define

define synonyms
end define

define room <Sally's Shoe'a'ramma>
look <You are standing in a bright, cheery, shoe store. Sally is here. Behind sally is a large amount of shoes.(sorry about the cruddy description, I just want to get to the NPC)>

define object <Sally>
look msg <Sally is a woman in her 20's. She has long blond hair, and green eyes. She is wearing a pair of black pants, and a white T-shirt. >
take msg <Sally+touching= lawsuit>
speak say <Welcome to sally's shoe'a'ramma!I'm sally! How may I make your day great today? >
displaytype <NPC>
detail <Cheerful>
article <her>
gender <she>
properties <not sleeping>
end define

end define

define timer <Speaking>
interval <20>
action if property <Sally; not sleeping> then say <|bSally:|xbWelcome to sallys! how can I make your life Wonderful today?> else msg <Sally says some things about hating this hell hole under her breath>
enabled
end define

define timer <sleepon>
interval <30>
action {
msg <Sally dozes off on the counter. Looks like a wonderful time to steal some prize winnin' shoes!>
property <Sally; sleeping>
timeroff <sleepon>
timeron <sleepon>
set interval <sleepon; 15>
}
enabled
end define

define timer <sleepoff>
interval <14>
action {
msg <Sally screams "No mother! not the bull whip!" when wakes up, seeming releaved that she is here.>
property <Sally; not sleeping>
timeron <sleepon>
timeroff <sleepoff>
set interval <sleepoff; 14>
}
disabled
end define

define text <intro>

end define

define text <win>

end define

define text <lose>

end define



Thank you. this is just to get things going.