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

03/15/2010 23:28 pintser#1
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 :)
03/16/2010 00:51 spare2#2
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());
                                    }
                                    } 
03/16/2010 01:14 pintser#3
so i missed 1 { Xd..

well thanks!
03/16/2010 01:15 Arcо#4
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]
03/16/2010 01:23 kophtus#5
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.
03/16/2010 08:58 xI NiNJA DuCKey#6
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")
                    {
03/16/2010 10:33 LegalConquer#7
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.
03/16/2010 11:37 pintser#8
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?