Its my code for Nobility npc, here depend of you sex become you King or Queen...
and... to donation need nvl +100...
Its for LOTF...
talk()
Code:
if (CurrentNPC == 8410)
{
SendPacket(General.MyPackets.NPCSay("Soy el Encargado de la Donacion en 4Conquer..."));
SendPacket(General.MyPackets.NPCSay(" si quieres tener reconocimiento y un Titulo noble"));
SendPacket(General.MyPackets.NPCSay(" tendras que Donar Riquezas al Imperio..."));
SendPacket(General.MyPackets.NPCLink("Tengo que donar?", 20));
SendPacket(General.MyPackets.NPCLink("Donar? jA!", 255));
SendPacket(General.MyPackets.NPCSetFace(28));
SendPacket(General.MyPackets.NPCFinish());
}
do()
Code:
if (CurrentNPC == 8410)
{
if (Control == 1)
{
if (MyChar.Silvers >= 500000000 && MyChar.Model == 1003 || MyChar.Silvers >= 500000000 && MyChar.Model == 1004) // King
{
MyChar.Silvers -= 500000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Rank = 1;
MyChar.Donation += 500000000;
MyChar.SaveRank();
MyChar.SaveDonation();
World.UpdateSpawn(MyChar);
World.SendMsgToAll(" ATENCION! " + MyChar.Name + " Se ah convertido en REY! #35 ", "SYSTEM", 2010);
SendPacket(General.MyPackets.NPCSay("Larga Vida al Rey!"));
SendPacket(General.MyPackets.NPCLink("Oh...", 255));
SendPacket(General.MyPackets.NPCSetFace(28));
SendPacket(General.MyPackets.NPCFinish());
}
else if (MyChar.Silvers < 500000000 && MyChar.Model == 1003 || MyChar.Silvers < 500000000 && MyChar.Model == 1004) // no money
{
SendPacket(General.MyPackets.NPCSay("No tienes Tanto Dinero, no queremos un Rey Pobre!"));
SendPacket(General.MyPackets.NPCLink("Oh...", 255));
SendPacket(General.MyPackets.NPCSetFace(28));
SendPacket(General.MyPackets.NPCFinish());
}
else if (MyChar.Silvers >= 500000000 && MyChar.Model == 2001 || MyChar.Silvers >= 500000000 && MyChar.Model == 2002) // queen
{
MyChar.Silvers -= 500000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Rank = 2;
MyChar.Donation += 500000000;
MyChar.SaveRank();
MyChar.SaveDonation();
World.UpdateSpawn(MyChar);
World.SendMsgToAll(" ATENCION! " + MyChar.Name + " se ah convertido en Reina! #35 ", "SYSTEM", 2010);
}
else if (MyChar.Silvers < 500000000 && MyChar.Model == 2001 || MyChar.Silvers < 500000000 && MyChar.Model == 2002) // no money
{
SendPacket(General.MyPackets.NPCSay("No tienes Tanto Dinero, no queremos una Reina Pobre!"));
SendPacket(General.MyPackets.NPCLink("Oh...", 255));
SendPacket(General.MyPackets.NPCSetFace(28));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 3)
{
if (MyChar.Silvers >= 300000000) // 300 Million
{
MyChar.Silvers -= 300000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Rank = 3;
MyChar.Donation += 300000000;
MyChar.SaveRank();
MyChar.SaveDonation();
World.UpdateSpawn(MyChar);
}
else
{
SendPacket(General.MyPackets.NPCSay("No Tienes Dinero!!"));
SendPacket(General.MyPackets.NPCLink("Oh sorry...", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 4)
{
if (MyChar.Silvers >= 70000000) // 70 Million
{
MyChar.Silvers -= 70000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Rank = 4;
MyChar.Donation += 70000000;
MyChar.SaveRank();
MyChar.SaveDonation();
World.UpdateSpawn(MyChar);
}
else
{
SendPacket(General.MyPackets.NPCSay("No Tienes Dinero!!"));
SendPacket(General.MyPackets.NPCLink("Oh sorry...", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 5)
{
if (MyChar.Silvers >= 50000000) // 50 Million
{
MyChar.Silvers -= 50000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Rank = 5;
MyChar.Donation += 50000000;
MyChar.SaveRank();
MyChar.SaveDonation();
World.UpdateSpawn(MyChar);
}
else
{
SendPacket(General.MyPackets.NPCSay("No tienes Dinero!!"));
SendPacket(General.MyPackets.NPCLink("Oh sorry...", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 6)
{
if (MyChar.Silvers >= 30000000) // 30 Million
{
MyChar.Silvers -= 30000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Rank = 6;
MyChar.Donation += 30000000;
MyChar.SaveRank();
MyChar.SaveDonation();
World.UpdateSpawn(MyChar);
}
else
{
SendPacket(General.MyPackets.NPCSay("No Tienes Dinero!!"));
SendPacket(General.MyPackets.NPCLink("Oh sorry...", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 7)
{
if (MyChar.Silvers >= 3000000) // 3 Million
{
MyChar.Silvers -= 3000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Rank = 7;
MyChar.Donation += 3000000;
MyChar.SaveRank();
MyChar.SaveDonation();
World.UpdateSpawn(MyChar);
}
else
{
SendPacket(General.MyPackets.NPCSay("No Tienes Dinero!!"));
SendPacket(General.MyPackets.NPCLink("Oh sorry...", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 20)
{
if (MyChar.Level >= 100)
{
SendPacket(General.MyPackets.NPCSay("Asi es, donar al Imperio para que seas reconocido!"));
SendPacket(General.MyPackets.NPCLink("Cuanto tengo que donar?", 21));
SendPacket(General.MyPackets.NPCLink("Ni pensar en Donar mi Dinero!", 255));
SendPacket(General.MyPackets.NPCSetFace(28));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Lo siento, solo Mayores de Nvl 100 Pueden ingresar"));
SendPacket(General.MyPackets.NPCSay(" a la nobleza del Imperio."));
SendPacket(General.MyPackets.NPCLink("Discriminacion!", 255));
SendPacket(General.MyPackets.NPCSetFace(28));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 21)
{
SendPacket(General.MyPackets.NPCSay("Bien, el precio del Reconocimiento es Alto..."));
SendPacket(General.MyPackets.NPCSay(" Elige la que mas se acomode a tus Riquezas."));
SendPacket(General.MyPackets.NPCSay(" No es Acumulable ok?"));
SendPacket(General.MyPackets.NPCLink("Rey/Reina (500kk)", 1));
SendPacket(General.MyPackets.NPCLink("Duque (300kk)", 3));
SendPacket(General.MyPackets.NPCLink("Marquez (70kk)", 4));
SendPacket(General.MyPackets.NPCLink("Conde (50kk)", 5));
SendPacket(General.MyPackets.NPCLink("Vizconde (30kk)", 6));
SendPacket(General.MyPackets.NPCLink("Lord (3kk)", 7));
SendPacket(General.MyPackets.NPCLink("Nos Vemoz...", 255));
SendPacket(General.MyPackets.NPCSetFace(28));
SendPacket(General.MyPackets.NPCFinish());
}
}
Well, this one in Spanish, only translates the text if you use ...
I know, someone else release it, but I seek less lines for more nice
Well, i'm not to explain how to find the NPCDO() or NPCTALK() region... If you a programmer or think a little u can find it.
Well, I don't think it should really be required.. Looking at every NPC release it should be common sense on how to find it.. but some people pick up things better than others..
OMG and you guys think I'm the retarded one lols
I'm not stupid, I could add an NPC in my sleep. I mean every time I try to add a code for nobility I get errors like Rank&Donation are underlined because I was supposed to add something else before it. I asked what I needed to add before it and raiden said Rank, Donation, SaveRank and SaveDonation. And I simply said idk where to find all of it. I found it now...because nomansland land sent a code to me but I get errors there as well...You can find that post So now I'm stuck and need help
[Release]CoEmu(V2) Nobility Completed 90% 12/23/2009 - CO2 PServer Guides & Releases - 8 Replies Here you will have the full nobility to CoEmu V2. If you have any error, or do not understand something, I do not ask, here just let my contribution.
English:
In Character.cs:
add this:
public int NobleListPlace;
public uint NobleDonate = 0;
public byte NobleRank = 0;
[GREAT-RELEASE]Nobility Rank on LOTF 08/05/2009 - CO2 PServer Guides & Releases - 30 Replies Ok well i decided to share with everyone the nobility rank that i use on my private server Drop|Dead, Its really nicely coded so just check it out and judge by yourself.
Well anyways here it is enjoy.
Ok first go to Client.cs and search for: if (MyChar.PrayStone > 0
And add this above:
[RELEASE]Nobility 08/05/2009 - CO2 PServer Guides & Releases - 10 Replies #REquest close
someone elses work i guess
[RELEASE] Nobility 06/20/2009 - CO2 PServer Guides & Releases - 63 Replies REQUEST CLOSE
[Release]Nobility chat effect fix 04/22/2008 - EO PServer Guides & Releases - 2 Replies This mysql dump will fix the chat effects so that the right ranks get the right chat effects. The baron currently will not recieve a chat effect. I will be adding that once I have more time to work on it.