I need Some C# Scripts here please!!

10/08/2010 13:20 sohaib#1
Hi, i have a Conquer private server 5165, i'm asking for some npcs

i'm searching but it's hard, so i asked you guys to help me

1- Npc To Compose Steeds

2- When Someone Die In guild war, will be sent in another place (like desert or twin city)

3- Npc to echant items (you put echant sdg in your item and you get 255 hp in) , my wuxin four is to compose +12 and +15 only, so i need another npc near him to echant

4- My pk emulet delete 50k pk points in the place of 30, and if you have 1k pk pount for exemple you will not have 0, you will have (50k-1k=49k) 49k pk points , is it possible to make it delete 30 ou 100 only, and make fix this bug ( i want it 1k pk points-50k[pk emulet] =0pk points not 49k)
10/08/2010 18:32 pro4never#2
Well most of that is simple enough to do yourself but here's some advice for the pk amulet.


if((int)GC.MyChar.PkPts - (int)AmountToRemove < 1)
GC.MyChar.PkPts = 0;
else
GC.MyChar.PkPts -= AmountToRemove


Using int will allow the value to go below 0 vs looping back around to the highest value.

I had a bit of a problem with this when I was doing my damage calculations. I'd kill a mob and hp would go from like 20 or w/e was left up to a huge number cause it looped around. Uint does not support negative values, that's the whole point of them.
10/08/2010 21:09 tomtucker#3
Code:
if (GC.MyChar.Loc.Map == 1038 && Features.GuildWars.War)
                        GC.MyChar.Teleport(6001, 32, 72);
                    else
                    {
                        if (GC.MyChar.PKPoints >= 100)
                            GC.MyChar.Teleport(6000, 32, 72);
10/08/2010 21:38 pro4never#4
@ Decker

That way teleports you out as soon as you die, he wants to send elsewhere when you revive.

Hint: Go to your revive handler in your packet handling and it should have something along the lines of revive points. Add a revive point for map 1038 (guessing decker has the map ## correct at least) to revive them wherever you want.

Personally i did a random number of coords outside of the guild gates but that was just me (That way people could still come back but would at least be kicked outside the gates and with enough randomness that there wasn't a spawn to camp)
10/08/2010 22:09 tomtucker#5
Ok Sohaib, for the guild war.

Search for:

Code:
public static void LoadRevPoints()
Under that you will see a bunch of mapids and coords, you can make a new one for twin city.

Code:
RevPoints[0] = new ushort[4] { 1002, 1002, 430, 380 };
The last one is:
Code:
RevPoints[[COLOR="Red"]21[/COLOR]] = new ushort[4] { 6000, 6000, 29, 50 };
So you would make a new one:
Code:
RevPoints[22] = new ushort[4] { mapid, mapid, xcord, ycord };
Then you need 2 more.

So now search for:
Code:
foreach (ushort[] Point in Database.RevPoints)
Under it you will see:
Code:
GC.MyChar.Teleport(Point[1], Point[2], Point[3]);
Change it to:

Code:
GC.MyChar.Teleport(Point[23], Point[24], Point[25]);
10/09/2010 11:15 sohaib#6
thank you guys, but i have another little problem i hope to get some help, when i trade a +15 item, other players see it +0 in the trade box, is tehre a fix for it?
10/09/2010 15:37 pro4never#7
Quote:
Originally Posted by sohaib View Post
thank you guys, but i have another little problem i hope to get some help, when i trade a +15 item, other players see it +0 in the trade box, is tehre a fix for it?
Make sure the item info packet you are sending to the other client uses the correct value for pluses.
10/09/2010 16:31 Arcо#8
Quote:
Originally Posted by sohaib View Post
thank you guys, but i have another little problem i hope to get some help, when i trade a +15 item, other players see it +0 in the trade box, is tehre a fix for it?
If you learned to do a bit of searching, you'd know I released that LONG ago.