Customizing Layout.
Anonymous
04 Feb 2004, 18:09I'm looking to do a custom room description.
I'm hoping you can tell me how to do the example below in scripting.
If it can't be done, then I know I'm using the wrong product.
Example display follows:
You're in the shop.
There is a shop keeper here.
Happy and Lucky are here.
There is nothing on the floor.
Exits: se
But the player display line may have 4 versions,
depending on amount of players in the room:
There is nobody here.
Happy is here.
Happy and Lucky are here.
Happy, Go, and Lucky are here.
Also, the object display may have 4 different versions as well:
There is nothing on the floor.
You see Go's ear on the floor.
You see Go's ear and Go's leg on the floor.
You see Go's ear, Go's leg, and Go's arm on the floor.
Basically there should be 4 different lines, for the NPC, Player, Inventory lines.
Is this possible in the QuestNet version, using scripting?
After reading the scripting help files, it seems it may be,
but I'd have no clue how it would be implemented.
I know it should be a script that runs on players entering the room.
The look command would only show the verbose room description.
Thanks
I'm hoping you can tell me how to do the example below in scripting.
If it can't be done, then I know I'm using the wrong product.
Example display follows:
You're in the shop.
There is a shop keeper here.
Happy and Lucky are here.
There is nothing on the floor.
Exits: se
But the player display line may have 4 versions,
depending on amount of players in the room:
There is nobody here.
Happy is here.
Happy and Lucky are here.
Happy, Go, and Lucky are here.
Also, the object display may have 4 different versions as well:
There is nothing on the floor.
You see Go's ear on the floor.
You see Go's ear and Go's leg on the floor.
You see Go's ear, Go's leg, and Go's arm on the floor.
Basically there should be 4 different lines, for the NPC, Player, Inventory lines.
Is this possible in the QuestNet version, using scripting?
After reading the scripting help files, it seems it may be,
but I'd have no clue how it would be implemented.
I know it should be a script that runs on players entering the room.
The look command would only show the verbose room description.
Thanks
Farvardin
04 Feb 2004, 20:07in "startscript", you have to setup a "description".
You can inspirte yourself from my own script :
try to add to such a script your own objects
You can inspirte yourself from my own script :
description {
set string <indescription; $gettag(#quest.currentroom#;indescription)$>
msg <#indescription#|n|b|cl#quest.formatroom#|xb|cb|n>
msg <#quest.lookdesc#|n>
if ( #indescription# = ) then set string <indescription; You are in> else {
set numeric <len; $lengthof(#indescription#)$>
set numeric <len; %len%-1>
set string <indescription; $left(#indescription#;%len%)$>
}
if not ( #quest.objects# = ) then msg <You can see #quest.formatobjects#.|n>
}
try to add to such a script your own objects
Farvardin
04 Feb 2004, 20:08sorry I forgot this is about QuestNet, my script was for normal Quest, but probably you can tweak it for QuestNet too
Anonymous
04 Feb 2004, 22:19Eh I'm at work and have no internet at home so I'll just let you know that it is very possible, that "copied from the manual" bit of script won't really help but is similar to what you want, in order to seperate objects and players you'd have to throw a few more lines of code in. It's still fairly easy though.