iam need some advices

09/21/2011 04:09 asdalhog#1
all look for this pic
i try to make this skill
when i make it attack for monster in spawn
it's attack the monster but i can't attack again
must wait for the next xp full
can anyone advice me what i can do

[Only registered and activated users can see links. Click Here To Register...]
09/21/2011 04:50 PsiKiller#2
first of all put code here -.- no one can help you with out of basic source of the skill
09/21/2011 04:58 asdalhog#3
Quote:
Originally Posted by PsiKiller View Post
first of all put code here -.- no one can help you with out of basic source of the skill
here the code
Code:
  //ChainBolt
                                case 10309:
                                    {
                                        if (attacked == null)
                                            return;
                                        

                                        if (CanUseSpell(spell, attacker.Owner))
                                        {
                                            PrepareSpell(spell, attacker.Owner);
                                            SpellUse suse = new SpellUse(true);
                                            suse.Attacker = attacker.UID;
                                            suse.SpellID = spell.ID;
                                            suse.SpellLevel = spell.Level;
                                            suse.X = X;
                                            suse.Y = Y;
                                            
                                            Sector sector = new Sector(attacker.X, attacker.Y, X, Y);
                                            sector.Arrange(spell.Sector, spell.Distance);
                                            for (int c = 0; c < attacker.Owner.Screen.Objects.Count; c++)
                                            {
                                                //For a multi threaded application, while we go through the collection
                                                //the collection might change. We will make sure that we wont go off  
                                                //the limits with a check.
                                                if (c >= attacker.Owner.Screen.Objects.Count)
                                                    break;
                                                Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c];
                                                if (_obj == null)
                                                    continue;
                                                if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
                                                {
                                                    attacked = _obj as Entity;

                                                    if (sector.Inside(attacked.X, attacked.Y))
                                                    {
                                                        if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                        {
                                                            uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell);

                                                            damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell);

                                                            suse.Targets.Add(attacked.UID, damage);
                                                        }
                                                    }
                                                }
                                                else if (_obj.MapObjType == MapObjectType.SobNpc)
                                                {
                                                    attackedsob = _obj as SobNpcSpawn;

                                                    if (sector.Inside(attackedsob.X, attackedsob.Y))
                                                    {
                                                        if (CanAttack(attacker, attackedsob, spell))
                                                        {
                                                            uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell);

                                                            ReceiveAttack(attacker, attackedsob, attack, damage, spell);

                                                            suse.Targets.Add(attackedsob.UID, damage);
                                                        }
                                                    }
                                                }
                                            }
                                            attacker.Owner.Screen.SendScreen(suse, true);
                                        }
                                        break;
                                    }
09/21/2011 05:21 pro4never#4
Check your PrepareSpell.

I can guarantee you that it's removing your startXP flag which is required for the spell to be able to cast.


Think of it like superman.

The client uses the skill, the server checks if you have xp mode ready and if so removes it and performs skill activation.

That's EXACTLY what's happening here but because you've already used it, and the xp flag has been removed you cannot use it again.
09/21/2011 05:45 asdalhog#5
Quote:
Originally Posted by pro4never View Post
Check your PrepareSpell.

I can guarantee you that it's removing your startXP flag which is required for the spell to be able to cast.


Think of it like superman.

The client uses the skill, the server checks if you have xp mode ready and if so removes it and performs skill activation.

That's EXACTLY what's happening here but because you've already used it, and the xp flag has been removed you cannot use it again.
i know that but i need to make it time like cycolne

but when i make it's attack one time

i have idea if i can make this skill take from stamina not xp
.......lol i can't thinking

Quote:
Originally Posted by pro4never View Post
Check your PrepareSpell.

I can guarantee you that it's removing your startXP flag which is required for the spell to be able to cast.


Think of it like superman.

The client uses the skill, the server checks if you have xp mode ready and if so removes it and performs skill activation.

That's EXACTLY what's happening here but because you've already used it, and the xp flag has been removed you cannot use it again.
rely big thank for ur helpful the skill work now
thank u pro4never
now i can attack but i have another
Problem
i add time falg but when time end flag dosnt remov
Code:
attacked.AddFlag2(Update.Flags2.ChainBoltActive);
[Only registered and activated users can see links. Click Here To Register...]

the skill done thanks for help