Category:Statements

From SphereWiki
Jump to: navigation, search
Statement End Statement Description
BEGIN END Groups a set of lines together, for use with DORAND and DOSWITCH statements.
DORAND line_count ENDDO Executes a random line of code within the block.
DOSWITCH line_number ENDDO Executes the specified line of code within the block.
FOR start end ENDFOR Loops through the block of code
FORCHARLAYER layer_id ENDFOR Loops through all items that a character has equipped on a specified layer.
FORCHARMEMORYTYPE memory_flags ENDFOR Loops through all memory items on a character that have one of the specified flags.
FORCHARS distance ENDFOR Loops through all characters within distance tiles.
FORCLIENTS distance ENDFOR Loops through all connected clients within distance tiles.
FORCONT container_uid, max_subcontainers ENDFOR Loops through all items inside a container.
FORCONTID item_id, max_subcontainers'' ENDFOR Loops through all items inside a container with a specified BASEID
FORCONTTYPE type, max_subcontainers ENDFOR Loops through all items inside a container with a specified TYPE
FORINSTANCES defname ENDFOR Loops through all instances of characters or items with the specified BASEID
FORITEMS distance ENDFOR Loops through all items within distance tiles.
FOROBJS distance ENDFOR Loops through all items and players within distance tiles.
FORPLAYERS distance ENDFOR Loops through all players (online and offline) within distance tiles.
IF condition
ELIF condition
ELSEIF condition
ENDIF Executes the block of code if condition is true.
WHILE condition ENDWHILE Loops through the block of code whilst condition is true.
<local._for> Current Step of the Loop for the FOR statements. Note, not all of the FOR statements use this concept... for example, in a FORITEMS statement, the <local._for> counter will always be zero no matter how many objects the statement loops over.
<local._while> Current Step of the Loop for the WHILE statement.

This category currently contains no pages or media.