some help with 5517 trinity source

05/23/2012 11:28 zoro7070#1
how can i make the autoinvite window don't show in a map
and i have problem with that npc
the npc upgrade the items above 140
Code:
#region Weapon Master
                case 7050:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    int aut = npcRequest.OptionID * 10;
                                    dialog.Text("Hi friend select the equipment you want to pass the level now? Each level costs a Dragonball.");
                                    dialog.Option("Upgrade HeadGear.", (byte)(aut + 1));
                                    dialog.Option("Upgrade Necklace/Bag.", (byte)(aut + 2));
                                    dialog.Option("Upgrade armor.", (byte)(aut + 3));
                                    dialog.Option("Upgrade main weapon.", (byte)(aut + 4));
                                    dialog.Option("Upgrade Left weapon/shield.", (byte)(aut + 5));
                                    dialog.Option("Upgrade Heavy Ring, Ring, Bracelet.", (byte)(aut + 6));
                                    dialog.Option("Upgrade Boots.", (byte)(aut + 8));
                                    dialog.Option("No need thanks!", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 100:
                                {
                                    if (client.SelectedItem == 0)
                                        return;
                                    var item = client.Equipment.TryGetItem(client.SelectedItem);
                                    var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];
                                    Conquer_Online_Server.Database.ConquerItemInformation infos = new Conquer_Online_Server.Database.ConquerItemInformation(item.ID, item.Plus);
                                    switch (client.UpdateType)
                                    {
                                        case 1:
                                        case 2:
                                            {
                                                byte cost = (byte)(itemdetail.Level / 6);
                                                cost += (byte)((item.ID % 10) / 3);
                                                uint id = 1088001;
                                                if (client.UpdateType == 2)
                                                    id++;
                                                if (client.Inventory.Contains(id, cost))
                                                {
                                                    client.Inventory.Remove(id, cost);
                                                    client.UnloadItemStats(item, false);
                                                    if (client.UpdateType == 1)
                                                        item.ID = infos.CalculateUplevel();
                                                    else
                                                        item.ID = infos.CalculateDownlevel();
                                                    if (infos.BaseInformation.ID == item.ID)
                                                        return;
                                                    Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                                    item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                    item.Send(client);
                                                    _String str = new _String(true);
                                                    str.UID = client.Entity.UID;
                                                    str.TextsCount = 1;
                                                    str.Type = _String.Effect;
                                                    str.Texts.Add("perfect");
                                                    client.Screen.SendScreen(str, true);
                                                    client.LoadItemStats(item);
                                                    client.Equipment.UpdateEntityPacket();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                byte cost = (byte)(itemdetail.Level / 30);
                                                cost += (byte)((item.ID % 10) / 2);
                                                uint id = 1088000;

                                                if (client.Inventory.Contains(id, cost))
                                                {
                                                    client.Inventory.Remove(id, cost);
                                                    client.UnloadItemStats(item, false);
                                                    item.ID++;
                                                    Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                                    item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                    item.Send(client);
                                                    _String str = new _String(true);
                                                    str.UID = client.Entity.UID;
                                                    str.TextsCount = 1;
                                                    str.Type = _String.Effect;
                                                    str.Texts.Add("perfect");
                                                    client.Screen.SendScreen(str, true);
                                                    client.LoadItemStats(item);
                                                    client.Equipment.UpdateEntityPacket();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            default:
                                {
                                    if (npcRequest.OptionID == 255)
                                        break;
                                    byte SelectedItem = (byte)(npcRequest.OptionID % 10);
                                    byte NowType = (byte)(npcRequest.OptionID / 10);
                                    if (client.Equipment.Free(SelectedItem))
                                    {
                                        dialog.Text("You have to be wearing the selected item.");
                                        dialog.Option("I'll just leave", 255);
                                        dialog.Send();
                                        return;
                                    }
                                    var item = client.Equipment.TryGetItem(SelectedItem);
                                    var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];

                                    if (itemdetail.Level == Conquer_Online_Server.Network.PacketHandler.ItemMaxLevel(client.SelectedItem) && client.UpdateType == 1)
                                    {
                                        dialog.Text("This item's level cannot be upgraded anymore.");
                                        dialog.Option("Ahh sorry.", 255);
                                        dialog.Send();
                                        client.SelectedItem = 0;
                                        client.UpdateType = 0;
                                        return;
                                    }
                                    if (NowType == 1)
                                    {
                                        dialog.Text("It will cost you one dragonball. Do you accept?");
                                        dialog.Option("Yes.", (byte)(20 + SelectedItem));
                                        dialog.Option("No thank you.", 255);
                                        dialog.Send();
                                    }
                                    else
                                    {
                                        Conquer_Online_Server.Database.ConquerItemInformation infos = new Conquer_Online_Server.Database.ConquerItemInformation(item.ID, item.Plus);
                                        Conquer_Online_Server.Database.ConquerItemInformation infos2 = new Conquer_Online_Server.Database.ConquerItemInformation(infos.CalculateUplevel(), item.Plus);
                                        if (client.Entity.Level < infos2.BaseInformation.Level)
                                        {
                                            dialog.Text("You need level " + infos2.BaseInformation.Level + " first.");
                                            dialog.Option("Ahh sorry.", 255);
                                            dialog.Send();
                                            client.SelectedItem = 0;
                                            client.UpdateType = 0;
                                            return;
                                        }
                                        if (client.Inventory.Contains(1088000, 1))
                                        {
                                            client.Inventory.Remove(1088000, 1);
                                            client.UnloadItemStats(item, false);
                                            item.ID = infos.CalculateUplevel();
                                            Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                            item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                            item.Send(client);
                                            _String str = new _String(true);
                                            str.UID = client.Entity.UID;
                                            str.TextsCount = 1;
                                            str.Type = _String.Effect;
                                            str.Texts.Add("perfect");
                                            client.Screen.SendScreen(str, true);
                                            client.LoadItemStats(item);
                                            client.Equipment.UpdateEntityPacket();
                                        }
                                    }
                                }
                                break;
                        }
                        break;
                    }
                #endregion
05/23/2012 11:31 Kiyono#2
For the invite to not show in certain maps, go to your invite code and simply place a map id check.
05/23/2012 12:18 |xabi|#3
Mapid != the id of map

for the autoinvite
05/23/2012 15:50 turk55#4
Quote:
Originally Posted by |xabi| View Post
Mapid != the id of map

for the autoinvite
if (MapID != 1002) // just a example

you basically say if the person isnt in map 1002
05/25/2012 14:26 zoro7070#5
what about that
Code:
if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 159)//DeathTeam
                        {
                            client.Entity.Teleport(1595, 125, 130);
                        }
05/25/2012 15:02 shadowman123#6
Quote:
Originally Posted by zoro7070 View Post
what about that
Code:
if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 159)//DeathTeam
                        {
                            client.Entity.Teleport(1595, 125, 130);
                        }
