sontung93
10-09-10, 09:55 PM
Include("\\Script\\global\\sourcejx49.lua (file://\\Script\\global\\sourcejx49.lua)");
function mohongbao(per1,per2)
i = random(per1,per2)
if i <= 100 then
AddOwnExp(1000*i)
Msg2Player("Nhan duoc "..(1000*i).." diem kinh nghiem.")
elseif i > 100 and i < 150 then
a = random(55,64)
AddEventItem(a)
Msg2Player("Nhan duoc mot vien huyen tinh cap "..(a-54)..".")
elseif i >= 150 and i < 200 then
AddEventItem(0)
Msg2Player("Nhan duoc Tay Tuy Kinh.")
elseif i >= 200 and i < 210 then
AddEventItem(1)
Msg2Player("Nhan duoc Ban Nguoc Tam Kinh.")
elseif i >= 210 and i < 220 then
AddEventItem(2)
Msg2Player("Nhan duoc Thiet La Han.")
elseif i >= 220 and i < 230 then
AddEventItem(85)
Msg2Player("Nhan duoc Vo Lam Mat Tich")
elseif i >= 230 and i < 240 then
AddEventItem(8)
Msg2Player("Nhan duoc Lam Thuy Tinh")
elseif i >= 240 and i < 250 then
AddEventItem(9)
Msg2Player("Nhan duoc Tu Thuy Tinh")
elseif i >= 250 and i < 260 then
AddEventItem(10)
Msg2Player("Nhan duoc Luc Thuy Tinh")
elseif i >= 260 and i < 270 then
AddEventItem(11)
Msg2Player("Nhan duoc Tinh Hong Bao Thach")
elseif i >= 270 and i < 280 then
a = random(3,9)
persen = a/3
if persen == 1 then
AddEventItem(5)
MsgEx("Nhan duoc Phuc Duyen Dai")
elseif persen == 2 then
AddEventItem(4)
MsgEx("Nhan duoc Phuc Duyen Trung")
elseif persen == 3 then
AddEventItem(3)
MsgEx("Nhan duoc Phuc Duyen Tieu")
else
Earn(5000*a)
MsgEx("Nhan duoc "..(5000*a).." luong")
end
elseif i >= 280 and i < 290 then
tyle = random(1,1000)
if tyle == 50 then
AddEventItem(65)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 100 then
AddEventItem(66)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 150 then
AddEventItem(67)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 200 then
AddEventItem(68)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 250 then
AddEventItem(69)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 300 then
AddEventItem(70)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 350 then
AddEventItem(71)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 400 then
AddEventItem(72)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 450 then
AddEventItem(73)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 500 then
AddEventItem(74)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
else
km = 2000*tyle
AddOwnExp(km)
MsgEx("Nhan duoc "..km.." diem kinh nghiem")
end
elseif i >= 290 and i < 300 then
k = random(45,54)
AddEventItem(k)
MsgEx("Nhan duoc mot bi kip do pho")
elseif i >= 300 and i < 350 then
AddItem(0,0,0,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 350 and i < 400 then
AddItem(0,0,1,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 400 and i < 450 then
AddItem(0,0,2,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 450 and i < 500 then
AddItem(0,0,3,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 500 and i < 550 then
AddItem(0,0,4,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 550 and i < 600 then
AddItem(0,0,5,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 600 and i < 650 then
AddItem(0,0,0,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 650 and i < 700 then
AddItem(0,0,0,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 700 and i < 750 then
AddItem(0,0,1,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 750 and i < 800 then
AddItem(0,0,2,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 800 and i < 850 then
AddItem(0,0,3,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 850 and i < 900 then
AddItem(0,0,4,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 900 and i < 950 then
AddItem(0,0,5,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 950 and i < 1000 then
AddItem(0,0,0,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1000 and i < 1050 then
AddItem(0,0,1,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1050 and i < 1100 then
AddItem(0,0,2,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1100 and i < 1150 then
AddItem(0,0,3,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1150 and i < 1200 then
AddItem(0,0,4,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1200 and i < 1250 then
AddItem(0,0,5,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1250 and i < 1300 then
AddItem(0,0,0,191,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1300 and i < 1350 then
AddItem(0,0,1,201,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1350 and i < 1400 then
AddItem(0,1,0,31,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1400 and i < 1450 then
AddItem(0,1,1,31,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1450 and i < 1500 then
AddItem(0,1,2,31,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
end
end;
cho e hỏi là nó sai ở đâu hả
function mohongbao(per1,per2)
i = random(per1,per2)
if i <= 100 then
AddOwnExp(1000*i)
Msg2Player("Nhan duoc "..(1000*i).." diem kinh nghiem.")
elseif i > 100 and i < 150 then
a = random(55,64)
AddEventItem(a)
Msg2Player("Nhan duoc mot vien huyen tinh cap "..(a-54)..".")
elseif i >= 150 and i < 200 then
AddEventItem(0)
Msg2Player("Nhan duoc Tay Tuy Kinh.")
elseif i >= 200 and i < 210 then
AddEventItem(1)
Msg2Player("Nhan duoc Ban Nguoc Tam Kinh.")
elseif i >= 210 and i < 220 then
AddEventItem(2)
Msg2Player("Nhan duoc Thiet La Han.")
elseif i >= 220 and i < 230 then
AddEventItem(85)
Msg2Player("Nhan duoc Vo Lam Mat Tich")
elseif i >= 230 and i < 240 then
AddEventItem(8)
Msg2Player("Nhan duoc Lam Thuy Tinh")
elseif i >= 240 and i < 250 then
AddEventItem(9)
Msg2Player("Nhan duoc Tu Thuy Tinh")
elseif i >= 250 and i < 260 then
AddEventItem(10)
Msg2Player("Nhan duoc Luc Thuy Tinh")
elseif i >= 260 and i < 270 then
AddEventItem(11)
Msg2Player("Nhan duoc Tinh Hong Bao Thach")
elseif i >= 270 and i < 280 then
a = random(3,9)
persen = a/3
if persen == 1 then
AddEventItem(5)
MsgEx("Nhan duoc Phuc Duyen Dai")
elseif persen == 2 then
AddEventItem(4)
MsgEx("Nhan duoc Phuc Duyen Trung")
elseif persen == 3 then
AddEventItem(3)
MsgEx("Nhan duoc Phuc Duyen Tieu")
else
Earn(5000*a)
MsgEx("Nhan duoc "..(5000*a).." luong")
end
elseif i >= 280 and i < 290 then
tyle = random(1,1000)
if tyle == 50 then
AddEventItem(65)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 100 then
AddEventItem(66)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 150 then
AddEventItem(67)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 200 then
AddEventItem(68)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 250 then
AddEventItem(69)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 300 then
AddEventItem(70)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 350 then
AddEventItem(71)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 400 then
AddEventItem(72)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 450 then
AddEventItem(73)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif tyle == 500 then
AddEventItem(74)
MsgEx("Nhan duoc mot cuon bi kip 120")
logWrite("["..GetName().."] lay duoc 1 cuon bi kip 120")
else
km = 2000*tyle
AddOwnExp(km)
MsgEx("Nhan duoc "..km.." diem kinh nghiem")
end
elseif i >= 290 and i < 300 then
k = random(45,54)
AddEventItem(k)
MsgEx("Nhan duoc mot bi kip do pho")
elseif i >= 300 and i < 350 then
AddItem(0,0,0,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 350 and i < 400 then
AddItem(0,0,1,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 400 and i < 450 then
AddItem(0,0,2,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 450 and i < 500 then
AddItem(0,0,3,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 500 and i < 550 then
AddItem(0,0,4,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 550 and i < 600 then
AddItem(0,0,5,61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 600 and i < 650 then
AddItem(0,0,0,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 650 and i < 700 then
AddItem(0,0,0,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 700 and i < 750 then
AddItem(0,0,1,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 750 and i < 800 then
AddItem(0,0,2,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 800 and i < 850 then
AddItem(0,0,3,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 850 and i < 900 then
AddItem(0,0,4,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 900 and i < 950 then
AddItem(0,0,5,121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 950 and i < 1000 then
AddItem(0,0,0,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1000 and i < 1050 then
AddItem(0,0,1,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1050 and i < 1100 then
AddItem(0,0,2,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1100 and i < 1150 then
AddItem(0,0,3,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1150 and i < 1200 then
AddItem(0,0,4,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1200 and i < 1250 then
AddItem(0,0,5,181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1250 and i < 1300 then
AddItem(0,0,0,191,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1300 and i < 1350 then
AddItem(0,0,1,201,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1350 and i < 1400 then
AddItem(0,1,0,31,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1400 and i < 1450 then
AddItem(0,1,1,31,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 1450 and i < 1500 then
AddItem(0,1,2,31,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
logWrite("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
end
end;
cho e hỏi là nó sai ở đâu hả