|
You last visited: Today at 14:16
Advertisement
Redux v2 - Official 5065 Classic Source
Discussion on Redux v2 - Official 5065 Classic Source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
12/07/2013, 11:49
|
#436
|
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
|
Quote:
Originally Posted by Kiyono
At the moment you set the color of _item to 3 and delete the black tulip but don't you also need to save it and update the item in the client so that it shows up?
|
That's where I'm stuck I'm not sure how to update and save it
|
|
|
12/07/2013, 16:39
|
#437
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
|
Quote:
Originally Posted by corbit15
That's where I'm stuck I'm not sure how to update and save it
|
You need to get the equipment from your equipment manager.
Something more like...
var armor = _client.Equipment.GetEquipmentByLocation(ItemLocat ion.Armor);
if(armor == null)
return;//no armor to dye, don't waste tulip
armor.Color = 9;
armor.Save();
_client.DeleteItem(_item);
|
|
|
12/07/2013, 16:39
|
#438
|
elite*gold: 0
Join Date: Jan 2012
Posts: 42
Received Thanks: 0
|
@pro, a lot of changes submitted lately. Can you please release a newer version of the source? Its hard to keep track.
|
|
|
12/07/2013, 17:41
|
#439
|
elite*gold: 0
Join Date: Oct 2013
Posts: 7
Received Thanks: 1
|
When I execute the .sql file over to MySQL it keeps saying [Msg] Finished - Unsuccessfully and I'm at the point that I have no idea what to do about this... Any help? Thanks
|
|
|
12/07/2013, 17:53
|
#440
|
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
|
Make sure u have innodb checked if you are using appserv
|
|
|
12/07/2013, 17:56
|
#441
|
elite*gold: 0
Join Date: Oct 2013
Posts: 7
Received Thanks: 1
|
Sorry to sound like an idiot at this point but, how exactly do I check on innodb? I read that on an earlier comment some 1 told some 1 else about it but I have no idea how to check up on it.
|
|
|
12/07/2013, 18:14
|
#442
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
|
Quote:
Originally Posted by DDTtrainer
@pro, a lot of changes submitted lately. Can you please release a newer version of the source? Its hard to keep track.
|
We're not releasing it till features are done.
Right now most of the added features will run into tons of issues if you try to use them (EG: pets)
Again, if you're actively developing with the source feel free to send me a PM with the type of stuff you're adding and I can put you in the dropbox. Releases are for stable releases though.
|
|
|
12/07/2013, 18:55
|
#443
|
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
|
well while installing appserv make sure u check innodb box..is where u set passwork i think.
Who uses pets these days?
|
|
|
12/07/2013, 21:02
|
#444
|
elite*gold: 0
Join Date: Oct 2013
Posts: 7
Received Thanks: 1
|
So... as soon as I turn on the Redux.exe this is what I get
|
|
|
12/07/2013, 22:54
|
#445
|
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
|
Quote:
Originally Posted by pro4never
You need to get the equipment from your equipment manager.
Something more like...
var armor = _client.Equipment.GetEquipmentByLocation(ItemLocat ion.Armor);
if(armor == null)
return;//no armor to dye, don't waste tulip
armor.Color = 9;
armor.Save();
_client.DeleteItem(_item);
|
Tried this a few different ways but still can't get it to change the color. Black armor color is 2.
Ill keep trying different ways to see what I come up with
#edit ok I bought armor from the shop thinking maybe it just didn't work with my armor. Still no success, however when I dropped the armor I bought it showed on the ground as black and I picked it up and it was black. So I guess its not updating right?
|
|
|
12/07/2013, 23:55
|
#446
|
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
|
Here's an working NPC to socket weapons made from GodlyArtisan in market
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Redux.Packets.Game;
namespace Redux.Npcs
{
/// <summary>
/// Handles NPC usage for Godly Artisan
/// </summary>
public class NPC_10065 : INpc
{
public NPC_10065(Game_Server.Player _client)
: base(_client)
{
ID = 10065;
Face = 54;
}
public override void Run(Game_Server.Player _client, ushort _linkback)
{
Responses = new List<NpcDialogPacket>();
AddAvatar();
var weapon = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
switch (_linkback)
{
case 0:
AddText("Hello , did you knew that an socketed weapon is better than one without sockets?");
AddText("It costs 1 DragonBall for the first socket and 5 DragonBall for the second one.");
AddOption("Help me put an socket then! .", 1);
AddOption("No. I like it this way.", 255);
break;
case 1:
if (_client.HasItem(1088000) && _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR) != null && weapon.Gem1 == 0)
{
weapon.Gem1 = 255;
_client.Send(ItemInformationPacket.Create(weapon));
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
else if (_client.HasItem(1088000, 5) && _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR) != null && weapon.Gem1 != 0 && weapon.Gem2 == 0)
{
weapon.Gem2 = 255;
_client.Send(ItemInformationPacket.Create(weapon));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
else
{
AddText("You don't have enough DragonBalls or your weapon is already socketed!");
AddOption("Ok! .", 255);
}
break;
}
AddFinish();
Send();
}
}
}
Work perfectly now , i think... thanks to aceking who told me where to look for packet update.
Feel free to improve it.
|
|
|
12/08/2013, 00:08
|
#447
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
Quote:
Originally Posted by mujake
Here's an working NPC to socket weapons made from GodlyArtisan in market
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Redux.Packets.Game;
namespace Redux.Npcs
{
/// <summary>
/// Handles NPC usage for Godly Artisan
/// </summary>
public class NPC_10065 : INpc
{
public NPC_10065(Game_Server.Player _client)
: base(_client)
{
ID = 10065;
Face = 54;
}
public override void Run(Game_Server.Player _client, ushort _linkback)
{
Responses = new List<NpcDialogPacket>();
AddAvatar();
var weapon = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
switch (_linkback)
{
case 0:
AddText("Hello , did you knew that an socketed weapon is better than one without sockets?");
AddText("It costs 1 DragonBall for the first socket and 5 DragonBall for the second one.");
AddOption("Help me put an socket then! .", 1);
AddOption("No. I like it this way.", 255);
break;
case 1:
if (_client.HasItem(1088000) && _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR) != null && weapon.Gem1 == 0)
{
weapon.Gem1 = 255;
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
else if (_client.HasItem(1088000, 5) && _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR) != null && weapon.Gem1 != 0 && weapon.Gem2 == 0)
{
weapon.Gem2 = 255;
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
else
{
AddText("You don't have enough DragonBalls or your weapon is already socketed!");
AddOption("Ok! .", 255);
}
break;
}
AddFinish();
Send();
}
}
}
I don't know to make it updates the packets to show it from start, i have dropped it on the floor and picked it up and the sockets are made.
Feel free to improve it.
|
In both cases you need to send the item information packet to the client with the updated values....
If you look at some of the upgrading npcs like the one in TC when there is a successful upgrade and you will see what you need to do....
Quote:
Originally Posted by iPlayHD
So... as soon as I turn on the Redux.exe this is what I get
|
Your database isn't setup correctly because it can't call the stored procedure for the guilds...
Make sure you use the SQL backup in the folder
|
|
|
12/08/2013, 00:35
|
#448
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
|
Stickied for continual development, involvement of the community, and starting stable development with the 5065 patch. The project is promising. Good luck with everything.
|
|
|
12/08/2013, 00:52
|
#449
|
elite*gold: 0
Join Date: Oct 2013
Posts: 7
Received Thanks: 1
|
Quote:
Originally Posted by Aceking
Your database isn't setup correctly because it can't call the stored procedure for the guilds...
Make sure you use the SQL backup in the folder
|
Thanks but I already found out what the problem was, apparently appserv sucks for this kind of thing I had to use the MySQL on the main post...
|
|
|
12/08/2013, 03:11
|
#450
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
I added basic broadcasts.
Nothing fancy, just broadcasts any new message once a minute.
Quote:
Originally Posted by mujake
Here's an working NPC to socket weapons made from GodlyArtisan in market
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Redux.Packets.Game;
namespace Redux.Npcs
{
/// <summary>
/// Handles NPC usage for Godly Artisan
/// </summary>
public class NPC_10065 : INpc
{
public NPC_10065(Game_Server.Player _client)
: base(_client)
{
ID = 10065;
Face = 54;
}
public override void Run(Game_Server.Player _client, ushort _linkback)
{
Responses = new List<NpcDialogPacket>();
AddAvatar();
var weapon = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
switch (_linkback)
{
case 0:
AddText("Hello , did you knew that an socketed weapon is better than one without sockets?");
AddText("It costs 1 DragonBall for the first socket and 5 DragonBall for the second one.");
AddOption("Help me put an socket then! .", 1);
AddOption("No. I like it this way.", 255);
break;
case 1:
if (_client.HasItem(1088000) && _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR) != null && weapon.Gem1 == 0)
{
weapon.Gem1 = 255;
_client.Send(ItemInformationPacket.Create(weapon));
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
else if (_client.HasItem(1088000, 5) && _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR) != null && weapon.Gem1 != 0 && weapon.Gem2 == 0)
{
weapon.Gem2 = 255;
_client.Send(ItemInformationPacket.Create(weapon));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
else
{
AddText("You don't have enough DragonBalls or your weapon is already socketed!");
AddOption("Ok! .", 255);
}
break;
}
AddFinish();
Send();
}
}
}
Work perfectly now , i think... thanks to aceking who told me where to look for packet update.
Feel free to improve it.
|
Nice job....small suggestion though.
Rather than checking the item slot over and over, why not just use the weapon variable you already initialized and assigned the item to?
Just check if the weapon variable is null rather than pulling the information again.
Will just make it a little more efficient
Quote:
Originally Posted by corbit15
Tried this a few different ways but still can't get it to change the color. Black armor color is 2.
Ill keep trying different ways to see what I come up with
#edit ok I bought armor from the shop thinking maybe it just didn't work with my armor. Still no success, however when I dropped the armor I bought it showed on the ground as black and I picked it up and it was black. So I guess its not updating right?
|
Code:
Structures.ConquerItem arm;
_client.TryGetEquipmentByLocation(Enum.ItemLocation.Armor, out arm);
if (arm != null)
{
arm.Color = 2;
arm.Save();
_client.Send(ItemInformationPacket.Create(arm, Enum.ItemInfoAction.Update));
_client.SpawnPacket.ArmorColor = 2;
_client.SendToScreen(_client.SpawnPacket);
}
|
|
|
All times are GMT +2. The time now is 14:19.
|
|