well if u noticed OptionID = 159 so this means once u send Auto invite to players with optionID = 159 .... the Players will be sent to map 1595 of x = 125, y = 130 if they pressed Ok Button .. got it ?? All u miss is sending Auto invite to players and it would be Like that

Set Timer in Program.cs and write this Code in its block

Code:
client.Send(new NpcReply(6, " Team Death match Has Just Begun .. would you like To join  ") { OptionID = 159 });
wish u good luck
05/25/2012 20:22 zoro7070#7
Quote:
Originally Posted by shadowman123 View Post
well if u noticed OptionID = 159 so this means once u send Auto invite to players with optionID = 159 .... the Players will be sent to map 1595 of x = 125, y = 130 if they pressed Ok Button .. got it ?? All u miss is sending Auto invite to players and it would be Like that

Set Timer in Program.cs and write this Code in its block

Code:
client.Send(new NpcReply(6, " Team Death match Has Just Begun .. would you like To join  ") { OptionID = 159 });
wish u good luck
i think i get it whatever i will try it

but what about the items when i upgrade it -boot- its level became above 140
05/25/2012 22:25 shadowman123#8
Quote:
Originally Posted by zoro7070 View Post
i think i get it whatever i will try it

but what about the items when i upgrade it -boot- its level became above 140
thats bec u didnt make Level checkers ..make check like that if item level reaches most level which is 140 the npc says " Item Cannot be Upgraded Anymore "

Try getting it from any other Source
05/25/2012 22:57 zoro7070#9
Quote:
Originally Posted by shadowman123 View Post
thats bec u didnt make Level checkers ..make check like that if item level reaches most level which is 140 the npc says " Item Cannot be Upgraded Anymore "

Try getting it from any other Source
:rolleyes::rolleyes::handsdown::handsdown:
works fine i take the npc from another source