kris_hole Posted September 8, 2009 Share Posted September 8, 2009 whats the client side for that? the PLAYERNEWXY i use 2.7 for kryce so :P Link to comment Share on other sites More sharing options...
Scorpious2k Posted September 8, 2009 Author Share Posted September 8, 2009 @[THE-KRIS:> link=topic=51502.msg541823#msg541823 date=1252415790]> whats the client side for that? the PLAYERNEWXY i use 2.7 for kryce so :PI don't think there is a client side version of it. Did you get a compile error? Link to comment Share on other sites More sharing options...
kris_hole Posted September 8, 2009 Share Posted September 8, 2009 no i mean its SendDataTo, meaning theres a bit in the packethandler on the client source. whats the code in that bit so i can put it in :P in modhandledata on the client Link to comment Share on other sites More sharing options...
Scorpious2k Posted September 8, 2009 Author Share Posted September 8, 2009 @[THE-KRIS:> link=topic=51502.msg541823#msg541823 date=1252415790]> whats the client side for that? the PLAYERNEWXY i use 2.7 for kryce so :POH, OK, got it.In **modHandleData Sub HandleData()**at the end, before```End Sub```insert``` If (casestring = "playernewxy") Then X = Val(parse(1)) y = Val(parse(2)) If Not GetPlayerX(MyIndex) = X Then Call SetPlayerX(MyIndex, X) If Not GetPlayerY(MyIndex) = y Then Call SetPlayerY(MyIndex, y) Exit Sub End If``` Link to comment Share on other sites More sharing options...
Aydan Posted September 8, 2009 Share Posted September 8, 2009 I tried adding it in but I had an error server side with this lineSendPlayerNewXY(index)Any ideas? I'm using 2.7 as well so…thats the only error I have. Link to comment Share on other sites More sharing options...
Scorpious2k Posted September 8, 2009 Author Share Posted September 8, 2009 @AydanWatkins:> I tried adding it in but I had an error server side with this line> > SendPlayerNewXY(index)> > Any ideas? I'm using 2.7 as well so…> > thats the only error I have.I already answered this for 2.7 server:http://www.touchofdeathforums.com/smf/index.php/topic,51502.msg541189.html#msg541189for the 2.7 client:http://www.touchofdeathforums.com/smf/index.php/topic,51502.msg541898.html#msg541898 Link to comment Share on other sites More sharing options...
Kimimaru Posted September 9, 2009 Share Posted September 9, 2009 @Scorpious2k:> OH, OK, got it.> > In **modHandleData Sub HandleData()**> > at the end, before> > ```> End Sub> ```> insert> > ```> If (casestring = "playernewxy") Then> X = Val(parse(1))> y = Val(parse(2))> > If Not GetPlayerX(MyIndex) = X Then Call SetPlayerX(MyIndex, X)> If Not GetPlayerY(MyIndex) = y Then Call SetPlayerY(MyIndex, y)> > Exit Sub> End If> ```Do we need to add this, or is it just something [THE-KRIS] asked for? Link to comment Share on other sites More sharing options...
Scorpious2k Posted September 9, 2009 Author Share Posted September 9, 2009 @Kimimaru:> Do we need to add this, or is it just something [THE-KRIS] asked for?If you don't have it in the client, then I think you would need it. Link to comment Share on other sites More sharing options...
damian666 Posted September 9, 2009 Share Posted September 9, 2009 its needed, period XDDamian666 Link to comment Share on other sites More sharing options...
kris_hole Posted September 9, 2009 Share Posted September 9, 2009 if your running eclipse 2.7 or earlier (why earlier i dont know) but if you are then you need that in the client. Link to comment Share on other sites More sharing options...
Kimimaru Posted September 10, 2009 Share Posted September 10, 2009 Okay, thanks guys! I just checked, and I already have it in there. It's pretty strange how I didn't notice putting it in. Link to comment Share on other sites More sharing options...
Scorpious2k Posted September 14, 2009 Author Share Posted September 14, 2009 The eagle-eyed Damian666, found anotther problem in the code when changing the max number of characters;. This will fix it and potentially any others involving new accounts/characters.in **modDatabase Sub ClearChar()**after``` Dim n As Long```insert``` ' version info Player(index).Char(CharNum).Vflag = 128 Player(index).Char(CharNum).Ver = 2 Player(index).Char(CharNum).SubVer = 8 Player(index).Char(CharNum).Rel = 0```This early posts that tell how to install this fix has been edited to include this, but if you have it already in you will want to add this.Thank you again, Damian666. Link to comment Share on other sites More sharing options...
damian666 Posted September 14, 2009 Share Posted September 14, 2009 no problem man, thank you for fixing this damn bug for us :)Damian666 Link to comment Share on other sites More sharing options...
kris_hole Posted September 15, 2009 Share Posted September 15, 2009 for whatever reson 2.7 doesnt like setting the players x below 0 (ie -1)so if you ARE using 2.7 and you have problems going left to the next map then replace```' update it to match client - this will be correct 99% of the time Call SetPlayerX(Index, Xpos) Call SetPlayerY(Index, Ypos) ```with[code=vb' update it to match client - this will be correct 99% of the timeIf Xpos >= 0 Then Call SetPlayerX(Index, Xpos)End If Call SetPlayerY(Index, Ypos)that works :Pand that also means you dont have to change the player rec. cos i didnt :P Link to comment Share on other sites More sharing options...
damian666 Posted September 15, 2009 Share Posted September 15, 2009 thats because you have to add ALL of the code mate, not just a piece of it…you will get in trouble.Damian666 Link to comment Share on other sites More sharing options...
kris_hole Posted September 15, 2009 Share Posted September 15, 2009 i wont :Pi give credits :P and i sed the code that was useful to me :P Link to comment Share on other sites More sharing options...
damian666 Posted September 15, 2009 Share Posted September 15, 2009 thats not what i meant XDi mean if you only use part of such a extensive piece of code, you get in trouble XDDamian666 Link to comment Share on other sites More sharing options...
kris_hole Posted September 15, 2009 Share Posted September 15, 2009 why would i get in trouble :( and i ment to put Used not sed, my U key is fucked Link to comment Share on other sites More sharing options...
damian666 Posted September 15, 2009 Share Posted September 15, 2009 trouble like in getting problems with the code man XDDamian666 Link to comment Share on other sites More sharing options...
kris_hole Posted September 15, 2009 Share Posted September 15, 2009 oh nah mine works fine. the only thing i left out is converting the player.dats to teh new ones from the byte to integers but thats not needed. not if you do what i did. mine works fine now i tested it with warps, gm warps, blocks, sadscript blocks etc :P Link to comment Share on other sites More sharing options...
damian666 Posted September 15, 2009 Share Posted September 15, 2009 if you say so, but i believe the rest of the code is using that piece, but whatever XDDamian666 Link to comment Share on other sites More sharing options...
kris_hole Posted September 15, 2009 Share Posted September 15, 2009 meh it worked for me :P also (off topic) CHICKEN DIPPERS!!!!! i just cooked some :P Link to comment Share on other sites More sharing options...
Pikachu Posted September 17, 2009 Share Posted September 17, 2009 Wouldn't updating a players location based on the clients location create some security holes? Someone with the proper tools (packet editor) would be able to warp on a map by just sending a PlayerMove packet with the coordinates they want to go to. Then they can skip blocks, scripts, etc. Link to comment Share on other sites More sharing options...
Scorpious2k Posted September 17, 2009 Author Share Posted September 17, 2009 It's possible, but with an open source client you really don't have much security anyway. There *are* a few rudimentary hacker checks in the code.Something I have in my "to-do" list is to replace the text packet names (ie "playermove") with shorter codes to reduce bandwidth. I will be doing this by making constants with the packet name and assigning values to them, Using obfuscating values would help in security. Link to comment Share on other sites More sharing options...
damian666 Posted September 19, 2009 Share Posted September 19, 2009 there seems to be a small problem, Stable is build of 2.7, and that doesnt have the newplayerxy sub in client.couldyou please tell me where exactly it goes in the client?i came far, but i just want to know if i got it all.Damian666 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