[help] i tryed to add a new npc but ehh failed:P

06/20/2009 13:08 xellios#1
I was never good with MYSQL but i cant add my coded npc??.
If someone can give me a lil .sql file with my npc in it i would be really happy.

case 10997: // Hell teleporter
{
if (LinkBack == 0)
{
Text("Hello I can help you train after you reach level 130,\n But I will charge you 3,000 cps.\n Would you like to go to Hell?", CSocket);
Link("Yes Please, Here are the cps", 1, CSocket);
Link("No Thank you I cannot afford it.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.CPs >= 3000)
{
Teleport(2021, 219, 215, 0, CSocket);
CPs(-3000, CSocket);
}
else
{
Text("You dont have 3,000 cps!!", CSocket);
Link("I'm sorry, I forgot it.", 255, CSocket);
End(CSocket);
}
}
break;
}

THX!!!
06/20/2009 13:39 Akarama#2
Quote:
Originally Posted by xellios View Post
case 10997: // Hell teleporter
{
if (LinkBack == 0)
{
Text("Hello I can help you train after you reach level 130,\n But I will charge you 3,000 cps.\n Would you like to go to Hell?", CSocket);
Link("Yes Please, Here are the cps", 1, CSocket);
Link("No Thank you I cannot afford it.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.CPs >= 3000)
{
CPs(-3000, CSocket);
Teleport(2021, 219, 215, 0, CSocket);
}
else
{
Text("You dont have 3,000 cps!!", CSocket);
Link("I'm sorry, I forgot it.", 255, CSocket);
End(CSocket);
}
}
break;
}
I switched the CPs(-3000) to the top, maybe itl work now.

By the way, what npc is that?
06/20/2009 13:52 xellios#3
Quote:
Originally Posted by Akarama View Post
I switched the CPs(-3000) to the top, maybe itl work now.

By the way, what npc is that?
it teleports you to hell made it myself though its not hard either

@MY problem is that i spawned it but it doesnt work it uses the default "Dialog is not coded" when the code is there?
06/20/2009 14:08 Akarama#4
Quote:
Originally Posted by xellios View Post
it teleports you to hell made it myself though its not hard either

@MY problem is that i spawned it but it doesnt work it uses the default "Dialog is not coded" when the code is there?
Tell me what npc it is.
maybe i can help you from there.
06/20/2009 14:19 xellios#5
Quote:
Originally Posted by Akarama View Post
Tell me what npc it is.
maybe i can help you from there.
Cant you read that? HELL TELEPORTER IT TELEPORTS YOU TO HEL!!!!:P:P
Anyways i sended you a PM.
06/20/2009 18:48 n0mansland#6
here follow by this

NPCID = Any non taken number in MySQL

NPC Type = Any non taken number in MySQL (Case ID also)

SubType = What npc looks like (conquer folder/ini/npc.ini find what you want and add a 0 after that number)

Then put the map you want him in and the coords and put notnpctype = 2

if you need help just post
06/20/2009 21:29 WHITELIONX#7
Why not just use a current npc? I had a similar problem with rb guy but I just used Eternity case number and moved Eternity into market from AC and it worked no problems :D

case 10997: // Hell teleporter <<<---Change the case number to an npc that exists and you do not use?

Example
case 300500: /* Eternity Corrections would be appreciated since i am still learning how to code C Sharp */
{
if (LinkBack == 0)
{
Text("Would you like to be reborn? You need to be level 120 or higher to reborn.", CSocket);
Link("1st rb", 1, CSocket);
Link("2nd rb", 2, CSocket);
Link("No thanks", 225, CSocket);
End(CSocket);

}
else if (LinkBack == 1)

The case number was different originally so I found Eternity in AC checked the case numbers and changed case number to Eternities case number and changed name, I am unsure as to whether changing the actual npcs name makes a difference?