Quote: "Python 2.7.7 (default, Jun 1 2014, 14:17:13) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
sorted version list
=====================
v0.001: Chris Tate : ""
v0.002: VisualProg : ""
v0.003: TheComet : "Fixed new lines, now uses printa instead of print"
v0.004: Chris Tate : "Move input down a bit"
v0.005: TheComet : "- (DEPRECATED) Use this to add new lines inside print statements, e.g. "this line"+nl+"is over this line""
v0.006: VisualProg : "- start program. Above will be functions"
v0.007: Chris Tate : "- Type in progress..."
v0.008: TheComet : "Fixed new lines, now uses printa instead of print"
v0.009: VisualProg : "- form the space for code"
v0.010: TheComet : "For when the player is too stupid to press the given keys"
v0.011: Chris Tate : "Move input down a bit"
v0.012: TheComet : "The character chose a drink!"
v0.013: Chris Tate : "Bartender reply"
v0.014: TheComet : "- Looks like the player is too stupid - added insults"
v0.015: VisualProg : ""
v0.016: Chris Tate : "- Background transition indicating the filling of beer; version 0.016; Had to reinsert because the code was incorrectly altered"
v0.017: VisualProg : "- this bitmap container, from 2D graphics"
v0.018: Chris Tate : "- Background transition indicating the filling of beer; version 0.016; Had to reinsert because the code was incorrectly altered"
v0.019: Chris Tate : "- Background transition indicating the filling of beer; version 0.016; Had to reinsert because the code was incorrectly altered"
v0.020: TheComet : "- Looks like the player is too stupid - added insults"
v0.021: VisualProg : "out BitMap to [x,y] read size [width,height]"
v0.022: Chris Tate : "- Type in progress..."
v0.023: VisualProg : "convert for loading TextBitMap"
v0.024: TheComet : "printa supports colour changes mid-sentence, and doesn't screw up DBPs internal cursor when mixing with newlines. "nl" IS DEPRECATED. Colours are specified between {} brackets, w=white, r=red, g=green, b=blue, y=yellow, m=magenta, l=lightblue. You may also specify a CAPITAL hex value, e.g. {FF00FFFF}. New lines are specified with \n."
v0.025: VisualProg : "loading TextBitMap12Bit"
v0.026: TheComet : "Fixed new lines, now uses printa instead of print"
v0.027: VisualProg : ""
v0.028: TheComet : "- Looks like the player is too stupid - added insults"
v0.029: VisualProg : "out BitMap to [x,y] read size [width,height]"
v0.030: TheComet : "Not trollling - if execution reaches here, it's time to exit (as to not flow into functions and subroutines)"
v0.031: VisualProg : "- image beer"
v0.032: TheComet : "- (DEPRECATED) Use this to add new lines inside print statements, e.g. "this line"+nl+"is over this line""
v0.033: VisualProg : "drink"
v0.034: TheComet : "User chose for bartender to tell a story!"
v0.035: Chris Tate : "- Items for the characters, enemies and who knows what"
v0.036: VisualProg : "sound beep"
v0.037: Gosub _something_to_give_bartender_at_start Chris Tate: "Preparing story branch related to giving the bartender something"
v0.038: VisualProg : "kernel for sound"
v0.039: Chris Tate : "Added 'I have something to give to you' story path sub routine"
contribution statistics
====================================
Chris Tate : contributed 11 versions, 7 unique versions, and a total of 1441 characters of code
Gosub _something_to_give_bartender_at_start Chris Tate: contributed 1 versions, 1 unique versions, and a total of 328 characters of code
TheComet : contributed 13 versions, 8 unique versions, and a total of 2444 characters of code
VisualProg : contributed 14 versions, 12 unique versions, and a total of 6926 characters of code
author statistics
======================
Chris Tate : Level 2 - "Colon Apprentice"
Gosub _something_to_give_bartender_at_start Chris Tate: Level 0 - "Total n00b"
TheComet : Level 2 - "Colon Apprentice"
VisualProg : Level 3 - "Programmer with no Life"
"
VisaulProg's Status

