Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
etorth committed Aug 14, 2023
1 parent c0cb734 commit 443f62d
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 55 deletions.
72 changes: 45 additions & 27 deletions server/script/quest/初出江湖.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,15 @@ setQuestFSMTable(
}
]])

uidRemoteCall(getNPCharUID('仓库_1_007', '大老板_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('仓库_1_007', '大老板_1', uid,
[[
return getQuestName()
]],
[[
local playerUID, questUID, questName = ...
local questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -170,7 +173,7 @@ setQuestFSMTable(
</layout>
]=], SYS_EXIT)
end,
})
}
]])

setUIDQuestState{uid=uid, state='quest_find_chicken_blood'}
Expand All @@ -195,12 +198,15 @@ setQuestFSMTable(
end,

quest_done_chicken_blood = function(uid, value)
uidRemoteCall(getNPCharUID('仓库_1_007', '大老板_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('仓库_1_007', '大老板_1', uid,
[[
local playerUID, questUID, questName = ...
return getUID(), getQuestName()
]],
[[
local questUID, questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -216,21 +222,24 @@ setQuestFSMTable(
uidRemoteCall(questUID, uid,
[=[
local playerUID = ...
setUIDQuestState(playerUID, 'quest_prepare_to_wang')
setUIDQuestState(playerUID, 'quest_prepare_to_wang'}
]=])
end,
})
}
]])
end,

quest_prepare_to_wang = function(uid, value)
if uidRemoteCall(uid, [[ return getLevel() ]]) < 6 then
uidRemoteCall(getNPCharUID('道馆_1', '士官_1'), uid, getQuestName(),
setupNPCQuestBehavior('道馆_1', '士官_1', uid,
[[
return getQuestName()
]],
[[
local playerUID, questName = ...
local questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -242,7 +251,7 @@ setQuestFSMTable(
</layout>
]=], SYS_EXIT)
end,
})
}
]])

uidRemoteCall(uid, getUID(),
Expand All @@ -262,12 +271,15 @@ setQuestFSMTable(
]])

else
uidRemoteCall(getNPCharUID('道馆_1', '士官_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('道馆_1', '士官_1', uid,
[[
local playerUID, questUID, questName = ...
return getUID(), getQuestName()
]],
[[
local questUID, questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand Down Expand Up @@ -296,21 +308,24 @@ setQuestFSMTable(
uidRemoteCall(questUID, uid,
[=[
local playerUID = ...
setUIDQuestState{uid=playerUID, state='quest_accept_wang_book')
setUIDQuestState{uid=playerUID, state='quest_accept_wang_book'}
]=])
end,
})
}
]])
end
end,

quest_accept_wang_book = function(uid, value)
uidRemoteCall(getNPCharUID('道馆_1', '士官_1'), uid, getQuestName(),
setupNPCQuestBehavior('道馆_1', '士官_1', uid,
[[
return getQuestName()
]],
[[
local playerUID, questName = ...
local questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -322,15 +337,18 @@ setQuestFSMTable(
</layout>
]=], SYS_EXIT)
end,
})
}
]])

uidRemoteCall(getNPCharUID('比奇县_0', '王大人_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('比奇县_0', '王大人_1', uid,
[[
return getUID(), getQuestName()
]],
[[
local playerUID, questUID, questName = ...
local questUID, questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand Down Expand Up @@ -372,7 +390,7 @@ setQuestFSMTable(
uidRemoteCall(questUID, uid,
[=[
local playerUID = ...
setUIDQuestState{uid=playerUID, state='quest_done_wang_book')
setUIDQuestState{uid=playerUID, state='quest_done_wang_book'}
]=])
end,
Expand All @@ -388,7 +406,7 @@ setQuestFSMTable(
</layout>
]=], SYS_EXIT)
end,
})
}
]])
end,

Expand Down
74 changes: 46 additions & 28 deletions server/script/quest/比奇商会.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ setQuestFSMTable(
end,

quest_refuse_quest = function(uid, value)
uidRemoteCall(getNPCharUID('比奇县_0', '王大人_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('比奇县_0', '王大人_1', uid,
[[
local playerUID, questUID, questName = ...
return getUID(), getQuestName()
]],
[[
local questUID, questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand Down Expand Up @@ -81,7 +84,7 @@ setQuestFSMTable(
</layout>
]=], SYS_EXIT)
end,
})
}
]])
end,

