Матрос 0 Report post Posted December 14, 2017 (edited) Суть проблемы опять перерождение, первое рб решили путем добавление несуществующей функции. При обращении к НПС Банкир - Моника она выдает квест "Срочная доставка" которую нужно отнести Банкиру Ледыне function r_talk13 () Talk( 1, "Моника: Привет! Я банкир Моника! В нашем банке ваши вещи всегда под надежной защитой! " ) InitTrigger() TriggerCondition( 1, HasMoney, 200 ) TriggerAction( 1, TakeMoney, 200 ) TriggerAction( 1, OpenBank ) TriggerFailure( 1, JumpPage, 2 ) Text( 1, "Хранилище (стоимость 200 золотых) ", MultiTrigger, GetMultiTrigger(), 1) Talk( 2, "Простите, вы не имеете достаточное количество золота! " ) AddNpcMission (1050) AddNpcMission (1212) -- Перерождение феникса часть 2 AddNpcMission ( 6091 ) AddNpcMission ( 6092 ) end -- Срочная доставка DefineMission( 6092, "Срочная доставка ", 1422) MisBeginTalk( "<t>Мне нужна курьерская помощь. Но к сожалению все курьеры заняты. Ты сможешь доставить эту послыку? ") MisBeginCondition( NoMission, 1422) MisBeginCondition( NoRecord, 1422) MisBeginCondition( HasRecord, 1421) MisBeginAction( AddMission, 1422) MisBeginAction( GiveItem, 956, 1, 4) MisCancelAction( ClearMission, 1422) MisNeed( MIS_NEED_DESP, "<t>Доставь посылку Банкиру в Ледыни (1358,519) ") MisHelpTalk( "<t>Как? Вы что ещё не передали посылку? ") MisResultCondition( AlwaysFailure ) Квест выдается, его можно посмотреть в журнале заданий, проблема заключается в том, что не выдается итем 956 - который узазан в коде, так же ошибка в системе и невозможно сдать квест Банкиру Ледыни В системном чате выдает вот это http://skrinshoter.ru/s/141217/i0eqTAgz Начинаем смотреть логи выводит вот это [12-14 13:00:41]./resource/script/MisSdk/MissionSdk.lua:2684: attempt to call global `NoNewbie' (a nil value) MissionSdk.lua elseif conditions[i].func == NoNewbie then PRINT( "ConditionsTest:NoNewbie, p1 = ", conditions[i].p1 ) local ret = NoNewbie( npc, conditions[i].p1 ) ----2684 строка if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoNewbie = false" ) return LUA_FALSE end Как тут быть? Edited December 14, 2017 by Матрос Quote Share this post Link to post Share on other sites
WVWMK 121 Report post Posted December 14, 2017 Саму функцию NoNewbie в студию, ругается что она не существует(она ничего не возвращает или, как было у меня раньше, слишком перегружает память и не выводится) Quote Делай добро и бросай его в воду Share this post Link to post Share on other sites
Матрос 0 Report post Posted December 14, 2017 Такой функции я чет не нахожу у себя... Quote Share this post Link to post Share on other sites
WVWMK 121 Report post Posted December 14, 2017 Тем не менее вы ее вызываете, или это переменная и вы с ней как то работаете, в итоге сервер не понимает что происходит и ругается. Но она не должна относится к данному квесту. Самый обычный вопрос - 956 предмет есть в iteminfo? Quote Делай добро и бросай его в воду Share this post Link to post Share on other sites
Матрос 0 Report post Posted December 14, 2017 (edited) function ConditionsTest( character, conditions, param1, param2, npc ) if conditions == nil then SystemNotice( character, "ConditionsTest: condition test function conditions parameter cannot be as null!" ) return LUA_FALSE end if conditions[1] == nil then PRINT( "ConditionsTest: condition as null return real!" ) else local num = TR_MAXNUM_CONDITIONS if conditions.count ~= nil then num = conditions.count end for i = 1, num, 1 do --јмІвґҐ·ўЖчПЮЦЖМхјюЧо¶а12ёцМхјю if conditions[i] == nil then break; end if conditions[i].func == nil then SystemNotice( character, "ConditionsTest: condition management function cannot be as null!" ) end if conditions[i].func == NoMission then PRINT( "ConditionsTest:NoMission, p1 = ", conditions[i].p1 ) local Ret = NoMission( character, conditions[i].p1 ) if Ret ~= LUA_TRUE then PRINT( "ConditionsTest: NoMission = false" ) return LUA_FALSE end elseif conditions[i].func == HasMission then PRINT( "ConditionsTest:HasMission, p1 = ", conditions[i].p1 ) local ret = HasMission( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: HasMission = false" ) return LUA_FALSE end elseif conditions[i].func == Checkjlktime then PRINT( "ConditionsTest:Checkjlktime, p1 =", conditions[i].p1 ) local ret = Checkjlktime( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:Checkjlktime = false" ) return LUA_FALSE end elseif conditions[i].func == HasRandMission then PRINT( "ConditionsTest:HasRandMission, p1 = ", conditions[i].p1 ) local ret = HasRandMission( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: HasRandMission = false" ) return LUA_FALSE end elseif conditions[i].func == HasMisssionFailure then PRINT( "ConditionsTest:HasMisssionFailure, p1 = ", conditions[i].p1 ) local ret = HasMisssionFailure( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: HasMisssionFailure = false" ) return LUA_FALSE end elseif conditions[i].func == NoMisssionFailure then PRINT( "ConditionsTest:NoMisssionFailure, p1 = ", conditions[i].p1 ) local ret = NoMisssionFailure( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: NoMisssionFailure = false" ) return LUA_FALSE end elseif conditions[i].func == NoRecord then PRINT( "ConditionsTest:NoRecord, p1 = ", conditions[i].p1 ) local ret = NoRecord( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: NoRecord = false" ) return LUA_FALSE end elseif conditions[i].func == HasState then PRINT( "ConditionsTest:HasState, p1 = ", conditions[i].p1 ) local ret = HasState( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: HasState = false" ) return LUA_FALSE end elseif conditions[i].func == CheckWeddingTime then PRINT( "ConditionsTest:CheckWeddingTime, p1 = ", conditions[i].p1 ) local ret = CheckWeddingTime( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: CheckWeddingTime = false" ) return LUA_FALSE end -----Lunch elseif conditions[i].func == LunchCheck then PRINT( "ConditionsTest: LunchCheck") local ret = LunchCheck(character) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:LunchCheck = false" ) return LUA_FALSE end elseif conditions[i].func == LunchCheck1 then PRINT( "ConditionsTest: LunchCheck1") local ret = LunchCheck1(character) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:LunchCheck1 = false" ) return LUA_FALSE end -----Lunch end elseif conditions[i].func == Wedding then PRINT( "ConditionsTest:Wedding, p1 = ", conditions[i].p1 ) local ret = Wedding( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: Wedding = false" ) return LUA_FALSE end elseif conditions[i].func == GiveWeddingCertificate then PRINT( "ConditionsTest:GiveWeddingCertificate, p1 = ", conditions[i].p1 ) local ret = GiveWeddingCertificate( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: GiveWeddingCertificate = false" ) return LUA_FALSE end elseif conditions[i].func == ChangeItem then PRINT( "ConditionsTest:ChangeItem, p1 = ", conditions[i].p1 ) local ret = ChangeItem( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: ChangeItem = false" ) return LUA_FALSE end elseif conditions[i].func == CheckZS then PRINT( "ConditionsTest:CheckZS, p1 = ", conditions[i].p1 ) local ret = CheckZS( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckZS = false" ) return LUA_FALSE end elseif conditions[i].func == IsChaType then PRINT( "ConditionsTest:IsChaType, p1 = ", conditions[i].p1 ) local ret = IsChaType( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: IsChaType = false" ) return LUA_FALSE end elseif conditions[i].func == NoChaType then PRINT( "ConditionsTest:NoChaType, p1 = ", conditions[i].p1 ) local ret = NoChaType( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: NoChaType = false" ) return LUA_FALSE end elseif conditions[i].func == HasRecord then PRINT( "ConditionsTest:HasRecord, p1 = ", conditions[i].p1 ) local ret = HasRecord( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: HasRecord = false" ) return LUA_FALSE end elseif conditions[i].func == CheckTeam then PRINT( "ConditionsTest:CheckTeam, p1 = ", conditions[i].p1 ) local ret = CheckTeam( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: CheckTeam = false" ) return LUA_FALSE end elseif conditions[i].func == CheckTime then PRINT( "ConditionsTest:CheckTime, p1 = ", conditions[i].p1 ) local ret = CheckTime( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: CheckTime = false" ) return LUA_FALSE end elseif conditions[i].func == NoFlag then PRINT( "ConditionsTest:NoFlag, p1 =, p2 = ", conditions[i].p1, conditions[i].p2 ) local ret = NoFlag( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoFlag = false" ) return LUA_FALSE end elseif conditions[i].func == HasAllFlag then PRINT( "ConditionsTest:HasAllFlag, p1 =, p2 = ", conditions[i].p1, conditions[i].p2, conditions[i].p3 ) local ret = HasAllFlag( character, conditions[i].p1, conditions[i].p2, conditions[i].p3 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: HasAllFlag = false" ) return LUA_FALSE end elseif conditions[i].func == HasFlag then PRINT( "ConditionsTest:HasFlag, p1 =, p2 = ", conditions[i].p1, conditions[i].p2 ) local ret = HasFlag( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasFlag = false" ) return LUA_FALSE end elseif conditions[i].func == HasItem then PRINT( "ConditionsTest: HasItem, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = HasItem( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasItem = false" ) return LUA_FALSE end elseif conditions[i].func == NoItem then PRINT( "ConditionsTest: NoItem, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = NoItem( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoItem = false" ) return LUA_FALSE end elseif conditions[i].func == HasCredit then PRINT( "ConditionsTest: HasCredit, p1 = ", conditions[i].p1) local ret = HasCredit( character, conditions[i].p1) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasCredit = false" ) return LUA_FALSE end elseif conditions[i].func == HasHonorPoint then PRINT( "ConditionsTest: HasHonorPoint, p1 = ", conditions[i].p1) local ret = HasHonorPoint( character, conditions[i].p1) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasHonorPoint = false" ) return LUA_FALSE end elseif conditions[i].func == HasFightingPoint then PRINT( "ConditionsTest: HasFightingPoint, p1 = ", conditions[i].p1) local ret = HasFightingPoint( character, conditions[i].p1) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasFightingPoint = false" ) return LUA_FALSE end elseif conditions[i].func == CheckPoint then PRINT( "ConditionsTest: CheckPoint, p1 = ", conditions[i].p1) local ret = CheckPoint( character,conditions[i].p1) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckPoint = false" ) return LUA_FALSE end elseif conditions[i].func == HaveNoItem then PRINT( "ConditionsTest: HaveNoItem, p1 = ", conditions[i].p1) local ret = HaveNoItem( character,conditions[i].p1) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HaveNoItem = false" ) return LUA_FALSE end elseif conditions[i].func == BankNoItem then PRINT( "ConditionsTest: BankNoItem, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = BankNoItem( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:BankNoItem = false" ) return LUA_FALSE end elseif conditions[i].func == EquipNoItem then PRINT( "ConditionsTest: EquipNoItem, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = EquipNoItem( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:EquipNoItem = false" ) return LUA_FALSE end elseif conditions[i].func == NoMoney then PRINT( "ConditionsTest: NoMoney, p1 = ", conditions[i].p1 ) local ret = NoMoney( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoMoney = false" ) return LUA_FALSE end elseif conditions[i].func == HasMoney then PRINT( "ConditionsTest: HasMoney, p1 = ", conditions[i].p1 ) local ret = HasMoney( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasMoney = false" ) return LUA_FALSE end elseif conditions[i].func == HasCancelMissionMoney then PRINT( "ConditionsTest: HasCancelMissionMoney" ) local ret = HasCancelMissionMoney( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasCancelMissionMoney = false" ) return LUA_FALSE end elseif conditions[i].func == IsMonster then PRINT( "ConditionsTest:IsMonster, p1 =, p2 =", conditions[i].p1, param1 ) if param1 == nil then SystemNotice( "ConditionsTest: determine destroy item type function, parameter invalid!param1 = nil" ) return LUA_FALSE end local ret = IsMonster( conditions[i].p1, param1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsMonster = false" ) return LUA_FALSE end elseif conditions[i].func == IsItem then PRINT( "ConditionsTest:IsItem, p1 =, p2 =", conditions[i].p1, param1 ) if param1 == nil then SystemNotice( "ConditionsTest: determine obtain item type function, parameter invalid! param1 = nil" ) return LUA_FALSE end local ret = IsItem( conditions[i].p1, param1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsItem = false" ) return LUA_FALSE end elseif conditions[i].func == IsMapNpc then PRINT( "ConditionsTest:IsMapNpc, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = IsMapNpc( npc, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsMapNpc = false" ) return LUA_FALSE end elseif conditions[i].func == IsMapChar then PRINT( "ConditionsTest:IsMapChar, p1 =", conditions[i].p1 ) local ret = IsMapChar( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsMapChar = false" ) return LUA_FALSE end elseif conditions[i].func == LvCheck then PRINT( "ConditionsTest:LvCheck, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = LvCheck( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:LvCheck = false" ) return LUA_FALSE end elseif conditions[i].func == TurnToJob then PRINT( "ConditionsTest:TurnToJob,p1 = ", conditions[i].p1 ) local ret = TurnToJob( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:TurnToJob = false" ) return LUA_FALSE end elseif conditions[i].func == HpCheck then PRINT( "ConditionsTest:HpCheck, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = HpCheck( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HpCheck = false" ) return LUA_FALSE end elseif conditions[i].func == SpCheck then PRINT( "ConditionsTest:SpCheck, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = SpCheck( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:SpCheck = false" ) return LUA_FALSE end elseif conditions[i].func == PfEqual then PRINT( "ConditionsTest:PfEqual, p1 =", conditions[i].p1 ) local ret = PfEqual( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:PfEqual = false" ) return LUA_FALSE end elseif conditions[i].func == NoPfEqual then PRINT( "ConditionsTest:PfEqual, p1 =", conditions[i].p1 ) local ret = NoPfEqual( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:PfEqual = false" ) return LUA_FALSE end elseif conditions[i].func == HasFame then PRINT( "ConditionsTest:HasFame, p1 =", conditions[i].p1 ) local ret = HasFame( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasFame = false" ) return LUA_FALSE end elseif conditions[i].func == IsInArea then PRINT( "ConditionsTest:IsInArea, p1 =", conditions[i].p1 ) local ret = IsInArea( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsInArea = false" ) return LUA_FALSE end elseif conditions[i].func == IsInMap then PRINT( "ConditionsTest:IsInMap, p1 =, p2 =, p3 = , p4 = ", conditions[i].p1, conditions[i].p2, conditions[i].p3, conditions[i].p4 ) local ret = IsInMap( character, conditions[i].p1, conditions[i].p2, conditions[i].p3, conditions[i].p4, 10000, 10000 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsInMap = false" ) return LUA_FALSE end elseif conditions[i].func == AlwaysFailure then PRINT( "ConditionsTest:AlwaysFailure," ) local ret = AlwaysFailure() if ret ~= LUA_TRUE then PRINT( "ConditionsTest:AlwaysFailure = false" ) return LUA_FALSE end elseif conditions[i].func == AlwaysTrue then PRINT( "ConditionsTest:AlwaysTrue," ) local ret = AlwaysTrue() --if ret ~= LUA_TRUE then --PRINT( "ConditionsTest:AlwaysTrue = false" ) --return LUA_FALSE --end elseif conditions[i].func == HasRandMissionNpc then PRINT( "ConditionsTest:HasRandMissionNpc,p1, p2, p3", conditions[i].p1, conditions[i].p2, conditions[i].p3 ) local ret = HasRandMissionNpc( character, conditions[i].p1, conditions[i].p2, conditions[i].p3 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasRandMissionNpc = false" ) return LUA_FALSE end elseif conditions[i].func == HasRandNpcItemFlag then PRINT( "ConditionsTest:HasRandNpcItemFlag,p1, p2", conditions[i].p1, conditions[i].p2 ) local ret = HasRandNpcItemFlag( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasRandNpcItemFlag = false" ) return LUA_FALSE end elseif conditions[i].func == NoRandNpcItemFlag then PRINT( "ConditionsTest:NoRandNpcItemFlag,p1, p2", conditions[i].p1, conditions[i].p2 ) local ret = NoRandNpcItemFlag( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoRandNpcItemFlag = false" ) return LUA_FALSE end elseif conditions[i].func == HasConvoyNpc then PRINT( "ConditionsTest:HasConvoyNpc,p1 = ", conditions[i].p1 ) local ret = HasConvoyNpc( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasConvoyNpc = false" ) return LUA_FALSE end elseif conditions[i].func ==CheckItem then PRINT( "ConditionsTest: CheckItem, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ) local ret = CheckItem( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckItem = false" ) return LUA_FALSE end elseif conditions[i].func ==CheckBag then PRINT( "ConditionsTest: CheckBag, p1 =, p2 =", conditions[i].p1, conditions[i].p2 ,conditions[i].p3) local ret = CheckBag( character, conditions[i].p1, conditions[i].p2 ,conditions[i].p3) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckBag = false" ) return LUA_FALSE end elseif conditions[i].func == NoNewbie then PRINT( "ConditionsTest:NoNewbie, p1 = ", conditions[i].p1 ) local ret = NoNewbie( npc, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoNewbie = false" ) return LUA_FALSE end elseif conditions[i].func ==CheckBagEmp then PRINT( "ConditionsTest: CheckBagEmp, p1 =, p2 =", conditions[i].p1) local ret = CheckBagEmp( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckBagEmp = false" ) return LUA_FALSE end elseif conditions[i].func == NoConvoyNpc then PRINT( "ConditionsTest:NoConvoyNpc,p1 = ", conditions[i].p1 ) local ret = NoConvoyNpc( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoConvoyNpc = false" ) return LUA_FALSE end elseif conditions[i].func == IsConvoyNpc then PRINT( "ConditionsTest:IsConvoyNpc,p1 = , p2 = ", conditions[i].p1, conditions[i].p2 ) local ret = IsConvoyNpc( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsConvoyNpc = false" ) return LUA_FALSE end elseif conditions[i].func == IsCategory then PRINT( "ConditionsTest:IsCategory,p1 = ", conditions[i].p1 ) local ret = IsCategory( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsCategory = false" ) return LUA_FALSE end elseif conditions[i].func == CheckConvertProfession then PRINT( "ConditionsTest:CheckConvertProfession,p1 = ", conditions[i].p1 ) local ret = CheckConvertProfession( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckConvertProfession = false" ) return LUA_FALSE end elseif conditions[i].func == IsSpawnPos then PRINT( "ConditionsTest:IsSpawnPos, p1 =", conditions[i].p1 ) local ret = IsSpawnPos( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsSpawnPos = false" ) return LUA_FALSE end elseif conditions[i].func == HasLeaveBagGrid then PRINT( "ConditionsTest:HasLeaveBagGrid, p1 =", conditions[i].p1 ) local ret = HasLeaveBagGrid( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasLeaveBagGrid = false" ) return LUA_FALSE end elseif conditions[i].func == HasLeaveBagTempGrid then PRINT( "ConditionsTest:HasLeaveBagTempGrid, p1 =", conditions[i].p1 ) local ret = HasLeaveBagTempGrid( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasLeaveBagTempGrid = false" ) return LUA_FALSE end elseif conditions[i].func == IsBoatFull then PRINT( "ConditionsTest:IsBoatFull" ) local ret = IsBoatFull( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsBoatFull = false" ) return LUA_FALSE end elseif conditions[i].func == BoatBuildCheck then PRINT( "ConditionsTest:BoatBuildCheck, p1 =", conditions[i].p1 ) local ret = BoatBuildCheck( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:BoatBuildCheck = false" ) return LUA_FALSE end elseif conditions[i].func == HasBoatInBerth then PRINT( "ConditionsTest:HasBoatInBerth, p1 =", conditions[i].p1 ) local ret = HasBoatInBerth( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasBoatInBerth = false" ) return LUA_FALSE end elseif conditions[i].func == HasDeadBoatInBerth then PRINT( "ConditionsTest:HasDeadBoatInBerth, p1 =", conditions[i].p1 ) local ret = HasDeadBoatInBerth( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasDeadBoatInBerth = false" ) return LUA_FALSE end elseif conditions[i].func == HasAllBoatInBerth then PRINT( "ConditionsTest:HasAllBoatInBerth, p1 =", conditions[i].p1 ) local ret = HasAllBoatInBerth( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasAllBoatInBerth = false" ) return LUA_FALSE end --elseif conditions[i].func == HasAllBoatInBerth_eitheror then -- PRINT( "ConditionsTest:HasAllBoatInBerth , p1 = , p2 = ", conditions[i].p1, conditions[i].p2 ) -- local ret = HasAllBoatInBerth_eitheror( character, conditions[i].p1, conditions[i].p2 ) -- if ret ~= LUA_TRUE then -- PRINT( "ConditionsTest:HasAllBoatInBerth_eitheror = false" ) -- return LUA_FALSE -- end elseif conditions[i].func == HasLuanchOut then PRINT( "ConditionsTest:HasLuanchOut" ) local ret = HasLuanchOut( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasLuanchOut = false" ) return LUA_FALSE end elseif conditions[i].func == HasGuild then PRINT( "ConditionsTest:HasGuild" ) local ret = HasGuild( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasGuild = false" ) return LUA_FALSE end elseif conditions[i].func == NoGuild then PRINT( "ConditionsTest:NoGuild" ) local ret = NoGuild( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoGuild = false" ) return LUA_FALSE end elseif conditions[i].func == HasPirateGuild then PRINT( "ConditionsTest:HasPirateGuild" ) local ret = HasPirateGuild( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasPirateGuild = false" ) return LUA_FALSE end elseif conditions[i].func == NoPirateGuild then PRINT( "ConditionsTest:NoPirateGuild" ) local ret = NoPirateGuild( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoPirateGuild = false" ) return LUA_FALSE end elseif conditions[i].func == HasNavyGuild then PRINT( "ConditionsTest:HasNavyGuild" ) local ret = HasNavyGuild( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasNavyGuild = false" ) return LUA_FALSE end elseif conditions[i].func == NoNavyGuild then PRINT( "ConditionsTest:NoNavyGuild" ) local ret = NoNavyGuild( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoNavyGuild = false" ) return LUA_FALSE end elseif conditions[i].func == IsGuildType then PRINT( "ConditionsTest:IsGuildType, p1 = ", conditions[i].p1 ) local ret = IsGuildType( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:IsGuildType = false" ) return LUA_FALSE end elseif conditions[i].func == TradeItemLevelCheck then PRINT( "ConditionsTest:TradeItemLevelCheck, p1 = , p2 = ", conditions[i].p1, conditions[i].p2 ) local ret = TradeItemLevelCheck( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:TradeItemLevelCheck = false" ) return LUA_FALSE end elseif conditions[i].func == TradeItemDataCheck then PRINT( "ConditionsTest:TradeItemDataCheck, p1 = , p2 = ", conditions[i].p1, conditions[i].p2 ) local ret = TradeItemDataCheck( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:TradeItemDataCheck = false" ) return LUA_FALSE end elseif conditions[i].func == HasOffer then PRINT( "ConditionsTest:HasOffer, p1 = ", conditions[i].p1 ) local ret = HasOffer( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasOffer = false" ) return LUA_FALSE end elseif conditions[i].func == LessCredit then PRINT( "ConditionsTest:LessCredit, p1 = , p2 = ", conditions[i].p1, conditions[i].p2 ) local ret = LessCredit( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:LessCredit = false" ) return LUA_FALSE end elseif conditions[i].func == LessTime then PRINT( "ConditionsTest:LessTime, p1 = ", conditions[i].p1 ) local ret = LessTime( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:LessTime = false" ) return LUA_FALSE end elseif conditions[i].func == MoreTime then PRINT( "ConditionsTest:MoreTime, p1 = ", conditions[i].p1 ) local ret = MoreTime( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:MoreTime = false" ) return LUA_FALSE end elseif conditions[i].func == BaiyangOn then PRINT( "ConditionsTest:BaiyangOn, p1 = ", conditions[i].p1 ) local ret = BaiyangOn( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:BaiyangOn = false" ) return LUA_FALSE end elseif conditions[i].func == CheckEnergy then PRINT( "ConditionsTest:CheckEnergy, p1 = ", conditions[i].p1 ) local ret = CheckEnergy( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckEnergy = false" ) return LUA_FALSE end elseif conditions[i].func == HasNOZSExp then PRINT( "ConditionsTest:HasNOZSExp, p1 = ", conditions[i].p1 ) local ret = HasNOZSExp( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasNOZSExp = false" ) return LUA_FALSE end elseif conditions[i].func == HasGuildLevel then PRINT( "ConditionsTest:HasGuildLevel, p1 = ", conditions[i].p1 ) local ret = HasGuildLevel( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasGuildLevel = false" ) return LUA_FALSE end -----Check_TOPguild elseif conditions[i].func == Check_TOPguild then PRINT( "ConditionsTest:Check_TOPguild") local ret = Check_TOPguild(character) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:Check_TOPguild = false" ) return LUA_FALSE end -----Check_TOPguild end elseif conditions[i].func == HasXmasYB then PRINT( "ConditionsTest:HasXmasYB,p1, p2", conditions[i].p1, conditions[i].p2 ) local ret = HasXmasYB( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasXmasYB = false" ) return LUA_FALSE end elseif conditions[i].func == KitbagLock then PRINT( "ConditionsTest:KitbagLock, p1 = ", conditions[i].p1 ) local ret = KitbagLock( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:KitbagLock = false" ) return LUA_FALSE end --2.0 elseif conditions[i].func == Get_Day_Mission1 then PRINT( "ConditionsTest:Get_Day_Mission1" ) local ret = Get_Day_Mission1( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:Get_Day_Mission1 = false" ) return LUA_FALSE end elseif conditions[i].func == Get_Day_Mission2 then PRINT( "ConditionsTest:Get_Day_Mission2" ) local ret = Get_Day_Mission2( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:Get_Day_Mission2 = false" ) return LUA_FALSE end elseif conditions[i].func == Get_Day_Mission3 then PRINT( "ConditionsTest:Get_Day_Mission3" ) local ret = Get_Day_Mission3( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:Get_Day_Mission3 = false" ) return LUA_FALSE end elseif conditions[i].func == Get_Day_Mission4 then PRINT( "ConditionsTest:Get_Day_Mission4" ) local ret = Get_Day_Mission4( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:Get_Day_Mission4 = false" ) return LUA_FALSE end elseif conditions[i].func == Get_Day_Mission5 then PRINT( "ConditionsTest:Get_Day_Mission5" ) local ret = Get_Day_Mission5( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:Get_Day_Mission5 = false" ) return LUA_FALSE end elseif conditions[i].func == HasNoItem then PRINT( "ConditionsTest:HasNoItem" ) local ret = HasNoItem( character ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:HasNoItem = false" ) return LUA_FALSE end else PRINT( "ConditionsTest: unknown condition function!i = %d", i ) SystemNotice( character, "ConditionsTest:unknown condition function error!" ) return LUA_ERROR end end end PRINT( "ConditionsTest: return true" ) return LUA_TRUE end Предмет да есть. Так а как мне ее убрать? Edited December 14, 2017 by Матрос Quote Share this post Link to post Share on other sites
WVWMK 121 Report post Posted December 14, 2017 вырезай тот кусок который вызывает ее и все Quote Делай добро и бросай его в воду Share this post Link to post Share on other sites
Матрос 0 Report post Posted December 14, 2017 --[[elseif conditions[i].func == NoNewbie then PRINT( "ConditionsTest:NoNewbie, p1 = ", conditions[i].p1 ) local ret = NoNewbie( npc, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoNewbie = false" ) return LUA_FALSE end]]-- Было бы все так просто. При вырезании этого кода НПС выдает ошибку http://skrinshoter.ru/s/141217/b2p3xivc А если закомментировать вот так эту часть elseif conditions[i].func == NoNewbie then --[[ PRINT( "ConditionsTest:NoNewbie, p1 = ", conditions[i].p1 ) local ret = NoNewbie( npc, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:NoNewbie = false" ) return LUA_FALSE end]]-- то работает но все равно криво, в обоих случаях нету файла с логом ошибки Quote Share this post Link to post Share on other sites