|
You last visited: Today at 15:24
Advertisement
VIP Aura not saving correctly
Discussion on VIP Aura not saving correctly within the CO2 Private Server forum part of the Conquer Online 2 category.
01/12/2018, 03:05
|
#1
|
elite*gold: 0
Join Date: Jul 2013
Posts: 37
Received Thanks: 2
|
VIP Aura not saving correctly
So I been writing hours of different codes, trying and testing over and over and decided to see if anyone here has the golden hint. The effect does appear, however when people jump out screen and back.. it's gone. and it will take a moment before it will appear again. Thanks in advance.
Code:
try
{
byte servermin = ServerTime.Minute;
if (servermin % 1 == 0)
{
foreach (Game.Character C in Game.World.H_Chars.Values)
{
if (C.VipLevel >= 5)
{
if (!C.VIPAura)
{
C.VIPAura = true;
Game.World.Action(C, (Packets.String(C.EntityID, 10, "2NDMetempsychosis")).Get);
}
else
{
Game.World.Action(C, (Packets.String(C.EntityID, 10, "none")).Get);
Game.World.Action(C, (Packets.String(C.EntityID, 10, "2NDMetempsychosis")).Get);
}
}
}
}
}
catch { }
|
|
|
01/12/2018, 03:57
|
#2
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by ~OwnageBoy
So I been writing hours of different codes, trying and testing over and over and decided to see if anyone here has the golden hint. The effect does appear, however when people jump out screen and back.. it's gone. and it will take a moment before it will appear again. Thanks in advance.
Code:
try
{
byte servermin = ServerTime.Minute;
if (servermin % 1 == 0)
{
foreach (Game.Character C in Game.World.H_Chars.Values)
{
if (C.VipLevel >= 5)
{
if (!C.VIPAura)
{
C.VIPAura = true;
Game.World.Action(C, (Packets.String(C.EntityID, 10, "2NDMetempsychosis")).Get);
}
else
{
Game.World.Action(C, (Packets.String(C.EntityID, 10, "none")).Get);
Game.World.Action(C, (Packets.String(C.EntityID, 10, "2NDMetempsychosis")).Get);
}
}
}
}
}
catch { }
|
You're not going to like this response, but you need to do a lot better than this. This type of code is going to break your server pretty badly. Firstly, mod 1 of everything is going to be zero, always. The mod operation just says "what's the remainder of dividing these two numbers". If you divide anything by 1, the remainder will always be zero. Secondly, you need to be adding these effects on login, not in some massive loop that loops through every character every few minutes of the server being on. That's just inefficient. On top of that, you're sending these packets in duplicates to each player's screen for each run of this code. That's approaching exponential growth (the worst type of algorithm efficiency model there is). You need to move this to login, and to a status effect using the spawn packet rather than client effects using the string packet.
|
|
|
01/12/2018, 07:47
|
#3
|
elite*gold: 0
Join Date: Mar 2006
Posts: 598
Received Thanks: 69
|
@  is right dude. We have the same thought to use the string. Then again I was thinking there is an Statuseffect which will store all looped effects that's why I use the statuseffect procedure yet still confused about bitflags to figured it out (it's not a code it's a number system). Hehehe.
|
|
|
01/12/2018, 09:19
|
#4
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by Soulfly25
@  is right dude. We have the same thought to use the string. Then again I was thinking there is an Statuseffect which will store all looped effects that's why I use the statuseffect procedure yet still confused about bitflags to figured it out (it's not a code it's a number system). Hehehe.
|
Your source already implements it...
|
|
|
01/12/2018, 11:02
|
#5
|
elite*gold: 0
Join Date: Jul 2013
Posts: 37
Received Thanks: 2
|
Thanks for ur response. The 2nd reborn effect is not in the list of statuseffect. Would it be better to put it there? Thats why i tried using packet string since the 2nd rb effect only comes when im 2nd reborn by the rebirthcount.
Here is my status effects, 2NDMetempsychosis is not in there and I can't find which numbers to use behind it if I add it in there.
public enum StatusEffectEn : ulong
{
Normal = 0x0,
BlueName = 0x1,
Poisoned = 0x2,
Gone = 0x4,//invisible
XPStart = 0x10,
TeamLeader = 0x40,
Accuracy = 0x80,
Shield = 0x100,
Stigma = 0x200,
Dead = 0x420,//0x420 sau 400
FadeAway = 0x800,
Invisible = 0x400000,
RedName = 0x4000,
BlackName = 0x8000,
SuperMan = 0x40000,
Cyclone = 0x800000,
Dodge = 0x4000000,
Fly = 0x8000000,
Pray = 0x40000000,
Blessing = 8589934592,
TopGuildLeader = 17179869184,
TopDeputyLeader = 34359738368,
MonthlyPKChampion = 68719476736,
WeeklyPKChampion = 137438953472,
TopWarrior = 274877906944,
TopTrojan = 549755813888,
TopArcher = 1099511627776,
TopWaterTaoist = 2199023255552,
TopFireTaoist = 4398046511104,
TopNinja = 8796093022208,
ShurikenVortex = 70368744177664,
FatalStrike = 140737488355328,
Flashy = 281474976710656,
Ride = 1125899906842624
}
Hoping to find a solution for my problem, I been working days on this now
|
|
|
01/12/2018, 17:27
|
#6
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Not even sure you need to send a status effect for that... I'm pretty sure it's just the spawn packet having the right reborn info. You should probably send something else if you want to make a VIP aura anyways, so not to confuse players.

