|
You last visited: Today at 02:15
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.
03/15/2010, 23:28
|
#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
|
|
|
03/16/2010, 00:51
|
#2
|
elite*gold: 20
Join Date: Oct 2009
Posts: 1,009
Received Thanks: 621
|
Quote:
Originally Posted by pintser
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
|
#3
|
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
|
so i missed 1 { Xd..
well thanks!
|
|
|
03/16/2010, 01:15
|
#4
|
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]
|
|
|
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.
|
|
|
03/16/2010, 08:58
|
#6
|
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")
{
|
|
|
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.
|
|
|
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
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?
|
|
|
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.
|
|