Expand Down Expand Up @@ -837,12 +840,15 @@ setQuestFSMTable(fsmName_persuade_librarian,
setQuestFSMTable(fsmName_persuade_pharmacist,
{
[SYS_ENTER] = function(uid, value)
uidRemoteCall(getNPCharUID('比奇县_0', '药剂师_1'), uid, getQuestName(),
setupNPCQuestBehavior('比奇县_0', '药剂师_1', uid,
[[
return getQuestName()
]],
[[
local playerUID, questName = ...
local questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -865,15 +871,18 @@ setQuestFSMTable(fsmName_persuade_pharmacist,
</layout>
]=], SYS_EXIT)
end,
})
}
]])

uidRemoteCall(getNPCharUID('毒蛇山谷_2', '金中医_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('毒蛇山谷_2', '金中医_1', uid,
[[
return getUID(), getQuestName()
]],
[[
local playerUID, questUID, questName = ...
local questUID, questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand Down Expand Up @@ -947,7 +956,7 @@ setQuestFSMTable(fsmName_persuade_pharmacist,
setUIDQuestState{uid=playerUID, fsm=fsmName_persuade_pharmacist, state='quest_purchase_with_agreed_price', args=100}
]=])
end,
})
}
]])
end,

Expand Down Expand Up @@ -1036,12 +1045,12 @@ setQuestFSMTable(fsmName_persuade_pharmacist,
end,

quest_wait_purchase = function(uid, value)
uidRemoteCall(getNPCharUID('毒蛇山谷_2', '金中医_1'), uid, value, getUID(), getQuestName(),
setupNPCQuestBehavior('毒蛇山谷_2', '金中医_1', uid, string.format([[ return %d, getUID(), getQuestName() ]], value),
[[
local playerUID, askedGold, questUID, questName = ...
local askedGold, questUID, questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -1062,17 +1071,20 @@ setQuestFSMTable(fsmName_persuade_pharmacist,
setUIDQuestState{uid=playeUID, fsm=fsmName_persuade_pharmacist, state='quest_purchase_with_agreed_price', args=askedGold}
]=])
end,
})
}
]])
end,

quest_purchase_with_free_price = function(uid, value)
uidRemoteCall(getNPCharUID('毒蛇山谷_2', '金中医_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('毒蛇山谷_2', '金中医_1', uid,
[[
getUID(), getQuestName()
]],
[[
local playerUID, questUID, questName = ...
local questUID, questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand Down Expand Up @@ -1101,17 +1113,20 @@ setQuestFSMTable(fsmName_persuade_pharmacist,
setUIDQuestState{uid=playerUID, fsm=fsmName_persuade_pharmacist, state='quest_purchased_tooth'}
]=])
end,
})
}
]])
end,

quest_purchased_tooth = function(uid, value)
uidRemoteCall(getNPCharUID('毒蛇山谷_2', '金中医_1'), uid, getQuestName(),
setupNPCQuestBehavior('毒蛇山谷_2', '金中医_1', uid,
[[
return getQuestName()
]],
[[
local playerUID, questName = ...
local questName = ...
local questPath = {SYS_EPUID, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -1123,15 +1138,18 @@ setQuestFSMTable(fsmName_persuade_pharmacist,
</layout>
]=], SYS_EXIT)
end,
})
}
]])

uidRemoteCall(getNPCharUID('比奇县_0', '药剂师_1'), uid, getUID(), getQuestName(),
setupNPCQuestBehavior('比奇县_0', '药剂师_1', uid,
[[
local playerUID, questUID, questName = ...
return getUID(), getQuestName()
]],
[[
local questUID, questName = ...
local questPath = {SYS_EPQST, questName}
setUIDQuestHandler(playerUID, questName,
return
{
[SYS_ENTER] = function(uid, value)
uidPostXML(uid, questPath,
Expand All @@ -1151,7 +1169,7 @@ setQuestFSMTable(fsmName_persuade_pharmacist,
setUIDQuestState{uid=playerUID, fsm=fsmName_persuade_pharmacist, state=SYS_DONE}
]=])
end,
})
}
]])
end,
})
Expand Down

0 comments on commit 443f62d

Please sign in to comment.