The CoEmu V2 NPC Thread - Post your ready made NPCs

06/03/2009 02:52 scottdavey#31
Quote:
Originally Posted by m4l4ria View Post
Can Help me?
Error in the name 'Face' dont existi in the current context :confused:
Search
06/03/2009 02:53 UnoAmigos#32
Honestly i want LOFT than this....lot of damn bugs................. ;-(
06/03/2009 03:00 scottdavey#33
Quote:
Originally Posted by UnoAmigos View Post
Honestly i want LOFT than this....lot of damn bugs................. ;-(
You want Land of forgotten the?

I've never heard of such a thing, it's nothing to do with bugs. It's mainly just the fact that your a nubcake.
06/03/2009 04:36 Zeroxelli#34
Quote:
Originally Posted by UnoAmigos View Post
Honestly i want LOFT than this....lot of damn bugs................. ;-(
LOL WHAT THE FU_-------89d&(@#)

You're saying LOTF has less bugs than CoEmu? ROFLMAO.

Thanks, I feel better now. :)

EDIT: Also, this source has no real bugs unless you fuck something up; thus ignorance :D
06/04/2009 06:07 killerbee#35
Quote:
Originally Posted by felipeboladao View Post
To Work Record Maps ;D For Leave Conducter in Market.

Go to Handles Folder , Teleport.cs Replace it to
Code:
/*
 * Created by SharpDevelop.
 * User: sams
 * Date: 3/14/2009
 * Time: 1:56 PM
 * 
 * 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;

namespace CoEmu_v2_GameServer.Handlers
{
	/// <summary>
	/// Handles teleportations in the Conquer worls
	/// </summary>
	public partial class Handler
	{
		public static void Teleport(int Map, int X, int Y, int Instance, ClientSocket CSocket)
		{
            if (Map > 0 && X > 0 && Y > 0 && CSocket != null)
            {
                ConquerPacket.ToLocal(ConquerPacket.General(CSocket.Client.ID, CSocket.Client.X, CSocket.Client.Y, 0, 0, 0, Struct.DataType.EntityRemove), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, CSocket.Client.ID);
                CSocket.Client.RecordMap = (int)CSocket.Client.Map;
                CSocket.Client.RecordX = CSocket.Client.X;
                CSocket.Client.RecordY = CSocket.Client.Y;
                CSocket.Client.Map = (Struct.Maps)Map;
                CSocket.Client.X = X;
                CSocket.Client.Y = Y;
                //TODO: Instance pairing.
                CSocket.Send(ConquerPacket.General(CSocket.Client.ID, (int)CSocket.Client.Map, 0, CSocket.Client.X, CSocket.Client.Y, 0, Struct.DataType.ChangeMap));
                CSocket.Send(ConquerPacket.General(CSocket.Client.ID, Nano.TintR, Nano.TintG, 0, 0, 0, Struct.DataType.CompleteMapChange));
                CSocket.Send(ConquerPacket.NewMap((int)CSocket.Client.Map));
                CSocket.Send(ConquerPacket.General(CSocket.Client.ID, 2, 0, CSocket.Client.X, CSocket.Client.Y, 0, Struct.DataType.MapShow3));
                ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter(CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, CSocket.Client.ID);
                CSocket.Client.PrevX = 0;
                CSocket.Client.PrevY = 0;
                Spawn.All(CSocket);
			}
		}
	}
}
And go to Chat.cs and Replace

Code:
               case 45: // Mark. Controller
                    {
                        if (LinkBack == 0)
                        {
                            Text("Hello I can teleport You outside of the market for free! Do you want to leave?", CSocket);
                            Link("Why would you be so kind to do so?", 1, CSocket);
                            Link("No, Thank you anyway.", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            if (CSocket.Client.RecordMap == 1002) //Twin City
                            {
                                Teleport(1002, 430, 380, 0, CSocket);
                            }
                            else if (CSocket.Client.RecordMap == 1011) //phoniex
                            {
                                Teleport(1011, 232, 260, 0, CSocket);
                            }
                            else if (CSocket.Client.RecordMap == 1020) //apecity
                            {
                                Teleport(1020, 565, 565, 0, CSocket);
                            }
                            else if (CSocket.Client.RecordMap == 1000) //desertcity
                            {
                                Teleport(1000, 496, 649, 0, CSocket);
                            }
                            else if (CSocket.Client.RecordMap == 1015) //birdisland
                            {
                                Teleport(1015, 723, 573, 0, CSocket);
                            }
                            else //For Other Map
                                Teleport(1002, 430, 380, 0, CSocket);
                        }
                        break;
                    }
And Replace in Database.cs

Code:
        public static void SaveCharacter(Character Client)
        {
            MySqlCommand Cmd = new MySqlCommand("UPDATE `characters` SET `Level` = " + Client.Level + ", `WHMoney` = " + Client.WHMoney + ", `PkPoints` = " + Client.PkPoints + ", `xCord` = " + Client.X + ", `yCord` = " + Client.Y + ", `Map` = " + (int)Client.Map + ", `HairStyle` = " + Client.Hair + ", `Class` = " + (int)Client.Class + ", `Exp` = " + Client.Exp + ", `Money` = " + Client.Money + ", `CPoints` = " + Client.CPs + ", `Str` = " + Client.Strength + ",`Vit` = " + Client.Vitality + ", `Spi` = " + Client.Spirit + ", `Dex` = " + Client.Dexterity + ", `StatPoints` = " + Client.StatPoints + ", `FirstLog` = " + 1 + ", `Reborn` = " + Client.Reborn + ", `HP` = " + Client.CurrentHP + ", `MP` = " + Client.CurrentMP + ", `RecordMap` = " + Client.RecordMap + ", `RecordX` = " + Client.RecordX + ", `RecordY` = " + Client.RecordY + " WHERE `CharID` = " + Client.ID, DatabaseConnection.NewConnection());
            Cmd.ExecuteNonQuery();
            Cmd.Connection.Close();
            Cmd.Connection.Dispose();
            Cmd.Dispose();
        }
Work??, Give me +k...


ok, after i debug the codes above, but when in, it wont log in, frozen login. it refers to where i pointed on the image. anybody got any ideas. sorry for the big image.

[Only registered and activated users can see links. Click Here To Register...]
06/04/2009 09:16 damianpesta#36
Quote:
Originally Posted by killerbee View Post
ok, after i debug the codes above, but when in, it wont log in, frozen login. it refers to where i pointed on the image. anybody got any ideas. sorry for the big image.

[Only registered and activated users can see links. Click Here To Register...]
Make a table im phpmyadmin 4 the commands you get error on.
06/04/2009 13:18 BlooD-BoY#37
Quote:
Originally Posted by killerbee View Post
ok, after i debug the codes above, but when in, it wont log in, frozen login. it refers to where i pointed on the image. anybody got any ideas. sorry for the big image.

[Only registered and activated users can see links. Click Here To Register...]
go to mysql (either from phpmyadmin or from any prog like navicat or w/e) go to the 'character' tab and edit it, add these 3 :

Record map, int, 11, 0, no null
Record X, int, 11, 0, no null
Record Y, int, 11, 0, no null

enjoy.
06/04/2009 17:22 ScamBolterII#38
Quote:
Originally Posted by scottdavey View Post
Search
I got the same error how you mean search ?
06/04/2009 17:23 scottdavey#39
It's not my code your having a problem with, pm the author.
06/04/2009 18:41 nuhali#40
i got this error
Error The name 'LinkBack' does not exist in the current context
06/04/2009 21:53 killerbee#41
thank you BlooD-BoY. now the error is gone.
06/04/2009 22:23 danielachraf#42
For who have error on LoginServer/databaseconnection line 30 ... Because you didn't setup mysql ..
06/05/2009 00:14 coreymills#43
EDIT: code didnt work workin on it again
06/25/2009 12:54 duddz#44
Ok i Tried taking the Db to cps npc and editing it but i kept getting an error.
Code:
                [U]case[/U] 10062: // Gears
                    {
                        if (LinkBack == 0)
                        {
                            Text("Hi. Gear here.", CSocket);
                            Link("Trojan", 1, CSocket);
                            Link("Nevermind", 255, CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            int AMUID = 0;
                            int AMcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 1088000)
                                {
                                    AMUID = Item.UID;
                                    AMcount++;
                                }
                            }

                            if (AMcount >= 1)
                            {
                                AddItem(130009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                CSocket.Client.Inventory.Remove(AMUID);
                                CSocket.Send(ConquerPacket.ItemUsage(AMUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(AMUID);
                                Text("There you go.", CSocket);
                                Link("Bye.", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("Your Do not have a trojan Amulet", CSocket);
                                Link("Bye.", 255, CSocket);
                                End(CSocket);
                            }
                        }
                    }
I get an error under that something like "Control cannot fall through from one case label ('case 10062':) to another"
Can Any1 let me know what i did wrong?
06/25/2009 13:03 Kiyono#45
You forgot the break; at the end.