Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 19:51

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Help Me In This Npc Script

Discussion on Help Me In This Npc Script within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
sohaib's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 258
Received Thanks: 102
Help Me In This Npc Script

Hello, i added this npc to my 5165 source NewestCOServer RikardoUptades flatfile With Impulse's Sockets

so here's the Npc
PHP Code:
#region GWNPC
                            
case 951753:
                                {
                                    if (
Control == 0)
                                    {
                                        
GC.AddSend(Packets.NPCSay("Do you want enter TheGuildWar?"));
                                        
GC.AddSend(Packets.NPCLink("Yes."1));
                                        
GC.AddSend(Packets.NPCLink("I am the winning Guild Leader!"2));
                                        
GC.AddSend(Packets.NPCLink("I am the winning Deputy Leader!"3));
                                        
GC.AddSend(Packets.NPCLink("Just passing by."255));
                                        
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        
GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (
Control == 1)
                                    {
                                        
GC.MyChar.Teleport(1038350350);
                                    }
                                    else if (
Control == 2)
                                    {
                                        if (
GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {

                                            
GC.MyChar.CPs += 1000000;
                                            
World.SendMsgToAll("SYSTEM"GC.MyChar.Name " has claimed 1 Million CPs and the TopGuildLeader Halo for winning GuildWar!"20110);

                                            
GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader);
                                            try
                                            {
                                                
StreamWriter sw = new StreamWriter("C:\\OldCODB/Tops/TopLeader.txt");
                                                
sw.WriteLine("" GC.MyChar.EntityID "#17179869184");
                                                
sw.Close();
                                            }
                                            catch (
Exception e)
                                            {
                                                
Console.WriteLine(e.Message);
                                            }
                                        }
                                        else
                                        {
                                            
GC.AddSend(Packets.NPCSay("You already claimed your 1kk cps! Get out of here!"));
                                            
GC.AddSend(Packets.NPCLink("Sorry"255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else
                                    {
                                        
GC.AddSend(Packets.NPCSay("You are not in the Top Guild!"));
                                        
GC.AddSend(Packets.NPCLink("Oh sorry"255));
                                        
GC.AddSend(Packets.NPCSetFace(30));
                                        
GC.AddSend(Packets.NPCFinish());
                                    }

                                    if (
Control == 3)
                                    {
                                        if (
GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.DeputyManager))
                                        {
                                            
World.SendMsgToAll("SYSTEM"GC.MyChar.Name " has claimed the TopDeputyLeader Halo!"20110);
                                            
GC.MyChar.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                                            try
                                            {
                                                
                                                
StreamWriter sw = new StreamWriter("C:\\OldCODB/Tops/TopDeputy.txt");
                                                
sw.WriteLine("" GC.MyChar.EntityID "#34359738368");
                                                
sw.Close();
                                            }
                                            catch (
Exception e)
                                            {
                                                
Console.WriteLine(e.Message);
                                            }
                                        }
                                        else
                                        {
                                            
GC.AddSend(Packets.NPCSay("You are not in the Top Guild!"));
                                            
GC.AddSend(Packets.NPCLink("Oh sorry"255));
                                            
GC.AddSend(Packets.NPCSetFace(30));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }


                            
#endregion 
But there is a problem in this Npc, if You Won GW, you can claim 1kkcps infinity times, How can i make it leave you claim it only one time (if you won Gw of course)

thanks
sohaib is offline  
Old 12/16/2010, 13:22   #2


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Put a check in? Store a bool somewhere so that i can only be claimed if it hasnt be claimed before and then change the bool accordingly.
Korvacs is offline  
Reply


Similar Threads Similar Threads
L2Walker script: Solo rebuff/restock/return script
08/08/2012 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 63 Replies
Hello! I've been reading alot and not really contributing so i'll start off here with a very well working script im using to bot my SK outside ivory tower in oren. I've tried to structure the code so it easily can be modified for another level of character, town, and hunting spot. The script is made for CT2 Retail, mainly to get advantage of the newbie buffs (which now lasts all the way until level 62) Change log: Update 2008-09-01 Version 1.14 -Download
[suche] d2nt level rush script 1-25 / follow script
06/23/2010 - Diablo 2 Programming - 5 Replies
moin erstmal sry falls es da doch schon was passendes zu gab - hab schonmal gesucht aber nur alte sachen gefunden oder eben antworten in richtung "geht so schnell dafür braucht man keinen bot" ^^ mein problem besteht darin dass ich für lvl 1 bis 20 immer x stunden brauche - trist geht ja noch halberwegs aber mit tombruns such ich mich immer dusselig ^^ - bzw cows sind noch schlimmer (dafür geht das cow-script für d2nt ausm bluebird zumindest halberwegs) die frage ist jetz die - giebt...



All times are GMT +2. The time now is 19:51.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.