You last visited: Today at 08:31
Advertisement
[Release]Talisman in Coemu V2 Source
Discussion on [Release]Talisman in Coemu V2 Source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
05/26/2009, 14:56
#1
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
[Release]Talisman in Coemu V2 Source
look Img its works...
In game Server Source go to Handles, ItemEquip
Search for
Code:
else if ((ItemID >= 181300 && ItemID <= 192000 || ItemID >= 930000 && ItemID <= 940000) && EquipLocation == 9)//Returns Garment Position
{
return 9;
}
Add down this code:
Code:
else if ((ItemID >= 201003 && ItemID <= 201009) && EquipLocation == 10)//Returns Heaven Position
{
return 10;
}
else if ((ItemID >= 202003 && ItemID <= 202009) && EquipLocation == 11)//Returns Tower Position
{
return 11;
}
Working??, give me Tranks...
Attached Images
mane.JPG
(49.7 KB, 1906 views)
05/26/2009, 15:14
#2
elite*gold: 0
Join Date: Jan 2009
Posts: 145
Received Thanks: 4
i have another error below it,
at return -1, here's the error:
Error 1 Invalid token 'return' in class, struct, or interface member declaration
Error 2 Type or namespace definition, or end-of-file expected
help me? im in a rush be back later.
05/26/2009, 15:23
#3
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
testeofchaos...
My ItemEquip.cs ;D
Code:
/*
* Created by SharpDevelop.
* User: sams
* Date: 3/11/2009
* Time: 9:28 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections;
using System.Collections.Generic;
using CoEmu_v2_GameServer.Connections;
using CoEmu_v2_GameServer.Entities;
using CoEmu_v2_GameServer.Structs;
using CoEmu_v2_GameServer.Packets;
using CoEmu_v2_GameServer.Calculations;
using CoEmu_v2_GameServer.Database;
namespace CoEmu_v2_GameServer.Handlers
{
/// <summary>
/// Provides methods for equiping items
/// </summary>
public partial class Handler
{
public static void ItemEquip(int Location, int UID, ClientSocket CSocket)
{
if(CSocket.Client.Inventory.ContainsKey(UID))
{
Struct.ItemInfo Item = CSocket.Client.Inventory[UID];
int TrueLoc = DeterminePosition(Item.ItemID, Location);
if (Item.ItemID == 1050002 || Item.ItemID == 1050001 || Item.ItemID == 1050000)
Location = 5;
if(TrueLoc == Location)
{
if(CSocket.Client.Equipment.ContainsKey(Location))
{
int Loc2 = CSocket.Client.Equipment[Location].Position;
int UID2 = CSocket.Client.Equipment[Location].UID;
ItemUnequip(Loc2, UID2, CSocket);
}
//TODO: Item bonuses(attack etc)
//TODO: Position checks, class requirements
if(CSocket.Client.Equipment.ContainsKey(Location))
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Could not equip the item into that slot.", Struct.ChatType.Top));
return;
}
CSocket.Client.Inventory.Remove(UID);
Item.Position = Location;
CSocket.Client.Equipment.Add(Location, Item);
Database.Database.UpdateItem(Item);
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Position, Item.Color));
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, 255, Struct.ItemUsage.RemoveItem));
if (Location == 4 || Location == 5)
{
if (Item.ItemID != 1050002 && Item.ItemID != 1050001 & Item.ItemID != 1050000)
{
int Type = Calculation.WeaponType(Convert.ToString(Item.ItemID));
if (!CSocket.Client.Profs.ContainsKey(Type))
{
Struct.CharProf Prof = new Struct.CharProf();
Prof.ID = Type;
Prof.Level = 1;
Prof.Exp = 0;
CSocket.Client.Profs.Add(Type, Prof);
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You have learned a new weapon proficiency!", Struct.ChatType.Top));
Database.Database.NewProf(Prof.ID, Prof.Level, Prof.Exp, CSocket.Client.ID);
}
}
}
#region ItemCalculations
switch(Item.Soc1)
{
case 1:
{
CSocket.Client.NPG++;
break;
}
case 2:
{
CSocket.Client.RPG++;
break;
}
case 3:
{
CSocket.Client.SPG++;
break;
}
case 11:
{
CSocket.Client.NDG++;
break;
}
case 12:
{
CSocket.Client.RDG++;
break;
}
case 13:
{
CSocket.Client.SDG++;
break;
}
case 71:
{
CSocket.Client.NTG++;
break;
}
case 72:
{
CSocket.Client.RTG++;
break;
}
case 73:
{
CSocket.Client.STG++;
break;
}
default:
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Please report: Unknown GemID: " + Item.Soc1, Struct.ChatType.Talk));
break;
}
}
switch(Item.Soc2)
{
case 1:
{
CSocket.Client.NPG++;
break;
}
case 2:
{
CSocket.Client.RPG++;
break;
}
case 3:
{
CSocket.Client.SPG++;
break;
}
case 11:
{
CSocket.Client.NDG++;
break;
}
case 12:
{
CSocket.Client.RDG++;
break;
}
case 13:
{
CSocket.Client.SDG++;
break;
}
case 71:
{
CSocket.Client.NTG++;
break;
}
case 72:
{
CSocket.Client.RTG++;
break;
}
case 73:
{
CSocket.Client.STG++;
break;
}
default:
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Please report: Unknown GemID: " + Item.Soc2, Struct.ChatType.Talk));
break;
}
}
switch(Item.Bless)
{
case 7:
{
CSocket.Client.Bless += 7;
break;
}
case 5:
{
CSocket.Client.Bless += 5;
break;
}
case 3:
{
CSocket.Client.Bless += 3;
break;
}
case 1:
{
CSocket.Client.Bless += 1;
break;
}
case 0:
{
break;
}
default:
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Invalid bless: " + Item.Bless, Struct.ChatType.Top));
break;
}
}
if(Nano.Items.ContainsKey(Item.ItemID))
{
Struct.ItemData ItemD = Nano.Items[Item.ItemID];
CSocket.Client.BaseMagicAttack += ItemD.MagicAttack;
if(Item.Position == 5)
{
CSocket.Client.BaseMaxAttack += (int)Math.Floor(.5*ItemD.MaxDamage);
CSocket.Client.BaseMinAttack += (int)Math.Floor(.5*ItemD.MinDamage);
}
else
{
CSocket.Client.BaseMaxAttack += ItemD.MaxDamage;
CSocket.Client.BaseMinAttack += ItemD.MinDamage;
}
CSocket.Client.Defense += ItemD.DefenseAdd;
CSocket.Client.MaxHP += ItemD.HPAdd;
CSocket.Client.MaxHP += Item.Enchant;
CSocket.Client.MagicDefense += ItemD.MDefenseAdd;
CSocket.Client.MaxMP += ItemD.MPAdd;
CSocket.Client.Dodge += ItemD.DodgeAdd;
}
if(Item.Plus > 0)
{
string s_ItemID = Convert.ToString(Item.ItemID);
int itemidsimple = 0;
if ((Item.ItemID >= 900000 && Item.ItemID <= 900999) || (Item.ItemID >= 111303 && Item.ItemID <= 118999) || (Item.ItemID >= 130003 && Item.ItemID <= 139999))//Shields, Helms, Armors
{
/*s_ItemID = s_ItemID.Remove((s_ItemID.Length - 3), 1);
s_ItemID = s_ItemID.Insert((s_ItemID.Length - 2), "0");
s_ItemID = s_ItemID.Remove((s_ItemID.Length - 1), 1);
s_ItemID = s_ItemID.Insert((s_ItemID.Length), "0");*/
s_ItemID = s_ItemID.Remove((s_ItemID.Length -1), 1);
s_ItemID = s_ItemID.Insert(s_ItemID.Length, "0");
itemidsimple = Convert.ToInt32(s_ItemID);
}
else if ((Item.ItemID >= 150000 && Item.ItemID <= 160250) || (Item.ItemID >= 500000 && Item.ItemID <= 500400) || (Item.ItemID >= 120003 && Item.ItemID <= 121249) || (Item.ItemID >= 421003 && Item.ItemID <= 421339))//BS's, Bows, Necky/Bags
{
s_ItemID = s_ItemID.Remove((s_ItemID.Length - 1), 1);
s_ItemID = s_ItemID.Insert((s_ItemID.Length), "0");
itemidsimple = Convert.ToInt32(s_ItemID);
}
else if (Item.ItemID >= 510000 && Item.ItemID <= 580400)//2 Hander
{
s_ItemID = s_ItemID.Remove(0, 3);
s_ItemID = s_ItemID.Insert(0, "555");
s_ItemID = s_ItemID.Remove((s_ItemID.Length - 1), 1);
s_ItemID = s_ItemID.Insert((s_ItemID.Length), "0");
itemidsimple = Convert.ToInt32(s_ItemID);
}
else if (Item.ItemID >= 410000 && Item.ItemID <= 490400 && itemidsimple == 0)//1 Handers
{
s_ItemID = s_ItemID.Remove(0, 3);
s_ItemID = s_ItemID.Insert(0, "444");
s_ItemID = s_ItemID.Remove((s_ItemID.Length - 1), 1);
s_ItemID = s_ItemID.Insert((s_ItemID.Length), "0");
itemidsimple = Convert.ToInt32(s_ItemID);
}
if(Nano.ItemPluses.ContainsKey(itemidsimple))
{
Struct.ItemPlusDB IPlus = Nano.ItemPluses[itemidsimple];
if(IPlus.DB.ContainsKey(Item.Plus))
{
Struct.ItemPlus iPlus = IPlus.DB[Item.Plus];
CSocket.Client.BaseMaxAttack += iPlus.MaxDmg;
CSocket.Client.BaseMinAttack += iPlus.MinDmg;
CSocket.Client.Defense += iPlus.DefenseAdd;
CSocket.Client.BaseMagicAttack += iPlus.MDamageAdd;
CSocket.Client.BonusMagicAttack += iPlus.MDamageAdd;
CSocket.Client.BonusMagicDefense += iPlus.MDefAdd;
CSocket.Client.MaxHP += iPlus.HPAdd;
CSocket.Client.Dodge += iPlus.DodgeAdd;
//TODO: Dodge, etc
}
}
}
#endregion
Calculation.Attack(CSocket);
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter(CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, CSocket.Client.ID);
}
else if(TrueLoc > 0 && TrueLoc != Location)
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Incorrect equip location.", Struct.ChatType.Top));
}
else if(TrueLoc == -1)
{
Handler.UseItem(Item, CSocket);
}
}
else
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Item doesn't exist.", Struct.ChatType.Top));
}
}
public static int DeterminePosition(int ItemID, int EquipLocation)
{
if (ItemID >= 111000 && ItemID <= 119999 && EquipLocation == 1)//Returns HeadGear Position
{
return 1;
}
if(ItemID >= 123000 && ItemID <= 123109 && EquipLocation == 1)
{
return 1;
}
else if (ItemID >= 120000 && ItemID <= 129999 && EquipLocation == 2)//Returns Necklace Position
{
return 2;
}
else if (ItemID >= 130000 && ItemID <= 139999 && EquipLocation == 3)//Returns Armor Position
{
return 3;
}
else if (ItemID >= 410000 && ItemID <= 589999 && EquipLocation == 4)//Returns Weapon Default Position
{
return 4;
}
else if (ItemID >= 410000 && ItemID <= 589999 && EquipLocation == 5)//Returns Weapon Default Position
{
return 5;
}
else if(ItemID >= 601000 && ItemID <= 601339 && EquipLocation == 4)//Return Weapon, KATANA!
{
return 4;
}
else if(ItemID >= 601000 && ItemID <= 601339 && EquipLocation == 5)//Return Weapon, KATANA!
{
return 5;
}
else if (ItemID == 1050002 || ItemID == 1050001 || ItemID == 1050000)
{
return 5;
}
else if (ItemID >= 900000 && ItemID <= 900109 && EquipLocation == 5) //Shields
{
return 5;
}
else if (ItemID >= 150000 && ItemID <= 159999 && EquipLocation == 6)//Returns Ring Position
{
return 6;
}
else if (ItemID == 2100045 || ItemID == 2100025 && EquipLocation == 7)//Returns Gourd Position
{
return 7;
}
else if (ItemID >= 160000 && ItemID <= 169999 && EquipLocation == 8)//Returns Boots Position
{
return 8;
}
else if ((ItemID >= 181300 && ItemID <= 192000 || ItemID >= 930000 && ItemID <= 940000) && EquipLocation == 9)//Returns Garment Position
{
return 9;
}
else if ((ItemID >= 201003 && ItemID <= 201009) && EquipLocation == 10)//Returns HeavenTalismam Position
{
return 10;
}
else if ((ItemID >= 202003 && ItemID <= 202009) && EquipLocation == 11)//Returns TowerTalismam Position
{
return 11;
}
return -1;
}
}
}
05/26/2009, 15:43
#4
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
and what about items table in the database ?
05/26/2009, 15:45
#5
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
And if you want GoldCup/GoldTrophy/GoldPrize/SilverPrize/BronzePrize equiped, change:
Code:
else if (ItemID == 2100045 || ItemID == 2100025 && EquipLocation == 7)//Returns Gourd Position
{
return 7;
}
into:
Code:
else if (ItemID >= 2100025 && ItemID <= 2100095 && EquipLocation == 7)//Returns Gourd Position
{
return 7;
}
05/26/2009, 15:49
#6
elite*gold: 0
Join Date: Nov 2006
Posts: 35
Received Thanks: 14
offtopic..
why do you use case like that?
you could use case 1: action; break; too (dont get me wrong just a protip)
05/26/2009, 15:50
#7
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
Kiyono could ya help me out bro, i got the open ssl error and have no idea how to fix it
05/26/2009, 15:54
#8
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by
Beta Limit
Kiyono could ya help me out bro, i got the open ssl error and have no idea how to fix it
Open the Gameserver project expand "Preferences" rightclick ManagedOpenSSL hit remove and re-add.
05/26/2009, 16:01
#9
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
Beta Limit, its simple ,open project from Visual C# and Add Reference
Click in Browse and go to \CoEmu v2\CoEmu v2 GameServer
And add libeay32.dll
and go to \CoEmu v2\CoEmu v2 GameServer\bin\Debug
and add ManagedOpenSsl.dll
Fixed it.
Tranks??
Attached Images
pobb.JPG
(18.3 KB, 1803 views)
prob1.JPG
(34.4 KB, 1794 views)
prob2.JPG
(35.4 KB, 1794 views)
05/26/2009, 17:06
#10
elite*gold: 0
Join Date: Apr 2009
Posts: 17
Received Thanks: 1
Quote:
Originally Posted by
felipeboladao
Beta Limit, its simple ,open project from Visual C# and Add Reference
Click in Browse and go to \CoEmu v2\CoEmu v2 GameServer
And add libeay32.dll
and go to \CoEmu v2\CoEmu v2 GameServer\bin\Debug
and add ManagedOpenSsl.dll
Fixed it.
Tranks??
I don't have that ddl file :|
05/26/2009, 17:14
#11
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
Vijftig
Re-extract the source. it fix ;D
05/26/2009, 17:20
#12
elite*gold: 0
Join Date: Nov 2008
Posts: 357
Received Thanks: 250
Thank Youu For This Useful Post
05/26/2009, 17:23
#13
elite*gold: 0
Join Date: Apr 2009
Posts: 17
Received Thanks: 1
I found the file >.<
Error:
A reference to "D:\ etc etc etc" could not be added. Please make sure
that the file is accesible, and that it is a valid assembly or COM component.
:|
05/26/2009, 17:51
#14
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
Turn off your computer and restart and do the process again of previous post.
Its Fixed ;D
05/26/2009, 18:35
#15
elite*gold: 0
Join Date: Apr 2009
Posts: 17
Received Thanks: 1
restarted computer
still not working :|
and i Re-extracted
Can you send your ddl file please ?
EDIT:
It's working I did nothing :| but ok
thanks for helping
Similar Threads
[Release] CoEmu v2 Source With Talisman And More
03/24/2010 - CO2 PServer Guides & Releases - 63 Replies
i have Add Many thing from guides that already posted here
What i add on source?
-Talisman
-cps Save
-Maps Loaded
-fix ShopingMail
-CP Admin
-scrolls
[Release] SwordCo V5101 Source COEMU
03/17/2010 - CO2 PServer Guides & Releases - 17 Replies
I do not take credit for this i was just being snoopy and found it on megaupload...All Credits goto Main Creator
MEGAUPLOAD - The leading online storage and file delivery service
[Release]CoEmu V2 C++ Source
01/02/2010 - CO2 PServer Guides & Releases - 13 Replies
Hello Guys
i Writen This Source From Along Time
Now Time To Share It
DownLoad Link : CoEmu V2 C++ Source Writen By MeGaMaX.rar
If You Want It In another lang Just add Me [email protected]
[Release]Fix the ShopMall in Coemu Source
07/16/2009 - CO2 PServer Guides & Releases - 14 Replies
Okay, Best Code...
Look Imag's
http://www.elitepvpers.com/forum/attachment.php?at tachmentid=23183&stc=1&d=1243402494
http://www.elitepvpers.com/forum/attachment.php?at tachmentid=23184&stc=1&d=1243402494
http://www.elitepvpers.com/forum/attachment.php?at tachmentid=23185&stc=1&d=1243402494
[Release]NPCs for Coemu V2 source
06/26/2009 - CO2 PServer Guides & Releases - 2 Replies
Post here the Npcs for Coemu Source, thanks for you contribution...
case 104839: // BoxerLi PC- TG teleporter
{
if (LinkBack == 0)
{
Text("If you are level 20 or above, you may train ub the training ground. Would you like me to teleport you there for 1000 silver.", CSocket);
Link("Yes, please.", 1, CSocket);
Link("No Thanks.", 255, CSocket);
All times are GMT +1. The time now is 08:32 .