RCRPG/uBasic-4tH: Difference between revisions
Some minor cleanups in the code - spelling, long lines, etc.
(Added uBasic/4tH version) |
(Some minor cleanups in the code - spelling, long lines, etc.) |
||
Line 34:
== The code ==
<lang>Dim @r(216) ' these are our rooms▼
▲Dim @r(216) ' these are our rooms
i = Rnd(36) ' now place the person in a room, floor 0
Line 93 ⟶ 92:
Print : Print
Print "Things of interest here:"
b@ = And(@r(a@)/65536, 255)
c@ = And(@r(a@)/256, 255)
If b@ Then Print "\t";b@;" piece(s) of gold"
Line 103 ⟶ 102:
If @r(a@)/128 = 0 Then Print "\tNothing"
If And(@r(a@), 64) Then ' see if we are in the prize room
Print
Print "You found the Prize Room!"
Line 118 ⟶ 117:
While Len(c) ' any string left?
While Peek(c, 0) = Ord(" ") ' is it a space?
c = Chop(c, 1) ' split off space
Next
Line 163 ⟶ 162:
Proc _TakeAll ' be greedy
Else Print "Hey, just what you see, pal!\n"
EndIf EndIf EndIf EndIf ' no
Return
Line 207 ⟶ 206:
EndIf
Push ((And(i/256, 255) + And(@r(a@)/256, 255)) * 256)
i = ((i/16777216) * 16777216) + Pop() + Pop() + a@
@r(a@) = And(@r(a@), 63)
Else
Line 222 ⟶ 223:
If Comp(a@, "sledge") = 0 Then
Proc _EquipSledge
Else If Comp(a@, "ladder") = 0 Then
Proc _EquipLadder
Else Print "You can't equip that.\n"
EndIf EndIf
Return
Line 265 ⟶ 266:
Proc _DropAll ' be greedy
Else Print "You can't drop what you don't have.\n"
EndIf EndIf EndIf EndIf ' no
Return
Line 314 ⟶ 315:
EndIf
Push ((And(@r(a@)/256, 255) + And(i/256, 255)) * 256)
@r(a@) = Pop() + Pop() + And(@r(a@), 255)
i = And(i, 255)
Else
Line 379 ⟶ 382:
Print
Print "take (all|item name)"
Print "\
Print
Print "inventory"
Line 505 ⟶ 508:
Print "Equip the sledge first. If you got one..\n"
EndIf
Return</lang>
|