Learning
26-02-12, 10:12 AM
Include("\\script\\global\\Get_NPC.lua")
Include("\\script\\source\\sourcejx49.lua")
Include("\\script\\Á½ºþÇø\\°ÍÁêÏØ\\npc\\luyenco ng.lua")
Include("\\script\\source\\timerserver.lua")
Include("\\dulieu\\quyensohuu.lua")
Include("\\script\\manager.lua")
server = 0
function khoidong()
w,x,y = GetWorldPos()
--if w == 53 then
if server == 0 then
SetGlbMissionV(27,1)
--SetGlbMissionV(50,150)
print("")
print("| Server JX by Jxvietnam develop and edit |")
antihack()
npcallmaps()
server = 1
else
xaphu()
end
--else
--xaphu()
--end
end
function antihack()
curidx = SubWorld
idx = SubWorldID2Idx(1);
if idx == -1 then
Msg2Player("Kh«ng ThÓ Ch¹y Anti V× Map Cha Më !")
return
end
SubWorld = idx;
OpenMission(1);
StartMissionTimer(1,14,60*18);
end;
listgm={{"GameMaster","Admin"},{"","Admin"},{"","Admin"},{"","Admin"},{"",""}} >>>> sửa tên GM ở đây
function admincheck()
for i=1,getn(listgm) do
if GetName() == listgm[i][1] then
if listgm[i][2] == "Admin" then
return 1
end
end
end
return 2
end
function main()
if admincheck() == 1 then
SayEx({"<color=cyan>Xa Phu:<color> Xin chµo ng¬i muèn ®i ®©u nµo ?",
"Trë l¹i ®iÓm cò/backupdiadiem",
"Khu vùc thµnh thÞ/thanhthi",
"Khu vùc luyÖn c«ng/luyencong",
"Thay ®æi tr¹ng th¸i/doimau",
"§¶o tÈy tñy/daott",
"Chøc n¨ng Admin/WritePass",
"Tho¸t/Exit"})
elseif admincheck() == 2 then
SayEx({"<color=cyan>Xa Phu:<color> Xin chµo ng¬i muèn ®i ®©u nµo ?",
"Trë l¹i ®iÓm cò/backupdiadiem",
"Khu vùc thµnh thÞ/thanhthi",
"Khu vùc luyÖn c«ng/luyencong",
"Thay ®æi tr¹ng th¸i/doimau",
"§¶o tÈy tñy/daott",
"Tho¸t/Exit"})
end
end
function doimau()
Say("PhÝ thay ®æi lµ 5000 lîng 1 lÇn",6,
"LuyÖn c«ng/doimau1",
"ChÝnh ph¸i/doimau1",
"Tµ ph¸i /doimau1",
"Trung lËp /doimau1",
"S¸t thñ /doimau1",
"Tho¸t./no")
end
function doimau1(sel)
if GetCash() >= 5000 then
Pay(5000)
SetCamp(sel)
SetCurCamp(sel)
else
Talk(1,"","<color=red>Ng¬i kh«ng cã 5000 lîng !")
end
end
function daott()
if GetLevel() >= 50 then
if GetTask(52) == 0 then
Say("<color=blue>Xa Phu:<color> 1 nh©n vËt cÊp 50 ®îc ®Õn <color=fire>®¶o tÈy tñy<color> miÔn phÝ <color=fire>1 lÇn,<color> ng¬i sÏ ®i chø ?", 2,"§i ®¶o tu luyÖn/daottdimp","Tho¸t/no")
else
Say("<color=blue>Xa Phu:<color> §Ó tÈy tiÒm n¨ng cÇn 6 THBT<enter>§Ó tÈy kü n¨ng cÇn 3 lo¹i TT<enter>§Ó tÈy tiÒm n¨ng + kü n¨ng cÇn 3 TT, 6 THBT", 4,"TÈy kü n¨ng/daottdi","TÈy tiÒm n¨ng/daottdi","TÈy tiÒm n¨ng + kü n¨ng/daottdi","Tho¸t/no")
end
else
Talk(1,"","§¼ng cÊp thÊp h¬n 50, ko thÓ ®i ®¶o tÈy tñy")
end
end
function daottdimp()
SetTask(52,GetTask(52)+1)
MoveNPC(50,201,199,9,8,0,0);
SetTempRevPos(50,200*8*32,199*16*32)
Msg2Player("B¹n ®· ®Õn ®¶o luyÖn skill .....");
SetFightState(1)
SetRevPos(0)
SetLogoutRV(0)
end;
function daottdi(sel)
n = sel + 1
if n == 1 then
if (GetItemCount(28) >= 1) and (GetItemCount(29) >= 1) and (GetItemCount(30) >= 1) then
DelItem(28)
DelItem(29)
DelItem(30)
SetTask(52,2)
MoveNPC(50,201,199,9,8,0,0);
SetTempRevPos(50,200*8*32,199*16*32)
Msg2Player("B¹n ®· ®Õn ®¶o tÈy tñyl .....");
SetFightState(1)
SetRevPos(0)
SetLogoutRV(0)
else
Talk(1,"no","C¸c h¹ kh«ng cã ®ñ <color=red>Tö Thñy Tinh, Lam Thñy Tinh, Lôc Thñy Tinh<color>")
end
elseif n == 2 then
if GetItemCount(31) >= 6 then
SetTask(52,3)
for i=1,6 do DelItem(31) end
MoveNPC(50,201,199,9,8,0,0);
SetTempRevPos(50,200*8*32,199*16*32)
Msg2Player("B¹n ®· ®Õn ®¶o tÈy tñyl .....");
SetFightState(1)
SetRevPos(0)
SetLogoutRV(0)
else
Talk(1,"no","C¸c h¹ kh«ng cã ®ñ <color=red>6 TÝnh Hång B¶o Th¹ch<color>")
end
elseif n == 3 then
if (GetItemCount(28) >= 1) and (GetItemCount(29) >= 1) and (GetItemCount(30) >= 1) and (GetItemCount(31) >= 6) then
DelItem(28)
DelItem(29)
DelItem(30)
SetTask(52,4)
for i=1,6 do DelItem(31) end
MoveNPC(50,201,199,9,8,0,0);
SetTempRevPos(50,200*8*32,199*16*32)
Msg2Player("B¹n ®· ®Õn ®¶o tÈy tñyl .....");
SetFightState(1)
SetRevPos(0)
SetLogoutRV(0)
else
Talk(1,"no","C¸c h¹ kh«ng cã ®ñ <color=red>3 lo¹i thñy tinh vµ 6 TÝnh Hång B¶o Th¹ch<color>")
end
end
end
function backupdiadiem()
ReturnFromPortal()
end
function thanhthi()
w,x,y = GetWorldPos()
if w == 53 then
SayEx({"<color=cyan>Xa Phu<color>: Ng¬i muèn ®i ®©u ?","T¬ng D¬ng/tuongduong","Phîng Têng/phuongtuong","Thµnh §«/thanhdo","Tho¸t/no"})
elseif w == 37 then -- tuong duong
SayEx({"<color=cyan>Xa Phu<color>: Ng¬i muèn ®i ®©u ?","Phîng Têng/phuongtuong","Thµnh §«/thanhdo","Ba L¨ng HuyÖn/balang","Tho¸t/no"})
elseif w == 36 then -- phuong tuong
SayEx({"<color=cyan>Xa Phu<color>: Ng¬i muèn ®i ®©u ?","T¬ng D¬ng/tuongduong","Thµnh §«/thanhdo","Ba L¨ng HuyÖn/balang","Tho¸t/no"})
elseif w == 40 then -- thanh do
SayEx({"<color=cyan>Xa Phu<color>: Ng¬i muèn ®i ®©u ?","T¬ng D¬ng/tuongduong","Phîng Têng/phuongtuong","Ba L¨ng HuyÖn/balang","Tho¸t/no"})
else
SayEx({"<color=cyan>Xa Phu<color>: Ng¬i muèn ®i ®©u ?","T¬ng D¬ng/tuongduong","Phîng Têng/phuongtuong","Thµnh §«/thanhdo","Ba L¨ng HuyÖn/balang","Tho¸t/no"})
end
end
function tuongduong()
if GetCash() >= 500 then
post = random(0,3)
if post == 0 then
NewWorld(37,1589,3374)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn T¬ng D¬ng...")
SetRevPos(53,200*8,200*16)
elseif post == 1 then
NewWorld(37,1436,3216)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn T¬ng D¬ng...")
SetRevPos(53,200*8,200*16)
elseif post == 2 then
NewWorld(37,1507,3139)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn T¬ng D¬ng...")
SetRevPos(53,200*8,200*16)
elseif post == 3 then
NewWorld(37,1695,3236)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn T¬ng D¬ng...")
SetRevPos(53,200*8,200*16)
end
Earn(500)
else
Talk(1,"","Kh«ng cã 500 lîng")
end
end
function phuongtuong()
if GetCash() >= 500 then
post = random(0,3)
if post == 0 then
NewWorld(36,1644,3275)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Phîng Têng...")
SetRevPos(53,200*8,200*16)
elseif post == 1 then
NewWorld(36,1522,3231)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Phîng Têng...")
SetRevPos(53,200*8,200*16)
elseif post == 2 then
NewWorld(36,1560,3113)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Phîng Têng...")
SetRevPos(53,200*8,200*16)
elseif post == 3 then
NewWorld(36,1652,3167)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Phîng Têng...")
SetRevPos(53,200*8,200*16)
end
Earn(500)
else
Talk(1,"","Kh«ng cã 500 lîng")
end
end
function duongchau()
post = random(0,3)
if post == 0 then
MoveNPC(39,209,187,0+random(-2,2),3+random(-2,2),500,0);
Msg2Player("Ngåi yªn ! §ang ®i ®Õn D¬ng Ch©u...")
SetRevPos(53,200*8,200*16)
elseif post == 1 then
MoveNPC(39,199,200,5+random(-2,2),1+random(-2,2),500,0);
Msg2Player("Ngåi yªn ! §ang ®i ®Õn D¬ng Ch©u...")
SetRevPos(53,200*8,200*16)
elseif post == 2 then
MoveNPC(39,215,200,5+random(-2,2),8+random(-2,2),500,0);
Msg2Player("Ngåi yªn ! §ang ®i ®Õn D¬ng Ch©u...")
SetRevPos(53,200*8,200*16)
elseif post == 3 then
MoveNPC(39,229,191,3+random(-2,2),2+random(-2,2),500,0);
Msg2Player("Ngåi yªn ! §ang ®i ®Õn D¬ng Ch©u...")
SetRevPos(53,200*8,200*16)
end
end
function thanhdo()
if GetCash() >= 500 then
post = random(0,3)
if post == 0 then
NewWorld(40,3194,5193)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Thµnh §«...")
SetRevPos(53,200*8,200*16)
elseif post == 1 then
NewWorld(40,3013,5097)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Thµnh §«...")
SetRevPos(53,200*8,200*16)
elseif post == 2 then
NewWorld(40,3024,4959)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Thµnh §«...")
SetRevPos(53,200*8,200*16)
elseif post == 3 then
NewWorld(40,3270,5001)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Thµnh §«...")
SetRevPos(53,200*8,200*16)
end
Earn(500)
else
Talk(1,"","Kh«ng cã 500 lîng")
end
end
function bienkinh()
post = random(0,3)
if post == 0 then
MoveNPC(38,204,199,6+random(-2,2),0+random(-2,2),500,0);
Msg2Player("Ngåi yªn ! §ang ®i ®Õn BiÖn Kinh...")
SetRevPos(53,200*8,200*16)
elseif post == 1 then
MoveNPC(38,213,201,3+random(-2,2),8+random(-2,2),500,0);
Msg2Player("Ngåi yªn ! §ang ®i ®Õn BiÖn Kinh...")
SetRevPos(53,200*8,200*16)
elseif post == 2 then
MoveNPC(38,233,182,5+random(-2,2),8+random(-2,2),500,0);
Msg2Player("Ngåi yªn ! §ang ®i ®Õn BiÖn Kinh...")
SetRevPos(53,200*8,200*16)
elseif post == 3 then
MoveNPC(38,199,187,7+random(-2,2),6+random(-2,2),500,0);
SetRevPos(53,200*8,200*16)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn BiÖn Kinh...")
end;
end
function balang()
MoveNPC(53,197,202,6+random(-2,2),4+random(-2,2),500,0);
SetRevPos(53,200*8,200*16)
Msg2Player("Ngåi yªn ! §ang ®i ®Õn Ba L¨ng HuyÖn...")
end
function giangtan()
MoveNPC(25,432,382,3+random(-2,2),1+random(-2,2),500,0);
Msg2Player("Ngoi Yen ! Dang di den Giang Tan Thon...")
end
function namnhac()
MoveNPC(26,198,193,4+random(-2,2),8+random(-2,2),500,0);
Msg2Player("Ngoi Yen ! Dang di den Nam Nhac Tran...")
end
------------------------Fan PassWorld ADMIN thay doi tu do----
MATKHAU = {1,1,1,1,1,1}
function WritePass()
if GetTaskTemp(57) == 1 then
manager()
else
SayEx({"<color=red>HÖ thèng<color>: Xin mêi nhËp pass :",
"1./number",
"2./number",
"3./number",
"4./number",
"5./number",
"6./number",
"7,/number",
"8./number",
"9./number",
"0./number",
"Tho¸t./finish"})
end
end
function number(sel)
id = sel + 1
if id == 10 then
id = 0
end
if GetTaskTemp(55) == 0 then
if (id == MATKHAU[1]) then
SetTaskTemp(55,GetTaskTemp(55)+1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
else
SetTaskTemp(55,GetTaskTemp(55)+1)
SetTaskTemp(56,1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
end
elseif GetTaskTemp(55) == 1 then
if (id == MATKHAU[2]) then
SetTaskTemp(55,GetTaskTemp(55)+1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
else
SetTaskTemp(55,GetTaskTemp(55)+1)
SetTaskTemp(56,1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
end
elseif GetTaskTemp(55) == 2 then
if (id == MATKHAU[3]) then
SetTaskTemp(55,GetTaskTemp(55)+1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
else
SetTaskTemp(55,GetTaskTemp(55)+1)
SetTaskTemp(56,1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
end
elseif GetTaskTemp(55) == 3 then
if (id == MATKHAU[4]) then
SetTaskTemp(55,GetTaskTemp(55)+1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
else
SetTaskTemp(55,GetTaskTemp(55)+1)
SetTaskTemp(56,1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
end
elseif GetTaskTemp(55) == 4 then
if (id == MATKHAU[5]) then
SetTaskTemp(55,GetTaskTemp(55)+1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
else
SetTaskTemp(55,GetTaskTemp(55)+1)
SetTaskTemp(56,1)
WritePass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
end
elseif GetTaskTemp(55) == 5 then
if (id == MATKHAU[6]) then
SetTaskTemp(55,GetTaskTemp(55)+1)
Msg2Player("B¹n ®· nhËp sè "..id.."")
CheckPass()
else
SetTaskTemp(55,GetTaskTemp(55)+1)
SetTaskTemp(56,1)
CheckPass()
Msg2Player("B¹n ®· nhËp sè "..id.."")
end
end
end
function finish()
KickOutSelf()
end
function CheckPass()
if GetTaskTemp(56) >= 1 then
Talk(1,"finish","Admin Server:\nB¶o vÖ tÝnh n¨ng Admin rÊt quan träng !")
else
SetTaskTemp(55,0)
SetTaskTemp(57,1)
Msg2Player("Pass chÝnh x¸c, tÝnh n¨ng ®· më")
manager()
end
end
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.