Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Chronous

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Chronous's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Chronous

    Leaf Village

    I think the map looks pretty good, definitely got a naruto feel to it. The only bad thing i have to say about it at a first glance is that the hokage's heads dont really go with the cliff, maybe a more detailed cliff background would make the heads look less out of place. I
  2. Chronous

    Fishing Code

    Thanks for the suggestions, I used the handlekeypresses method, its working right now :D.
  3. Chronous

    Fishing Code

    Ok so im trying to write some code for a player to fish, ive got it set up to be a scripted tile, that calls my fishing sub when stepped on. So my problem come up because I want my server to watch whether or not a player hits enter while he is on that scripted tile, and if he does it will then execute my "fishing code". I know how to watch for a keypress, but Im not sure how to have the server watch the player while they are in a scripted tile, because its set up to only watch for when a scripted tile is walked onto, but not to continue to watch it, im not sure how to change it or if its possible to do without causing an infinite loop, any help or suggestions on a different way to do fishing system?
  4. Found the problem, I left out an if statement to check for a scripted before calling the Sub
  5. Ok this fix seems to have worked for the incorrect base stat issue, incase anyone else has the same problem im posting my fix. Go to your server in modHandleData find the Packet_UseStatPoint, and replace it with my code below. This fix simply takes off the boost from stats from the users stats before adding the extra stat point. Also note that this fix is for the Crypto Version, and if you are using another version then the same general idea should work. ``` Public Sub Packet_PlayerStatsPacket(ByVal STR As Long, ByVal DEX As Long, ByVal CON As Long, ByVal INTEL As Long, ByVal WIS As Long, ByVal CHA As Long, ByVal MaxExp As Long, ByVal Exp As Long, ByVal lvl As Long) Dim SubStr As Long, SubDex As Long, SubCon As Long, SubIntel As Long, SubWis As Long, SubCha As Long SubStr = 0 SubDex = 0 SubCon = 0 SubIntel = 0 SubWis = 0 SubCha = 0 If GetPlayerWeaponSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddCHA End If If GetPlayerArmorSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddCHA End If If GetPlayerShieldSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddCHA End If If GetPlayerHelmetSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddCHA End If If GetPlayerLegsSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddCHA End If If GetPlayerRingSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddCHA End If If GetPlayerNecklaceSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddCHA End If If SubStr > 0 Then frmStable.lblSTR.Caption = Val(STR) - SubStr & " (+" & SubStr & ")" Else frmStable.lblSTR.Caption = Val(STR) End If If SubDex > 0 Then frmStable.lblDEX.Caption = Val(DEX) - SubDex & " (+" & SubDex & ")" Else frmStable.lblDEX.Caption = Val(DEX) End If If SubCon > 0 Then frmStable.lblCON.Caption = Val(CON) - SubCon & " (+" & SubCon & ")" Else frmStable.lblCON.Caption = Val(CON) End If If SubIntel > 0 Then frmStable.lblINTEL.Caption = Val(INTEL) - SubIntel & " (+" & SubIntel & ")" Else frmStable.lblINTEL.Caption = Val(INTEL) End If If SubWis > 0 Then frmStable.lblWIS.Caption = Val(WIS) - SubWis & " (+" & SubWis & ")" Else frmStable.lblWIS.Caption = Val(WIS) End If If SubCha > 0 Then frmStable.lblCHA.Caption = Val(CHA) - SubCha & " (+" & SubCha & ")" Else frmStable.lblCHA.Caption = Val(CHA) End If frmStable.lblEXP.Caption = Val(Exp) & " / " & Val(MaxExp) frmStable.shpTNL.Width = (((Val(Exp)) / (Val(MaxExp))) * 150) frmStable.lblLevel.Caption = Val(lvl) Player(MyIndex).Level = Val(lvl) End Sub ```
  6. Ok I think I might have found the issue. Whenever the program is calculating players stats it adds in the Stats boost from weapons and returns the player strength, which is now the weapon strength + the base Strength from the player. So if you are getting a stat boost from a weapon that is equipped and try to add your stat point, the server checks only for playerStrength which is has been calculated to be their Stat + there weapon boost stat. So now you add a stat point, and it resets your base strength to be Your Base + Your Weapon + 1, so I think all i have to do is edit the servers use stat point area so that is subtracts the weapon boost from the playersStat before it adds 1\. Does this sound right or way off base? Im gonna try it out and ill update this post after i test it
  7. Im not sure if this is an issue with just the Crypto version or not, but when you equip an item that offers a stat boost, and take it off, it shows your stats weird. For example you equip a weapon that gives 5 STR points. STR before equiping weapon 12 (All Variations that happen from equipping and un-equipping) STR 12(+5) (I assume this is the correct way it is supposed to display) STR 7(+5) (After the weapon is unequipped, which is technically the correct amount of points, but they should all be base) STR 17 (While equiped) Im not sure if this is changing the actual stat or if it is just messing with the display. I was just wondering if anyone knew of this problem and / or a fix for it. If not just letting me know where the items stats are added to the players stats in the coding would be a great help so i dont have to go searching through it all. Thanks. Also yes i know that the added up values are always correct however it just bothers me that it switches between having (+5) and not having it. Also I just tested it a little further, and if i level up STR while the weapon with the +5 stat boost is equiped it changed my stat by 6 instead of by 1. Before using a stat point STR = 12(+5) After using stat point STR = 18(+5) and unequiping the weapon shows a base stat of 18 from then on out.
  8. Ok so im not exactly asking for a fix but i find this a bit weird. So I open up the source code for the first time, move the GUI for frmStable around a little bit, so that the picPlayerSpells is on the right side of the game screen. Now i go into the source code and remove any like that says picPlayerSpells.Visible = False. Now when I learn or unlearn a spell it doesnt update the list until you log off and log back into the game. It doesn't seem like just changing lines that change visibility should have this effect on the list being updated. And I am sure that I havent accidentally changed any code other than removing picPlayerSpells.Visible, Ive done this a couple of time to make sure that this is what was causing the problem.
  9. Chronous

    Stats

    I also gave a far to long description on it here http://www.touchofdeathforums.com/smf/index.php/topic,60558.msg639515/topicseen.html#new
  10. Sorry about not updating this sooner, I switched over to origins, which has 6 different stats like I want, and I dont think Ill have a problem editing how they work. Thanks though :D
  11. Thanks that was the issue. I feel silly that it was such an easy fix :D
  12. Im trying to change my MAX_CHAR constant to 7 however whenever I changed it off of the "3" that it comes scripted with I get a "Subscript out of range" error. On the line of code Name = parse(n) from the block of code at the end of this. Its running through this line at least 4 times, creating the error 5th. However Im not sure why this is going out of range, since im not exactly sure what range it is trying to stay within. Any help would be appreciated thanks. ``` If casestring = "allchars" Then n = 1 frmChars.Visible = True frmSendGetData.Visible = False frmChars.lstChars.Clear For i = 1 To MAX_CHARS Name = parse(n) If Trim$(Name) = vbNullString Then frmChars.lstChars.addItem "Free Character Slot" Else Msg = parse(n + 1) Level = Val(parse(n + 2)) frmChars.lstChars.addItem Name & " a level " & Level & " " & Msg End If n = n + 3 Next i frmChars.lstChars.ListIndex = 0 Exit Sub End If ```
×
×
  • Create New...