[RELEASE]MAKE SCROLLS WORK CoEmuV2

05/27/2009 23:39 almoshax.#1
hi guys thats the way to make scrolls work
in useitem.cs serach for
Quote:
case 1060020://twincity
{
Handler.Teleport(1002, 438, 377, 0, CSocket);
break;

}
case 1060023://phoniex
{
Handler.Teleport(1011, 232, 260, 0, CSocket);
break;

}
case 1060022://apecity
{
Handler.Teleport(1020, 565, 565, 0, CSocket);
break;

}
case 1060021://desertcity
{
Handler.Teleport(1000, 496, 649, 0, CSocket);
break;

}
case 1060024://birdisland
{
Handler.Teleport(1015, 723, 573, 0, CSocket);
break;

}
and thx for andy for that great source
sorry for bad english and tiny release
press rthank if i helped
Edit:edited it added
remove item after use
and i make the npc and it working good
and that the link
[Only registered and activated users can see links. Click Here To Register...]
05/28/2009 03:09 scottdavey#2
Code:
                    //Scrolls
                case 1060020:// Twin City Teleport
                    {
                        Handler.Teleport(1002, 438, 377, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Twin City!", Struct.ChatType.Top));
                        break;
                    }
                case 1060023: // Phoenix Castle Teleport
                    {
                        Handler.Teleport(1011, 232, 260, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Phoenix Castle!", Struct.ChatType.Top));
                        break;
                    }
                case 1060022:// Ape City Teleport
                    {
                        Handler.Teleport(1020, 565, 565, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Ape City!", Struct.ChatType.Top));
                        break;
                    }
                case 1060021:// Desert City Teleport
                    {
                        Handler.Teleport(1000, 496, 649, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Desert City!", Struct.ChatType.Top));
                        break;
                    }
                case 1060024:// Bird Island Teleport
                    {
                        Handler.Teleport(1015, 723, 573, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Bird Island!", Struct.ChatType.Top));
                        break;
                    }
Just made some minor changes, but it works fine.

Thanks.
05/28/2009 06:49 tere12#3
Here I got it working that it gives u 2 +12 items it was easy, but it gives katana when u speak with him :S
Quote:
case 923:
{
if (LinkBack == 0)
{
Text("Ho i can give you full +12 gea if you wish Just Choose your pro?", CSocket); //Remove one ) and add, CSocket
Link("Trojan", 1, CSocket);
Link("Warrior", 2, CSocket);
Link("Archer", 3, CSocket);
Link("Toa", 4, CSocket);
Link("NiNja", 5, CSocket);
Link("No, I dont need", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Struct.ItemInfo Item = new Struct.ItemInfo();
Item.Bless = 7;
Item.Dura = Item.MaxDura;
Item.Enchant = 25;
Item.ItemID = 410289;
Item.Plus = 12;
Item.Position = 0;
Item.Soc1 = 13;
Item.Soc2 = 13;
Item.Color = 0;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}
CSocket.Client.Inventory.Add(Item.UID, 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));
}
{
Struct.ItemInfo Item = new Struct.ItemInfo();
Item.Bless = 7;
Item.Dura = Item.MaxDura;
Item.Enchant = 25;
Item.ItemID = 601339;
Item.Plus = 12;
Item.Position = 0;
Item.Soc1 = 13;
Item.Soc2 = 13;
Item.Color = 0;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}
CSocket.Client.Inventory.Add(Item.UID, 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));
}
break;
}
05/29/2009 00:42 almoshax.#4
edited it now its better before it was working good but now better
and made npc and it worked good thats the link
[Only registered and activated users can see links. Click Here To Register...]
05/29/2009 00:53 kinshi88#5
Just a hint for all you guys.
The definition for the Delete bool is true, so you don't have to add Delete = true; to the items.
Only if you don't want to delete the item, add Delete = false;
Saves time and space.
It pays to be cool, stay in school =P
05/29/2009 01:08 almoshax.#6
oh thx first time i made with out delete
05/29/2009 02:06 scottdavey#7
Quote:
Originally Posted by kinshi88 View Post
Just a hint for all you guys.
The definition for the Delete bool is true, so you don't have to add Delete = true; to the items.
Only if you don't want to delete the item, add Delete = false;
Saves time and space.
It pays to be cool, stay in school =P
You sure about that? If i remove delete = true; in my scrolls the item won't delete.
05/29/2009 03:13 kinshi88#8
Quote:
Originally Posted by scottdavey View Post
You sure about that? If i remove delete = true; in my scrolls the item won't delete.
Yup. My items work perfect =D
05/29/2009 04:16 scottdavey#9
Quote:
Originally Posted by kinshi88 View Post
Yup. My items work perfect =D
Strange, why don't mine delete after use? I haven't touched anything lol.
05/29/2009 04:38 scottdavey#10
Yeah i know, i'm coding at 3am and i forgot to reload the debug. My fault lol.

Rewritten most npcs and made market/tg save your previous map, probably gonna be lots of typos atm i can barely see lol.
05/29/2009 17:45 almoshax.#11
oh shit when i edited it i made delete false sorry edited it again and now works fine
06/11/2009 09:23 arab4life#12
Quote:
Originally Posted by scottdavey View Post
Code:
                    //Scrolls
                case 1060020:// Twin City Teleport
                    {
                        Handler.Teleport(1002, 438, 377, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Twin City!", Struct.ChatType.Top));
                        break;
                    }
                case 1060023: // Phoenix Castle Teleport
                    {
                        Handler.Teleport(1011, 232, 260, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Phoenix Castle!", Struct.ChatType.Top));
                        break;
                    }
                case 1060022:// Ape City Teleport
                    {
                        Handler.Teleport(1020, 565, 565, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Ape City!", Struct.ChatType.Top));
                        break;
                    }
                case 1060021:// Desert City Teleport
                    {
                        Handler.Teleport(1000, 496, 649, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Desert City!", Struct.ChatType.Top));
                        break;
                    }
                case 1060024:// Bird Island Teleport
                    {
                        Handler.Teleport(1015, 723, 573, 0, CSocket);
                        Delete = true;
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You teleported to Bird Island!", Struct.ChatType.Top));
                        break;
                    }
Just made some minor changes, but it works fine.

Thanks.
i tried his didn't work but yours did

thanks
06/15/2009 01:59 almoshax.#13
which one worked mine or his
06/15/2009 04:57 CIRASH#14
Really sorry to bring this topic back but you all are forgetting stonecity scroll xD

Code:
                #region Scrolls
                case 1060020://TwinCityGate
                    {
                        Handler.Teleport(1002, 438, 377, 0, CSocket);
                        break;

                    }
                case 1060023://CastleGate
                    {
                        Handler.Teleport(1011, 190, 266, 0, CSocket);
                        break;

                    }
                case 1060022://ApeCityGate
                    {
                        Handler.Teleport(1020, 565, 565, 0, CSocket);
                        break;

                    }
                case 1060021://DesertCityGate
                    {
                        Handler.Teleport(1000, 500, 650, 0, CSocket);
                        break;

                    }
                case 1060024://BirdIslandGate
                    {
                        Handler.Teleport(1015, 723, 573, 0, CSocket);
                        break;

                    }
                case 1060102://StoneCityGate
                    {
                        Handler.Teleport(1213, 448, 272, 0, CSocket);
                        break;

                    }
                #endregion
06/15/2009 14:51 unknownone#15
Use a goddamn database. Have you not all noticed that you are practically repeating the same code 15 times and making it impossible to edit points add new points without recompiling. lrn2code.

Code:
ScrollPoint sp = Select().From("scroll_points").Where(Equals("scoll_id", MyItem));
Handler.Teleport(sp.Map, sp.X, sp.Y, CSocket);