Register for your free account! | Forgot your password?

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

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

Advertisement



Help with a npc Coding for [GM/PM/ADM]

Discussion on Help with a npc Coding for [GM/PM/ADM] within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
Help with a npc Coding for [GM/PM/ADM]

Lets say:
this is a part of the npc:
lets say i wont to make it only accesable for [ADM] status,
am i doing this correct?


Code:
#region bla bla npc
case 300006:
                                {
                                    if (GC.AuthInfo.Status == "[ADM]")
                                    if (Control == 0)
                                     {
                                        GC.AddSend(Packets.NPCSay("Welcome to the CrankCo - This is gift gear NPC. Hello I am one of goddess which are here to help.!"));
                                        GC.AddSend(Packets.NPCLink("Cool let me in.", 1));
                                        GC.AddSend(Packets.NPCLink("Not need thx", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }

Already thanks for help
pintser is offline  
Old 03/16/2010, 00:51   #2
 
spare2's Avatar
 
elite*gold: 20
Join Date: Oct 2009
Posts: 1,009
Received Thanks: 621
Quote:
Originally Posted by pintser View Post
Lets say:
this is a part of the npc:
lets say i wont to make it only accesable for [ADM] status,
am i doing this correct?


Code:
#region bla bla npc
case 300006:
                                {
                                    if (GC.AuthInfo.Status == "[ADM]")
                                    if (Control == 0)
                                     {
                                        GC.AddSend(Packets.NPCSay("Welcome to the CrankCo - This is gift gear NPC. Hello I am one of goddess which are here to help.!"));
                                        GC.AddSend(Packets.NPCLink("Cool let me in.", 1));
                                        GC.AddSend(Packets.NPCLink("Not need thx", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }

Already thanks for help
PHP Code:
#region bla bla npc
case 300006:
                                
                                    if (
GC.AuthInfo.Status == "[ADM]")
                                    {
                                    if (
Control == 0)
                                    {
                                        
GC.AddSend(Packets.NPCSay("Welcome to the CrankCo - This is gift gear NPC. Hello I am one of goddess which are here to help.!"));
                                        
GC.AddSend(Packets.NPCLink("Cool let me in."1));
                                        
GC.AddSend(Packets.NPCLink("Not need thx"255));
                                        
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        
GC.AddSend(Packets.NPCFinish());
                                    }
                                    } 
spare2 is offline  
Thanks
1 User
Old 03/16/2010, 01:14   #3
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
so i missed 1 { Xd..

well thanks!
pintser is offline  
Old 03/16/2010, 01:15   #4
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Code:
[COLOR=#000000][COLOR=#ff8000]#region bla bla npc 
[/COLOR][COLOR=#007700]case [/COLOR][COLOR=#0000bb]300006[/COLOR][COLOR=#007700]: 
{
                                 
                                    if ([/COLOR][COLOR=#0000bb]GC[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]AuthInfo[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]Status [/COLOR][COLOR=#007700]== [/COLOR][COLOR=#dd0000]"[ADM]"[/COLOR][COLOR=#007700]) 
                                    { 
                                    if ([/COLOR][COLOR=#0000bb]Control [/COLOR][COLOR=#007700]== [/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700]) 
                                    { 
                                        [/COLOR][COLOR=#0000bb]GC[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]AddSend[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]Packets[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]NPCSay[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"Welcome to the CrankCo - This is gift gear NPC. Hello I am one of goddess which are here to help.!"[/COLOR][COLOR=#007700])); 
                                        [/COLOR][COLOR=#0000bb]GC[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]AddSend[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]Packets[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]NPCLink[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"Cool let me in."[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700])); 
                                        [/COLOR][COLOR=#0000bb]GC[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]AddSend[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]Packets[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]NPCLink[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"Not need thx"[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]255[/COLOR][COLOR=#007700])); 
                                        [/COLOR][COLOR=#0000bb]GC[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]AddSend[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]Packets[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]NPCSetFace[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]N[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]Avatar[/COLOR][COLOR=#007700])); 
                                        [/COLOR][COLOR=#0000bb]GC[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]AddSend[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]Packets[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]NPCFinish[/COLOR][COLOR=#007700]()); 
                                    }
                                    }
[/COLOR][/COLOR][COLOR=#000000][COLOR=#007700]                                     [/COLOR][/COLOR][COLOR=#000000][COLOR=#007700]break; 
                                    }  [/COLOR][/COLOR]
Arcо is offline  
Thanks
1 User
Old 03/16/2010, 01:23   #5
 
elite*gold: 0
Join Date: Jan 2009
Posts: 37
Received Thanks: 19
Code:
#region bla bla npc 
case 300006: 

                                 
                                    if (GC.AuthInfo.Status != "[ADM]") 
                                             return;
                                    if (Control == 0) 
                                    { 
                                        GC.AddSend(Packets.NPCSay("Welcome to the CrankCo - This is gift gear NPC. Hello I am one of goddess which are here to help.!")); 
                                        GC.AddSend(Packets.NPCLink("Cool let me in.", 1)); 
                                        GC.AddSend(Packets.NPCLink("Not need thx", 255)); 
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar)); 
                                        GC.AddSend(Packets.NPCFinish()); 
                                    }
                                    
break;

you don't need

case 1000:
{



} < brackets that define each case.. and if ur not showing a message just do what i did above.
kophtus is offline  
Thanks
1 User
Old 03/16/2010, 08:58   #6
 
xI NiNJA DuCKey's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 51
Received Thanks: 17
Use the Map ID: 5000
If you didnt U cld Add [SH]
Code:
if (GC.AuthInfo.Status == "Can be [GM], [PM], [ADM], [SH] Or Anything you want")
                    {
xI NiNJA DuCKey is offline  
Old 03/16/2010, 10:33   #7
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
i was going to make a new system for things like this when people make there account they can choose there [XX] status and u get unique skills to ur certain status i havnt fully finished this yet but its a working progress in future its all going o be done on the reg page.
LegalConquer is offline  
Old 03/16/2010, 11:37   #8
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
Quote:
Originally Posted by xI NiNJA DuCKey View Post
Use the Map ID: 5000
If you didnt U cld Add [SH]
Code:
if (GC.AuthInfo.Status == "Can be [GM], [PM], [ADM], [SH] Or Anything you want")
                    {
Uhmm i dont get u?
pintser is offline  
Reply

Tags
gm, map, npc, source, test


Similar Threads Similar Threads
*NEW CODING ART!!!..........:::::~WhiteLight D3D~:::::..........*NEW CODING ART!!!
09/21/2010 - WarRock Hacks, Bots, Cheats & Exploits - 25 Replies
http://250kb.de/u/100911/p/m4buevNCZhoQ.PNG Download: Multiupload.com - upload your files to multiple file hosting sites! VirusScan: VirusTotal - Free Online Virus, Malware and URL Scanner Funktionen: SuperJump Teleport NoSpread NoRecoil
Uce Coding+ winhex coding
03/05/2009 - Dekaron - 8 Replies
i was just wondering is it true if u do coding with winhex is it less dc?? tats all cuz uce coding dcs me alot



All times are GMT +1. The time now is 02:15.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.