Skorpion 0 Report post Posted June 1, 2018 Greetings, I'm working with a server file 1.36, and I'm trying to activate Sea Commerce, but so far it has not been possible to make it work. All NPC dialogues involved are in this Npc Script, que aciona um TriggerAction TradeBerthList: --- Resource\script\MisScript\NpcScript03.lua function r_talk10 () Talk( 1, "Chiroro: Hi! I am the Harbor Operator. How can I help you?" ) InitTrigger() TriggerCondition( 1, HasBoatInBerth, 1 ) TriggerAction( 1, TradeBerthList, 1 ) TriggerFailure( 1, JumpPage, 2 ) Text( 1, "Cargo Trade", MultiTrigger, GetMultiTrigger(), 1 ) --- InitGoods(1) SaleGoodsData( 0 , 4573 , 900 , 279 , 62 ) BuyGoodsData(0, 4581 , -1 , 542 , 121 ) --- InitTrigger() TriggerAction( 1, AddNpcTrigger, 51, TE_GAMETIME, TT_CYCLETIME, 30, 0 ) SetNpcTrigger( GetTrigger( 1 ) ) SetNpcActive() end In game, with Boat in the harbor of the city and Commerce Permit in hand, at the moment of doing the Cargo Trade appears in the system: ActionsProc: TradeBerthList failed! Which brings us to this function that checks if it was executed correctly. ActionProc: --- Resource\script\MisSdk\MissionSdk.lua elseif actions[i].func == TradeBerthList then PRINT( "ActionsProc:TradeBerthList, p1 = ", actions[i].p1 ) local ret = TradeBerthList( character, npc, actions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ActionsProc:TradeBerthList failed!" ) SystemNotice( character, "ActionsProc:TradeBerthList failed!" ) end The function returns the BoatBerthList that in the other occasions in which it is used there is no problem at all. It just does not work just by using the third parameter as BERTH_TRADE_LIST or 0 that is Cargo Trade. TriggerAction: --- Resource\script\MisSdk\NpcSdk.lua BERTH_TRADE_LIST = 0 function TradeBerthList( character, npc, berth ) PRINT( "TadeBerthList: show list of ship docked in harbor for trade!" ) local npcid = GetCharID( npc ) return BoatBerthList( character, npcid, BERTH_TRADE_LIST, berth, 0, 0, 0 ) end I would like to share this headache with you, and who knows, some of you can solve this problem ... What do you guys think? Quote Share this post Link to post Share on other sites
Andy 39 Report post Posted June 1, 2018 (edited) some function is changed in the GameServer(136), (may the TradeBerthList) because if you use old gameserver(1.35), cargo trade function works fine... Edited June 1, 2018 by Andy Quote Share this post Link to post Share on other sites
Skorpion 0 Report post Posted June 1, 2018 Hello Andy, could you make the serverfile (1.35) and client available, for the purpose of isolating such a function and finding the error? Quote Share this post Link to post Share on other sites