[Release]NPC SELLS GOLDCUP

07/15/2009 10:03 imported_spitt_fire911#1
First of all u have to have GoldCup in your server... then all u need to do it add this to NpcTalk.cs

This is a good release for donaters.. u cannot get that amount of cps.. so no one will have it.. but if u donate to the server and get the cps.. and buy it.. it will show that u donated... etc..

I MADE THIS FROM SCRATCH SO GIVE ME SOME CREDIT PLEASE,

QUESTION : How do I make cps save in CoEmu.. if i sell a DB for 215 cps.. it gives me the cps.. but if i relog... I dont have that 215 Cps.. Where can I fix that?

Code:
                case 47: //GoldPrize Rewarder - CODED BY imported_spitt_fire911
                    {
                        if (LinkBack == 0)
                        {
                            Text("I can sell you items!, So I suggest donating to obtian the CP for these items.", CSocket);
                            Link("Buy a GoldCup for 500,000 CPs.", 1, CSocket);
                            Link("No Thank You", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1) //Gold Cup
                            if (CSocket.Client.CPs >= 500000)
                            {
                                CPs(-500000, CSocket);
                                AddItem(2100075, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                            }
                        else
                            {
                                Text("How dare you, You do not have the CPs!", CSocket);
                                Link("Sorry!", 255, CSocket);
                                End(CSocket);
                            } break;
                    }
07/15/2009 11:52 habbo245#2
good aport
07/15/2009 12:16 tanelipe#3
PHP Code:
public static void SaveConquerPoints(Character Client) {
    
MySqlCommand Command = new MySqlCommand("UPDATE `characters` SET `CPoint` = " Client.CPs " WHERE `CharID` = " Client.IDDatabaseConnection.NewConnection());
    
Command .ExecuteNonQuery();
    
Command .Connection.Close();
    
Command .Connection.Dispose();

That should save the ConquerPoints you have. Place it in your Database.cs
07/15/2009 16:39 raidenx123#4
This is good and all but GoldCup is supposed to be won in GuildWar :/
07/15/2009 17:55 Yooha#5
i maked npc Give GoldCup and GoldPrize For LOTF
07/15/2009 18:00 f0am#6
Quote:
Originally Posted by raidenx123 View Post
This is good and all but GoldCup is supposed to be won in GuildWar :/

Just make it so like if your guild has pole, if your gl already took it, or if they didnt, and if your gl and you can get itto work :D
07/15/2009 20:32 imported_spitt_fire911#7
Well i dont have guildwar lmfao... im a new coder.... all im trying to do... is start up #C and just write outa my head so that i know how to work #C and so far its workin out well... im tryin to finish all my NPC's... come in on well... accept for MagicArtisan... I really need that... But U can edit it how u want.... U can add other things to it... but i only wanted to make it basic... I do plan on adding other stuff to mine.. ^.^ But its a good release for nubs... Now... can someone teach me how to make a NPC like MagicArtisan ... to up level of the gear..
07/16/2009 01:30 raidenx123#8
Lol k anywase its C# ;)

as in C (C) Sharp (#)
07/16/2009 09:42 xellios#9
#Edited - tanelipe
07/16/2009 21:39 imported_spitt_fire911#10
If you go to MagicCost.. thats were all the Cost of everything is.. so thats the first thing you need

....

Then you got to SpellDamaged.cs

All this is in Calculations....
I will do a example...



GameServer>Calculations>MagicCost

Code:
				case 1000://Thunder - MP Check
      			{
      				int ManaCost = 0;
      				if(MagicLevel == 0)
      					ManaCost = 1;
      				else if(MagicLevel == 1)
      					ManaCost = 6;
      				else if(MagicLevel == 2)
      					ManaCost = 10;
      				else if(MagicLevel == 3)
      					ManaCost = 11;
      				else if(MagicLevel == 4)
      					ManaCost = 17;
      				if(CSocket.Client.CurrentMP < ManaCost)
      				{
      					CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Not enough mana!", Struct.ChatType.Top));
      					return false;
      				}
      				else
      				{
      					CSocket.Client.CurrentMP -= ManaCost;
      					CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CurrentMP, Struct.StatusTypes.Mp));
      					return true;
      				}
      			}
Now .... GameServer>Calculations>SpellDamage

Code:
	      		case 1000://Thunder
	      			{
	      				if(Level ==0)
	      				return 7;
	      				if(Level== 1)
	      				return 16;
	      				if(Level == 2)
	      					return 32;
	      				if(Level == 3)
	      					return 57;
	      				if(Level == 4)
	      					return 86;
	      				break;
	      			}
And thats the skill Thunder... Which is already coded... so just change that code into another skill... but ONLY magic skills... Tell me if that works.. I didn't test it.. but ya... lol