bualolu
16-02-15, 08:55 AM
ai giúp mình code lại cái Scrip chuyển sinh này với bỏ vài bước đi mình muốn có chuyển sinh đơn là có thể chuyển sinh được không cần làm thêm bước nào nữa..
Scrip này nó yêu cầu vài bước đốt hoa đăng tùm lum ai giúp với
ID item chuyển sinh đơn :
999000350
--Ten nhiem vu: (Cai Lao Hoan Dong (Lan 1) ) --- So buoc: (6)
function MissIon253(UserWorldId,QuestId, StepQuest, StatusQuest)
local Player = GetPlayer(UserWorldId)
local Msg = string.format("Nhan vat %s linh hoi thanh cong 2 thanh Hon Nguyen Cong qua la bat cao thu", Player.UserName);
local weiz1=GetPakItme(UserWorldId,999000350)
local weiz2=GetPakItme(UserWorldId,900000218)
-- Các bước xử lý nhiệm vụ
if StepQuest==1 then
if Player.Player_DotPhao < 40 then
SendSysMsg(UserWorldId,"Chua hoan thanh 40 lan Hoa Dang!", 9, "He thong")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest) --Chua du cap du yeu cau
else
local QuestLevel=GetQuestLevel(UserWorldId,QuestId) --lay gia tri QuestLevel la buoc hien tai cua nhan vat
if QuestLevel==1 then --neu dang o buoc 1
StatusQuest=2
AddQuest(UserWorldId,QuestId, StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la 2
elseif QuestLevel==2 then
StatusQuest=3 --dat buoc tiep theo la: 3
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 3
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 3
elseif QuestLevel==3 then
StatusQuest=4 --dat buoc tiep theo la: 4
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 4
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 4
elseif QuestLevel==4 then
StatusQuest=5 --dat buoc tiep theo la: 5
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 5
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 5
elseif QuestLevel==5 then
if (Player.BACKHOA < 12000 or Player.Danhvong < 3000) then
SendSysMsg(UserWorldId,"Khong du 12,000 Bac Khoa hoac 3000 Danh Vong!", 9, "He thong")
return
else
end
Player.BACKHOA=Player.BACKHOA - 12000;
Player.Danhvong=Player.Danhvong - 3000;
local weiz900000218=GetPackage(UserWorldId) --vi tri con trong
AddItme(UserWorldId,900000218,weiz900000218,1)
SendSysMsg(UserWorldId,"Ban vua nhan duoc 01 binh ruou Nu Nhi Hong !", 20, "He Thong")
StatusQuest=6 --dat buoc tiep theo la: 6
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 6
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 6
elseif QuestLevel==6 then
local controng=GetPackages(UserWorldId,3) --vi tri con trong
if (controng.Count < 3 or weiz2==-1) then --neu thung do day
SendSysMsg(UserWorldId,"Khong tim thay binh ruou trong hanh trang !", 20, "He Thong")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else --neu con cho trong
UpUseItme(UserWorldId,weiz2,1)
StatusQuest=7 --dat buoc tiep theo la: 7
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 7
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 7
end
else
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
end
end
elseif StepQuest==2 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if (Player.Player_Level<130 or weiz1==-1) then
SendSysMsg(UserWorldId,"Khong tim thay Chuyen Sinh Don trong hanh trang !", 9, "He thong")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest) --chua dat yeu cau, quay lai sau
else
if QuestLevel==7 then
SendMissionMsg(UserWorldId,QuestId, 22, StatusQuest)
else
StatusQuest=1
AddQuest(UserWorldId,QuestId, StatusQuest)
UpUseItme(UserWorldId,weiz1,1)
SendSysMsg(UserWorldId,"Tieu hao 01 Chuyen Sinh Don!", 10, "He thong")
SendMissionMsg(UserWorldId,QuestId, 21, StatusQuest)
SendSysMsg(UserWorldId,"Nhan nhiem vu thanh cong !", 9, "He thong")
end
end
elseif StepQuest==3 then
SendMissionMsg(UserWorldId,QuestId, 31, StatusQuest)
SendSysMsg(UserWorldId,"Ban vua tu choi nhiem vu !", 9, "He thong")
elseif StepQuest==4 then
SendSysMsg(UserWorldId,"Huy bo nhiem vu thanh cong !", 9, "He thong")
elseif StepQuest==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==7 then
local controng=GetPackages(UserWorldId,3) --vi tri con trong
if controng.Count < 3 then --neu thung do day
SendSysMsg(UserWorldId,"Tui do khong du 3 khong gian trong!", 9, "Chu Y")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else --neu con cho trong
-- Chuyển Sinh
SetPlayerLevel(UserWorldId,120)
Player.Player_ZS=Player.Player_ZS+1
SetPlayerShuxing(UserWorldId,150,150,1000)
SetPlayerTransfer(UserWorldId,Player.Player_Zx,7) -- Cho về thăng chức lần 7
Player.Player_WuXun=Player.Player_WuXun+100000
UpYzbItme(UserWorldId)
UpHpMpSp(UserWorldId)
--tang thuong
local weiz909000003=GetPackage(UserWorldId) --vi tri con trong
if Player.Player_Job==1 then -- neu la DAO
AddItmeProp(UserWorldId,100200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==2 then -- neu la KIEM
AddItmeProp(UserWorldId,200200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==3 then -- neu la THUONG
AddItmeProp(UserWorldId,300200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==4 then -- neu la CUNG
AddItmeProp(UserWorldId,400200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==5 then -- neu la DAI PHU
AddItmeProp(UserWorldId,500200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==6 then -- neu la THICH KHACH
AddItmeProp(UserWorldId,700200003,weiz909000003,1, 0,10000125,50000025,20000025,80000002,0,0,0,1)
end
--tang thuong
local weiz909000003=GetPackage(UserWorldId) --vi tri con trong
if Player.Player_Sex==1 then
AddItmeProp(UserWorldId,16900114,weiz909000003,1,0 ,10000070,50000150,90000005,80000003,0,0,0,1)
elseif Player.Player_Sex==1 then
AddItmeProp(UserWorldId,26900095,weiz909000003,1,0 ,10000070,50000150,90000005,80000003,0,0,0,1)
--tang thuong
end
SendSysMsg(UserWorldId,"Linh hoi duoc 2 Thanh Hon Nguyen Cong !!!",10,"Chu Y")
SendNoticeMsg(Msg,1)
end
SendMissionMsg(UserWorldId,QuestId, 51, StatusQuest)
end
end
end
Scrip này nó yêu cầu vài bước đốt hoa đăng tùm lum ai giúp với
ID item chuyển sinh đơn :
999000350
--Ten nhiem vu: (Cai Lao Hoan Dong (Lan 1) ) --- So buoc: (6)
function MissIon253(UserWorldId,QuestId, StepQuest, StatusQuest)
local Player = GetPlayer(UserWorldId)
local Msg = string.format("Nhan vat %s linh hoi thanh cong 2 thanh Hon Nguyen Cong qua la bat cao thu", Player.UserName);
local weiz1=GetPakItme(UserWorldId,999000350)
local weiz2=GetPakItme(UserWorldId,900000218)
-- Các bước xử lý nhiệm vụ
if StepQuest==1 then
if Player.Player_DotPhao < 40 then
SendSysMsg(UserWorldId,"Chua hoan thanh 40 lan Hoa Dang!", 9, "He thong")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest) --Chua du cap du yeu cau
else
local QuestLevel=GetQuestLevel(UserWorldId,QuestId) --lay gia tri QuestLevel la buoc hien tai cua nhan vat
if QuestLevel==1 then --neu dang o buoc 1
StatusQuest=2
AddQuest(UserWorldId,QuestId, StatusQuest)
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la 2
elseif QuestLevel==2 then
StatusQuest=3 --dat buoc tiep theo la: 3
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 3
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 3
elseif QuestLevel==3 then
StatusQuest=4 --dat buoc tiep theo la: 4
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 4
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 4
elseif QuestLevel==4 then
StatusQuest=5 --dat buoc tiep theo la: 5
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 5
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 5
elseif QuestLevel==5 then
if (Player.BACKHOA < 12000 or Player.Danhvong < 3000) then
SendSysMsg(UserWorldId,"Khong du 12,000 Bac Khoa hoac 3000 Danh Vong!", 9, "He thong")
return
else
end
Player.BACKHOA=Player.BACKHOA - 12000;
Player.Danhvong=Player.Danhvong - 3000;
local weiz900000218=GetPackage(UserWorldId) --vi tri con trong
AddItme(UserWorldId,900000218,weiz900000218,1)
SendSysMsg(UserWorldId,"Ban vua nhan duoc 01 binh ruou Nu Nhi Hong !", 20, "He Thong")
StatusQuest=6 --dat buoc tiep theo la: 6
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 6
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 6
elseif QuestLevel==6 then
local controng=GetPackages(UserWorldId,3) --vi tri con trong
if (controng.Count < 3 or weiz2==-1) then --neu thung do day
SendSysMsg(UserWorldId,"Khong tim thay binh ruou trong hanh trang !", 20, "He Thong")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else --neu con cho trong
UpUseItme(UserWorldId,weiz2,1)
StatusQuest=7 --dat buoc tiep theo la: 7
AddQuest(UserWorldId, QuestId, StatusQuest) --cho lam buoc tiep theo la: 7
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest) --cho lam buoc tiep theo la: 7
end
else
SendMissionMsg(UserWorldId,QuestId, 11, StatusQuest)
end
end
elseif StepQuest==2 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if (Player.Player_Level<130 or weiz1==-1) then
SendSysMsg(UserWorldId,"Khong tim thay Chuyen Sinh Don trong hanh trang !", 9, "He thong")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest) --chua dat yeu cau, quay lai sau
else
if QuestLevel==7 then
SendMissionMsg(UserWorldId,QuestId, 22, StatusQuest)
else
StatusQuest=1
AddQuest(UserWorldId,QuestId, StatusQuest)
UpUseItme(UserWorldId,weiz1,1)
SendSysMsg(UserWorldId,"Tieu hao 01 Chuyen Sinh Don!", 10, "He thong")
SendMissionMsg(UserWorldId,QuestId, 21, StatusQuest)
SendSysMsg(UserWorldId,"Nhan nhiem vu thanh cong !", 9, "He thong")
end
end
elseif StepQuest==3 then
SendMissionMsg(UserWorldId,QuestId, 31, StatusQuest)
SendSysMsg(UserWorldId,"Ban vua tu choi nhiem vu !", 9, "He thong")
elseif StepQuest==4 then
SendSysMsg(UserWorldId,"Huy bo nhiem vu thanh cong !", 9, "He thong")
elseif StepQuest==5 then
local QuestLevel=GetQuestLevel(UserWorldId,QuestId)
if QuestLevel==7 then
local controng=GetPackages(UserWorldId,3) --vi tri con trong
if controng.Count < 3 then --neu thung do day
SendSysMsg(UserWorldId,"Tui do khong du 3 khong gian trong!", 9, "Chu Y")
SendMissionMsg(UserWorldId,QuestId, 12, StatusQuest)
return
else --neu con cho trong
-- Chuyển Sinh
SetPlayerLevel(UserWorldId,120)
Player.Player_ZS=Player.Player_ZS+1
SetPlayerShuxing(UserWorldId,150,150,1000)
SetPlayerTransfer(UserWorldId,Player.Player_Zx,7) -- Cho về thăng chức lần 7
Player.Player_WuXun=Player.Player_WuXun+100000
UpYzbItme(UserWorldId)
UpHpMpSp(UserWorldId)
--tang thuong
local weiz909000003=GetPackage(UserWorldId) --vi tri con trong
if Player.Player_Job==1 then -- neu la DAO
AddItmeProp(UserWorldId,100200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==2 then -- neu la KIEM
AddItmeProp(UserWorldId,200200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==3 then -- neu la THUONG
AddItmeProp(UserWorldId,300200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==4 then -- neu la CUNG
AddItmeProp(UserWorldId,400200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==5 then -- neu la DAI PHU
AddItmeProp(UserWorldId,500200003,weiz909000003,1, 0,70000100,50000025,20000025,80000002,0,0,0,1)
elseif Player.Player_Job==6 then -- neu la THICH KHACH
AddItmeProp(UserWorldId,700200003,weiz909000003,1, 0,10000125,50000025,20000025,80000002,0,0,0,1)
end
--tang thuong
local weiz909000003=GetPackage(UserWorldId) --vi tri con trong
if Player.Player_Sex==1 then
AddItmeProp(UserWorldId,16900114,weiz909000003,1,0 ,10000070,50000150,90000005,80000003,0,0,0,1)
elseif Player.Player_Sex==1 then
AddItmeProp(UserWorldId,26900095,weiz909000003,1,0 ,10000070,50000150,90000005,80000003,0,0,0,1)
--tang thuong
end
SendSysMsg(UserWorldId,"Linh hoi duoc 2 Thanh Hon Nguyen Cong !!!",10,"Chu Y")
SendNoticeMsg(Msg,1)
end
SendMissionMsg(UserWorldId,QuestId, 51, StatusQuest)
end
end
end