hisherwin Posted September 22, 2012 Author Share Posted September 22, 2012 I don't recommend you to use this because its only for pokemon gamesTo all PMD Lovers!! BEHOLD The Noob Code Belly system!!I called it Noob Code because the code was too messy . I don't know how to clean it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)Information: I made a New Map Moral , Like MAP_MORAL_DUNGEON .. On that map you will lose Belly.. I will also explain how i made this System , Well we can also called this System as Hunger System . When your belly reach to 0 and your still moving , you will lose healthSorry for my EnglishProblems:The major 1 Problem is when you log out and log in again your belly will turn into 100 again.. I don't know how to fix that .. So if anyone can fix it . i'll appriciate your help!!Now let's start it .. The Belly Code is on the Client Side , And the HP Reduction Code is on Server Side~Client Side~On ModGameLogic find "CheckMovement" at "Player(MyIndex).Moving = MOVING_RUNNING" Add this below```If Map.Moral = MAP_MORAL_DUNGEON ThenIf frmMain.lblBelly.Caption = "0" ThenSendBellyElsefrmMain.lblBelly.Caption = Val(frmMain.lblBelly) - 1End IfElsefrmMain.lblBelly.Caption = "100"End If```You can also add it on "Player(MyIndex).Moving = MOVING_WALKING"Now formwork , At frmMain add a lblBelly and make its caption "100" or any number you want ..- at frmEditor_Map Properties add this on Morals "Dungeon"At ModConstant on MapMorals add this```Public Const MAP_MORAL_DUNGEON As Byte = 2```Now at UpdateDrawMapName add Replace the whole sub into this```Public Sub UpdateDrawMapName()' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerDrawMapNameX = Camera.Left + ((MAX_MAPX + 1) * PIC_X / 2) - getWidth(TexthDC, Trim$(Map.Name))DrawMapNameY = Camera.top + 1Select Case Map.MoralCase MAP_MORAL_NONEDrawMapNameColor = QBColor(BrightRed)Case MAP_MORAL_SAFEDrawMapNameColor = QBColor(White)Case MAP_MORAL_DUNGEONDrawMapNameColor = QBColor(Black)Case ElseDrawMapNameColor = QBColor(White)End Select' Error handlerExit Suberrorhandler:HandleError "UpdateDrawMapName", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```at HandlePLayerHP add this below the sub```If frmMain.lblHP.Caption = "0/" & GetPlayerMaxVital(MyIndex, Vitals.HP) ThenSendDeadElse' Send NoneEnd If```at clientTCP Add this at the bottom```Sub SendBelly()Dim Buffer As clsBufferSet Buffer = New clsBufferBuffer.WriteLong CBellySendData Buffer.ToArray()Set Buffer = NothingEnd SubSub SendDead()Dim Buffer As clsBufferSet Buffer = New clsBufferBuffer.WriteLong CDeadSendData Buffer.ToArray()Set Buffer = NothingEnd Sub```at Enumeration add this above CMSG_COUNT```CBellyCDead```at the same mod add this above SMSG_COUNT```SRestartBelly```At InitMessages add this```HandleDataSub(SRestartBelly) = GetAddress(AddressOf HandleRestartBelly)```at the bottom of the sub add this```Private Sub HandleSendPing(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)frmMain.lblBelly.Caption = "100"End Sub```~Server Side~At Map constants at modConstants add this```Public Const MAP_MORAL_DUNGEON As byte = 2```at Enumeration add this above CMSG_COUNT```CBellyCDead```at the same mod add this above SMSG_COUNT```SRestartBelly```At the bottom of ServerTCP Add this```Sub SendRestartBelly(ByVal index As Long)Dim buffer As clsBufferSet buffer = New clsBufferbuffer.WriteLong SRestartBellySendDataTo index, buffer.ToArray()Set buffer = NothingEnd Sub```Add this at InitMessages```HandleDataSub(CBelly) = GetAddress(AddressOf HandleBelly)HandleDataSub(CDead) = GetAddress(AddressOf HandleDead)```At the bottom of the mod add this```Sub HandleBelly(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim x As Longx = rand(5, 10)If Player(index).Vital(Vitals.HP) <= 20 ThenPlayer(index).Vital(Vitals.HP) = Player(index).Vital(Vitals.HP) - 1ElsePlayer(index).Vital(Vitals.HP) = Player(index).Vital(Vitals.HP) - xEnd IfSendVital index, HPEnd SubSub HandleDead(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Call OnDeath(index)End Sub```at sub onDeath add this after Dim i As Long```SendRestartBelly (index)```If i miss something please notice me..If you saw some bugs , Please Notice me againAnd if you want me to clean it , Please GET OUT! Link to comment Share on other sites More sharing options...
Zzbrandon Posted September 22, 2012 Share Posted September 22, 2012 Belly lol but nice I like it ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
hisherwin Posted September 22, 2012 Author Share Posted September 22, 2012 You tried it? Link to comment Share on other sites More sharing options...
kibbelz Posted September 22, 2012 Share Posted September 22, 2012 From looking at the code it takes only 100 steps to do damage. This will anoy players like hell and they will not play a game with that feature. I suggest making the -1 for every 10 steps so then it will be 1000 steps to do damage which is a bit more reasonable and like the PMD series. Keep programming Sherwin.~Kibbelz Link to comment Share on other sites More sharing options...
hisherwin Posted September 23, 2012 Author Share Posted September 23, 2012 > From looking at the code it takes only 100 steps to do damage. This will anoy players like hell and they will not play a game with that feature. I suggest making the -1 for every 10 steps so then it will be 1000 steps to do damage which is a bit more reasonable and like the PMD series. Keep programming Sherwin.> > ~KibbelzI saw that too .. I'm trying to use Rand Function to make it fix.. Link to comment Share on other sites More sharing options...
Link Posted September 23, 2012 Share Posted September 23, 2012 Edit: Speculating. Link to comment Share on other sites More sharing options...
Joyce Posted September 24, 2012 Share Posted September 24, 2012 Edited the title, I can't be the only person here that went like "What on earth is this..? And why is the word belly used in such a redicilous manner?" Link to comment Share on other sites More sharing options...
Exception Posted September 24, 2012 Share Posted September 24, 2012 > And why is the word belly used in such a redicilous manner?"Pokémon Mystery Dungeon. Link to comment Share on other sites More sharing options...
Joyce Posted September 24, 2012 Share Posted September 24, 2012 Which is? Link to comment Share on other sites More sharing options...
Exception Posted September 24, 2012 Share Posted September 24, 2012 Someone search it on Bulbapedia or Serebii for me, and show it to Joyce, it's blocked on this school network. ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Growlith1223 Posted September 24, 2012 Share Posted September 24, 2012 http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Mystery_Dungeon here ya go ^^ Link to comment Share on other sites More sharing options...
hisherwin Posted September 30, 2012 Author Share Posted September 30, 2012 Tut was too buggy , recommend not to use it.. I'll find a way to make a Fixed one. Link to comment Share on other sites More sharing options...
Justn Posted October 1, 2012 Share Posted October 1, 2012 I have a more traditional hunger system (not based on steps or pokemon related) If anyone needs it let me know and ill make a tutorial Link to comment Share on other sites More sharing options...
or3o Posted October 2, 2012 Share Posted October 2, 2012 yea justn seems legit Link to comment Share on other sites More sharing options...
Guest Posted October 2, 2012 Share Posted October 2, 2012 You've done it the most awkward way possible. Make a timer in the gameloop that either decreases your hunger at certain intervals or randomly (If rand(1, 50) = 50 then Player(index).Hunger = Player(index).Hunger - 1, etc). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now