2 Request

09/18/2010 06:03 salem rey#1
1st request is: When you make a new char i wanna show a dialog box if you want to apply a merchant or not, because in my server it dont have it.

2md request is: a message in my source that if someone will log in, because my source got only game save automatically spamming. i jsut want to see if there is someone is logging in...


please anyone can help me out here i will give a very big thanks.. :D



ps, salem

:handsdown::handsdown::handsdown::handsdown::hands down::handsdown::handsdown:
09/18/2010 11:58 _DreadNought_#2
Why dont you work on the problem for a couple of days and im sure you will find the answer :)
09/18/2010 12:09 salem rey#3
I dont really the how to fix it, I don't have any clue... I'm clueless please need really help..
09/18/2010 12:46 { Angelius }#4
1 set .im not sure how to do it but to make it the easy way you can add an npc at the birth Village to tell players what is the merchant acc and apply for them if they wanted it

2nd
im not sure what source you r working on but i hope this is gonna help you

in GameWorker.cs
Quote:
search for
static void DataHandler(StateObj StO, byte[] Data)

in the end of it you'll find this bit of code

GC.EndSend();

above it add this

Quote:

}
Program.WriteLine(GC.MyChar.Name + " has just logged in .");//change it to whatever you wanna read when a user log in to the game
}
in GameClient.cs
search for
Code:
public void LogOff(bool Remove)

in that public void you'll find an if statement contains something about saving the char  or to check the char contains 
above it add this 
[CODE]
Program.WriteLine("User " + MyChar.Name + " has logged of or disconnected.");
[/CODE]
hope i helped

guess i found a way to get it to work :DD

go to teleport.cs and search for

Quote:
if (Game.World.CurrentBC.Message != null)
above it add this

Quote:
if (GC.MyChar.Loc.Map == 1010)
GC.AddSend(Packets.AttackPacket(GC.MyChar.EntityID , 0, 0, 0, 0, 40)); // Asks the player on character creation.
GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 0, 0, 0, 132, 0));
this way its gonna ask the player to apply for a merchant acc only at the birth village map and once he get out the birth village its done well never ask him again
and to ask the player if he wanna cancel the merchant acc every time he log in do this
go to PachetHandler.cs and look for

Quote:
case 132:
in the end of that case add this
Quote:
}
if (GC.MyChar.Merchant == NewestCOServer.Game.MerchantTypes.Yes)
GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.Merchant, 255));

break;
}
09/18/2010 16:23 salem rey#5
hehehe i will try thanks anyway...

Sorry for double post but thanks for your help { Angelius }
Member

is works jsut paste it in teleport.cs

it should be like this

if (!GC.LoginDataSent)
{
Program.WriteLine(GC.MyChar.Name + " has just logged in.");
Game.World.Spawns(GC.MyChar, true);
GC.AddSend(Packets.Packet1012Time(GC.MyChar.Entity ID));
GC.AddSend(Packets.GeneralData(GC.MyChar.Loc.Map, GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0x4a));
GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 0xffffffff, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0x68));
ushort MapStatus = DMaps.GetMapStatus(GC.MyChar.Loc.Map);
GC.AddSend(Packets.MapStatus(GC.MyChar.Loc.Map, MapStatus));
foreach (Game.Item I in GC.MyChar.Inventory)
GC.AddSend(Packets.AddItem(I, 0));
GC.MyChar.Equips.Send(GC, true);


i think i am double post
09/18/2010 17:05 pro4never#6
No... if it's in teleport code obviously it will give you that any time they teleport (use scroll, go through portal... etc)

Search your packet handler for code that deals with logging on and put it there...

As for merchant stuff.. It's an attack packet with various values iirc. Create values in your character files to see if player is merchant or not. If they are not merchant than send them the packet that will pop up the merchant apply box and use the response to set merchant level (merchant, not merchant or applying merchant)
09/18/2010 17:22 { Angelius }#7
Quote:
Originally Posted by SALEM REY

is works jsut paste it in teleport.cs

it should be like this

if (!GC.LoginDataSent)
{
Program.WriteLine(GC.MyChar.Name + " has just logged in.");
Game.World.Spawns(GC.MyChar, true);
GC.AddSend(Packets.Packet1012Time(GC.MyChar.Entity ID));
GC.AddSend(Packets.GeneralData(GC.MyChar.Loc.Map, GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0x4a));
GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 0xffffffff, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0x68));
ushort MapStatus = DMaps.GetMapStatus(GC.MyChar.Loc.Map);
GC.AddSend(Packets.MapStatus(GC.MyChar.Loc.Map, MapStatus));
foreach (Game.Item I in GC.MyChar.Inventory)
GC.AddSend(Packets.AddItem(I, 0));
GC.MyChar.Equips.Send(GC, true);
Quote:
wrong file that bit of code should go to the gameworker.cs
Quote:
Originally Posted by pro4never

As for merchant stuff.. It's an attack packet with various values iirc. Create values in your character files to see if player is merchant or not. If they are not merchant than send them the packet that will pop up the merchant apply box and use the response to set merchant level (merchant, not merchant or applying merchant)
well lol no body answered her at all so i posted what i know about it :D

and honstly it works fine for me
and btw salem rey where is my BIG THANKS LOL J/K