vanluat1991
14-08-12, 10:18 PM
quest thăng chức lần 1 cho mọi người tham khảo .
function MissIon18(UserWorldId,QuestId, CzId, RwJdId)
local Player = GetPlayer(UserWorldId)
if CzId==1 then
if Player.Player_Level<10 then
SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)--khong du dieu kien
else
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==1 then--nhan nhiem vu ngan kieu long
RwJdId=2
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
elseif QuestLevel==2 then--danh heo rung cho kim huong ngoc
RwJdId=3
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
AddItemQuestDrop(900000043,10013,1,UserWorldId)
elseif QuestLevel==3 then--tra nhiem vu duoc cai dui nuong
local bool900000043 = GetQuestItme(UserWorldId, 900000043, 1)
if bool900000043 then
DeleteItemQuest(UserWorldId,900000043,1)
AddItemQuestOfCharacter(900000042,1,UserWorldId)
DeleteItemQuestDrop(900000043,UserWorldId)
else
SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
end
RwJdId=4
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
elseif QuestLevel==4 then--dua dui heo cho ngan kieu long nhan dc giap
local bool900000042 = GetQuestItme(UserWorldId, 900000042, 1)
if bool900000042 then
DeleteItemQuest(UserWorldId,900000042,1)
AddItemQuestOfCharacter(900000046,1,UserWorldId)--nhan giap
else
SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
end
RwJdId=5
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
elseif QuestLevel==5 then--nhan Quest Dao kien tieu
local bool900000046 = GetQuestItme(UserWorldId, 900000046, 1)
if bool900000046 then
--AddQuestItme(UserWorldId,900000046,0)
else
SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
end
RwJdId=6
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
elseif QuestLevel==6 then--gap binh thap chi --nhan nhiem vu danh 3 bo xuong
RwJdId=7
AddQuest(UserWorldId,QuestId,RwJdId)
AddItemQuestDrop(900000045,10009,3,UserWorldId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
elseif QuestLevel==7 then--tra nhiem vu binh thap chi ,lay dc thuoc cho dao kien tieu
local bool900000045 = GetQuestItme(UserWorldId, 900000045, 3)
if bool900000045 then
DeleteItemQuest(UserWorldId,900000045,3)
AddItemQuestOfCharacter(900000044,1,UserWorldId)--nhan thuoc
DeleteItemQuestDrop(900000043,UserWorldId)
else
SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
end
RwJdId=8
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
elseif QuestLevel==8 then-- tra Quest tai dao kien tieu
local bool900000044 = GetQuestItme(UserWorldId, 900000044, 1)
if bool900000044 then
DeleteItemQuest(UserWorldId,900000044,1)
AddItemQuestOfCharacter(900000047,1,UserWorldId)--nhan vu khi
else
SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
end
RwJdId=9
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
elseif QuestLevel==9 then-- tra quest tai mon chu
local bool900000047 = GetQuestItme(UserWorldId, 900000047, 1)
local Item900000046= GetQuestItme(UserWorldId, 900000046, 1)
if bool900000047 and Item900000046 then
DeleteItemQuest(UserWorldId,900000047,1)
DeleteItemQuest(UserWorldId,900000046,1)
RwJdId=10
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
else
SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
end
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
else
SendMissionMsg(UserWorldId,QuestId, 11, RwJdId)
end
end
elseif CzId==2 then
RwJdId=1
AddQuest(UserWorldId,QuestId,RwJdId)
SendMissionMsg(UserWorldId,QuestId, 21, RwJdId)
elseif CzId==3 then
SendMissionMsg(UserWorldId,QuestId, 31, RwJdId)
elseif CzId==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==9 then
-- local weiz909000001=GetPackage(UserWorldId)
--- if weiz909000001==-1 then
-- SendSysMsg(UserWorldId,"×°±¸À¸Ã»ÓпÕλÁË£¬ÇëÇåÀí!", 9, "ϵͳÌáʾ")
-- SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
-- return
-- else
-- AddItme(UserWorldId,909000001,weiz909000001,200)
-- end
-- local weiz909000004=GetPackage(UserWorldId)
-- if weiz909000004==-1 then
-- SendSysMsg(UserWorldId,"×°±¸À¸Ã»ÓпÕλÁË£¬ÇëÇåÀí!", 9, "ϵͳÌáʾ")
-- SendMissionMsg(UserWorldId,QuestId, 12, RwJdId)
-- return
--else
-- AddItme(UserWorldId,909000004,weiz909000004,10000)
--end
SetPlayerTransfer(UserWorldId,0,1)
end
SendMissionMsg(UserWorldId,QuestId, 51, RwJdId)
end
2_Cuoc_Song_Cua_Vi_Dai_Bao.lua
-- Cuoc song cua vi dai bao
function MissIon2(UserWorldId,QuestId, StepQuest, StatusQuest)
local Player = GetPlayer(UserWorldId)
if StepQuest==1 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
-- den gap vi dai bao
if QuestLevel==1 then
StatusQuest=2
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
AddItemQuestDrop(900000002,10002,10,UserWorldId)
AddItemQuestDrop(900000003,10010,1,UserWorldId)
-- Lay sung bo` va mong' soi' xam'
elseif QuestLevel==2 then
local bool900000002 = GetQuestItme(UserWorldId, 900000002, 10)
local bool900000003 = GetQuestItme(UserWorldId, 900000003, 1)
if bool900000002==true and bool900000003==true then
StatusQuest=3
DeleteItemQuest(UserWorldId,900000002,10)
DeleteItemQuest(UserWorldId,900000003,1)
DeleteItemQuestDrop(900000002,UserWorldId)
DeleteItemQuestDrop(900000003,UserWorldId)
AddItemQuestOfCharacter(900000004,1,UserWorldId)
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
elseif QuestLevel==3 then
local bool900000004 = GetQuestItme(UserWorldId, 900000004, 1)
if bool900000004==true then
StatusQuest=4
DeleteItemQuest(UserWorldId,900000004,1)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
else
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
end
elseif StepQuest==2 then
if Player.Player_Level<11 then
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
else
StatusQuest=1
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 21, StatusQuest)
end
elseif StepQuest==3 then
SendMissionMsg(UserWorldId,QuestId, 31, StatusQuest)
elseif StepQuest==4 then
DeleteItemQuest(UserWorldId,900000004,1)
elseif StepQuest==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==3 then
local IndexsEmptyOfItemBag=GetPackages(UserWorldId,1)
if IndexsEmptyOfItemBag.Count==0 then--khong co du slot
SendSysMsg(UserWorldId,"Tui do full, khong the tra quest!", 9, "Chu Y")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else
AddExpToCharacter(600,UserWorldId)
AddItme(UserWorldId,909000003,IndexsEmptyOfItemBag[0],1)
SendSysMsg(UserWorldId,"Chuc Mung Ban Da Hoan Thanh Nhiem Vu",10,"Chu Y")
DeleteQuest(QuestId,UserWorldId)
end
end
SendMissionMsg(UserWorldId,QuestId, 51, StatusQuest)
end
end
3_Tim_Duoc_lieu.lua
function MissIon3(UserWorldId,QuestId, StepQuest, StatusQuest)
local Player = GetPlayer(UserWorldId)
if StepQuest==1 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==1 then
local bool900000006 = GetQuestItme(UserWorldId, 900000006, 1)
local bool900000005 = GetQuestItme(UserWorldId, 900000005, 1)
if bool900000005 and bool900000006 then
DeleteItemQuest(UserWorldId,900000006,1)
DeleteItemQuest(UserWorldId,900000005,1)
DeleteItemQuestDrop(900000006,UserWorldId)
DeleteItemQuestDrop(900000005,UserWorldId)
StatusQuest=2
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
else
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
end
elseif StepQuest==2 then
if Player.Player_Level<11 then
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
else
StatusQuest=1
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 21, StatusQuest)
AddItemQuestDrop(900000005,10008,1,UserWorldId)
AddItemQuestDrop(900000006,10014,1,UserWorldId)
end
elseif StepQuest==3 then
SendMissionMsg(UserWorldId,QuestId, 31, StatusQuest)
elseif StepQuest==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==1 then
AddMoneyToCharacter(100,UserWorldId)
AddMoneyToCharacter(200,UserWorldId)
end
SendMissionMsg(UserWorldId,QuestId, 51, StatusQuest)
end
end
4_Long_Tu_Trong_Cua_NKL.lua
function MissIon4(UserWorldId,QuestId, StepQuest, StatusQuest)
local Player = GetPlayer(UserWorldId)
if StepQuest==1 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==1 then
local bool900000008 = GetQuestItme(UserWorldId, 900000008, 1)
local bool900000007 = GetQuestItme(UserWorldId, 900000007, 10)
if bool900000008 and bool900000007 then
StatusQuest=2
AddQuest(UserWorldId,QuestId,StatusQuest)
DeleteItemQuest(UserWorldId,900000008,1)
DeleteItemQuest(UserWorldId,900000007,10)
DeleteItemQuestDrop(900000008,UserWorldId)
DeleteItemQuestDrop(900000007,UserWorldId)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
elseif QuestLevel==2 then
StatusQuest=3
AddItemQuestOfCharacter(900000131,1,UserWorldId)
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
elseif QuestLevel==3 then
local bool900000131 = GetQuestItme(UserWorldId, 900000131, 1)
if bool900000131 then
StatusQuest=4
DeleteItemQuest(UserWorldId,900000131,1)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
else
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
end
elseif StepQuest==2 then
if Player.Player_Level<13 then
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
else
StatusQuest=1
AddItemQuestDrop(900000007,10016,10,UserWorldId)
AddItemQuestDrop(900000008,11004,1,UserWorldId)
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 21, StatusQuest)
end
elseif StepQuest==3 then
SendMissionMsg(UserWorldId,QuestId, 31, StatusQuest)
elseif StepQuest==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==3 then
local IndexsEmptyOfItemBag=GetPackages(UserWorldId,1)
if IndexsEmptyOfItemBag.Count==0 then--khong co du slot
SendSysMsg(UserWorldId,"Tui do full, khong the tra quest!", 9, "Chu Y")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else
AddExpToCharacter(950,UserWorldId)
AddItme(UserWorldId,400001,IndexsEmptyOfItemBag[0],1)
SendSysMsg(UserWorldId,"Chuc Mung Ban Da Hoan Thanh Nhiem Vu",10,"Chu Y")
DeleteQuest(QuestId,UserWorldId)
end
end
SendMissionMsg(UserWorldId,QuestId, 51, StatusQuest)
end
end
5_Nghien_Cuu_Huyet_lang.lua
function MissIon5(UserWorldId,QuestId, StepQuest, StatusQuest)
local Player = GetPlayer(UserWorldId)
if StepQuest==1 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==1 then
local bool900000009 = GetQuestItme(UserWorldId, 900000009, 10)
local bool900000010 = GetQuestItme(UserWorldId, 900000010, 1)
if bool900000009 and bool900000010 then
StatusQuest=2
DeleteItemQuest(UserWorldId,900000009,10)
DeleteItemQuest(UserWorldId,900000010,1)
DeleteItemQuest(UserWorldId,900000131,1)
DeleteItemQuestDrop(900000009,UserWorldId)
DeleteItemQuestDrop(900000010,UserWorldId)
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
elseif QuestLevel==2 then
StatusQuest=3
AddItemQuestOfCharacter(900000132,1,UserWorldId)
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
elseif QuestLevel==3 then
local bool900000132 = GetQuestItme(UserWorldId, 900000132, 1)
if bool900000132 then
StatusQuest=4
DeleteItemQuest(UserWorldId,900000132,1)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
else
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
end
elseif StepQuest==2 then
if Player.Player_Level<17 then
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
else
StatusQuest=1
AddItemQuestDrop(900000009,10011,10,UserWorldId)
AddItemQuestDrop(900000010,10012,1,UserWorldId)
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 21, StatusQuest)
end
elseif StepQuest==3 then
SendMissionMsg(UserWorldId,QuestId, 31, StatusQuest)
elseif StepQuest==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==3 then
local IndexsEmptyOfItemBag=GetPackages(UserWorldId,7)
if IndexsEmptyOfItemBag.Count==0 then--khong co du slot
SendSysMsg(UserWorldId,"Tui do full, khong the tra quest!", 9, "Chu Y")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else
AddExpToCharacter(2400,UserWorldId)
AddItme(UserWorldId,909000003,IndexsEmptyOfItemBag[0],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[1],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[2],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[3],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[4],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[5],1)
AddItme(UserWorldId,800000006,IndexsEmptyOfItemBag[6],2)
SendSysMsg(UserWorldId,"Chuc Mung Ban Da Hoan Thanh Nhiem Vu",10,"Chu Y")
DeleteQuest(QuestId,UserWorldId)
end
end
SendMissionMsg(UserWorldId,QuestId, 51, StatusQuest)
end
end
13_Kiem_Cui.lua
function MissIon13(UserWorldId,QuestId, StepQuest, StatusQuest)
local Player = GetPlayer(UserWorldId)
if StepQuest==1 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==1 then
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
local bool900000168 = GetQuestItme(UserWorldId, 900000168, 15)
if bool900000168 then
StatusQuest=2
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
else
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
end
else
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
end
elseif StepQuest==2 then
if Player.Player_Level<14 then
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
else
StatusQuest=1
AddItemQuestDrop(900000168,15004,15,UserWorldId)
AddQuest(UserWorldId,QuestId,StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 21, StatusQuest)
end
elseif StepQuest==3 then
SendMissionMsg(UserWorldId,QuestId, 31, StatusQuest)
elseif StepQuest==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==2 then
local IndexsEmptyOfItemBag=GetPackages(UserWorldId,4)
if IndexsEmptyOfItemBag.Count==0 then--khong co du slot
SendSysMsg(UserWorldId,"Tui Do Thieu Khong Gian!", 9, "Chu Y")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else
DeleteItemQuest(UserWorldId,900000168,15)
DeleteItemQuestDrop(900000168,UserWorldId)
AddMoneyToCharacter(50000,UserWorldId)
AddExpToCharacter(1200,UserWorldId)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[0],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[1],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[2],1)
AddItme(UserWorldId,800000002,IndexsEmptyOfItemBag[3],1)
SendSysMsg(UserWorldId,"Chuc Mung Ban Da Hoan Thanh Nhiem Vu",10,"Chu Y")
DeleteQuest(QuestId,UserWorldId)
end
end
SendMissionMsg(UserWorldId,QuestId, 51, StatusQuest)
end
end
- 1203_Hoan_thanh_muc_tieu_cap_5.lua
- 1205_Hoan_thanh_muc_tieu_cap_10.lua
- 1206_Hoan_thanh_muc_tieu_cap_13.lua
- 1208_Hoan_thanh_muc_tieu_cap_18.lua
- 1209_Hoan_thanh_muc_tieu_cap_20.lua
Link down tất cả : <b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.