Define some things in Character.cs

10/13/2010 04:19 pro4never#16
I'm going to skip over this debate entirely.


#1: Why are you attempting to do item usage inside the character.cs? This belongs in with your other item usage as it will not be called when you use the item unless you seriously modify your existing codes!

#2: GC refers to game client usually (THIS IS NOT fixed, it's like saying int I = 0; YOu could put anything in place of I... but it holds the value of an int. Likewise GC is generally used to hold the GameClient value.

Game Client in lotf contains an instance of the CHARACTER class which is initialized on login (look in your packet processing and chances are when you load the character from database/files you are doing something like

GC.MyChar = new Character();


So if you are already inside your character class you are not going to have access to things like GC or GC.MyChar, you are already there!


So what do you want this to do exactly? YOu want it to pop up a msg when you login? You want it to pop up a msg when you use the item?... what?


Assuming you want it to happen when you use the item... Simply go to your item usage handling and do a case number for the static id of the item you are using. Then set your client last used npc and send the packet.... shouldn't be too hard.
10/13/2010 04:56 -diRt#17
Quote:
Originally Posted by pro4never View Post
I'm going to skip over this debate entirely.


#1: Why are you attempting to do item usage inside the character.cs? This belongs in with your other item usage as it will not be called when you use the item unless you seriously modify your existing codes!

#2: GC refers to game client usually (THIS IS NOT fixed, it's like saying int I = 0; YOu could put anything in place of I... but it holds the value of an int. Likewise GC is generally used to hold the GameClient value.

Game Client in lotf contains an instance of the CHARACTER class which is initialized on login (look in your packet processing and chances are when you load the character from database/files you are doing something like

GC.MyChar = new Character();


So if you are already inside your character class you are not going to have access to things like GC or GC.MyChar, you are already there!


So what do you want this to do exactly? YOu want it to pop up a msg when you login? You want it to pop up a msg when you use the item?... what?


Assuming you want it to happen when you use the item... Simply go to your item usage handling and do a case number for the static id of the item you are using. Then set your client last used npc and send the packet.... shouldn't be too hard.
He is kind of wanting to use this item like a NPC. I'm having a hard time understaing this aswell. I've never seen this done before.

What he is trying to do is have a pop-up message and have the item talk, there is options you can choose from. That's where I don't get it.

-Edit-

If I was him I would just make 2 seperate Items.
10/13/2010 05:03 pro4never#18
Ahh well it looks like he's already been answered but all you do is make a npc like normal with w/e ID you want then on using the item you set the last used npc to it and send the initial npc packet to the client.
10/13/2010 05:06 Arcо#19
Quote:
Originally Posted by -diRt View Post
I've never seen this done before.
Obviously you have cause you thanked+used my magic gate release :rolleyes:
10/13/2010 05:21 -diRt#20
Quote:
Originally Posted by Аrco View Post
Obviously you have cause you thanked+used my magic gate release :rolleyes:
I've never used your magic gate release :rolleyes:
10/13/2010 05:22 Arcо#21
Quote:
Originally Posted by -diRt View Post
I've never used your magic gate release :rolleyes:
Alright I'll correct myself, you've seen+thanked it ;)
10/13/2010 14:45 †he Knight#22
x10 facepalms :D
10/13/2010 15:00 copz1337#23
Solved.