Kết quả 1 đến 5 của 5
Chủ đề: Nhận set đồ +12
-
29-05-13, 11:19 AM #1
- Ngày tham gia
- May 2013
- Bài viết
- 15
- Thanks
- 61
- Thanked 3 Times in 3 Posts
Nhận set đồ +12
Đoạn code dưới đây chỉ cho nhận set đồ chưa cường hóa :
Code:tbGift.tbSetItem = { -- Trang bi +12 {{2,6,161,10}},{2,6,171,10}},{2,6,181,10}},{2,6,191,10}},{2,6,201,10}},{2,6,161,10}},{2,6,171,10}},{2,6,181,10}},{2,6,191,10}},{2,6,201,10}},},--phu {{2,7,312,10}},{2,7,332,10}},{2,7,352,10}},{2,7,372,10}},{2,7,492,10}},{2,7,322,10}},{2,7,342,10}},{2,7,362,10}},{2,7,382,10}},{2,7,402,10}},},--giay {{2,10,628,10}},{2,10,332,10}},{2,10,652,10}},{2,10,372,10}},{2,10,392,10}},{2,10,322,10}},{2,10,342,10},{ 2,10,362,10},{2,10,382,10},{2,10,502,10},},--bao tay {{2,5,160,10},{2,5,170,10},{2,5,180,10},{2,5,190,10},{2,5,200,10},{2,5,160,10},{2,5,170,10},{2,5,180 ,10},{2,5,190,10},{2,5,200,10},},--lien {{2,11,310,10},{2,11,330,10},{2,11,350,10},{2,11,370,10},{2,11,390,10},{2,11,320,10},{2,11,340,10},{ 2,11,360,10},{2,11,380,10},{2,11,400,10},},--ngoc boi {{2,4,160,10},{2,4,170,10},{2,4,180,10},{2,4,190,10},{2,4,250,10},{2,4,160,10},{2,4,170,10},{2,4,180 ,10},{2,11,190,10},{2,4,200,10},},--gioi chi {{2,8,310,10},{2,8,330,10},{2,8,350,10},{2,8,470,10},{2,8,390,10},{2,8,320,10},{2,8,340,10},{2,8,360 ,10},{2,8,380,10},{2,8,400,10},},--dai {{2,3,612,10},{2,3,652,10},{2,3,692,10},{2,3,732,10},{2,3,772,10},{2,3,622,10},{2,3,662,10},{2,3,702 ,10},{2,3,742,10},{2,3,802,10},},--ao {{2,9,610,10},{2,9,650,10},{2,9,690,10},{2,9,730,10},{2,9,770,10},{2,9,620,10},{2,9,660,10},{2,9,700 ,10},{2,9,760,10},{2,9,800,10},},--mu {{2,1,551,10},{2,1,591,10},{2,1,611,10},{2,1,651,10},{2,1,691,10},{2,1,551,10},{2,1,591,10},{2,1,611 ,10},{2,1,651,10},{2,1,691,10},}, {{2,1,561,10},{2,1,601,10},{2,1,621,10},{2,1,661,10},{2,1,701,10},{2,1,561,10},{2,1,601,10},{2,1,621 ,10},{2,1,661,10},{2,1,701,10},}, {{2,1,571,10},{2,1,981,10},{2,1,631,10},{2,1,671,10},{2,1,711,10},{2,1,571,10},{2,1,981,10},{2,1,631 ,10},{2,1,671,10},{2,1,711,10},}, {{2,1,581,10},{2,2,100,10},{2,1,641,10},{2,1,681,10},{2,1,721,10},{2,1,581,10},{2,2,100,10},{2,1,641 ,10},{2,1,681,10},{2,1,721,10},}, {{2,1,1172,10},{2,2,90,10},{2,1,811,10},{2,1,851,10},{2,1,891,10},{2,1,1172,10},{2,2,90,10},{2,1,811 ,10},{2,1,851,10},{2,1,891,10},}, {{2,1,1145,10},{2,1,911,10},{2,1,1183,10},{2,1,1208,10},{2,1,1211,10},{2,1,1145,10},{2,1,911,10},{2, 1,1183,10},{2,1,1208,10},{2,1,1211,10},}, } ------------------------------- function tbGift:TrangBi100(nFlag, nSeries) local nCount = me.GetTask(self.TASK_GROUP_ID6, self.TaskId_Count); if nCount >= self.Use_Max then local szMsg = "<color=yellow>Phần thưởng chỉ nhận được 1 lần :<color>"; local tbOpt = { {"Bạn đã nhận phần thưởng này rồi..."}; }; Dialog:Say(szMsg, tbOpt); return 0; end if (nCount == 0) then if not nFlag then local szMsg = "Nhận trang bị hệ nào?"; local tbOpt = { {"Hệ Kim",self.TrangBi100,self,1,1}, {"Hệ Mộc",self.TrangBi100,self,1,2}, {"Hệ Thủy",self.TrangBi100,self,1,3}, {"Hệ Hỏa",self.TrangBi100,self,1,4}, {"Hệ Thổ",self.TrangBi100,self,1,5}, } Dialog:Say(szMsg,tbOpt); elseif nFlag == 1 then local szMsg = "Nam hay nữ?"; local tbOpt = { {"Nam",self.TrangBi100,self,2,nSeries}, {"Nữ",self.TrangBi100,self,2,nSeries+5}, } Dialog:Say(szMsg,tbOpt); else local tbItems = self.tbSetItem; for i = 1, 15 do me.AddItem(unpack(tbItems[i][nSeries])).Bind(1); me.SetTask(self.TASK_GROUP_ID6, self.TaskId_Count, nCount + 1); end end end end
Khách viếng thăm hãy cùng tkv003 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
29-05-13, 11:23 AM #2
- Ngày tham gia
- Jan 2012
- Bài viết
- 2,415
- Thanks
- 2,567
- Thanked 1,844 Times in 882 Posts
Khách viếng thăm hãy cùng satthupro95 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
Các thành viên gởi lời cảm ơn đến satthupro95 vì bài viết này !
tkv003 (29-05-13)
-
29-05-13, 01:38 PM #3
- Ngày tham gia
- May 2013
- Bài viết
- 15
- Thanks
- 61
- Thanked 3 Times in 3 Posts
Ðề: Nhận set đồ +12
làm y như vậy nhưng có nhận được gì đâu,
Code:tbGift.tbSetItem = { -- Trang bi +12 {{2,6,161,10,nil,12}},{2,6,171,10,nil,12}},{2,6,181,10,nil,12}},{2,6,191,10,nil,12}},{2,6,201,10,nil,12}},{2,6,161,10,nil,12}},{2,6,171,10,nil,12}},{2,6,181,10,nil,12}},{2,6,191,10,nil,12}},{2,6,201,10,nil,12}},},--phu {{2,7,312,10,nil,12}},{2,7,332,10,nil,12}},{2,7,352,10,nil,12}},{2,7,372,10,nil,12}},{2,7,492,10,nil,12}},{2,7,322,10,nil,12}},{2,7,342,10,nil,12}},{2,7,362,10,nil,12}},{2,7,382,10,nil,12}},{2,7,402,10,nil,12}},},--giay {{2,10,628,10,nil,12}},{2,10,332,10,nil,12}},{2,10,652,10,nil,12}},{2,10,372,10,nil,12}},{2,10,392,10,nil,12}},{2,10,322,10,nil,12}},{2,10,342,10,nil,12},{ 2,10,362,10,nil,12},{2,10,382,10,nil,12},{2,10,502,10,nil,12},},--bao tay {{2,5,160,10,nil,12},{2,5,170,10,nil,12},{2,5,180,10,nil,12},{2,5,190,10,nil,12},{2,5,200,10,nil,12},{2,5,160,10,nil,12},{2,5,170,10,nil,12},{2,5,180 ,10,nil,12},{2,5,190,10,nil,12},{2,5,200,10,nil,12},},--lien {{2,11,310,10,nil,12},{2,11,330,10,nil,12},{2,11,350,10,nil,12},{2,11,370,10,nil,12},{2,11,390,10,nil,12},{2,11,320,10,nil,12},{2,11,340,10,nil,12},{ 2,11,360,10,nil,12},{2,11,380,10,nil,12},{2,11,400,10,nil,12},},--ngoc boi {{2,4,160,10,nil,12},{2,4,170,10,nil,12},{2,4,180,10,nil,12},{2,4,190,10,nil,12},{2,4,250,10,nil,12},{2,4,160,10,nil,12},{2,4,170,10,nil,12},{2,4,180 ,10,nil,12},{2,11,190,10,nil,12},{2,4,200,10,nil,12},},--gioi chi {{2,8,310,10,nil,12},{2,8,330,10,nil,12},{2,8,350,10,nil,12},{2,8,470,10,nil,12},{2,8,390,10,nil,12},{2,8,320,10,nil,12},{2,8,340,10,nil,12},{2,8,360 ,10,nil,12},{2,8,380,10,nil,12},{2,8,400,10,nil,12},},--dai {{2,3,612,10,nil,12},{2,3,652,10,nil,12},{2,3,692,10,nil,12},{2,3,732,10,nil,12},{2,3,772,10,nil,12},{2,3,622,10,nil,12},{2,3,662,10,nil,12},{2,3,702 ,10,nil,12},{2,3,742,10,nil,12},{2,3,802,10,nil,12},},--ao {{2,9,610,10,nil,12},{2,9,650,10,nil,12},{2,9,690,10,nil,12},{2,9,730,10,nil,12},{2,9,770,10,nil,12},{2,9,620,10,nil,12},{2,9,660,10,nil,12},{2,9,700 ,10,nil,12},{2,9,760,10,nil,12},{2,9,800,10,nil,12},},--mu {{2,1,551,10,nil,12},{2,1,591,10,nil,12},{2,1,611,10,nil,12},{2,1,651,10,nil,12},{2,1,691,10,nil,12},{2,1,551,10,nil,12},{2,1,591,10,nil,12},{2,1,611 ,10,nil,12},{2,1,651,10,nil,12},{2,1,691,10,nil,12},}, {{2,1,561,10,nil,12},{2,1,601,10,nil,12},{2,1,621,10,nil,12},{2,1,661,10,nil,12},{2,1,701,10,nil,12},{2,1,561,10,nil,12},{2,1,601,10,nil,12},{2,1,621 ,10,nil,12},{2,1,661,10,nil,12},{2,1,701,10,nil,12},}, {{2,1,571,10,nil,12},{2,1,981,10,nil,12},{2,1,631,10,nil,12},{2,1,671,10,nil,12},{2,1,711,10,nil,12},{2,1,571,10,nil,12},{2,1,981,10,nil,12},{2,1,631 ,10,nil,12},{2,1,671,10,nil,12},{2,1,711,10,nil,12},}, {{2,1,581,10,nil,12},{2,2,100,10,nil,12},{2,1,641,10,nil,12},{2,1,681,10,nil,12},{2,1,721,10,nil,12},{2,1,581,10,nil,12},{2,2,100,10,nil,12},{2,1,641 ,10,nil,12},{2,1,681,10,nil,12},{2,1,721,10,nil,12},}, {{2,1,1172,10,nil,12},{2,2,90,10,nil,12},{2,1,811,10,nil,12},{2,1,851,10,nil,12},{2,1,891,10,nil,12},{2,1,1172,10,nil,12},{2,2,90,10,nil,12},{2,1,811 ,10,nil,12},{2,1,851,10,nil,12},{2,1,891,10,nil,12},}, {{2,1,1145,10,nil,12},{2,1,911,10,nil,12},{2,1,1183,10,nil,12},{2,1,1208,10,nil,12},{2,1,1211,10,nil,12},{2,1,1145,10,nil,12},{2,1,911,10,nil,12},{2, 1,1183,10,nil,12},{2,1,1208,10,nil,12},{2,1,1211,10,nil,12},}, }
Code:for i = 1, 15 do me.AddItem(unpack(tbItems[i][nSeries])).Bind(1); me.SetTask(self.TASK_GROUP_ID6, self.TaskId_Count, nCount + 1); end
Khách viếng thăm hãy cùng tkv003 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
29-05-13, 08:32 PM #4
- Ngày tham gia
- May 2012
- Đang ở
- đây
- Bài viết
- 5,112
- Thanks
- 248
- Thanked 3,008 Times in 1,889 Posts
Ðề: Nhận set đồ +12
để ý vị trí thứ 3 (particular) có quy luật, dựa vào đó viết code sẽ đơn giản, đỡ dài dòng
161 - 171 - 181 ...Khách viếng thăm hãy cùng vipbk xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
Các thành viên gởi lời cảm ơn đến vipbk vì bài viết này !
tkv003 (30-05-13)
-
02-06-13, 10:14 AM #5
- Ngày tham gia
- Jul 2012
- Bài viết
- 71
- Thanks
- 53
- Thanked 12 Times in 11 Posts
Ðề: Nhận set đồ +12
mình làm như thế này ko biết có đúng ko: mình tạo thêm 1 file tmpnpc.lua rồi dùng chức năng GM để nhận đồ random theo hệ phái. Đồ gì thì chỉnh trong file tmpnpc.lua ấy và cho hàm check nhận 1 lần. Rồi tạo 1 hàm để nhận đồ này trong túi tân thủ
ko biết nghịch nên làm lung tung. heheKhách viếng thăm hãy cùng thanhdinh10 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!