Re: [SCRIPT] DG Scripts

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 07/31/00


Torgny Bjers wrote:

> * MANA LOADER SCRIPT
> * BY ARTOVIL, ARCANE REALMS
> * arcane-realms.dyndns.org:3011
> set nextplr %self.people%
>   while (%nextplr% != "")

should be ("%nextplr%" != "")

>   * MAKE SURE THEY ARE STILL IN THE ROOM
>   * if %nextplr.room% = %self.vnum%

there is no = operator, you need to use ==, and I recommend enclosing in
() for clarity, also, this check is unnecessary, as everyone in this
list will be in the room.

>     * IF SO, REWARD!
>     wreward %nextplr% mana 5
>     wsend %nextplr% Your mana increases!
>     wsend %nextplr% %nextplr.next_in_room%

This won't work, you're sending an unprintable value (a UID variable) to
a player's screen.

>   * end
>   * GO TO NEXT PLAYER
>   if %nextplr.name% = "The Void"

the quotes have to be on both sides of the comparison, and also, it's
==, not =, try...

(%"nextplr.name%" == "The Void")

Also, this is unnecessary, the while check will terminate the loop
properly, plus this won't be checked until after you have tried to
reward and send text to "The Void".

>     halt
>   else
>     set nextplr %nextplr.next_in_room%
>   end
> done
> * end of script

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT