level 140 effect

04/19/2013 01:00 LordGragen.#1
hey guys, so since my project have no reborn system i cant use the 2reborn effect that go on you every 10sec.

so i wane create something that when you hit level 140, you get that effect on you every 10sec

so far i came up with this


Code:
  #region level 140 effect

           if (client.Entity.Level == 140)
            {
                _String str = new _String(true);
                str.UID = client.Entity.UID;
                str.TextsCount = 1;
                str.Type = _String.Effect;
                str.Texts.Add("good");  // good is the effect folder name
                client.SendScreen(str, true);
            }
            #endregion level 140 effect
now if you guys can put me in the right track i will be thankful. never done anything like this.
04/19/2013 01:26 Spirited#2
The best way would to make that client sided by editing statuseffect.ini (and the files for adding the effect to the client which I assume you know how to do). That way, you can send the effect as a status (which is sent in the spawn packet and such).
04/19/2013 02:13 LordGragen.#3
okay so for the first part i did it i guess

[Only registered and activated users can see links. Click Here To Register...]

but for the 2nd part can you explain more please. coz i sow allot of stuff in there that the project is using and i have no idea how its working. so a bit more explaining will be good.

i also searched my projct found
Code:
StatusEffect = 25,
thats all thats why i got confused.
04/19/2013 02:15 shadowman123#4
i got few Comments :-

1 - as Fang Said Create Flag for this Effect then u can use it anyTime but in this case it will be attached to the player all the time

2 - y would u do smthing like that ..its useless?

3 - if u would like to do that there r more than one way to do that anyways here is one for u :-
- While (client level == 140)
{
if (Time32.Now >= client.Entity.EffectStamp.AddSeconds(10))
{
client.Entity.EffectStamp = Time32.Now;
client.Entity.Update("good", _String.Effect, false);
}
}
04/19/2013 02:39 LordGragen.#5
well here is 2 thing i was worry about

lets say if there is 200 online members and they are 140 using this every 10 sec wont hurt the project?


i just did how fang sad. and the edit was just going and going. thx tho

i will try the source part.
04/19/2013 03:31 pro4never#6
The point is waste. It might not heavily influence the project but there's no advantage to doing it another way.

Using a status effect means you send NO extra packets (just turn on the flag when they log in and you're done with it), requires NO extra threads, loops, etc and therefor has the least possible impact on the server performance.
04/19/2013 03:38 LordGragen.#7
i just found out how i can control the effect time

Code:
[break_start]    // this is the edit i want 
Amount=8
EffectId0=10703
TextureId0=10703
ASB0=5
ADB0=2
EffectId1=10704
TextureId1=10704
ASB1=5
ADB1=2
EffectId2=10705
TextureId2=10705
ASB2=5
ADB2=6
EffectId3=10706
TextureId3=10706
ASB3=5
ADB3=2
EffectId4=10707
TextureId4=10707
ASB4=5
ADB4=2
EffectId5=10708
TextureId5=10708
ASB5=5
ADB5=2
EffectId6=10709
TextureId6=10709
ASB6=5
ADB6=2
EffectId7=10710
TextureId7=10710
ASB7=5
ADB7=2
Delay=0
LoopTime=999999
FrameInterval=33
LoopInterval=3000
OffsetX=0
OffsetY=0
OffsetZ=0
ColorEnable=1
Lev=2
Code:
[2NDMetempsychosis]
Amount=1
EffectId0=259
TextureId0=259
ASB0=5
ADB0=2
Delay=0
LoopTime=999999
FrameInterval=33
LoopInterval=3000
OffsetX=0
OffsetY=0
OffsetZ=0
ColorEnable=1
Lev=2
now i change the looptime like the 2n reborn effect, 1 tested both 2nd reborn one works fine every 5 sec or so but the other effect only happens when i login just 1 time and thats it
04/19/2013 05:19 Spirited#8
Well, I know this is a cheating way around this, but if you don't think you're capable in creating an entirely new status effect, why not make use of one that already exists? One that repeats every so often. Then, you can just replace that effect in the client with whichever effect you want. Try replacing status effect #53. Don't try implementing what Shadow recommended. That's inefficient. Conquer created statuses for this very reason, so try to make use of them first before resorting to inefficient methods such as the one he provided.
04/19/2013 05:31 LordGragen.#9
Quote:
Originally Posted by Fаng View Post
Well, I know this is a cheating way around this, but if you don't think you're capable in creating an entirely new status effect, why not make use of one that already exists? One that repeats every so often. Then, you can just replace that effect in the client with whichever effect you want. Try replacing status effect #53. Don't try implementing what Shadow recommended. That's inefficient. Conquer created statuses for this very reason, so try to make use of them first before resorting to inefficient methods such as the one he provided.
i did it. and it worked. i changed #53 to break_start and works.

but not the way like the 2nd reborn one work.

but i got this question that i am kinda confused,

you see how the 2nd reborn effect keep repeats

is it because of how its build? how the .c3 file is build or there is a timer in the client that makes repeat,


coz the effect i am using now is working like the nobility system. if you go far and come back to that member the effect will show 1 time and thats it.