TWIN BLADEZ Posted February 26, 2012 Author Share Posted February 26, 2012 In my project, Im making it so you can walk and cast spells at the same time. Now what I want to so is make it so when you walk you have a 25% chance of missing but i don't know the commands to do it. I found where to put it:``` If PlayerSpells(spellslot) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then If Player(MyIndex).Moving = 0 Then Set Buffer = New clsBuffer Buffer.WriteLong CCast Buffer.WriteLong spellslot SendData Buffer.ToArray() Set Buffer = Nothing SpellBuffer = spellslot SpellBufferTimer = GetTickCount Else [u]Call AddText("Cannot cast while walking!", BrightRed)[/u] End If End If```But as I said before. I have no idea what to put there. Also i'm sorry it sounds like i want you to spoon feed me but this little feature will make a huge different.Thanks in Advance Link to comment Share on other sites More sharing options...
kenny92316 Posted March 10, 2012 Share Posted March 10, 2012 In the case else, which would be the character moving, simply place something like:```dim Rnumrnum = rand(100,1)if Rnum => 25 thenSet Buffer = New clsBuffer Buffer.WriteLong CCast Buffer.WriteLong spellslot SendData Buffer.ToArray() Set Buffer = Nothing SpellBuffer = spellslot SpellBufferTimer = GetTickCount exit subelseif Rnum < 25 thenCall AddText("Your attempt to cast the spell has failed!", BrightRed)end if``` 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