Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Release] Yay I finally made a basic RPG

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Codeslinger
I post too much
Reputation: 1

Joined: 11 Oct 2007
Posts: 3652
Location: Midwest, United States of America

PostPosted: Fri Mar 05, 2010 8:15 pm    Post subject: [Release] Yay I finally made a basic RPG Reply with quote

http://67.166.118.30/rpg.zip

Controls: Move with directional keys, NPC chat with right CTRL, exit with Esc

Note: Upon startup, press enter to view it normally (will automatically choose best graphics mode). If you get error "unable to create graphics" then open again and type "y" for 1024x768 windowed.

Note 2: You can edit in your own NPCs! Just open "npc.txt" and directions are inside.



Source code at bottom of page, compile with Blitz3D v198

Code:
 File rpg.zip received on 2010.03.05 23:15:51 (UTC)
Antivirus   Version   Last Update   Result
a-squared   4.5.0.50   2010.03.05   -
AhnLab-V3   5.0.0.2   2010.03.05   -
AntiVir   8.2.1.180   2010.03.05   -
Antiy-AVL   2.0.3.7   2010.03.05   -
Authentium   5.2.0.5   2010.03.05   -
Avast   4.8.1351.0   2010.03.05   -
Avast5   5.0.332.0   2010.03.05   -
AVG   9.0.0.787   2010.03.05   -
BitDefender   7.2   2010.03.05   -
CAT-QuickHeal   10.00   2010.03.05   -
ClamAV   0.96.0.0-git   2010.03.05   -
Comodo   4091   2010.02.28   -
DrWeb   5.0.1.12222   2010.03.05   -
eSafe   7.0.17.0   2010.03.04   -
eTrust-Vet   35.2.7342   2010.03.05   -
F-Prot   4.5.1.85   2010.03.05   -
F-Secure   9.0.15370.0   2010.03.05   -
Fortinet   4.0.14.0   2010.03.04   -
GData   19   2010.03.06   -
Ikarus   T3.1.1.80.0   2010.03.05   -
Jiangmin   13.0.900   2010.03.05   -
K7AntiVirus   7.10.990   2010.03.04   -
Kaspersky   7.0.0.125   2010.03.05   -
McAfee   5911   2010.03.05   -
McAfee+Artemis   5911   2010.03.05   -
McAfee-GW-Edition   6.8.5   2010.03.05   -
Microsoft   1.5502   2010.03.06   -
NOD32   4919   2010.03.05   -
Norman   6.04.08   2010.03.05   -
nProtect   2009.1.8.0   2010.03.05   -
Panda   10.0.2.2   2010.03.04   -
PCTools   7.0.3.5   2010.03.04   -
Rising   22.37.04.04   2010.03.05   -
Sophos   4.51.0   2010.03.05   -
Sunbelt   5764   2010.03.06   -
Symantec   20091.2.0.41   2010.03.06   Suspicious.Insight
TheHacker   6.5.1.8.222   2010.03.05   -
TrendMicro   9.120.0.1004   2010.03.05   -
VBA32   3.12.12.2   2010.03.05   -
ViRobot   2010.3.5.2214   2010.03.05   -
VirusBuster   5.0.27.0   2010.03.05   -



Code:
intModes=CountGfxModes() ;find best graphics mode
Global bestw, besth, bestd
For t = 1 To intModes
   
   If GfxModeWidth(t) > bestw
      bestw = GfxModeWidth(t)
   EndIf
   
   If GfxModeHeight(t) > besth
      besth = GfxModeHeight(t)
   EndIf
   
   If GfxModeDepth(t) > bestd
      bestd = GfxModeDepth(t)
   EndIf
   
Next

If Input("Enter safe graphics mode? (y/n)")  = "y"
   bestw=1024
   besth=768
   bestd=0
   windowed=2
EndIf

Graphics bestw,besth,bestd,windowed
SetBuffer BackBuffer()

Global char = LoadImage("char2.png")
Global map = LoadImage("map1.png")
Global map2 = LoadImage("map2.png")
Global map3 = LoadImage("map3.png")
Global map4 = LoadImage("map4.png")
Global map5 = LoadImage("map5.png")
Global map6 = LoadImage("map6.png")
Global map7 = LoadImage("map7.png")
Global map8 = LoadImage("map8.png")
Global map9 = LoadImage("map9.png")

If Not char
   RuntimeError "Could not load char2.png. Please check if it exists, or make sure you extracted first."
   End
EndIf

If Not map
   RuntimeError "Could not load map1.png. Please check if it exists, or make sure you extracted first."
   End
EndIf

MaskImage char, 94, 141, 41

Global playerx, playerxspeed = 12 ;player position and speed variables
Global playery, playeryspeed = 12
Global npcid, currentnpcID ;Most recently issued NPC ID

