haileelipse Posted February 21, 2012 Author Share Posted February 21, 2012 I have added sleep, silence, bind to my game instead of just stunBind ; Stops them movingSleep ; stops them doing anything untill they take damageSilence ; stops castingStun ; stops everythingI added spell_type_unstun, spell_type_unsilence, spell_type_unsleep, spell_type_unbind as well to counteract these imparing spells.I added checks to castspell;If silenceduration > 0 then exitsubIf Sleepduration > 0 then exitsubIf stunduration > 0 then exitsuband added to walkingsubif bindduration > 0 then exit subif stunduration > 0 then exit subif sleepduration > 0 then exit subI then added this to checks to see if im casting movement unimpairing abilities as thats all i want to be able to cast when silenced / stuned or asleep.so in cast sub i usedif silenceduration > 0 then If spell(spellslot).type <> spell_type_unsilence then Exit Sub End ifEnd ifif Sleepduration > 0 then If spell(spellslot).type <> spell_type_unsleep then Exit Sub End ifEnd ifif Stunduration> 0 then If spell(spellslot).type <> spell_type_un stunthen Exit Sub End ifEnd ifNow the problem is for some reason when stuned i can only cast unsleep, when silenced i can only cast unbind and when asleep I can only cast unsilence >.<….Ive checked spell_types as I thought they must be getting muked up but there all in the same order so what could be causing this mix up any ideas? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted February 21, 2012 Share Posted February 21, 2012 I'm going to move this over to the Source Questions board, if you don't mind.Alright, make sure that the order for the spell selection list client-side is the same as the order you use for the spell constants server-side (you said you did this, make sure). Make sure that the appropriate packets are sent to set off each of these (like the packet for Silence doesn't send the packet for Sleep). Link to comment Share on other sites More sharing options...
haileelipse Posted February 21, 2012 Author Share Posted February 21, 2012 Sorry thought I placed it there :S thanks for the post I checked looks right it is meant to start at 0 right? xD' Spell constants both client and serverPublic Const SPELL_TYPE_DAMAGEHP As Byte = 0Public Const SPELL_TYPE_DAMAGEMP As Byte = 1Public Const SPELL_TYPE_HEALHP As Byte = 2Public Const SPELL_TYPE_HEALMP As Byte = 3Public Const SPELL_TYPE_WARP As Byte = 4Public Const SPELL_TYPE_PET As Byte = 5Public Const SPELL_TYPE_TRANSFORMATION As Byte = 6Public Const SPELL_TYPE_BUFFER As Byte = 7Public Const SPELL_TYPE_Flash As Byte = 8Public Const SPELL_TYPE_unstun As Byte = 9Public Const SPELL_TYPE_unbind As Byte = 10Public Const SPELL_TYPE_unsilence As Byte = 11Public Const SPELL_TYPE_unsleep As Byte = 12Public Const SPELL_TYPE_undo As Byte = 13Public Const SPELL_TYPE_itemsummon As Byte = 14spell selection listDamage HPDamage MPHeal HPHeal MPWarpPetTransformBuffFlashunstununbindunsilenceunsleepundoItemsummon Link to comment Share on other sites More sharing options...
kenny92316 Posted March 10, 2012 Share Posted March 10, 2012 Perhaps trying something along the lines of:```if Sleepduration > 0 then If spell(spellslot).type = spell_type_unsleep then'code for casting here else Exit Sub End ifEnd 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