I thought the use of #@object# was for avoiding ambigus commands on objects with similar name, and to check if an object is in scope. Recently I added in my code such a command :
command <push #@table#> {
if ( %table_move% > 0 ) and ( %table_move% < 11 ) then {
msg <You push the table>
dec <table_move>
}
else msg <There is a wall preventing you to move anymore.>
}
command <pull #@table># {
if ( %table_move% > -1 ) and ( %table_move% < 10 ) then {
msg <You pull the table>
inc <table_move>
}
else msg <There is a wall preventing you to move anymore.>
}
command <push #@chair#> {
if ( %chair_move% > 0 ) and ( %chair_move% < 11 ) then {
msg <You push the chair>
dec <chair_move>
}
else msg <There is a wall preventing you to move anymore.>
}
command <pull #@chair#> {
if ( %chair_move% > -1 ) and ( %chair_move% < 10 ) then {
msg <You pull the chair>
inc <chair_move>
}
else msg <There is a wall preventing you to move anymore.>
}
command <push #@bed#> if not exists <book1> then {
msg <You notice a book has fallen between the wall and your bed.>
reveal <book1>
show <book1>
The problem now is if I write :
>push bed
You push the table
(and the value decrease for table_move)
the same goes for
>push chair
etc.
only the 1st command written is considered (command <push #@table#>)
So to avoid this problem, I removed the #@....# and all works fine, except it doesn't check if the object is in scope
I have also this :
command <pull #@rope3#> {
if flag <gote_rope> and not flag <livolas_rope> then msg <You're not strong enough.>
if flag <gote_rope> and flag <livolas_rope> then {
msg <You help the Elf to pull the string. The princess is almost free now.>
flag on <liberee>
timeron <gote_lib>
}
}
and if someone type :
> pull tree
You help the Elf to pull the string. The princess is almost free now.
what is wrong ? It doesn't seem to be a normal behaviour.