Const UP_KEY=200, DOWN_KEY=208, LEFT_KEY=203, RIGHT_KEY=205, RIGHT_CTRL=157

Global drawnpctext, npctext$, npcname$; test

font1 = LoadFont("Comic Sans MS",28)
SetFont font1

;main NPC type
Type npc
   Field x, y, npcid, text1$, text2$, text3$, text4$, name$
End Type

;Set up game

npcf = ReadFile("npc.txt")

While Not Eof(npcf)
   xs$=Left(ReadLine(npcf),1)
   If xs = ";"
      While xs=";"
         xs=Left(ReadLine(npcf),1)
      Wend
   EndIf
   x=Int(xs)
   
   Local y=Int(ReadLine(npcf)),name$=ReadLine(npcf),t1$=ReadLine(npcf),t2$=ReadLine(npcf),t3$=ReadLine(npcf),t4$=ReadLine(npcf)
   CreateNPC(x,y,name$,t1$,t2$,t3$,t4$)
   blank$=ReadLine(npcf)
   If blank$ = ""
      DebugLog "np"
   Else
      DebugLog blank$
      RuntimeError("NPC.txt corrupted, please follow the proper format.")
   EndIf
   
Wend
CloseFile(npcf)


Global milliseconds = MilliSecs()
Global millisecs1 = milliseconds
Global gtime=0

;MAIN LOOP
While Not KeyHit(1)
   DetectKeys()
   DrawScreen()
   FPSLimit()
Wend

End

Function CreateNPC(npcx, npcy, name$, itext1$, itext2$, itext3$, itext4$)
   ccnpc.npc = New npc ;Create a new NPC at the given coordinates
   ccnpc\x = npcx
   ccnpc\y = npcy
   ccnpc\npcid = npcID + 1001
   ccnpc\text1$ = itext1$
   ccnpc\text2$ = itext2$
   ccnpc\text3$ = itext3$
   ccnpc\text4$ = itext4$
   ccnpc\name$ = name$
   
   npcID = npcID + 1
End Function


Function DetectKeys() ;Detect which keys were pressed and act accordingly
   If KeyDown(UP_KEY)
      playery = playery - playeryspeed
   EndIf
   
   If KeyDown(DOWN_KEY)
      playery = playery + playeryspeed
   EndIf
   
   If KeyDown(LEFT_KEY)
      playerx = playerx - playerxspeed
   EndIf
   
   If KeyDown(RIGHT_KEY)
      playerx = playerx + playerxspeed
   EndIf
   
   If KeyHit(RIGHT_CTRL) ;Detect if player is talking to an NPC
      If drawnpctext = True
         For cnpc.npc = Each NPC
         If cnpc\npcID = currentnpcID
            Select npctext$
               Case cnpc\text1$
                  npctext$ = cnpc\text2$
               Case cnpc\text2$
                  npctext$ = cnpc\text3$
               Case cnpc\text3$
                  npctext$ = cnpc\text4$
               Case cnpc\text4$
                  npctext$ = ""
                  npcname$ = ""
                  drawnpctext = False
               Default
                  npctext$ = cnpc\text1$
            End Select
            If npctext$ = ""
               drawnpctext = False
               Return
            EndIf
            Exit
         EndIf
         Next
      EndIf
         
      For cnpc.npc = Each npc ;Detect if player is near NPC
         If (Sqr(((playerx - (cnpc\x + (ImageWidth(char)/2)))^2) + ((playery - (cnpc\y + (ImageHeight(char)/2))) ^ 2))) < 190
            drawnpctext = True
            currentnpcID = cnpc\npcID
            If npctext$ = ""
               npctext$ = cnpc\text1$
               npcname$ = cnpc\name$
            EndIf
         EndIf
      
      Next
   EndIf
End Function

Function DrawNPCChat()
   ;draw chat box
   Color(30,40,55)
   Rect(((GraphicsWidth()/2) - (StringWidth(npctext$)/2)), GraphicsHeight() - (GraphicsHeight()/3), StringWidth(npctext$) + 60, 130, True)
   Color(90,75,145)
   Rect(((GraphicsWidth()/2) - (StringWidth(npctext$)/2)), GraphicsHeight() - (GraphicsHeight()/3), StringWidth(npctext$) + 60, 4, True)
   Rect(((GraphicsWidth()/2) - (StringWidth(npctext$)/2)), GraphicsHeight() - (GraphicsHeight()/3), 4, 130, True)
   Rect(((GraphicsWidth()/2) - (StringWidth(npctext$)/2)) + StringWidth(npctext$) + 60, GraphicsHeight() - (GraphicsHeight()/3), 4, 130, True)
   Rect(((GraphicsWidth()/2) - (StringWidth(npctext$)/2)), GraphicsHeight() - (GraphicsHeight()/3) + 130, StringWidth(npctext$) + 64, 4, True)
   
   ;draw text
   Color(250,250,250)
   Text(((GraphicsWidth()/2) - (StringWidth(npctext$)/2)) + 15, (GraphicsHeight() - (GraphicsHeight()/3)) + 10, npcname$)
   Text(((GraphicsWidth()/2) - (StringWidth(npctext$)/2)) + 30, (GraphicsHeight() - (GraphicsHeight()/3)) + 50, npctext$)
