RCRPG/PureBasic: Difference between revisions

m
Fixed syntax highlighting.
(Added PureBasic)
 
m (Fixed syntax highlighting.)
 
(5 intermediate revisions by 2 users not shown)
Line 1:
{{collection|RCRPG}}
=={{header|PureBasic}}==
This version is a more or less direct translation of the RCRPG version done in Perl (See [[RCRPG/Perl]]) with some additional functionality added. AllCommands commandsinclude areattack, implementeddrop, includingtake, equip, alias's, andname, theinventory, namingand of roomsdirections. AnThe additional'name' command 'ask'can wasuse implementeda fordouble-quoted providingstring hintsif spaces wanted to locatebe included in the randomlyname placed(i.e. 'name Prize"this Roomroom").
 
<lang PureBasic>;Here is a description of all of the commands:
An additional command 'ask' was implemented for providing hints in finding the randomly placed Prize Room. The program also allows the stacking of commands if they are separated by a space (i.e. 'take all equip sledge a north n' will perform four actions: take all, equip sledge, [a]ttack north, [n]orth).
 
A simple outlay of the play strategy is: Take and equip a sledge. Get some gold to ask for hints (from the program) and move a ladder into a room to go up if necessary and attack walls to make exits.
<langsyntaxhighlight PureBasiclang="purebasic">;Here is a description of all of the commands:
;
;north
Line 44 ⟶ 48:
;At the start of the game, only two rooms exist, the Start and the Prize room.
;All other rooms the player creates by moving around. The Prize room is randomly
;located each game. If you get need a hint just 'ask'.
;
;To move out of the start room, the player needs to break a hole in a wall,
Line 194 ⟶ 198:
rooms()\items() = #itm_sledge
 
setLocation(prizeRoom, Random(106) - 53, Random(106) - 53, Random(5) + 2)
*locations(Str(prizeRoom\x) + "," + Str(prizeRoom\y) + "," + Str(prizeRoom\z)) = AddElement(rooms())
rooms()\name = "The Prize Room"
Line 855 ⟶ 859:
display(#CR$ + #CR$ + "Press ENTER to exit"): Input()
CloseConsole()
EndIf </langsyntaxhighlight>
9,476

edits