08-30-2012, 09:06 AM
Помогите найти ошибку что не так, в игре скрипт не работает:
offtop
import sys
from ru.catssoftware import Config
from ru.catssoftware import L2DatabaseFactory
from ru.catssoftware.gameserver import Olympiad
from ru.catssoftware.gameserver import SevenSigns
from ru.catssoftware.gameserver.datatables import CharNameTable
from ru.catssoftware.gameserver.datatables import CharTemplateTable
from ru.catssoftware.gameserver.datatables import SkillTable
from ru.catssoftwaregameserver.communitybbs.Manager import RegionBBSManager
from ru.catssoftware.gameserver.model import L2World
from ru.catssoftware.gameserver.model.quest import State
from ru.catssoftware.gameserver.model.quest import QuestState
from ru.catssoftware.gameserver.model.quest.jython import QuestJython as JQuest
from ru.catssoftware.gameserver.network.serverpackets import EtcStatusUpdate
from ru.catssoftware.gameserver.network.serverpackets import PledgeShowInfoUpdate
from ru.catssoftware.tools.random import Rnd
qn = "8705_Services"
NPC = 8705
ITEM = 57
CHANGENAMEITEMCOUNT = 100
TRANSFERCHARITEMCOUNT = 200
NAMECHARS = {
"name_A" : "A",
"name_B" : "B",
"name_C" : "C",
"name_D" : "D",
"name_E" : "E",
"name_F" : "F",
"name_G" : "G",
"name_H" : "H",
"name_I" : "I",
"name_J" : "J",
"name_K" : "K",
"name_L" : "L",
"name_M" : "M",
"name_N" : "N",
"name_O" : "O",
"name_P" : "P",
"name_Q" : "Q",
"name_R" : "R",
"name_S" : "S",
"name_T" : "T",
"name_U" : "U",
"name_V" : "V",
"name_W" : "W",
"name_X" : "X",
"name_Y" : "Y",
"name_Z" : "Z",
"name_a" : "a",
"name_b" : "b",
"name_c" : "c",
"name_d" : "d",
"name_e" : "e",
"name_f" : "f",
"name_g" : "g",
"name_h" : "h",
"name_i" : "i",
"name_j" : "j",
"name_k" : "k",
"name_l" : "l",
"name_m" : "m",
"name_n" : "n",
"name_o" : "o",
"name_p" : "p",
"name_q" : "q",
"name_r" : "r",
"name_s" : "s",
"name_t" : "t",
"name_u" : "u",
"name_v" : "v",
"name_w" : "w",
"name_x" : "x",
"name_y" : "y",
"name_z" : "z",
"name_0" : "0",
"name_1" : "1",
"name_2" : "2",
"name_3" : "3",
"name_4" : "4",
"name_5" : "5",
"name_6" : "6",
"name_7" : "7",
"name_8" : "8",
"name_9" : "9"
}
ACCOUNTCHARS = {
"transfer_A" : "A",
"transfer_B" : "B",
"transfer_C" : "C",
"transfer_D" : "D",
"transfer_E" : "E",
"transfer_F" : "F",
"transfer_G" : "G",
"transfer_H" : "H",
"transfer_I" : "I",
"transfer_J" : "J",
"transfer_K" : "K",
"transfer_L" : "L",
"transfer_M" : "M",
"transfer_N" : "N",
"transfer_O" : "O",
"transfer_P" : "P",
"transfer_Q" : "Q",
"transfer_R" : "R",
"transfer_S" : "S",
"transfer_T" : "T",
"transfer_U" : "U",
"transfer_V" : "V",
"transfer_W" : "W",
"transfer_X" : "X",
"transfer_Y" : "Y",
"transfer_Z" : "Z",
"transfer_a" : "a",
"transfer_b" : "b",
"transfer_c" : "c",
"transfer_d" : "d",
"transfer_e" : "e",
"transfer_f" : "f",
"transfer_g" : "g",
"transfer_h" : "h",
"transfer_i" : "i",
"transfer_j" : "j",
"transfer_k" : "k",
"transfer_l" : "l",
"transfer_m" : "m",
"transfer_n" : "n",
"transfer_o" : "o",
"transfer_p" : "p",
"transfer_q" : "q",
"transfer_r" : "r",
"transfer_s" : "s",
"transfer_t" : "t",
"transfer_u" : "u",
"transfer_v" : "v",
"transfer_w" : "w",
"transfer_x" : "x",
"transfer_y" : "y",
"transfer_z" : "z",
"transfer_0" : "0",
"transfer_1" : "1",
"transfer_2" : "2",
"transfer_3" : "3",
"transfer_4" : "4",
"transfer_5" : "5",
"transfer_6" : "6",
"transfer_7" : "7",
"transfer_8" : "8",
"transfer_9" : "9"
}
def findAccount(newAccount) :
con = L2DatabaseFactory.getInstance().getConnection()
offline = con.prepareStatement("SELECT account_name FROM characters WHERE account_name = ?")
offline.setString(1, str(newAccount))
rs = offline.executeQuery()
if rs :
rs.next()
try :
newAccount = rs.getString("account_name")
newAccount = True
con.close()
except :
newAccount = None
try : con.close()
except : pass
else :
newAccount = None
return newAccount
class Quest (JQuest) :
def __init__(self, id, name, descr) :
JQuest.__init__(self, id, name, descr)
def onAdvEvent(self, event, npc, player) :
st = player.getQuestState(qn)
htmltext = event
if event == "changeName.htm" :
st.set("newName","")
htmltext = st.showHtmlFile("changeName.htm").replace("%newName%", " ")
elif event in NAMECHARS.keys() :
newName = NAMECHARS[event]
st.set("newName", st.get("newName") + str(newName))
newName = st.get("newName")
htmltext = st.showHtmlFile("changeName.htm").replace("%newName%", str(newName))
elif event == "changeMyName" :
if st.getQuestItemsCount(ITEM) < CHANGENAMEITEMCOUNT :
htmltext = "<html><head><body> You dont Have Enought item to use this Action!</body></html>"
else :
newName = st.get("newName")
if newName :
if player.isHero() :
htmltext = "<html><head><body>Hero Players Can't Change Name!</body></html>"
elif player.isCursedWeaponEquipped() :
htmltext = "<html><head><body> You Can't Change Name, Cursed Weapon!</body></html>"
elif player.isTransformed() :
htmltext = "<html><head><body> You Can't use This Action in Transformation!</body></html>"
elif Olympiad.getInstance().isRegisteredInComp(player) :
htmltext = "<html><head><body> You Can't when Practice in Olympiad!</body></html>"
else :
if Config.CNAME_PATTERN.matcher(newName).matches() :
if CharNameTable.getInstance().doesCharNameExist(newName) :
st.unset("newName")
htmltext = "<html><head><body> This Name Already Exist!</body></html>"
else :
if player.isInParty() :
htmltext = "You Must Remove From Party!"
else :
L2World.getInstance().removeFromAllPlayers(player)
player.setName(newName)
player.store()
L2World.getInstance().addToAllPlayers(player)
player.broadcastUserInfo()
if player.getClan() :
player.getClan().broadcastClanStatus()
RegionBBSManager.getInstance().changeCommunityBoard()
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE auction_bid SET bidderName = ? WHERE bidderId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE characters_custom_data SET char_name = ? WHERE charId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE character_friends SET friend_name = ? WHERE friendId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE heroes SET char_name = ? WHERE charId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE olympiad_nobles SET char_name = ? WHERE charId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE posts SET post_owner_name = ? WHERE post_ownerid = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE topic SET topic_ownername = ? WHERE topic_ownerid = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
st.takeItems(ITEM, CHANGENAMEITEMCOUNT)
htmltext = "<html><head><body>Congratulation, Your Name Changed.</body></html>"
st.playSound("ItemSound.quest_finish")
st.unset("newName")
st.exitQuest(1)
else :
htmltext = "<html><head><body> Something went wrong, Try Again!</body></html>"
else :
htmltext = "<html><head><body> Something went wrong, Try Again!</body></html>"
elif event == "transferChar.htm" :
st.set("newAccount","")
htmltext = st.showHtmlFile("transferChar.htm").replace("%newAccount%", " ")
elif event in ACCOUNTCHARS.keys() :
newAccount = ACCOUNTCHARS[event]
st.set("newAccount", st.get("newAccount") + str(newAccount))
newAccount = st.get("newAccount")
htmltext = st.showHtmlFile("transferChar.htm").replace("%newAccount%", str(newAccount))
elif event == "transferChar" :
if st.getQuestItemsCount(ITEM) < TRANSFERCHARITEMCOUNT :
htmltext = "cant.htm"
else :
if player.isCursedWeaponEquipped() :
htmltext = "<html><head><body> You Can't Make This Action, Cursed Weapon!</body></html>"
elif player.isTransformed() :
htmltext = "<html><head><body> You Can't use This Action in Transformation!</body></html>"
elif Olympiad.getInstance().isRegisteredInComp(player) :
htmltext = "<html><head><body> You Can't when Practice in Olympiad!</body></html>"
else :
newAccount = st.get("newAccount")
if newAccount :
if Config.CNAME_PATTERN.matcher(newAccount).matches() :
if findAccount(newAccount) == None :
htmltext = "<html><head><body> Sorry, This Account Don't Exist or dont have Any Character!</body></html>"
elif str(newAccount) == player.getAccountName() :
htmltext = "<html><head><body> This is your Curent Account, You Cant use this Action!</body></html>"
else :
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE characters SET account_name = ? WHERE charId = ?")
offline.setString(1, newAccount)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
AutoChat(npc, "Congratulation "+player.getName()+". You performed the function successfully. In order to complete the function you need to re-login.")
st.unset("newAccount")
st.takeItems(ITEM, TRANSFERCHARITEMCOUNT)
htmltext = "<html><head><body> Your Character Transfered in other Account!</body></html>"
st.playSound("ItemSound.quest_finish")
st.exitQuest(1)
player.closeNetConnection()
else :
htmltext = "<html><head><body> Something went wrong. Try Again!</body></html>"
else :
htmltext = "<html><head><body> Something went wrong. Try Again!</body></html>"
return htmltext
def onTalk(self, npc, player) :
htmltext = ""
st = player.getQuestState(qn)
if not st :
st = self.newQuestState(player)
htmltext = "home.htm"
st.playSound("ItemSound.quest_accept")
return htmltext
QUEST = Quest(8705,qn,"custom")
QUEST.addStartNpc(NPC)
QUEST.addTalkId(NPC)
Если знаете скажите,если не знаете нечто не пишите.
from ru.catssoftware import Config
from ru.catssoftware import L2DatabaseFactory
from ru.catssoftware.gameserver import Olympiad
from ru.catssoftware.gameserver import SevenSigns
from ru.catssoftware.gameserver.datatables import CharNameTable
from ru.catssoftware.gameserver.datatables import CharTemplateTable
from ru.catssoftware.gameserver.datatables import SkillTable
from ru.catssoftwaregameserver.communitybbs.Manager import RegionBBSManager
from ru.catssoftware.gameserver.model import L2World
from ru.catssoftware.gameserver.model.quest import State
from ru.catssoftware.gameserver.model.quest import QuestState
from ru.catssoftware.gameserver.model.quest.jython import QuestJython as JQuest
from ru.catssoftware.gameserver.network.serverpackets import EtcStatusUpdate
from ru.catssoftware.gameserver.network.serverpackets import PledgeShowInfoUpdate
from ru.catssoftware.tools.random import Rnd
qn = "8705_Services"
NPC = 8705
ITEM = 57
CHANGENAMEITEMCOUNT = 100
TRANSFERCHARITEMCOUNT = 200
NAMECHARS = {
"name_A" : "A",
"name_B" : "B",
"name_C" : "C",
"name_D" : "D",
"name_E" : "E",
"name_F" : "F",
"name_G" : "G",
"name_H" : "H",
"name_I" : "I",
"name_J" : "J",
"name_K" : "K",
"name_L" : "L",
"name_M" : "M",
"name_N" : "N",
"name_O" : "O",
"name_P" : "P",
"name_Q" : "Q",
"name_R" : "R",
"name_S" : "S",
"name_T" : "T",
"name_U" : "U",
"name_V" : "V",
"name_W" : "W",
"name_X" : "X",
"name_Y" : "Y",
"name_Z" : "Z",
"name_a" : "a",
"name_b" : "b",
"name_c" : "c",
"name_d" : "d",
"name_e" : "e",
"name_f" : "f",
"name_g" : "g",
"name_h" : "h",
"name_i" : "i",
"name_j" : "j",
"name_k" : "k",
"name_l" : "l",
"name_m" : "m",
"name_n" : "n",
"name_o" : "o",
"name_p" : "p",
"name_q" : "q",
"name_r" : "r",
"name_s" : "s",
"name_t" : "t",
"name_u" : "u",
"name_v" : "v",
"name_w" : "w",
"name_x" : "x",
"name_y" : "y",
"name_z" : "z",
"name_0" : "0",
"name_1" : "1",
"name_2" : "2",
"name_3" : "3",
"name_4" : "4",
"name_5" : "5",
"name_6" : "6",
"name_7" : "7",
"name_8" : "8",
"name_9" : "9"
}
ACCOUNTCHARS = {
"transfer_A" : "A",
"transfer_B" : "B",
"transfer_C" : "C",
"transfer_D" : "D",
"transfer_E" : "E",
"transfer_F" : "F",
"transfer_G" : "G",
"transfer_H" : "H",
"transfer_I" : "I",
"transfer_J" : "J",
"transfer_K" : "K",
"transfer_L" : "L",
"transfer_M" : "M",
"transfer_N" : "N",
"transfer_O" : "O",
"transfer_P" : "P",
"transfer_Q" : "Q",
"transfer_R" : "R",
"transfer_S" : "S",
"transfer_T" : "T",
"transfer_U" : "U",
"transfer_V" : "V",
"transfer_W" : "W",
"transfer_X" : "X",
"transfer_Y" : "Y",
"transfer_Z" : "Z",
"transfer_a" : "a",
"transfer_b" : "b",
"transfer_c" : "c",
"transfer_d" : "d",
"transfer_e" : "e",
"transfer_f" : "f",
"transfer_g" : "g",
"transfer_h" : "h",
"transfer_i" : "i",
"transfer_j" : "j",
"transfer_k" : "k",
"transfer_l" : "l",
"transfer_m" : "m",
"transfer_n" : "n",
"transfer_o" : "o",
"transfer_p" : "p",
"transfer_q" : "q",
"transfer_r" : "r",
"transfer_s" : "s",
"transfer_t" : "t",
"transfer_u" : "u",
"transfer_v" : "v",
"transfer_w" : "w",
"transfer_x" : "x",
"transfer_y" : "y",
"transfer_z" : "z",
"transfer_0" : "0",
"transfer_1" : "1",
"transfer_2" : "2",
"transfer_3" : "3",
"transfer_4" : "4",
"transfer_5" : "5",
"transfer_6" : "6",
"transfer_7" : "7",
"transfer_8" : "8",
"transfer_9" : "9"
}
def findAccount(newAccount) :
con = L2DatabaseFactory.getInstance().getConnection()
offline = con.prepareStatement("SELECT account_name FROM characters WHERE account_name = ?")
offline.setString(1, str(newAccount))
rs = offline.executeQuery()
if rs :
rs.next()
try :
newAccount = rs.getString("account_name")
newAccount = True
con.close()
except :
newAccount = None
try : con.close()
except : pass
else :
newAccount = None
return newAccount
class Quest (JQuest) :
def __init__(self, id, name, descr) :
JQuest.__init__(self, id, name, descr)
def onAdvEvent(self, event, npc, player) :
st = player.getQuestState(qn)
htmltext = event
if event == "changeName.htm" :
st.set("newName","")
htmltext = st.showHtmlFile("changeName.htm").replace("%newName%", " ")
elif event in NAMECHARS.keys() :
newName = NAMECHARS[event]
st.set("newName", st.get("newName") + str(newName))
newName = st.get("newName")
htmltext = st.showHtmlFile("changeName.htm").replace("%newName%", str(newName))
elif event == "changeMyName" :
if st.getQuestItemsCount(ITEM) < CHANGENAMEITEMCOUNT :
htmltext = "<html><head><body> You dont Have Enought item to use this Action!</body></html>"
else :
newName = st.get("newName")
if newName :
if player.isHero() :
htmltext = "<html><head><body>Hero Players Can't Change Name!</body></html>"
elif player.isCursedWeaponEquipped() :
htmltext = "<html><head><body> You Can't Change Name, Cursed Weapon!</body></html>"
elif player.isTransformed() :
htmltext = "<html><head><body> You Can't use This Action in Transformation!</body></html>"
elif Olympiad.getInstance().isRegisteredInComp(player) :
htmltext = "<html><head><body> You Can't when Practice in Olympiad!</body></html>"
else :
if Config.CNAME_PATTERN.matcher(newName).matches() :
if CharNameTable.getInstance().doesCharNameExist(newName) :
st.unset("newName")
htmltext = "<html><head><body> This Name Already Exist!</body></html>"
else :
if player.isInParty() :
htmltext = "You Must Remove From Party!"
else :
L2World.getInstance().removeFromAllPlayers(player)
player.setName(newName)
player.store()
L2World.getInstance().addToAllPlayers(player)
player.broadcastUserInfo()
if player.getClan() :
player.getClan().broadcastClanStatus()
RegionBBSManager.getInstance().changeCommunityBoard()
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE auction_bid SET bidderName = ? WHERE bidderId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE characters_custom_data SET char_name = ? WHERE charId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE character_friends SET friend_name = ? WHERE friendId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE heroes SET char_name = ? WHERE charId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE olympiad_nobles SET char_name = ? WHERE charId = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE posts SET post_owner_name = ? WHERE post_ownerid = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE topic SET topic_ownername = ? WHERE topic_ownerid = ?")
offline.setString(1, newName)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
st.takeItems(ITEM, CHANGENAMEITEMCOUNT)
htmltext = "<html><head><body>Congratulation, Your Name Changed.</body></html>"
st.playSound("ItemSound.quest_finish")
st.unset("newName")
st.exitQuest(1)
else :
htmltext = "<html><head><body> Something went wrong, Try Again!</body></html>"
else :
htmltext = "<html><head><body> Something went wrong, Try Again!</body></html>"
elif event == "transferChar.htm" :
st.set("newAccount","")
htmltext = st.showHtmlFile("transferChar.htm").replace("%newAccount%", " ")
elif event in ACCOUNTCHARS.keys() :
newAccount = ACCOUNTCHARS[event]
st.set("newAccount", st.get("newAccount") + str(newAccount))
newAccount = st.get("newAccount")
htmltext = st.showHtmlFile("transferChar.htm").replace("%newAccount%", str(newAccount))
elif event == "transferChar" :
if st.getQuestItemsCount(ITEM) < TRANSFERCHARITEMCOUNT :
htmltext = "cant.htm"
else :
if player.isCursedWeaponEquipped() :
htmltext = "<html><head><body> You Can't Make This Action, Cursed Weapon!</body></html>"
elif player.isTransformed() :
htmltext = "<html><head><body> You Can't use This Action in Transformation!</body></html>"
elif Olympiad.getInstance().isRegisteredInComp(player) :
htmltext = "<html><head><body> You Can't when Practice in Olympiad!</body></html>"
else :
newAccount = st.get("newAccount")
if newAccount :
if Config.CNAME_PATTERN.matcher(newAccount).matches() :
if findAccount(newAccount) == None :
htmltext = "<html><head><body> Sorry, This Account Don't Exist or dont have Any Character!</body></html>"
elif str(newAccount) == player.getAccountName() :
htmltext = "<html><head><body> This is your Curent Account, You Cant use this Action!</body></html>"
else :
con = L2DatabaseFactory.getInstance().getConnection(None)
offline = con.prepareStatement("UPDATE characters SET account_name = ? WHERE charId = ?")
offline.setString(1, newAccount)
offline.setInt(2, player.getObjectId())
try :
offline.executeUpdate()
offline.close()
con.close()
except :
try : con.close()
except : pass
AutoChat(npc, "Congratulation "+player.getName()+". You performed the function successfully. In order to complete the function you need to re-login.")
st.unset("newAccount")
st.takeItems(ITEM, TRANSFERCHARITEMCOUNT)
htmltext = "<html><head><body> Your Character Transfered in other Account!</body></html>"
st.playSound("ItemSound.quest_finish")
st.exitQuest(1)
player.closeNetConnection()
else :
htmltext = "<html><head><body> Something went wrong. Try Again!</body></html>"
else :
htmltext = "<html><head><body> Something went wrong. Try Again!</body></html>"
return htmltext
def onTalk(self, npc, player) :
htmltext = ""
st = player.getQuestState(qn)
if not st :
st = self.newQuestState(player)
htmltext = "home.htm"
st.playSound("ItemSound.quest_accept")
return htmltext
QUEST = Quest(8705,qn,"custom")
QUEST.addStartNpc(NPC)
QUEST.addTalkId(NPC)
Если знаете скажите,если не знаете нечто не пишите.