[Question] Plus notice through filter source code ?
hi there
i wonder is someone can share with me a correct plus notice script to put inside the filter
i tried to make it manually without any success
if someone can help ill really appreciate your help
thanks in advance
Don't ask for script suddenly if you don't want to learn. Also I think plus notice is available in all filters so I guess the filter source you're using contains it!
Don't ask for script immediately if you don't want to learn. Also I think plus notice is available in all filters so I guess the filter source you're using contains it!
Yes its already available and i saw the script in it but its not working
I just need to fix it
Btw im using the superman filter and i think the owner has disabled this function so i asked for a working script or how to activate the existing disabled function cuz i tried and failed
if (_pck.Opcode == 0xB150 && FilterMain.DB && FilterMain.PlusNotice)
{
try
{
_pck.Lock(); // Lock
_pck.ReadUInt16();
_pck.ReadUInt8();
int slot = _pck.ReadUInt8();
_pck.ReadUInt64();
int plus = _pck.ReadUInt8();
if (plus >= FilterMain.RequiredPlus && plus > 0)
{
try
{
// Get item name
SqlDataReader reader = sqlCon.Return("_GetName", new SqlParameter("@CharName", Program.Plis(this.sql_charname)), new SqlParameter("@Slot", slot));
reader.Read();
// Item name
string ItemName = reader["Name"].ToString();
// Check if name is not null.
if (ItemName != string.Empty && ItemName != null)
{
// New method, notice sender.
sqlCon.exec("INSERT INTO [" + FilterMain.SUP_DB + "].[dbo].[_Notice] (message, added) VALUES('" + Program.Plis(this.sql_charname) + " has increased [" + ItemName + "] to plus (" + plus + ")', '" + DateTime.UtcNow + "')");
}
First of all: If you're not gonna work on the filter to improve it, then don't try to fix plus notice only because the source totally sucks.
Second: All you have to do is to get items names table and edit the code to send notice using the packet from the program not by inserting into notice table
First of all: If you're not gonna work on the filter to improve it, then don't try to fix plus notice only because the source totally sucks.
Second: All you have to do is to get items names table and edit the code to send notice using the packet from the program not by inserting into notice table
#region Plus Notice system
// Notice spam xD
if (_pck.Opcode == 0xB150 && FilterMain.DB && FilterMain.PlusNotice)
{
try
{
_pck.Lock(); // Lock
_pck.ReadUInt16();
_pck.ReadUInt8();
int slot = _pck.ReadUInt8();
_pck.ReadUInt64();
int plus = _pck.ReadUInt8();
if (plus >= FilterMain.RequiredPlus && plus > 0)
{
try
{
// Get item name
SqlDataReader reader = sqlCon.Return("[" + FilterMain.SHA_DB + "].[dbo].[_AddLogItem]", new SqlParameter("@CharName", Program.Plis(this.sql_charname)), new SqlParameter("@Slot", slot));
reader.Read();
// Item name
string Name = reader[("[" + FilterMain.SHA_DB + "].[dbo].[_ItemName]")].ToString();
// Check if name is not null.
if (Name != string.Empty && Name != null)
{
// New method, notice sender.
sqlCon.exec("INSERT INTO [" + FilterMain.SUP_DB + "].[dbo].[_Notice] (message, added) VALUES('" + Program.Plis(this.sql_charname) + " has increased [" + Name + "] to plus (" + plus + ")', '" + DateTime.UtcNow + "')");
}
// Close DB
reader.Close();
and it requires a char id
and when i add 'Program.Plis(this.user_id)' it requires a refitem ID '
Read what I've written above again, you didn't change anything
yes i didnt changed the notice method but i added the ItemName table as u said
i cant understand where is the problem and what i should change
im a new to C# so its hard for me
please help
if u want
thanks
Thanks #HB i figured out whats the problem , but i have a datetime convertion issue
can u give some hints ?
P.S 'DateTime.UtcNow' and also 'DateTime.Now' not working and giving a datetime convertion error
any suggestions ?
You can't work on a filter source code immediately if you're new in C#.
Also, figure out how to make it send the notice as a packet instead of inserting in _Notice table (it's not hard at all and you can find it everywhere if you looked at goofie's code)
You can't work on a filter source code immediately if you're new in C#.
Also, figure out how to make it send the notice as a packet instead of inserting in _Notice table (it's not hard at all and you can find it everywhere if you looked at goofie's code)
i dont prefer to do it through notice packet only cuz i want the plus logs to be stored on a sql table
also i have a sql script which sends a notice which says if the item has an adv. and it's grade on it or not
i think its hard for me to do this through the source code and also it will require a customized SP in sql to work with the commands in the source code