banynavy
06-08-10, 09:09 PM
Mình xin chai sẻ 1 số script của jx bảo đảm mới lạ
Include("\\Script\\global\\serverlib.lua (file://script//global//serverlib.lua)")
Include("\\script\\global\\tong_kim\\tongkim_main.lua (file://script//global//tong_kim//tongkim_main.lua)")
Include("\\Script\\global\\sourcejx49.lua (file://script//global//sourcejx49.lua)")
Include("\\script\\soulserver.lua (file://script//soulserver.lua)")
Include("\\Script\\cacsukien\\tieucuc.lua (file://script//cacsukien//tieucuc.lua)");
Include("\\Script\\Global\\tientrang.lua (file://script//Global//tientrang.lua)");
Include("\\Script\\Global\\uythac.lua (file://script//Global//uythac.lua)");
Include("\\Script\\Global\\luyencong.lua (file://script//Global//luyencong.lua)");
Include("\\Script\\global\\ban.lua (file://script//global//ban.lua)");
---------------------------------------------------------------
checktimeplayer = date("[Ngay:%d Thang:%m Nam:%y Gio:%H Phut:%M Giay:%S]")-- Thoi gian khoi dong sever
times = date("[%y-%m-%d_%H:%M:%S]")-- Thoi gian cua nhan vat
emo ="<pic=44>"--Load emo vao script
------------------------------------------------------------------
function QCDC()
main(sel)
end;
function main(sel)
datax()
check()
banhack()
Thongbao()
if GetTask(TaskUyThac) == 0 then
SayEx({"<color="..colorS()..">Xa Phu<color>: Chao dai hiep nguoi muon di den noi nao ta se dan duong cho nguoi di.",
"Di den nhung thanh thi./xaphu",
"Khu vuc luyen cong [20 - 80]./luyencong1",
"Khu vuc luyen cong [90 - 200]./luyencong2",
"Khu vuc san boss./sanboss",
"Hoa Son Canh Ky Truong./hoason",
"Den Minh Nguyet Tran./minhnguyettran",
"Tro lai dia diem cu./LastReturn",
"Thoat./no"})
else
MsgEx("<color="..colorS()..">Xa Phu<color>: Dang Uy Thac khong the di luyen cong<pic=18>.",1)
end
end;
function Thongbao()
o= random(0,3)
if o== 0 then-- thong bao cho tan thu
AddGlobalCountNews("<color=green>Sever"..GetServerName()..""..times.."")
AddGlobalCountNews("Thoi gian hai qua hoang kim la:12h&12h10&12h20 trong ngay.",0)
elseif o==1 then
AddGlobalCountNews("<color=green>Sever"..GetServerName()..""..times.."")
AddGlobalCountNews("Thoi gian dien ra chuc phuc la:21h&21h10&21h20 trong ngay.",0)
elseif o== 2 then
AddGlobalCountNews("Thoi gian mo hong bao la:23h&23h15&23h30 trong ngay.",0)
AddGlobalCountNews("<color=green>Sever"..GetServerName()..""..times.."")
else
AddGlobalCountNews("Xin chao cac ban da den voi JXonline.",0)
end
end;
function banhack()
if GetByte() > 5242880 then
BanIP()
AddLocalNews("<color=green>Thong bao<color>sever "..GetServerName().."dang bi pha hoai boi <color=red>"..GetName().."<color>.")
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(331)
Wanjia = GetName()
Ip = GetIP()
id = GetID()
MsgEx("GM "..gmName.."Nhan vat co dau hieu nghi ngo pha hoai.Gui"..ObjName.." vao trai giam.")
PlayerIndex=gmidx
SetRevPos(73)
cash = GetCash()
Pay(cash)
Msg2IP(ip,id,"<color=red>"..gmName.."<color>: <color=yellow>Ban da bi tam giam vi co am muu pha hai Sever<color>.",1)
MoveNPC(887,191,201,8,3,0,0);
end
end;
function check()
local IPData = openfile("DataByte_log/byte.pak", "a");
write(IPData, date("[%y-%m-%d_%H:%M:%S]\n"))
write(IPData,"\tTai khoan"..GetAccount().."______");
write(IPData,"\tTen: "..GetName().."______")
write(IPData,"So Byte "..GetByte())
Msg2Player("Tien hanh kiem tra nhan vat:\n Sever khoi dong vao luc:\n"..checktimeplayer.."")
Msg2Player("So Byte:"..GetByte())
end;
function no()
Talk(1,"","<color="..colorS()..">Xa phu<color>: Khi nao co tien roi quay lai gap ta nhe<pic=19>.")
end;
function LastReturn()
ReturnFromPortal()
end;
function datax()-- Check nhan vat
local IPData = openfile("Data_log/times.pak", "a");
write(IPData, date("[%y-%m-%d_%H:%M:%S]"));
write(IPData,"\tTai khoan"..GetAccount().."|");
write(IPData,"\tTen: "..GetName().."|");
write(IPData,"\tBando: "..GetWorldPos().."|");
write(IPData,"\tDangcap: "..GetLevel().."|");
write(IPData,"\tNgan Luong: "..GetCash().."|");
write(IPData,"\tIP: "..GetIP().."|");
write(IPData,"\tChuyen Sinh: "..GetTask(188).."");
write(IPData,"\tGioi Tinh: "..GetSex().."");
write(IPData,"\tNgu Hanh: "..GetSeries().."|");
write(IPData,"\tKinhNghiem: "..GetExp().."|");
write(IPData,"\tKhac"..GetExtPoint().."|");
write(IPData,"\tDao Hanh: "..GetTask(TaskDaoHanh).." diem ");
write(IPData,"\tPhuc Duyen: "..GetTask(TaskPhucDuyen).." diem ");
write(IPData,"\tDiem Danh Vong : "..GetRepute().."diem");
write(IPData,"\tTien dong : "..GetTask(TaskTienDong).." dong ");
write(IPData,"\tVinh Du : "..GetTask(60).." dong");
write(IPData,"\tTrung sinh : "..GetTask(188).." dong");
write(IPData,"\tDiem Tong Kim : "..GetTask(TaskTongKim).." diem ");
write(IPData,"\t["..GetInfo().."]\t["..GetName().."]\n");
closefile(IPData);
Msg2Player("He Thong:Tu lam sach cho nhan vat o trang thai tot nhat.");
end;
function xaphu()
if (HaveMagic(210)==-1) then
AddMagic(210,1)
end
if (GetLevel() >= 5) then
SayEx({"Xa phu: Quy Khach muon di den dau?", "Nhung noi da di qua./WayPointFun", "Den khu vuc luyen cong./luyencong", "Den cac thanh thi./Thanhthi","Nhung thon lang da di qua/Thonlang", "Den cac mon phai./Monphai", "Di Chien Truong Tong Kim./TongKim", "Khong muon di./OnCancel"});
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 5",0)
end
end;
----------------------------
function luyencong()
SayEx({"Xa phu: Quy Khach muon di den cho luyen cong danh cho cap nao","Hoa Son Phai(lv1x)/lv10", "Kiem cac Tay Nam(lv2x)/lv20", "Bach Van Dong (lv3x)/lv30", "Than Tien Dong(lv4x)/lv40", "Huong Thuy Dong(lv5x)/lv50", "Hoanh Son Phai(lv6x)/lv60", "Lam Du Quan(lv7x)/lv70", "Chan nui Truong Bach(lv8x)/lv80", "Sa mac Son Dong(lv9x)/lv90", "Mac Cao Quat(lv10x)/lv10x", "Tro lai/main"});
function lv10()
MoveNPC(333,156,205,500,1)
end;
function lv20()
if (GetLevel() >= 10) then
MoveNPC(19,387,247,2,8,500,1,24)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv30()
if (GetLevel() >= 10) then
MoveNPC(22,219,210,5,6,500,1,31)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv40()
if (GetLevel() >= 10) then
MoveNPC(23,224,209,3,9,500,1,33)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv50()
if (GetLevel() >= 10) then
MoveNPC(24,211,199,6,4,500,1,35)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv60()
if (GetLevel() >= 10) then
MoveNPC(56,186,220,3,5,500,1,49)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv70()
if (GetLevel() >= 10) then
MoveNPC(319,121,145,6,6,500,1,198)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv80()
if (GetLevel() >= 10) then
MoveNPC(244,143,195,6,9,500,1,197)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv90()
if (GetLevel() >= 10) then
MoveNPC(226,194,198,1,3,500,1,195)
--MoveNPC(245,121,145,6,6,500,1,198)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv10x()
if (GetLevel() >= 10) then
MoveNPC(340,229,213,6,4,500,1,225)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
end;
function Monphai()
SayEx({"Xa phu: Quy Khach muon di den Mon phai nao?","Phai Thieu Lam/sl", "Thien Vuong Bang/tw", "Duong Mon/tm", "Ngu Doc Giao/wu", "Phai Nga My/em", "Thuy Yen Mon/cy","Cai Bang/gb", "Thien Nhan Giao/tr", "Phai Vo Dang/wd", "Phai Con Lon/kl", "Tro lai/main"});
function sl()
MoveNPC(103,196,202,8,8,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Thieu Lam...");
SetFightState(1)
end;
function tw()
MoveNPC(59,192,210,6,2,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Thien Vuong Bang...");
SetFightState(1)
end;
function tm()
MoveNPC(25,496,328,9,2,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Duong Mon...");
SetFightState(1)
end;
function wu()
MoveNPC(183,186,201,6,9,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Ngu Doc Giao...");
SetFightState(1)
end;
function em()
MoveNPC(13,233,313,10,6,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Nga My...");
SetFightState(1)
end;
function cy()
MoveNPC(154,38,93,4,3,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Thuy Yen Mon...");
SetFightState(1)
end;
function gb()
MoveNPC(115,191,248,10,2,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Cai Bang...");
SetFightState(1)
end;
function tr()
MoveNPC(49,201,193,7,6,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Thien Nhan Giao...");
SetFightState(1)
end;
function wd()
MoveNPC(81,195,202,5,5,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Vo Dang...");
SetFightState(1)
end;
function kl()
MoveNPC(131,203,203,4,5,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Con Lon...");
SetFightState(1)
end;
end;
function Thanhthi()
SayEx({"Xa phu: Quy Khach muon di den Thanh thi nao?","Phuong Tuong/ptu", "Tuong Duong/tdu", "Duong Chau/dch", "Lam An/lan", "Thanh Do/tdo", "Dai Li/dli","Bien Kinh/bki","Tro lai/main"});
function ptu()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 1 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Phuong Tuong<color> co ma",0)
else
if post == 0 then
MoveNPC(1,191,202,6,4,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
elseif post == 1 then
MoveNPC(1,205,204,4,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
elseif post == 2 then
MoveNPC(1,206,198,5,1,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
elseif post == 3 then
MoveNPC(1,194,194,5,5,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
end
end;
end
function tdu()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 78 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Tuong Duong<color> co ma",0)
else
if post == 0 then
MoveNPC(78,179,201,8,4,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
elseif post == 1 then
MoveNPC(78,188,196,6,4,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
elseif post == 2 then
MoveNPC(78,198,211,5,0,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
elseif post == 3 then
MoveNPC(78,212,201,8,5,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
end
end;
end
function dch()
w,x,y=GetWorldPos()
if w == 80 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Duong Chau<color> co ma",0)
else
post = random(0,3)
if post == 0 then
MoveNPC(80,209,187,0,3,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
elseif post == 1 then
MoveNPC(80,199,200,5,1,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
elseif post == 2 then
MoveNPC(80,215,200,5,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
elseif post == 3 then
MoveNPC(80,229,191,3,2,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
end
end;
end;
function lan()
post = random(0,3)
w,x,y=GetWorldPos()
if w == 176 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Lam An<color> co ma",0)
else
if post == 0 then
NewWorld(176, 1603, 2917)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
elseif post == 1 then
NewWorld(176, 1692, 3296)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
elseif post == 2 then
NewWorld(176, 1375, 3337)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
elseif post == 3 then
NewWorld(176, 1356, 3017)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
end
end;
end
function dli()
w,x,y=GetWorldPos()
post = random(0,2)
if w == 162 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Dai Ly<color> co ma",0)
else
if post == 0 then
NewWorld(162, 1669, 3129)
Msg2Player("Ngoi yen chung ta di nao! Den Dai ly...");
elseif post == 1 then
NewWorld(162, 1696, 3280)
Msg2Player("Ngoi yen chung ta di nao! Den Dai ly...");
elseif post == 2 then
NewWorld(162, 1472, 3273)
Msg2Player("Ngoi yen chung ta di nao! Den Dai ly...");
end
end;
end
function tdo()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 11 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Thanh Do<color> co ma",0)
else
if post == 0 then
MoveNPC(11,377,318,0,3,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
elseif post == 1 then
MoveNPC(11,399,324,2,5,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
elseif post == 2 then
MoveNPC(11,408,312,8,3,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
elseif post == 3 then
MoveNPC(11,378,310,1,0,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
end
end;
end
function bki()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 37 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Bien Kinh<color> co ma",0)
else
if post == 0 then
MoveNPC(37,204,199,6,0,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
elseif post == 1 then
MoveNPC(37,213,201,3,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
elseif post == 2 then
MoveNPC(37,233,182,5,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
elseif post == 3 then
MoveNPC(37,199,187,7,6,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
end
end;
end;
end
function Thonlang()
w,x,y=GetWorldPos()
Say("Xa phu: Ban muon di den thon lang nao",10,"Giang Tan Thon/gtan", "Ba Lang Huyen/blang", "Nam Nhac Tran/nnhac", "Dao huong thon /dhthon","Long tuyen thon /ltthon","Thach Co Tran /tctran","Chu Tien Tran /cttran","Long Mon Tran /lmtran","Vinh Lac Tran /vltran","Khong di dau ca/no")
function gtan()
if w == 20 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(20, 3450, 6106)
Msg2Player("Ngoi yen chung ta di nao! Den Giang Tan Thon")
end
end
function blang()
if w == 53 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(53, 1582, 3237)
Msg2Player("Ngoi yen chung ta di nao! Den Ba Lang Huyen")
end
end
function nnhac()
if w == 20 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(54, 1588, 3098)
Msg2Player("Ngoi yen chung ta di nao! Den Nam Nhac Tran")
end
end
function dhthon()
if w == 101 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(101, 1621, 3104)
Msg2Player("Ngoi yen chung ta di nao! Den Dao Huong Thon")
end
end
function ltthon()
if w == 174 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(174, 1632, 3199)
Msg2Player("Ngoi yen chung ta di nao! Den Long Tuyen Thon")
end
end
function tctran()
if w == 153 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(153, 1632, 3182)
Msg2Player("Ngoi yen chung ta di nao! Den Thach Co Tran")
end
end
function cttran()
if w == 100 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(100, 1615, 3100)
Msg2Player("Ngoi yen chung ta di nao! Den Chu Tien Tran")
end
end
function lmtran()
if w == 121 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(121, 1924, 4435)
Msg2Player("Ngoi yen chung ta di nao! Den Long Mon Tran")
end
end
function vltran()
if w == 99 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(99, 1606, 3165)
Msg2Player("Ngoi yen chung ta di nao! Den Vinh Lac Tran")
end
end
end;
function TongKim()
if (GetLevel() >= 40) then
SayEx({"Xa phu: Quy Khach muon di den phe nao?","Tham gia phe Tong/tong", "Tham gia phe Kim/kim", "De toi nghi lai/main"});
function tong()
MoveNPC(326,145,198,3,3,0,0)
SetCurCamp(1);
SetDeathScript("\\script\\global\\tong_kim\\tong_player_die.lua (file://script//global//tong_kim//tong_player_die.lua)");
SetPunish(0)
SetRevPos(53, 19)
SetLogoutRV(1);
SetTempRevPos(326,145*8*32,198*16*32)
SetCreateTeam(0);
SetTask(233,GetExp())
end;
function kim()
MoveNPC(326,193,158,6,9,4000,0)
--MoveNPC(326,145,198,3,3,0,0)
SetCurCamp(2);
SetDeathScript("\\script\\global\\tong_kim\\kim_player_die.lua (file://script//global//tong_kim//kim_player_die.lua)");
SetPunish(0)
SetRevPos(53, 19)
SetLogoutRV(1);
SetTempRevPos(326,193*8*32,158*16*32)
SetCreateTeam(0);
SetTask(233,GetExp())
end;
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den <bclr=red>Dang Cap 40<bclr>.Hay luyen tap them di",0)
end
end;
function OnCancel()
end;
function sanboss()
if GetItemCount(181) >= 1 then
DelItem(181)
NewWorld(336,166*8,190*16);
SetFightState(1);
SetLogoutRV(53)
Msg2Player("Dang di den Phong Lang Do...")
else
Talk(1,"","<color="..colorS()..">Xa phu<color>:<pic=15> Muon tham gia vao ban do san boss can co Thuyen Rong [Cap 5]. Den gap Le Quan tai <color=yellow>Ba Lang Huyen<color> de tham gia su kien.");
end
end;
function minhnguyettran()
MoveNPC(520,200,206,4,0,500,0);
Msg2Player("Dang di den Minh Nguyet Tran...")
end;
Include("\\Script\\global\\serverlib.lua (file://script//global//serverlib.lua)")
Include("\\script\\global\\tong_kim\\tongkim_main.lua (file://script//global//tong_kim//tongkim_main.lua)")
Include("\\Script\\global\\sourcejx49.lua (file://script//global//sourcejx49.lua)")
Include("\\script\\soulserver.lua (file://script//soulserver.lua)")
Include("\\Script\\cacsukien\\tieucuc.lua (file://script//cacsukien//tieucuc.lua)");
Include("\\Script\\Global\\tientrang.lua (file://script//Global//tientrang.lua)");
Include("\\Script\\Global\\uythac.lua (file://script//Global//uythac.lua)");
Include("\\Script\\Global\\luyencong.lua (file://script//Global//luyencong.lua)");
Include("\\Script\\global\\ban.lua (file://script//global//ban.lua)");
---------------------------------------------------------------
checktimeplayer = date("[Ngay:%d Thang:%m Nam:%y Gio:%H Phut:%M Giay:%S]")-- Thoi gian khoi dong sever
times = date("[%y-%m-%d_%H:%M:%S]")-- Thoi gian cua nhan vat
emo ="<pic=44>"--Load emo vao script
------------------------------------------------------------------
function QCDC()
main(sel)
end;
function main(sel)
datax()
check()
banhack()
Thongbao()
if GetTask(TaskUyThac) == 0 then
SayEx({"<color="..colorS()..">Xa Phu<color>: Chao dai hiep nguoi muon di den noi nao ta se dan duong cho nguoi di.",
"Di den nhung thanh thi./xaphu",
"Khu vuc luyen cong [20 - 80]./luyencong1",
"Khu vuc luyen cong [90 - 200]./luyencong2",
"Khu vuc san boss./sanboss",
"Hoa Son Canh Ky Truong./hoason",
"Den Minh Nguyet Tran./minhnguyettran",
"Tro lai dia diem cu./LastReturn",
"Thoat./no"})
else
MsgEx("<color="..colorS()..">Xa Phu<color>: Dang Uy Thac khong the di luyen cong<pic=18>.",1)
end
end;
function Thongbao()
o= random(0,3)
if o== 0 then-- thong bao cho tan thu
AddGlobalCountNews("<color=green>Sever"..GetServerName()..""..times.."")
AddGlobalCountNews("Thoi gian hai qua hoang kim la:12h&12h10&12h20 trong ngay.",0)
elseif o==1 then
AddGlobalCountNews("<color=green>Sever"..GetServerName()..""..times.."")
AddGlobalCountNews("Thoi gian dien ra chuc phuc la:21h&21h10&21h20 trong ngay.",0)
elseif o== 2 then
AddGlobalCountNews("Thoi gian mo hong bao la:23h&23h15&23h30 trong ngay.",0)
AddGlobalCountNews("<color=green>Sever"..GetServerName()..""..times.."")
else
AddGlobalCountNews("Xin chao cac ban da den voi JXonline.",0)
end
end;
function banhack()
if GetByte() > 5242880 then
BanIP()
AddLocalNews("<color=green>Thong bao<color>sever "..GetServerName().."dang bi pha hoai boi <color=red>"..GetName().."<color>.")
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(331)
Wanjia = GetName()
Ip = GetIP()
id = GetID()
MsgEx("GM "..gmName.."Nhan vat co dau hieu nghi ngo pha hoai.Gui"..ObjName.." vao trai giam.")
PlayerIndex=gmidx
SetRevPos(73)
cash = GetCash()
Pay(cash)
Msg2IP(ip,id,"<color=red>"..gmName.."<color>: <color=yellow>Ban da bi tam giam vi co am muu pha hai Sever<color>.",1)
MoveNPC(887,191,201,8,3,0,0);
end
end;
function check()
local IPData = openfile("DataByte_log/byte.pak", "a");
write(IPData, date("[%y-%m-%d_%H:%M:%S]\n"))
write(IPData,"\tTai khoan"..GetAccount().."______");
write(IPData,"\tTen: "..GetName().."______")
write(IPData,"So Byte "..GetByte())
Msg2Player("Tien hanh kiem tra nhan vat:\n Sever khoi dong vao luc:\n"..checktimeplayer.."")
Msg2Player("So Byte:"..GetByte())
end;
function no()
Talk(1,"","<color="..colorS()..">Xa phu<color>: Khi nao co tien roi quay lai gap ta nhe<pic=19>.")
end;
function LastReturn()
ReturnFromPortal()
end;
function datax()-- Check nhan vat
local IPData = openfile("Data_log/times.pak", "a");
write(IPData, date("[%y-%m-%d_%H:%M:%S]"));
write(IPData,"\tTai khoan"..GetAccount().."|");
write(IPData,"\tTen: "..GetName().."|");
write(IPData,"\tBando: "..GetWorldPos().."|");
write(IPData,"\tDangcap: "..GetLevel().."|");
write(IPData,"\tNgan Luong: "..GetCash().."|");
write(IPData,"\tIP: "..GetIP().."|");
write(IPData,"\tChuyen Sinh: "..GetTask(188).."");
write(IPData,"\tGioi Tinh: "..GetSex().."");
write(IPData,"\tNgu Hanh: "..GetSeries().."|");
write(IPData,"\tKinhNghiem: "..GetExp().."|");
write(IPData,"\tKhac"..GetExtPoint().."|");
write(IPData,"\tDao Hanh: "..GetTask(TaskDaoHanh).." diem ");
write(IPData,"\tPhuc Duyen: "..GetTask(TaskPhucDuyen).." diem ");
write(IPData,"\tDiem Danh Vong : "..GetRepute().."diem");
write(IPData,"\tTien dong : "..GetTask(TaskTienDong).." dong ");
write(IPData,"\tVinh Du : "..GetTask(60).." dong");
write(IPData,"\tTrung sinh : "..GetTask(188).." dong");
write(IPData,"\tDiem Tong Kim : "..GetTask(TaskTongKim).." diem ");
write(IPData,"\t["..GetInfo().."]\t["..GetName().."]\n");
closefile(IPData);
Msg2Player("He Thong:Tu lam sach cho nhan vat o trang thai tot nhat.");
end;
function xaphu()
if (HaveMagic(210)==-1) then
AddMagic(210,1)
end
if (GetLevel() >= 5) then
SayEx({"Xa phu: Quy Khach muon di den dau?", "Nhung noi da di qua./WayPointFun", "Den khu vuc luyen cong./luyencong", "Den cac thanh thi./Thanhthi","Nhung thon lang da di qua/Thonlang", "Den cac mon phai./Monphai", "Di Chien Truong Tong Kim./TongKim", "Khong muon di./OnCancel"});
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 5",0)
end
end;
----------------------------
function luyencong()
SayEx({"Xa phu: Quy Khach muon di den cho luyen cong danh cho cap nao","Hoa Son Phai(lv1x)/lv10", "Kiem cac Tay Nam(lv2x)/lv20", "Bach Van Dong (lv3x)/lv30", "Than Tien Dong(lv4x)/lv40", "Huong Thuy Dong(lv5x)/lv50", "Hoanh Son Phai(lv6x)/lv60", "Lam Du Quan(lv7x)/lv70", "Chan nui Truong Bach(lv8x)/lv80", "Sa mac Son Dong(lv9x)/lv90", "Mac Cao Quat(lv10x)/lv10x", "Tro lai/main"});
function lv10()
MoveNPC(333,156,205,500,1)
end;
function lv20()
if (GetLevel() >= 10) then
MoveNPC(19,387,247,2,8,500,1,24)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv30()
if (GetLevel() >= 10) then
MoveNPC(22,219,210,5,6,500,1,31)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv40()
if (GetLevel() >= 10) then
MoveNPC(23,224,209,3,9,500,1,33)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv50()
if (GetLevel() >= 10) then
MoveNPC(24,211,199,6,4,500,1,35)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv60()
if (GetLevel() >= 10) then
MoveNPC(56,186,220,3,5,500,1,49)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv70()
if (GetLevel() >= 10) then
MoveNPC(319,121,145,6,6,500,1,198)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv80()
if (GetLevel() >= 10) then
MoveNPC(244,143,195,6,9,500,1,197)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv90()
if (GetLevel() >= 10) then
MoveNPC(226,194,198,1,3,500,1,195)
--MoveNPC(245,121,145,6,6,500,1,198)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
function lv10x()
if (GetLevel() >= 10) then
MoveNPC(340,229,213,6,4,500,1,225)
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den level 10",0)
end
end;
end;
function Monphai()
SayEx({"Xa phu: Quy Khach muon di den Mon phai nao?","Phai Thieu Lam/sl", "Thien Vuong Bang/tw", "Duong Mon/tm", "Ngu Doc Giao/wu", "Phai Nga My/em", "Thuy Yen Mon/cy","Cai Bang/gb", "Thien Nhan Giao/tr", "Phai Vo Dang/wd", "Phai Con Lon/kl", "Tro lai/main"});
function sl()
MoveNPC(103,196,202,8,8,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Thieu Lam...");
SetFightState(1)
end;
function tw()
MoveNPC(59,192,210,6,2,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Thien Vuong Bang...");
SetFightState(1)
end;
function tm()
MoveNPC(25,496,328,9,2,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Duong Mon...");
SetFightState(1)
end;
function wu()
MoveNPC(183,186,201,6,9,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Ngu Doc Giao...");
SetFightState(1)
end;
function em()
MoveNPC(13,233,313,10,6,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Nga My...");
SetFightState(1)
end;
function cy()
MoveNPC(154,38,93,4,3,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Thuy Yen Mon...");
SetFightState(1)
end;
function gb()
MoveNPC(115,191,248,10,2,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Cai Bang...");
SetFightState(1)
end;
function tr()
MoveNPC(49,201,193,7,6,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Thien Nhan Giao...");
SetFightState(1)
end;
function wd()
MoveNPC(81,195,202,5,5,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Vo Dang...");
SetFightState(1)
end;
function kl()
MoveNPC(131,203,203,4,5,500,0)
Msg2Player("Ngoi yen chung ta di nao! Den Phai Con Lon...");
SetFightState(1)
end;
end;
function Thanhthi()
SayEx({"Xa phu: Quy Khach muon di den Thanh thi nao?","Phuong Tuong/ptu", "Tuong Duong/tdu", "Duong Chau/dch", "Lam An/lan", "Thanh Do/tdo", "Dai Li/dli","Bien Kinh/bki","Tro lai/main"});
function ptu()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 1 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Phuong Tuong<color> co ma",0)
else
if post == 0 then
MoveNPC(1,191,202,6,4,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
elseif post == 1 then
MoveNPC(1,205,204,4,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
elseif post == 2 then
MoveNPC(1,206,198,5,1,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
elseif post == 3 then
MoveNPC(1,194,194,5,5,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Phuong Tuong...")
end
end;
end
function tdu()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 78 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Tuong Duong<color> co ma",0)
else
if post == 0 then
MoveNPC(78,179,201,8,4,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
elseif post == 1 then
MoveNPC(78,188,196,6,4,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
elseif post == 2 then
MoveNPC(78,198,211,5,0,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
elseif post == 3 then
MoveNPC(78,212,201,8,5,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Tuong Duong...")
end
end;
end
function dch()
w,x,y=GetWorldPos()
if w == 80 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Duong Chau<color> co ma",0)
else
post = random(0,3)
if post == 0 then
MoveNPC(80,209,187,0,3,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
elseif post == 1 then
MoveNPC(80,199,200,5,1,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
elseif post == 2 then
MoveNPC(80,215,200,5,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
elseif post == 3 then
MoveNPC(80,229,191,3,2,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Duong Chau...")
end
end;
end;
function lan()
post = random(0,3)
w,x,y=GetWorldPos()
if w == 176 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Lam An<color> co ma",0)
else
if post == 0 then
NewWorld(176, 1603, 2917)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
elseif post == 1 then
NewWorld(176, 1692, 3296)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
elseif post == 2 then
NewWorld(176, 1375, 3337)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
elseif post == 3 then
NewWorld(176, 1356, 3017)
Msg2Player("Ngoi yen chung ta di nao! Den Lam An...");
end
end;
end
function dli()
w,x,y=GetWorldPos()
post = random(0,2)
if w == 162 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Dai Ly<color> co ma",0)
else
if post == 0 then
NewWorld(162, 1669, 3129)
Msg2Player("Ngoi yen chung ta di nao! Den Dai ly...");
elseif post == 1 then
NewWorld(162, 1696, 3280)
Msg2Player("Ngoi yen chung ta di nao! Den Dai ly...");
elseif post == 2 then
NewWorld(162, 1472, 3273)
Msg2Player("Ngoi yen chung ta di nao! Den Dai ly...");
end
end;
end
function tdo()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 11 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Thanh Do<color> co ma",0)
else
if post == 0 then
MoveNPC(11,377,318,0,3,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
elseif post == 1 then
MoveNPC(11,399,324,2,5,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
elseif post == 2 then
MoveNPC(11,408,312,8,3,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
elseif post == 3 then
MoveNPC(11,378,310,1,0,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Thanh Do...")
end
end;
end
function bki()
w,x,y=GetWorldPos()
post = random(0,3)
if w == 37 then
Say("Xaphu:<pic=24>Ban dang o<color="..colorS().."> Bien Kinh<color> co ma",0)
else
if post == 0 then
MoveNPC(37,204,199,6,0,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
elseif post == 1 then
MoveNPC(37,213,201,3,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
elseif post == 2 then
MoveNPC(37,233,182,5,8,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
elseif post == 3 then
MoveNPC(37,199,187,7,6,500,0);
Msg2Player("Ngoi Yen ! Dang di den thanh Bien Kinh...")
end
end;
end;
end
function Thonlang()
w,x,y=GetWorldPos()
Say("Xa phu: Ban muon di den thon lang nao",10,"Giang Tan Thon/gtan", "Ba Lang Huyen/blang", "Nam Nhac Tran/nnhac", "Dao huong thon /dhthon","Long tuyen thon /ltthon","Thach Co Tran /tctran","Chu Tien Tran /cttran","Long Mon Tran /lmtran","Vinh Lac Tran /vltran","Khong di dau ca/no")
function gtan()
if w == 20 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(20, 3450, 6106)
Msg2Player("Ngoi yen chung ta di nao! Den Giang Tan Thon")
end
end
function blang()
if w == 53 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(53, 1582, 3237)
Msg2Player("Ngoi yen chung ta di nao! Den Ba Lang Huyen")
end
end
function nnhac()
if w == 20 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(54, 1588, 3098)
Msg2Player("Ngoi yen chung ta di nao! Den Nam Nhac Tran")
end
end
function dhthon()
if w == 101 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(101, 1621, 3104)
Msg2Player("Ngoi yen chung ta di nao! Den Dao Huong Thon")
end
end
function ltthon()
if w == 174 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(174, 1632, 3199)
Msg2Player("Ngoi yen chung ta di nao! Den Long Tuyen Thon")
end
end
function tctran()
if w == 153 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(153, 1632, 3182)
Msg2Player("Ngoi yen chung ta di nao! Den Thach Co Tran")
end
end
function cttran()
if w == 100 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(100, 1615, 3100)
Msg2Player("Ngoi yen chung ta di nao! Den Chu Tien Tran")
end
end
function lmtran()
if w == 121 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(121, 1924, 4435)
Msg2Player("Ngoi yen chung ta di nao! Den Long Mon Tran")
end
end
function vltran()
if w == 99 then
Say("Xaphu:<pic=24>BXin dung choc gheo ta",0)
else
NewWorld(99, 1606, 3165)
Msg2Player("Ngoi yen chung ta di nao! Den Vinh Lac Tran")
end
end
end;
function TongKim()
if (GetLevel() >= 40) then
SayEx({"Xa phu: Quy Khach muon di den phe nao?","Tham gia phe Tong/tong", "Tham gia phe Kim/kim", "De toi nghi lai/main"});
function tong()
MoveNPC(326,145,198,3,3,0,0)
SetCurCamp(1);
SetDeathScript("\\script\\global\\tong_kim\\tong_player_die.lua (file://script//global//tong_kim//tong_player_die.lua)");
SetPunish(0)
SetRevPos(53, 19)
SetLogoutRV(1);
SetTempRevPos(326,145*8*32,198*16*32)
SetCreateTeam(0);
SetTask(233,GetExp())
end;
function kim()
MoveNPC(326,193,158,6,9,4000,0)
--MoveNPC(326,145,198,3,3,0,0)
SetCurCamp(2);
SetDeathScript("\\script\\global\\tong_kim\\kim_player_die.lua (file://script//global//tong_kim//kim_player_die.lua)");
SetPunish(0)
SetRevPos(53, 19)
SetLogoutRV(1);
SetTempRevPos(326,193*8*32,158*16*32)
SetCreateTeam(0);
SetTask(233,GetExp())
end;
else
Say("Xaphu:<pic=24>Quy Khach khong the di vi chua dat den <bclr=red>Dang Cap 40<bclr>.Hay luyen tap them di",0)
end
end;
function OnCancel()
end;
function sanboss()
if GetItemCount(181) >= 1 then
DelItem(181)
NewWorld(336,166*8,190*16);
SetFightState(1);
SetLogoutRV(53)
Msg2Player("Dang di den Phong Lang Do...")
else
Talk(1,"","<color="..colorS()..">Xa phu<color>:<pic=15> Muon tham gia vao ban do san boss can co Thuyen Rong [Cap 5]. Den gap Le Quan tai <color=yellow>Ba Lang Huyen<color> de tham gia su kien.");
end
end;
function minhnguyettran()
MoveNPC(520,200,206,4,0,500,0);
Msg2Player("Dang di den Minh Nguyet Tran...")
end;