|
|
|
01/13/2018, 09:30
|
#7
|
elite*gold: 0
Join Date: Jul 2013
Posts: 37
Received Thanks: 2
|
Quote:
Originally Posted by Spirited
Not even sure you need to send a status effect for that... I'm pretty sure it's just the spawn packet having the right reborn info. You should probably send something else if you want to make a VIP aura anyways, so not to confuse players.
 
|
What do you mean by sending something else? Players are not able to 2nd rb. Just me as a PM, aura works fine but cant find code that triggers it other than reborn count, and I would like the VIP to gain this 2nd reborn effect. I just keep getting stuck on it.
|
|
|
01/13/2018, 15:26
|
#8
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
Just because you don't allow 2nd reborn in your server doesn't mean the client doesn't know how to handle it. If you correctly set reborn count in entity spawn then anyone who sees that character will also see the 2nd reborn effect.
The only exception would be client version < 5000. I don't know what version your client is but since it looks like you're using LOTF it means it's at least 5017.
|
|
|
01/13/2018, 19:09
|
#9
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by -impulse-
Just because you don't allow 2nd reborn in your server doesn't mean the client doesn't know how to handle it. If you correctly set reborn count in entity spawn then anyone who sees that character will also see the 2nd reborn effect.
The only exception would be client version < 5000. I don't know what version your client is but since it looks like you're using LOTF it means it's at least 5017.
|
The NCOS2 source developed super cancer in the Arabic community just like your leaked source did. That's the source he's using. They call it "***". It's the same source I found that explicitly programmed exploit in that allows anyone to delete all characters or make themselves a PM. It's very ****.
|
|
|
01/14/2018, 06:04
|
#10
|
elite*gold: 0
Join Date: Jul 2013
Posts: 37
Received Thanks: 2
|
That moment people go off topic. Judging and cursing once again. Thanks anyway
|
|
|
01/14/2018, 07:19
|
#11
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by ~OwnageBoy
That moment people go off topic. Judging and cursing once again. Thanks anyway
|
Can't be helped. You contribute to the problem when you use sources like that and then spam our community. We're not hosting the source. Why bring the problems here? Why do that and then decide not to try learning how to code when people offer to help you? Why come here just to request code, and then go out of your way not to contribute back in any way. That's not what we're here for, and people who come here looking for that can leave.
|
|
|
01/14/2018, 08:02
|
#12
|
elite*gold: 0
Join Date: Jul 2013
Posts: 37
Received Thanks: 2
|
I didnt force you to answer. Go smoke some weed and get over yourself
|
|
|
01/14/2018, 08:06
|
#13
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by ~OwnageBoy
I didnt force you to answer. Go smoke some weed and get over yourself
|
I wasn't talking about myself. Sorry if it sounds like I only care about myself, but I don't want to code for you. Nobody here does unless you're willing  . Ultimately, I think you have unreasonable expectations when posting questions. I'd love to help, and I offered to help you come to better answers, but you refuse to cooperate or expect the work to be done completely for you - and then you don't respond appropriately in return. If that's not a summary for the type of attitude those ***-awful sources bring here, then I don't know what is.
|
|
|
01/14/2018, 12:37
|
#14
|
elite*gold: 0
Join Date: Mar 2006
Posts: 598
Received Thanks: 69
|
@  sir, can I ask you something? Is it possible if I add new data in statuseffect? like if the statuseffect.ini have the last of 54 (of total effects) and in the public enum statuseffect also have 54. Can I add another new line of effects both statuseffect.ini and in the source part? It's kind a noob question but want to know it.
Thank you.
|
|
|
01/14/2018, 13:37
|
#15
|
elite*gold: 0
Join Date: Jul 2013
Posts: 37
Received Thanks: 2
|
If thats possible it would be great. Looking forward to an answer of spirited
|
|
|
 |
|
Similar Threads
|
Rebirth system not saving correctly.
07/12/2013 - Flyff Private Server - 4 Replies
Hi elitepvpers,
I have build in the rebirth system that Andrej released in his source.
Almost everything works. The only downside is that its not saving it to the database.
Inside the CHARACTER_TBL i have made an new field called m_nRebirthCount
In the CHARACTER_STR procedure i have added this to S1 U1 I1
Now when i do an rebirth i get this inside the m_nRebirthCount
|
[Sjsro]Not saving my skills.
02/01/2011 - SRO Private Server - 12 Replies
Why it's not saving my skills on the skill bar?
|
Npc not working correctly
10/11/2010 - CO2 Private Server - 4 Replies
hes not selling the items what did i code wrong
he just takes the money and sometimes he says you dont have enough but i have 99999999cps
and when it does work nothing is in my inventory
for some reason though this code has no errors
Edit: Can Someone at least give me the code for +12 2 soc items for tanels source
Edit2: il just figure it out nvm thanks everyone....
#region Kid Seller
case 4466:
{
if (Control == 0)
|
All times are GMT +1. The time now is 15:24.
|
|