Diskmaster Posted July 31, 2009 Author Share Posted July 31, 2009 Hi, I am trying to make the SPEED stat have a reason so, I am making it so you get faster depending on what lvl in speed u r Here is the script, I just need a proofread, oh, and I have connected these to the Log on sub or whatever:```Sub CheckSpeed(index)If GetPlayerSPEED(Index) > 1999 ThenCall SetPlayerSpeed(index, "Run", 16)Call SetPlayerSpeed(index, "Walk", 6)ElseIf GetPlayerSPEED(Index) > 1499 ThenCall SetPlayerSpeed(index, "Run", 12)Call SetPlayerSpeed(index, "Walk", 6)ElseCall CheckSpeed2(index)End IfEnd IfEnd SubSub CheckSpeed2(index)If GetPlayerSPEED( Index) > 999 ThenCall SetPlayerSpeed(index, "Run", 10)ElseIf GetPlayerSPEED( Index) > 499 ThenCall SetPlayerSpeed(index, "Run", 9)ElseCall SetPlayerSpeed(index, "Walk", 4)Call SetPlayerSpeed(index, "Run", 8)End IfEnd If End Sub ```Any Suggestions? I thought it was good!??! Link to comment Share on other sites More sharing options...
emblem Posted July 31, 2009 Share Posted July 31, 2009 ```Sub CheckSpeed(index) If GetPlayerSPEED(Index) > 1999 Then Call SetPlayerSpeed(index, "Run", 16) Call SetPlayerSpeed(index, "Walk", 8) ElseIf GetPlayerSPEED(Index) > 1499 Then Call SetPlayerSpeed(index, "Run", 12) Call SetPlayerSpeed(index, "Walk", 6) ElseIf GetPlayerSPEED( Index) > 999 Then Call SetPlayerSpeed(index, "Run", 10) Call SetPlayerSpeed(index, "Walk", 5) ElseIf GetPlayerSPEED( Index) > 499 Then Call SetPlayerSpeed(index, "Run", 9) Call SetPlayerSpeed(index, "Walk", 5) Else Call SetPlayerSpeed(index, "Run", 8) Call SetPlayerSpeed(index, "Walk", 4) End IfEnd Sub```Although, I can already see a problem.The speeds have to be a power of two. Link to comment Share on other sites More sharing options...
Diskmaster Posted July 31, 2009 Author Share Posted July 31, 2009 so, I can't use the code u posted above, or I can?That looks like it would work tho, thx! Link to comment Share on other sites More sharing options...
emblem Posted July 31, 2009 Share Posted July 31, 2009 @Diskmaster:> so, I can't use the code u posted above, or I can?You can, it's just a really bad way to do it.Also, you learned about the ElseIf statement! Link to comment Share on other sites More sharing options...
Diskmaster Posted July 31, 2009 Author Share Posted July 31, 2009 Ty Umbra, I will make something in my game to credit you for helping me so much (same as Admiral Refuge and a few other ppl)EDIT: It doesn't work, any sudgestions? Link to comment Share on other sites More sharing options...
Diskmaster Posted July 31, 2009 Author Share Posted July 31, 2009 It doesn't work, any suggestions? Link to comment Share on other sites More sharing options...
DarkSpine Posted August 1, 2009 Share Posted August 1, 2009 It is:```Call SetSpeed(Index, "Walk", 4)```Or```Call SetSpeed(Index, "Run", 8)```Except you can replace the numbers, SetPlayerSpeed(Index, "Walk", 8) Is trying to set the player's speed stat to "Walk", and it doesn't know what to do with the comma and the 8 either.Also, if it doesn't work with setspeed, then that means your client is "Anti-Speedhack"d, making that command useless >.< Link to comment Share on other sites More sharing options...
Owen F Posted August 1, 2009 Share Posted August 1, 2009 speed always had a reason.Go to data.ini and go to SPRunning=0 change to =1.. Link to comment Share on other sites More sharing options...
Diskmaster Posted August 1, 2009 Author Share Posted August 1, 2009 I did the changing sprunning, but higher lvls never run out of speed! (PS, thx Spech for catching me on that, I didn't notice) Link to comment Share on other sites More sharing options...
DarkSpine Posted August 1, 2009 Share Posted August 1, 2009 Yeh, your welcome diskmaster. 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