End Function

Function FPSLimit()
   time = 0
   Repeat
      milliseconds = ((MilliSecs()-millisecs1))
      Delay(1)
      If time = 0
         time = milliseconds
      EndIf
   Until milliseconds > 16
   If milliseconds > 16
      millisecs1 = MilliSecs()
   EndIf
   
   gtime = time
End Function

Function DrawScreen() ;Render all objects to be displayed
   Cls()
   Local mapx = (-(playerx) + (GraphicsWidth()/2)), mapy = (-(playery) + (GraphicsHeight()/2)) ;calculate map coordinates
   
   DrawImage(map, mapx, mapy) ;draw map
   DrawImage(map, mapx + ImageWidth(map), mapy + ImageHeight(map))
   DrawImage(map, mapx + ImageWidth(map), mapy)
   DrawImage(map, mapx, mapy + ImageHeight(map))
   DrawImage(map, mapx - ImageWidth(map), mapy - ImageHeight(map))
   DrawImage(map, mapx - ImageWidth(map), mapy)
   DrawImage(map, mapx, mapy - ImageHeight(map))
   DrawImage(map, mapx + ImageWidth(map), mapy - ImageHeight(map))
   DrawImage(map, mapx - ImageWidth(map), mapy + ImageHeight(map))
   
   For cnpc.npc = Each npc ;draw NPCs
      DrawImage(char, (cnpc\x - playerx) + (GraphicsWidth()/2), (cnpc\y - playery) + (GraphicsHeight()/2))
      ;Text 50,80,(Sqr(((playerx - (cnpc\x + (ImageWidth(char)/2)))^2) + ((playery - (cnpc\y + (ImageHeight(char)/2))) ^ 2)))
   Next
   
   ;draw main character
   DrawImage(char, (GraphicsWidth()/2) - (ImageWidth(char)/2), (GraphicsHeight()/2) - (ImageHeight(char)/2))
   
   ;draw text
   If drawnpctext = True
      DrawNPCChat()
   EndIf
   
   Text 50,150, currentnpcID
   Text 50,180, gtime
   Flip
End Function
Back to top
View user's profile Send private message MSN Messenger
redslothx
Grandmaster Cheater Supreme
Reputation: 13

Joined: 27 Nov 2006
Posts: 1949

PostPosted: Fri Mar 05, 2010 8:35 pm    Post subject: Reply with quote

it has keylogers


nig why you try 2 key log rs?

_________________
Back to top
View user's profile Send private message
Jake!
Grandmaster Cheater Supreme
Reputation: 4

Joined: 03 Jan 2007
Posts: 1354

PostPosted: Fri Mar 05, 2010 8:38 pm    Post subject: Reply with quote

Never understood why someone would waste their time on shit like this.

If you want to make a game, fucking put some effort into making a good game. Don't waste your time making a half-assed shit-tier game.
Back to top
View user's profile Send private message
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

PostPosted: Fri Mar 05, 2010 8:41 pm    Post subject: Reply with quote

Jake! wrote:
Never understood why someone would waste their time on shit like this.

If you want to make a game, fucking put some effort into making a good game. Don't waste your time making a half-assed shit-tier game.

Holy fuck shit this guy gets it.
Back to top
View user's profile Send private message
fele
Master Cheater
Reputation: 23

Joined: 15 Sep 2007
Posts: 333

PostPosted: Fri Mar 05, 2010 8:41 pm    Post subject: Reply with quote

Jake! wrote:
Never understood why someone would waste their time on shit like this.

If you want to make a game, fucking put some effort into making a good game. Don't waste your time making a half-assed shit-tier game.

But I enjoyed wasting my time with CEFMMO

_________________
Back to top
View user's profile Send private message
br0l0ck
Cheater
Reputation: 63

Joined: 15 Aug 2007
Posts: 38

PostPosted: Fri Mar 05, 2010 8:44 pm    Post subject: Reply with quote

Felechtr wrote:
Jake! wrote:
Never understood why someone would waste their time on shit like this.

If you want to make a game, fucking put some effort into making a good game. Don't waste your time making a half-assed shit-tier game.

But I enjoyed wasting my time with CEFMMO

Link
Back to top
View user's profile Send private message
Codeslinger
I post too much
Reputation: 1

Joined: 11 Oct 2007
Posts: 3652
Location: Midwest, United States of America

PostPosted: Fri Mar 05, 2010 9:31 pm    Post subject: Reply with quote

Seems to be a glitch with the x coordinates for NPCs not working o.0
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites