hiding player objects
GameBoy
05 Dec 2003, 02:48Alex, as you cant do this, would you be able to make a feature that lets you HIDE yourself.
for example...
command <hide> conceal <player%userid%>
command <reveal> reveal <player%userid%>
but like i said, it would be good for games which have wizards, coz you could add invisibility spells.
Edit: Corrected Parameters
for example...
command <hide> conceal <player%userid%>
command <reveal> reveal <player%userid%>
but like i said, it would be good for games which have wizards, coz you could add invisibility spells.
Edit: Corrected Parameters
I think Im Dead
05 Dec 2003, 07:11if you are talking about qnet, it is.
conceal <player%userid%>
conceal <player%userid%>
GameBoy
05 Dec 2003, 07:17that's the one, but it doesnt work.
I think Im Dead
05 Dec 2003, 16:32It works.
You should try doing things before you say they don't work.
You should try doing things before you say they don't work.
MODIFIED ARENA.ASL
*****BEGIN*****
' QuestNet Sample Game "Arena"
' A basic demonstration of a few features of QuestNet Server 3.0 Beta 1
' by Alex Warren
' Version 0.2, last updated 27/JUL/2003
' Copyright © 2003 Axe Software
' This ASL file has been commented throughout to explain what each bit does - I highly recommend going
' through it to get a feel for programming QuestNet Server.
!include <net.lib>
define game <Arena>
asl-version <350>
gametype multiplayer
start <arena>
game version <0.1>
game author <Alex Warren>
' This prints to the server admin screen when the game initialises:
startscript {
msg <This game has been initialised and players can now connect to this server. To try _
this game out for yourself, load up Quest and select the "Network" tab, _
then connect to "localhost". You might want to load up two or three instances of Quest _
with different player names to test out possible interactions between players.|n>
msg <You will see details of connections, and see what each player types, in this window. _
You are also able to see player information and disconnect players from the server using the _
list and buttons to the right.>
msg <|nType |bHELP|xb to see a list of commands you can use in this Admin window.>
}
' This prints to each player's screen when they connect. Although we use the "msg" command just as
' we do above in the "normal" startscript, the message prints automatically to the correct player's screen.
' If we want to print a message on the server admin screen at this point, we need to use "msgto <0; Some message>"
' instead of msg.
player startscript {
msg <Hello $name(%userid%)$. Welcome to the QuestNet Sample Game, "Arena".|n>
msg <This very basic demonstration lets you pick up the various objects in the room, _
give them to people, and give people money. You can give people money by typing _
|bPAY|xb (|iplayer's name|xi) |b$$|xb(|iamount|xi). You can omit the "$$" if you like. Type |bBALANCE|xb _
to see how much money you have.|n>
msg <You can also have a mock "battle" with somebody if you have the hammer! Just type |bHIT|xb _
(|iplayer's name|xi).|n>
set numeric <money[userid]; 5>
}
' This sets up the command that allows players to pay money to each other. See how we use "msg" to print
' to the player that is doing the paying (the one who typed in the PAY command), and we use "msgto" to
' print to the receiving player.
command <pay #@player# $$#amt#; pay #@player# #amt#> {
if ( #amt# > 0 ) then {
if ( %money[userid]% >= #amt# ) then {
set numeric <id; $id(#player#)$>
set numeric <money[id]; %money[id]% + #amt#>
set numeric <money[userid]; %money[userid]% - #amt#>
msgto <%id%; |b$name(%userid%)$|xb has given you $$#amt#.>
msg <You give $name(%id%)$ $$#amt#.>
}
else {
msg <You don't have enough money for that.>
}
}
else {
msg <You can't go around giving people amounts like that.>
}
}
' This is a mini error handler that prints a helpful message to anybody who uses the PAY command without
' specifying another player or an amount properly:
command <pay #null#> {
msg <You need to type |bPAY|xb, followed by the player name, then the _
amount of money you want to pay.>
}
command <balance> msg <You are carrying $$%money[userid]%.>
command <hide> conceal <player%userid%>
' When a player disconnects, return everything that's in their inventory to the main "arena" room.
disconnect for each object in <player%userid%> move <#quest.thing#; arena>
end define
define options
servermsg off
welcome off
login off
register on
end define
define room <arena>
look <It's the arena.>
command <hit #@player#> {
if got <hammer> then {
msg <You hit #@player#.>
msgto <#player#; |b$name(%userid%)$|xb hits you with a hammer.>
}
else msg <You don't have anything to hit #@player# with.>
}
prefix <the>
define object <01>
alias <fish>
prefix <a blue>
detail <Blue fish>
look <It's a fish, nailed to a table.>
take msg <It's nailed to the table.>
type <giveable>
end define
define object <02>
alias <fish>
prefix <a red>
detail <Red fish>
look <The red fish.>
take
type <giveable>
end define
define object <table>
give <bomb> msg <That would be just silly.>
invisible
look <It's just a table.>
type <giveable>
end define
define object <bomb>
prefix <a>
look <Tick, tick, tick...>
take
type <giveable>
end define
define object <banana>
prefix <a>
take
type <giveable>
end define
define object <hammer>
prefix <a>
take
type <giveable>
end define
end define
*****END*****
GameBoy
05 Dec 2003, 17:17did you actually log on 2 times to the server and test it.. remember, you cant see yourself...
I think Im Dead
05 Dec 2003, 17:39I said it works.
It works.
It works.
GameBoy
05 Dec 2003, 17:56lol, ok...
dont work for me
command </cloak on> conceal <player%userid%>
command </cloak off> reveal <player%userid%>
dont work for me
I think Im Dead
05 Dec 2003, 19:23Copy and paste my code into a file and run it momo.
CYB3RPWN3D!11

CYB3RPWN3D!11

paul_one
07 Dec 2003, 01:25hahahaha - brillient.
Ste, have you got the latest Qnet and Quest?
Ste, have you got the latest Qnet and Quest?
GameBoy
07 Dec 2003, 01:41well of course lol