|
You last visited: Today at 21:08
Advertisement
P Server "NPC base code/shops/drop items" for who asked me 2 do it
Discussion on P Server "NPC base code/shops/drop items" for who asked me 2 do it within the CO2 Private Server forum part of the Conquer Online 2 category.
07/11/2008, 04:01
|
#1786
|
elite*gold: 0
Join Date: Aug 2007
Posts: 295
Received Thanks: 89
|
Quote:
Originally Posted by scottdavey
Anyway try this i don't think you seen it because i edited it after you replyed
|
Code:
if (Splitter[0] == "/rev")
{
[b]if (TheClient.MyChar.Alive == false)
{[/b]
TheClient.SendPacket(ThePackets.RemoveEntity((uint)TheClient.MyChar.UID));
TheClient.SendPacket(ThePackets.SomePacket((long)TheClient.MyChar.UID, 0));
TheClient.SendPacket(ThePackets.SomePacket3((long)TheClient.MyChar.UID));
TheClient.SendPacket(ThePackets.Status(TheClient.MyChar, 1, 0, 26));
TheClient.MyChar.CurHP = TheClient.MyChar.MaxHP;
TheClient.MyChar.Alive = true;
WorldHandler.SpawnMeToOthers(TheClient,false);
TheClient.SendPacket(ThePackets.CharacterInfo(TheClient.MyChar));
TheClient.MyChar.SendEquips2();
TheClient.SendPacket(ThePackets.Vital((long)TheClient.MyChar.UID, 9, 100));
TheClient.SendPacket(ThePackets.Vital2((long)TheClient.MyChar.UID,TheClient.MyChar.CurHP));
[b]}[/b]
}
A little validation never hurts  Prevents abusing this in order to get full hp and mp, useful if you have other people playing.
|
|
|
07/11/2008, 04:50
|
#1787
|
elite*gold: 0
Join Date: Jun 2008
Posts: 22
Received Thanks: 0
|
Quote:
Originally Posted by imunknown
you want something like a command that shows if there online, or last time on kinda deal? or are you looking for a full list of current users online? Sorry if you've already answered this, its late and Im lazy 
|
no i have that already.... but im missing a very small part of the puzzle =(
|
|
|
07/11/2008, 04:59
|
#1788
|
elite*gold: 0
Join Date: Jan 2007
Posts: 20
Received Thanks: 3
|
Quote:
Originally Posted by ammunation
k ive looked at a lot of pages and cant seem to find this although i know the information is here this is kind of a last resort
[1611]
face=9
txt0=Which items would you like to trade for a reward?
opt0=10 SunDiamonds for 5 mets-10 MoonDiamonds for 10 mets-15 StarDiamonds for 1 Dragonball-15 CloudDiamonds for 1 Dragonball and 1 AncestorBox
req=item,721533,0,0,0,0,0,10-item,721534,0,0,0,0,0,10-item,721535,0,0,0,0,0,15-item,721536,0,0,0,0,0,15
rew=item,1088001,0,0,0,0,0,5-item,1088001,0,0,0,0,0,10-item,1088000,0,0,0,0,0,1-item,1088000,0,0,0,0,0,1
where am i going wrong
i also noticed when i tried to spawn items using my compiled version i have to use the next item in the list to spawn the previous for example clouddiamond spawns me a stardiamond and star spawns a moon and so on think i need a fixed one
Ill release my full npc diag file when im done so far ive done birth village some of tc and some of market
|
this isnt working because you got to end it with a nothing opt, one to leave thats why you arent getting any rew with it, try it should work then
|
|
|
07/11/2008, 06:12
|
#1789
|
elite*gold: 0
Join Date: Oct 2006
Posts: 72
Received Thanks: 63
|
This code is for working met/db scrolls. Put it in your Equip.cs
Quote:
#region DBMetScrolls
case 720027:
{
Random Xx = new Random();
int ItemInInv = 0;
for (int coun = 0; coun < TheClient.MyChar.Inventory.Length; coun++)
{
if (TheClient.MyChar.Inventory[coun] != null)
ItemInInv++;
}
Console.WriteLine("inv lenght {0}", ItemInInv);
if (ItemInInv <= 30)
{
for (int db = 0; db < 10; db++)
{
long idd = (long)(1000 + Xx.Next(16777215));
TheClient.MyChar.AddAnItem("1088001-0-0-0-0-0", 0, true, idd, false);
}
}
else
{
TheClient.SendPacket(ThePackets.SendMsg(TheClient. MessageId, "System", TheClient.MyChar.CharName, "Please free 10 slots!", 2014));
goto NotFree;
}
break;
}
case 720028:
{
Random Xx = new Random();
int ItemInInv = 0;
for (int coun = 0; coun < TheClient.MyChar.Inventory.Length; coun++)
{
if (TheClient.MyChar.Inventory[coun] != null)
ItemInInv ++;
}
Console.WriteLine("inv lenght {0}", ItemInInv);
if (ItemInInv <= 30)
{
for (int db = 0; db < 10; db++)
{
long idd = (long)(1000 + Xx.Next(16777215));
TheClient.MyChar.AddAnItem("1088000-0-0-0-0-0", 0, true, idd, false);
}
}
else
{
TheClient.SendPacket(ThePackets.SendMsg(TheClient. MessageId, "System", TheClient.MyChar.CharName, "Please free 10 slots!", 2014));
goto NotFree;
}
break;
}
#endregion
|
|
|
|
07/11/2008, 06:25
|
#1790
|
elite*gold: 0
Join Date: Oct 2006
Posts: 72
Received Thanks: 63
|
Adding a Auto-Restarter.
Open TheMain.cs then follow the steps
First search for:
Quote:
|
Timer SaveTimer = new Timer();
|
Below that add:
Quote:
|
Timer RestartTimer = new Timer();
|
Go down about 17 lines down to you see this:
Quote:
|
ItemHandler.LoadAllDrops();
|
Below that add:
Quote:
RestartTimer.Interval = 15000000;
RestartTimer.Tick += new EventHandler(RestartTimer_Tick);
RestartTimer.Start();
|
You can change the interval depending on how long you want it to restart. Atm its set to 5 hours.
Now last thing scroll down to you see:
Quote:
|
void SaveTimer_Tick(object sender, EventArgs e)
|
Above that add this:
Quote:
void RestartTimer_Tick(object sender, EventArgs e)
{
RestartTimer.Stop();
WorldHandler.SaveAllChars();
Console.WriteLine("Server is now restarting!");
System.Diagnostics.Process.Start("restart.exe");
Environment.Exit(0);
RestartTimer.Start();
}
|
Save recompile it. then run. your restarter is now activated
|
|
|
07/11/2008, 06:33
|
#1791
|
elite*gold: 0
Join Date: Oct 2006
Posts: 72
Received Thanks: 63
|
Adding login server messages.
Open Login.cs
Search for this:
Quote:
|
Console.WriteLine("YourGuild {0}", CG);
|
A few lines above that you will see the login server message.
Bellow that add these:
Quote:
TheClient.SendPacket(ThePackets.SendMsg(TheClient. MessageId, "System", TheClient.MyChar.CharName, ("MESSAGE HERE!"), 2000));
TheClient.SendPacket(ThePackets.SendMsg(TheClient. MessageId, "System", TheClient.MyChar.CharName, ("MESSAGE HERE!"), 2000));
TheClient.SendPacket(ThePackets.SendMsg(TheClient. MessageId, "System", TheClient.MyChar.CharName, ("MESSAGE HERE!"), 2000));
TheClient.SendPacket(ThePackets.SendMsg(TheClient. MessageId, "System", TheClient.MyChar.CharName, ("MESSAGE HERE!"), 2000));
|
You can put your server updates on here so people can read them when they log in.
Cheers
|
|
|
07/11/2008, 06:56
|
#1792
|
elite*gold: 0
Join Date: Jun 2008
Posts: 418
Received Thanks: 56
|
Quote:
Originally Posted by samehvan
fixed
yea i got ur point and u are r8 it became little confusing ,seems we are goin en a very different ways here so i think i should stop releasing ,that will help u to concentrate on one edits (the Revs one)
i dunno tell now what is the different in there ,ADZ knows coz he is the updater so he is the only one who can add them ,or it will be a miss there
no , the vista system cant deal with the server packets ATM .
|
Oi dont stop releasing O_o you cant take out the person who started the whole thing! I personally think you should just join up with Adz, and Gfun. You're on the team anyway O_o i say just try to compile your source with the Rev sources. No reason to let someone fall off right? =) a member of the team is a member regardless.
Dont stop man, but dont go it alone either.
|
|
|
07/11/2008, 07:53
|
#1793
|
elite*gold: 0
Join Date: Sep 2006
Posts: 9
Received Thanks: 0
|
Some Help?
Alright I'm Using Rev4B and I can't seem to get the exp to work in the server.ini file leveling is set to 1.What I do it go back to level 1 and try killing pheasents but that doesn't give me exp.The EXP ***** do give me exp tho.Also I don't know why but every time I try to add more drops (Dragonball,Expball) it crashes the server.Can Anybody help? I know a bit of C#  Btw Thanks For the Source.
|
|
|
07/11/2008, 08:15
|
#1794
|
elite*gold: 0
Join Date: Jun 2007
Posts: 390
Received Thanks: 92
|
How to learn skills from skillbooks from market or NightDevil skillbookfound from a mob for normal player?
|
|
|
07/11/2008, 08:24
|
#1795
|
elite*gold: 0
Join Date: Sep 2006
Posts: 9
Received Thanks: 0
|
Quote:
Originally Posted by stephanyd
How to learn skills from skillbooks from market or NightDevil skillbookfound from a mob for normal player? 
|
I belive that would be coded in the equip.cs altho I see no point as in most skills don't work but i'm not so good at C# I just started learning but I belive it would be coded just like the moneybags and exp ***** just that it would give a skill instead of money/exp.BTW does rev4B have exp working? I'm going to try out the source.rar samhav posted see if that works.If anyone's interested i'll try to code it ^^.
|
|
|
07/11/2008, 08:47
|
#1796
|
elite*gold: 0
Join Date: Jul 2008
Posts: 20
Received Thanks: 0
|
Eh, tangaroa's codes screwed up my source...now i gotta start all over >_>
@adz, the rev doesnt fix my mana...i added everything but it still doesnt work...something im doing wrong? =/
|
|
|
07/11/2008, 09:44
|
#1797
|
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
|
Quote:
Originally Posted by zane203
Oi dont stop releasing O_o you cant take out the person who started the whole thing! I personally think you should just join up with Adz, and Gfun. You're on the team anyway O_o i say just try to compile your source with the Rev sources. No reason to let someone fall off right? =) a member of the team is a member regardless.
Dont stop man, but dont go it alone either.
|
I think all he ment was for me to add his updates to the source, he won't quit don't worry about that.
Quote:
Originally Posted by lawlxx
Eh, tangaroa's codes screwed up my source...now i gotta start all over >_>
@adz, the rev doesnt fix my mana...i added everything but it still doesnt work...something im doing wrong? =/
|
Yes
|
|
|
07/11/2008, 09:50
|
#1798
|
elite*gold: 0
Join Date: Jul 2008
Posts: 20
Received Thanks: 0
|
Gahh, tellzzzzz lol.
>.o
|
|
|
07/11/2008, 09:56
|
#1799
|
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
|
Quote:
Originally Posted by zane203
Oi dont stop releasing O_o you cant take out the person who started the whole thing! I personally think you should just join up with Adz, and Gfun. You're on the team anyway O_o i say just try to compile your source with the Rev sources. No reason to let someone fall off right? =) a member of the team is a member regardless.
Dont stop man, but dont go it alone either.
|
i am not quitting but , i asked to arrange a meeting so we can know how we will go on (as a team that should be) tell now that ddnt happen ,then i said i dd the drop rate but i figure out that the REV has another one ,the point is that will make 2 functions and tooooo many unuseful Vars ,i cant follow the new files and they surely will had a very hard time when i just release anynew adds coz they will have to check every line to c which are the new lines or edits that will be awful ,the disaster will be if we both create a Func or Var with the same name ,
they are doin a great work we all should appreciate that ,and i am the one u can blame coz my short free time ,
when i started this thread i though about helping ppl not confusing them but now i just feel i do confuse them , the edits they do are very helpful and fine so i think it is the time to be a normal user after all
|
|
|
07/11/2008, 10:04
|
#1800
|
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
|
Quote:
Originally Posted by 12it123
I belive that would be coded in the equip.cs altho I see no point as in most skills don't work but i'm not so good at C# I just started learning but I belive it would be coded just like the moneybags and exp ***** just that it would give a skill instead of money/exp.BTW does rev4B have exp working? I'm going to try out the source.rar samhav posted see if that works.If anyone's interested i'll try to code it ^^.
|
yes it is there , at Equip.cs u will find that Func
private void UseItem_(long ItemUID)
under it u will find lines in cases order by the item ID, so u will only need to add somethings like that
Code:
case <put ur skill book itemID here>:
{
TheClient.MyChar.SkillAdd(skill id,skill lvl);
break;
}
|
|
|
Similar Threads
|
Verkaufe: Guild Wars "Platin", "Ectos, "Items" mehr...
09/12/2008 - Guild Wars Trading - 0 Replies
Hallo,
ich biete gegen Euro viele schöne dinge für das Spiel Guild Wars an. Bitte meldet euch dann bei mir per PM was genau ihr haben möchtet und wieviel von den jeweiligen Virtuellen Gegenständen. Die Übergabe kann wie folgt ab laufen. Ich erstelle extra für euch die Ebay Auktion mit der gewünschten menge der jeweiligen Virtuellen Guild Wars gegenstände. Wenn ihr kein Ebay habt und euch auch kein Account anlegen möchtet kann die Übergabe auch ausserhalb Ebays statt finden hierzu erhaltet...
|
All times are GMT +1. The time now is 21:09.
|
|