Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 03:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Request] How to make a wishes tree

Discussion on [Request] How to make a wishes tree within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
masternek's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 94
Received Thanks: 29
[Request] How to make a wishes tree

hello everyone.

i wanna know, if it is possible to make something like... a wish tree, a player talk with the tree, and then he can writte his wish on it, and that wish, will be saved in a text file in a source folder with the infos:

character name, wish, date of wish.


please help
masternek is offline  
Old 06/04/2010, 21:48   #2
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
I'm sure you can. just use a stream writer to write the wish name and w/e you want into a file. Problem is I think you will have to use NPCLink2 which correct me if I'm wrong has a limit in the length. so your "wish" can only be so long. I'll double check this.
dragon89928 is offline  
Thanks
1 User
Old 06/04/2010, 23:46   #3
 
masternek's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 94
Received Thanks: 29
can you do something like... a lil guide? o.o
masternek is offline  
Old 06/05/2010, 08:17   #4
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
you'd wanna do something like

in npcdialog:
Code:
#region wish tree
                            case 999999: // make sure you change this to the npc you want to use
                                {

                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("What is your wish?"));
                                        GC.AddSend(Packets.NPCLink2("Type in your wish", 1));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        string wish = ReadString(Data);
                                        if (wish != null)
                                        {
                                            string path = "C:\\OldCODB\\wish.txt";
                                            StreamWriter SW;
                                            if (File.Exists(path))
                                            {
                                                SW = File.AppendText(path);
                                                SW.WriteLine(GC.MyChar.Name + ": " + wish);
                                                //will write  --   Name: My wish
                                                SW.Close();
                                                Console.WriteLine("A new wish has been made!");
                                            }
                                            else
                                            {
                                                SW = File.CreateText(path);
                                                SW.WriteLine(wish);
                                                SW.Close();
                                                Console.WriteLine("A new wish has been made!");
                                            }
                                        }
                                        GC.AddSend(Packets.NPCSay("Your Wish has been added into the file"));
                                        GC.AddSend(Packets.NPCLink2("Thanks", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                            #endregion
i didn't test this code. It should work though.
dragon89928 is offline  
Thanks
2 Users
Old 06/05/2010, 10:46   #5
 
masternek's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 94
Received Thanks: 29
it worked! you are awesome! thank you so much

by the way.. i have a last question... how can i make an item talk? like... open a dialogue
masternek is offline  
Old 06/05/2010, 10:50   #6
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Like the boxes in lady luck ?

Give the NPC the mesh of the weapon.
MonstersAbroad is offline  
Old 06/05/2010, 10:54   #7
 
masternek's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 94
Received Thanks: 29
item name: DragonPot

item id: 710868

i dont know if its like the boxes, in my server, the boxes dont talk xD
masternek is offline  
Old 06/05/2010, 11:59   #8
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Code:
                    Char.MyClient.DialogNPC = 666111;
                    PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
                    Char.MyClient.EndSend();
Should be able to make do with that.
Just remember you need to add an npc entry in npcdialog.cs and npcs.txt
Arcо is offline  
Thanks
1 User
Old 06/05/2010, 14:51   #9
 
masternek's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 94
Received Thanks: 29
thx, arco, but where do i put this code?

Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();

i put in packet.cs?

help? o.O
masternek is offline  
Old 06/05/2010, 16:55   #10
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
u put in command, npccontrol, whereever you want it to send it from.
.Summer is offline  
Old 06/05/2010, 18:25   #11
 
masternek's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 94
Received Thanks: 29
wesdr

a lil guide please? xD
masternek is offline  
Old 06/05/2010, 18:55   #12
 
masternek's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 94
Received Thanks: 29
so...?
masternek is offline  
Old 06/05/2010, 19:34   #13
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
When do you want it to come up?
.Summer is offline  
Old 06/05/2010, 20:46   #14
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
using arco's example, when an event that you want to happen is triggered and you want to send the box you would go:

Code:
bool someEventIsTriggered = true;
if (someEventIsTriggered){
	foreach(Game.Character Char in Game.World.H_Chars){
	Char.MyClient.DialogNPC = 666111;
	PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
	Char.MyClient.EndSend();
	}
}
dragon89928 is offline  
Old 06/05/2010, 21:10   #15
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Was hoping you'd be able to learn from what I gave you...
Guess not.
Btw stop double posting.
In character.cs with using items.
case 710868:
Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();
break;
Arcо is offline  
Reply


Similar Threads Similar Threads
[Request] NAGC Skill Tree Uncap?
04/16/2010 - Grand Chase - 7 Replies
Title says. Is there any possible hack to uncap the 35 limit to infinity?
Best Wishes from Hungary
07/14/2008 - Say Hello - 2 Replies
Hi to ALL ! :D enjoy the life's goods :cool:
Druid Tree form buff without tree Form
11/11/2007 - WoW Exploits, Hacks, Tools & Macros - 5 Replies
My buddy and i were screwing around the other day in Mech and we figured out a way to have a working tree form buff for the party but not be in tree form. Which if anyone knows about druids allows them to cast all their other high healing spells. Anyway follow the instructions below its a bit tricky 1. Change your chest item to something else 2. Get into Combat.. Queue your chestpiece to switch back to your original 3. When the fights finishing, Get ready.. The second the...



All times are GMT +2. The time now is 03:47.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.