Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2
You last visited: Today at 02:59

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

Advertisement



Can someone help me ?

Discussion on Can someone help me ? within the Conquer Online 2 forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2017
Posts: 43
Received Thanks: 0
Exclamation Can someone help me ?

I am trying to create a NPC where players can make sockets to their equipment with DB's and ToughDrills and I am trying to find out what is wrong with this script.

#region Socketter
case 4400:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello there my friend. I am here to put a socket in Your Equipment. For the first socket I demand 40 DragonBalls and for the second one I demand 25 ToughDrills.");
dialog.Option("Headgear", 4001);
dialog.Option("Necklace", 4011);
dialog.Option("Ring", 4021);
dialog.Option("Armor", 4031);
dialog.Option("Boots", 4041);
dialog.Option("Tower", 4051);
dialog.Option("Fan", 4061);
dialog.Option("Alright.", 255);
dialog.Send();
break;
}
case 4001:
{
if (!client.Headgear.Free(4))
{
MsgItemInfo Item = null;
Item = client.Headgear.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 40 DragonBalls to socket your Headgear. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4002);
dialog.Send();
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 25 ToughDrills to socket your Headgear. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4002);
dialog.Send();
}
else
{
dialog.Text("I can't socket this Headgear once more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Headgear first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
case 4011:
{
if (!client.Necklace.Free(4))
{
MsgItemInfo Item = null;
Item = client.Necklace.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 40 DragonBalls to socket your Necklace. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4012);
dialog.Send();
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 25 ToughDrills to socket your Necklace. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4012);
dialog.Send();
}
else
{
dialog.Text("I can't socket this Necklace once more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Necklace first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
case 4021:
{
if (!client.Ring.Free(4))
{
MsgItemInfo Item = null;
Item = client.Ring.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 40 DragonBalls to socket your Ring. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4022);
dialog.Send();
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 25 ToughDrills to socket your Ring. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4022);
dialog.Send();
}
else
{
dialog.Text("I can't socket this Ring once more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Ring first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
case 4031:
{
if (!client.Armor.Free(4))
{
MsgItemInfo Item = null;
Item = client.Armor.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 40 DragonBalls to socket your Armor. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4032);
dialog.Send();
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 25 ToughDrills to socket your Armor. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4032);
dialog.Send();
}
else
{
dialog.Text("I can't socket this Armor once more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Armor first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
case 4041:
{
if (!client.Boots.Free(4))
{
MsgItemInfo Item = null;
Item = client.Boots.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 40 DragonBalls to socket your Boots. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4042);
dialog.Send();
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 25 ToughDrills to socket your Boots. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4042);
dialog.Send();
}
else
{
dialog.Text("I can't socket this Ring once more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Ring first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
case 4051:
{
if (!client.Fan.Free(4))
{
MsgItemInfo Item = null;
Item = client.Fan.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 40 DragonBalls to socket your FanTalisman. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4052);
dialog.Send();
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 25 ToughDrills to socket your FanTalisman. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4052);
dialog.Send();
}
else
{
dialog.Text("I can't socket this FanTalisman once more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the FanTalisman first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
case 4061:
{
if (!client.Tower.Free(4))
{
MsgItemInfo Item = null;
Item = client.Tower.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 40 DragonBalls to socket your TowerTalisman. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4062);
dialog.Send();
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
dialog.Text("My friend I will need 25 ToughDrills to socket your TowerTalisman. Are you sure you want to do this ?");
dialog.Option("Yea sure.", 4062);
dialog.Send();
}
else
{
dialog.Text("I can't socket this TowerTalisman once more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the TowerTalisman first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
case 4002:
{
if (!client.Headgear.Free(4))
{
MsgItemInfo Item = null;
Item = client.Headgear.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1088000, 40))
{
client.Inventory.Remove(1088000, 40);
Item.SocketOne = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 40 DragonBalls !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1200005, 25))
{
client.Inventory.Remove(1200005, 25);
Item.SocketTwo = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 25 ToughDrills !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Headgear first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
}
case 4012:
{
if (!client.Necklace.Free(4))
{
MsgItemInfo Item = null;
Item = client.Necklace.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1088000, 40))
{
client.Inventory.Remove(1088000, 40);
Item.SocketOne = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 40 DragonBalls !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1200005, 25))
{
client.Inventory.Remove(1200005, 25);
Item.SocketTwo = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 25 ToughDrills !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Necklace first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
}
case 4022:
{
if (!client.Ring.Free(4))
{
MsgItemInfo Item = null;
Item = client.Ring.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1088000, 40))
{
client.Inventory.Remove(1088000, 40);
Item.SocketOne = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 40 DragonBalls !");
dialog.Option("Ah...", 255);
dialog.Send();
}
break;
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1200005, 25))
{
client.Inventory.Remove(1200005, 25);
Item.SocketTwo = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 25 ToughDrills !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Ring first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
}
case 4032:
{
if (!client.Armor.Free(4))
{
MsgItemInfo Item = null;
Item = client.Armor.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1088000, 40))
{
client.Inventory.Remove(1088000, 40);
Item.SocketOne = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 40 DragonBalls !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1200005, 25))
{
client.Inventory.Remove(1200005, 25);
Item.SocketTwo = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 25 ToughDrills !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Armor first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
}
case 4042:
{
if (!client.Boots.Free(4))
{
MsgItemInfo Item = null;
Item = client.Boots.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1088000, 40))
{
client.Inventory.Remove(1088000, 40);
Item.SocketOne = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 40 DragonBalls !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1200005, 25))
{
client.Inventory.Remove(1200005, 25);
Item.SocketTwo = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 25 ToughDrills !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the Boots first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
}
case 4052:
{
if (!client.Fan.Free(4))
{
MsgItemInfo Item = null;
Item = client.Fan.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1088000, 40))
{
client.Inventory.Remove(1088000, 40);
Item.SocketOne = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 40 DragonBalls !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1200005, 25))
{
client.Inventory.Remove(1200005, 25);
Item.SocketTwo = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 25 ToughDrills !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the FanTalisman first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
}
case 4062:
{
if (!client.Tower.Free(4))
{
MsgItemInfo Item = null;
Item = client.Tower.TryGetItem(4);
if (Item.SocketOne == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1088000, 40))
{
client.Inventory.Remove(1088000, 40);
Item.SocketOne = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 40 DragonBalls !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else if (Item.SocketTwo == COServer.Game.Enums.Gem.NoSocket)
{
if (client.Inventory.Contains(1200005, 25))
{
client.Inventory.Remove(1200005, 25);
Item.SocketTwo = COServer.Game.Enums.Gem.EmptySocket;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
COServer.Database.ConquerItemTable.UpdateSockets(I tem);
dialog.Text("Done !");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't have 25 ToughDrills !");
dialog.Option("Ah...", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to wear the TowerTalisman first.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
}
break;
}
}
#endregion
em0tions is offline  
Old 01/19/2019, 01:48   #2
 
12k's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 218
Received Thanks: 33
What is it doing that makes it broke? I don't want to read through all that if I don't have to haha
12k is offline  
Old 01/19/2019, 14:52   #3
 
elite*gold: 0
Join Date: Jun 2017
Posts: 43
Received Thanks: 0
It's not taking the required items from the players inventory ( 40 dbs for first socket & 25 ToughDrills for the second socket) and it's not putting the socket in the item.
em0tions is offline  
Old 01/19/2019, 17:00   #4
 
12k's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 218
Received Thanks: 33
Unless the packet has changed (Which it may have since i've worked on servers), I don't believe the npcRequest.OptionID should be larger than a byte (255). From the looks of it everything else should be working. Is the dialog popping up and going through all the options like it should?
12k is offline  
Old 01/19/2019, 17:33   #5
 
elite*gold: 0
Join Date: Jun 2017
Posts: 43
Received Thanks: 0
I am receiving an error message on my server console. The server source it's based on a 6609 client. So basically the command from the NPCs.cs it's not going to the next step. And the client it's not receiving the data from the source to finish the task (in this case, to take the required items and put the socket).
What I need to do ?
em0tions is offline  
Old 01/19/2019, 19:05   #6
 
Yupmoh's Avatar
 
elite*gold: 26
Join Date: Jul 2011
Posts: 522
Received Thanks: 284
Yupmoh is offline  
Old 01/19/2019, 19:11   #7
 
12k's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 218
Received Thanks: 33
For future reference for anyone trying to view this thread, I'm helping him on discord. It's just a null reference exception.
12k is offline  
Reply


Similar Threads Similar Threads
Can someone help me? How can i add 12d drops to Jupiter Mobs
12/17/2011 - SRO Private Server - 1 Replies
Please someone help me :(
PLEASE......CAN SOMEONE CAN GIVE ME AN ENGINE THAT CAN'T BE DETECTED...
12/30/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 3 Replies
...GIVE ME AN ENGINE THAT IS N0T DETECTED..... KAHIT NA PANG 5 DAYS LANG !^^...IF YOU ARE FINISH TO READ YOU CAN CLOSED THIS THREAD....>.<:):):):):)
Someone know how to use bot on Russian server or can someone do a bypass for russion?
08/28/2009 - General Gaming Discussion - 7 Replies
plz i see here allot of bypassed for english verison only but nothing from cheats or hacks for russian server :/



All times are GMT +2. The time now is 02:59.


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.