Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add spell
#1
figo566 Wrote:Hello everybody

Someone say how to create the poison's spell and the paralysis's for few seconds

that is kinda tricky ^^, if you understan dthe basics it shouldnt be too hard for you, but i am not sure if you know some vb, if you dont, you should go and learn it first, since this is more advanced and i am sure there wont be anyone giving you a tut for this :/

if you need help, add me in msn Smile
Reply
#2
It wouldn't be too hard. Just make a new variable in the player type called "Para As Long". Make a new spell type following the same format as the others. When the spell is casted on the player for that tpye, just do "Para = GetTickCount". Then, add a little thing in "CanPlayerMove" that checks if "Para > GetTickCount + 5000 ' 5000 = 5 seconds" and if it does, just say they can't move.

NOTE: "Para" would actually be written as "Player(index).Para" in the code.
Reply
#3
figo566 Wrote:and the poison ??


you have to save a lot of information into the players info for poisen, like: by whom etc.


as i said, it isnt as easy as it may seem first, it surly isnt for beginners
Reply
#4
Well first you have to et up the spell type. Which I'm not willing to do, it's easy. Then check if the player has been poisoned. If so, send data to the client which starts a timer with and interval of (wahtever you wish) 2 seconds, just for giggles. Also, set up a global variable called PoisonLen. Make sure you send a "flag" to tell that variable how many times to make the timer "tick".

The timer code might look something like this (doe off the top of my head, probably not right):

Code:
Sub Timer1_Timer()
     Dim a as long

     a = a + 1

     If a = PoisonLen then Timer1.Enabled = False

     Player(MyIndex).hp = Player(MyIndex).hp - (dmg amount)
End Sub

This will only effect the player contolling the client as far as I know. You probably want to have eveyr person in game see if a player is poisoned, and if I wasn't so tired right now I could probably lead you on the right path.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)