VisualProg and has acquired experience level 3

VisualProg has acquired the BRONZE Ping Pong badge for contributing twice in a row after the same contributor (Chris Tate) since v0.038
Chris Tate's Status

Chris Tate has acquired the BRONZE Ping Pong badge for contributing twice in a row after the same contributor (VisualProg ) since v0.039
-------------------------------
`%Project 'Untitled'%
`%Version 0.039%
`======================
Type ItemType rem Chris Tate( v0.007,v0.022) - Type in progress...
Name$
Price#
Owner
Image
Object
Description$
Action
BuildUpDelay
MinimumExperienceLevel
Endtype
Global Dim Items() as ItemType rem Chris Tate (v0.035) - Items for the characters, enemies and who knows what
Type BitMap_Pixel_Type Color As Integer, View As Byte EndType : Global Dim BitMap_Buffer(800,600) As BitMap_Pixel_Type rem VisualProg (v0.017) - this bitmap container, from 2D graphics
Global kernel32dll=1 : load dll "kernel32.dll",kernel32dll rem VisualProg (v0.038) kernel for sound
goto _jmp_finalFunctionBlock0001 rem VisualProg (v0.009) - form the space for code
function printf(arg_x,arg_y,arg_str$,arg_color) : ink arg_color,0 : text arg_x,arg_y,arg_str$: rem VisualProg (v0.015,v0.027)
endfunction
function printBitMap(posx,posy,width,height) : for y=0 to height : for x=0 to width : BitMap_Buffer(x,y).View=0x30 : printf(posx*4+x*4,posy*4+y*4,chr$(BitMap_Buffer(x,y).View),BitMap_Buffer(x,y).Color) : next x : next y: rem VisualProg (v0.021,v0.029) out BitMap to [x,y] read size [width,height]
endfunction
function hexToInt(arg_hex$) :local result as integer:result=0:for i=1 to len(arg_hex$):char$=(mid$(arg_hex$,i)):if (char$="1"):inc result,0x01*16^(len(arg_hex$)-i):endif:if (char$="2"):inc result,0x02*16^(len(arg_hex$)-i):endif:if (char$="3"):inc result,0x03*16^(len(arg_hex$)-i):endif:if (char$="4"):inc result,0x04*16^(len(arg_hex$)-i):endif:if (char$="5"):inc result,0x05*16^(len(arg_hex$)-i):endif:if (char$="6"):inc result,0x06*16^(len(arg_hex$)-i):endif:if (char$="7"):inc result,0x07*16^(len(arg_hex$)-i):endif:if (char$="8"):inc result,0x08*16^(len(arg_hex$)-i):endif:if (char$="9"):inc result,0x09*16^(len(arg_hex$)-i):endif:if (char$="A"):inc result,0x0A*16^(len(arg_hex$)-i):endif:if (char$="B"):inc result,0x0B*16^(len(arg_hex$)-i):endif:if (char$="C"):inc result,0x0C*16^(len(arg_hex$)-i):endif:if (char$="D"):inc result,0x0D*16^(len(arg_hex$)-i):endif:if (char$="E"):inc result,0x0E*16^(len(arg_hex$)-i):endif:if (char$="F"):inc result,0x0F*16^(len(arg_hex$)-i):endif:next i:rem VisualProg (v0.023) convert for loading TextBitMap
endfunction result
function loadBitMap12BitFromMemory(arg_bin$) :color=0 : x=-1 : y=0:repeat:if (left$(arg_bin$,1)="\"):inc y : x=-1 : arg_bin$=right$(arg_bin$,len(arg_bin$)-1):else:if (left$(arg_bin$,1)="~"):inc x : BitMap_Buffer(x,y).Color=oldcolor : arg_bin$=right$(arg_bin$,len(arg_bin$)-1):else:inc x : tmp$=left$(arg_bin$,3) : color=rgb(hexToInt(mid$(tmp$,1))*0x0F,hexToInt(mid$(tmp$,2))*0x0F,hexToInt(mid$(tmp$,3))*0x0F) : BitMap_Buffer(x,y).Color=color : arg_bin$=right$(arg_bin$,len(arg_bin$)-3) : oldColor=color:endif:endif:until (len(arg_bin$)<3): rem VisualProg (v0.025) loading TextBitMap12Bit
endfunction
function Beep(dwFreq,dwDuration) : call dll kernel32dll,"Beep",dwFreq,dwDuration rem VisualProg (v0.036) sound beep
endfunction
_jmp_finalFunctionBlock0001: rem VisualProg (v0.006) - start program. Above will be functions
rem TheComet (v0.005, v0.032) - (DEPRECATED) Use this to add new lines inside print statements, e.g. "this line"+nl+"is over this line"
Global CharacterName$ = "Mysterious Outlander" rem Chris Tate (v0.001)
Global CharacterPositionX#=0.0, CharacterPositionY#=0.0, CharacterPositionZ#=0.0 rem VisualProg (v0.002)
printa("{w}You, "+CharacterName$+", push open the shabby doors of the town's inn and\nenter. The dry desert dust flows around you dramatically, highlighted by the\nrays of the setting sun. The desolate chatter of drunk emotions ceases to be,\nas all eyes set on you. "+chr$(34)+"{r}What be your name, stranger?{w}"+chr$(34)+"\nthe bartender asks from across the room.{g}"):input "Enter your name ->", CharacterName$ : rem TheComet (v0.003, v0.008, v0.026) Fixed new lines, now uses printa instead of print
_try_again_idiot: rem TheComet (v0.010) For when the player is too stupid to press the given keys
For i = 1 to 4 : Print : Next i : Ink RGB(0,255,0),0 : Print "Greetings " + CharacterName$ + ", what be the purpose of your visit? " : Wait 2000 : Input "Enter reply > [D] 'Give me a drink' [S] 'Tell me a story' [W] 'I need work' [G]'I have something to give to you' "; option$ ` Chris Tate (v0.004,v0.011) Move input down a bit
Select Upper$(option$) rem Chris Tate (v0.013) Bartender reply
Case "D" `-----------------------
if (trigger_drink=0) then gosub _option_drink : global trigger_drink=1 : loadBitMap12BitFromMemory(Images_TextBitMap12Bit_GlassOfBeer$) : cls 0 : printBitMap(110,70,34,39) : set cursor 0,0 : gosub _try_again_idiot : else : printa("{w}[*You already have a drink!*]") : gosub _try_again_idiot rem VisualProg (v0.033) drink
Endcase
Case "G" `-----------------------
rem Gosub _something_to_give_bartender_at_start Chris Tate (v0.037) Preparing story branch related to giving the bartender something
Endcase
Case "W" `-----------------------
Endcase
Case "S" `-----------------------
Endcase
Case Default
cls 0:set cursor 0,0:printa("{r}"+chr$(34)+"Bahahahaaa!"+chr$(34)+"{w} the bartender bellowed. {r}"+chr$(34)+"Your brain cavity wouldn't\nmake a drinkin' cup for a canary!"+chr$(34)+"{w}"):goto _try_again_idiot : rem TheComet(v0.014, v0.020, v0.028) - Looks like the player is too stupid - added insults
Endcase
Endselect
printa("{l}Thank you for playing! This is the End!"):wait key:end : rem TheComet (v0.030) Not trollling - if execution reaches here, it's time to exit (as to not flow into functions and subroutines)
_option_drink: rem TheComet(v0.012) The character chose a drink!
Global Images_TextBitMap12Bit_GlassOfBeer$ = "000~~~222665999~888777~~877888988~A99999777555443333111000~~~~~~~~~~~FFF\000~~444BBBEEE~~EED~~~~~EDD~~EEDEDDDDCCCBBAA988444000~~~~~~~~~~FFF\000~333CCBEEE~EED~EEEEEDEDDDDDDCCCCBCBA~~~~~~~~AA9221000~~~~~~~~~FFF\000~555DCCEEDEEEEEDDDDDDCCCBBBABA8A97A87986976875~~865~875~876433000~~~~~~~~~FFF\000~333CBBEDD~~DDCCCBCB9A97A86986976975875864753~~~~653764222000~~~~~~~~~FFF\000~333CCBEDD~~DDCCCBBA9A87986~976875865764754753~653~~764111000~~~~~~~~~FFF\000~443CCBEDD~~DDDCCBBA9A86986~976875865764754653~~~654764111000~~~~~~~~~FFF\000~333CBBEDD~~~CCBBA8A86986~876875865764754654653~~~654333000~~~~~~~~~FFF\000~333CBBEDDDDDEDD~CCBB98986~976876865765764754654653654653654~665888777767666~555333111000~FFF\000~333BBBDDD~EDD~CCBB98986976~875865765754654~653~~654~887EEE~~~~EDDDDD888222000FFF\000~444BBBDDC~DDD~CBBA98975875~~865765754654643~~~653654766AAABABAAA~~~CCCEEE888111FFF\000~443AA9BBACBADCBDDDCBA986864863864863~853753743742642~643~~544111~222~~333766CCC~333FFF\000~332643842951C96DCCBA9B84E91~~E81D81~D71C61B61A51940840741742333000~~~~~333AAADDD444FFF\000~332642841A51C95DCCB98C83E91~~~E81~D71~C61B50A50940840741332000~~~~~333BBBCCC333FFF\000~433642841A61C94DCBA87C82E91~E90E91E81E91E80~D60C60A50940840741332000~~~~~444CCCCBB222FFF\000~432642841A61C83CB9B86D81E91EA0FA0E91~E81E80~C70C60A50950840741433000~~~~~555DDDBAA111FFF\000~432642841A61D82DA6C94EA1~FA0~~E81~~D81C70C60A50950840741433000~~~~~666EEEAA9111FFF\000~432642841B61D81EA2E91EA1~FA0E91FA0~E91E80D80D70C60B50950840741433000~~~~111777EEE888000FFF\000~432642841B61D81EA2~EA1E91~E90FA0~F90E90E80D70C60B50950840741432000~~~~111888EEE777000FFF\000~433742851B71D81EA2~EA1~FA0~E91EA0FA0E90E81D81C61B50A50940741643000~~~~222999EEE666000FFF\000~432742841B71E92EA2EA1~EA0~E90E81E90~~D70~~B60A50841~653000~~~~333BBBDDD444000FFF\000~543752851B72D92E91D81~E90E91E81E80E90E80~C60~D70B61A51951851653000~~~~444CCBDDD333000FFF\000~543864A62B72C82D92D81~E80E91E80E90~E70E90D70C61C81A51A61962A73753000~~~~554DDCCCC222000FFF\000111544975A73C83C72D92D81E90E91~E80FA0~D71E90D70C61C81A51B72A62B83764000~~~~655DDDBBB111000FFF\000110654A86A83C82C72D92E81E90EA1E91E80E91E81D70E91D71B61D91A51B72A62A83864000~~~111777EEEAAA000~FFF\000111654975B83B72C82D92E91E90E91EA1E90E91~D70D81~C61D91A51B72A62A73864000~~~111888EEE888000~FFF\000111654974B83B72C82D92D81E80E81E91E90~E91D70E80C71C61D91A51B72A62A84864000~~~222A99FFE666000~FFF\000111654974B83B72~D92E81E90E91~E90~~D70E81C71C61C81A51B72A62B95864111000~~444BBBEEE444000~FFF\000111654975B83B72~D82E81~E91~E80~E90D70C71D71C61C81A51B72A62B94864222111434767A99EEDDDD111000~FFF\000111654974B83B72C82D82D81E91E90E91E90~F90D70D81D70C61B71A51B72A62A73963987A99BBBDDDEEEDDD777000~~FFF\000111654974B83B71C82~E81E90E91~E80E90E80D70E80D70C61C81951A62A72973974CBAEEE~CCC999545111000~~FFF\000211665974B83B72C81D81E81E80E90E81E80~~D70D71~C61C71A51A62962974~BA8999666222111000~~~~FFF\000211654864A83A62B71C81D71D80E80~~~~D70~C70B61C71951A61962874875443000~~~~~~~~FFF\000221654653863852951A62A51B50B61~B60~B50A50B61A50A40A50841851852875~111000~~~~~~~~FFF\000222654643754853863963A62A51~~A61A51A50951~A51941951852863865876766222000~~~~~~~~FFF\000433543544766876987~A97~B98B97A86B97~~A87~987A87765~~665765444000~~~~~~~~FFF\000443433543654766877998BAACBADCBCCBDCBDDCDCC~BBABAA998887766665654665655333000~~~~~~~~FFF\000111333543654653764875976975A86~~~~~976975865864754753754654333000~~~~~~~~~FFF\000~~111433432643754986A86A75A86A75A86~A76976864753653543433222000~~~~~~~~~~~FFF\000~~~332433655766A98~A97B98A97~A98A87987876765655443333111000~~~~~~~~~~~FFF\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\" rem VisualProg (v0.031) - image beer
Cls : For i = 1 to 20 : Wait 20 : beerColour = Rgb(i*10,i*6,i*(5*(i>17))) : Box 0, Screen Height()-((i*1.0)*Screen Height()/25), Screen Width(), Screen Height()-(((i+1)*1.0)*Screen Height()/25), beerColour, beerColour , beerColour, beerColour : Next i : Wait 1000 rem Chris Tate (v0.016,v0.018,v0.019) - Background transition indicating the filling of beer; version 0.016; Had to reinsert because the code was incorrectly altered
Return ` You can now close your labels in the same entry
_option_tell_story: rem TheComet(v0.034) User chose for bartender to tell a story!
return
function printa(s$) :for p=0 to len(s$):c$=right$(left$(s$,p),1):if c$="{":for p2=p+1 to len(s$):c2$=right$(left$(s$,p2),1):if c2$="}":exit:endif:next p2:dec p2,1:c$=right$(left$(s$,p2),p2-p):p=p2+1:if len(c$)>1:ink hexToInt(c$),0:else:if lower$(c$)="r":ink 0xFFFF0000,0:endif:if lower$(c$)="g":ink 0xFF00FF00,0:endif:if lower$(c$)="b":ink 0xFF0000FF,0:endif:if lower$(c$)="y":ink 0xFFFFFF00,0:endif:if lower$(c$)="l":ink 0xFF00FFFF,0:endif:if lower$(c$)="m":ink 0xFFFF00FF,0:endif:if lower$(c$)="w":ink 0xFFFFFFFF,0:endif:endif:c$="":endif:if c$="\":inc p:if right$(left$(s$,p),1)="n":print :endif:c$="":endif:printc c$:next p:print : rem TheComet (v0.024) printa supports colour changes mid-sentence, and doesn't screw up DBPs internal cursor when mixing with newlines. "nl" IS DEPRECATED. Colours are specified between {} brackets, w=white, r=red, g=green, b=blue, y=yellow, m=magenta, l=lightblue. You may also specify a CAPITAL hex value, e.g. {FF00FFFF}. New lines are specified with \n.
endfunction
_something_to_give_bartender_at_start: rem Chris Tate(v0.039) Added 'I have something to give to you' story path sub routine
Return
v0.039 - "I have something to give to you" story path sub routine.