tongtulenh
24-02-12, 09:06 PM
Đầy Là time_server em muốn dev cái phần gạch chân + chữ đâm đó vào chức năng GM
Include("\\Script\\source\\sourcejx49.lua")
Include("\\script\\lien_dau\\liendau_head.lua")
Include("\\script\\phonglangdo\\thoigianpld.lua")
npcadd={0,0,0,0,0}
function OnTimer()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
SubWorld = SubWorldID2Idx(53)
phonglangdo()
vuotai()
thoigianbosshk()
print("So luong Acc online : "..GetPlayerCount().."");
if (gio == 12) or (gio == 18) then
if phut == 0 then
hat_huy_hoang()
Msg2SubWorld("H¹t huy hoµng ®· xuÊt hiÖn t¹i ba l¨ng huyÖn (194/204)")
elseif phut == 10 then
del_hat_hh()
qua_huy_hoang()
Msg2SubWorld("Qu¶ huy hoµng ®· xuÊt hiÖn t¹i ba l¨ng huyÖn (194/204)")
elseif phut == 15 then
del_qua_hh()
end
end
if phut == 6 or phut == 16 or phut == 26 or phut == 36 or phut == 43 then
Msg2SubWorld(" TØ LÖ ChÕ LÖnh Bµi Hoµng Kim lµ 40% ",1)
AddGlobalCountNews(" NhËn Item Theo Lv 80, 120, 140, 150,170",1)
elseif phut == 8 or phut == 18 or phut == 28 or phut == 38 then
AddGlobalCountNews("Server Donate §å + 1 Th«i !! 1 mãn = 20k Vinagame ®Ó tån t¹i sv ",1)
Msg2SubWorld(" Ðp §å TÝm T¹i Thî RÌn Ba L¨ng HuyÖn Vµ Ðp §å Hoµng Kim T¹i Thî RÌn Thµnh ThÞ",1)
end
if ((gio == 10) or (gio == 12) or (gio == 14) or (gio == 16) or (gio == 18) or (gio == 20) or (gio == 22)) and (phut >= 45) then
phutcl = 60 - phut
AddGlobalCountNews("Tèng kim ®ang trong thêi gian b¸o danh, cßn "..phutcl.." phut.",1)
if (phut == 59) then
SetGlbMissionV(81,0)
SetGlbMissionV(82,0)
SetGlbMissionV(83,0)
SetGlbMissionV(84,0)
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
DelNpc(npcadd[1])
DelNpc(npcadd[2])
return
end
end
end
elseif (gio == 11) or (gio == 13) or (gio == 15) or (gio == 17) or (gio == 19) or (gio == 21) or (gio == 23) then
if (phut == 0) then
AddGlobalCountNews("Tèng kim ®¹i chiÕn chÝnh thøc b¾t ®Çu !",1)
elseif (phut == 5) or (phut == 10) then
AddGlobalCountNews("Tèng kim tÝch lòy hiÖn t¹i lµ Tèng : Kim "..GetGlbMissionV(81).." : "..GetGlbMissionV(82),1)
elseif (phut == 20) then
if (GetGlbMissionV(81) > GetGlbMissionV(82)) then
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
idnpc = random(894,898)
tongkim = SubWorldID2Idx(51)
npcadd[2] = AddNpc(idnpc,99,tongkim,1968*32,2700*32)
IsBoss(npcadd[2],2)
SetNpcScript(npcadd[2], "\\script\\tongkim\\nguyensoai.lua");
AddGlobalCountNews("Tèng kim : Nguyªn so¸i phe kim ®· xuÊt hiÖn, h·y cè g¾ng lËp c«ng",1)
return
end
end
elseif (GetGlbMissionV(81) < GetGlbMissionV(82)) then
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
idnpc = random(889,893)
tongkim = SubWorldID2Idx(51)
npcadd[1] = AddNpc(idnpc,99,tongkim,1722*32,3044*32)
IsBoss(npcadd[1],2)
SetNpcScript(npcadd[1], "\\script\\tongkim\\nguyensoai.lua");
AddGlobalCountNews("Tèng kim : Nguyªn so¸i phe tèng ®· xuÊt hiÖn, h·y cè g¾ng lËp c«ng",1)
return
end
end
elseif (GetGlbMissionV(81) == GetGlbMissionV(82)) then
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
tongkim = SubWorldID2Idx(51)
idnpc = random(889,893)
npcadd[1] = AddNpc(idnpc,99,tongkim,1722*32,3044*32)
SetNpcScript(npcadd[1], "\\script\\tongkim\\nguyensoai.lua");
idnpc = random(894,898)
npcadd[2] = AddNpc(idnpc,99,tongkim,1968*32,2700*32)
SetNpcScript(npcadd[2], "\\script\\tongkim\\nguyensoai.lua");
AddGlobalCountNews("Tèng kim : Nguyªn so¸i phe kim vµ tèng ®· xuÊt hiÖn",1)
return
end
end
end
elseif (phut == 30) then
if (GetGlbMissionV(81) > GetGlbMissionV(82)) then
AddGlobalCountNews("Tèng kim ®¹i chiÕn kÕt thóc, phÇn th¾ng thuéc vÒ phe tèng !")
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
if (GetTask(23) == 2) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 500)
AddRepute(50)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 50 danh väng, 500 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 2047
toadoy = 2594
NewWorld(51, toadox, toadoy);
SetFightState(0)
elseif (GetTask(23) == 1) then
for i=1,20 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 1000)
AddRepute(100)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 20 Tói Nguyªn LiÖu, 100 danh väng, 1000 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 1640
toadoy = 3153
NewWorld(51,toadox,toadoy) -- tong
SetFightState(0)
end
end
end
elseif (GetGlbMissionV(81) < GetGlbMissionV(82)) then
AddGlobalCountNews("Tèng kim ®¹i chiÕn kÕt thóc, phÇn th¾ng thuéc vÒ phe kim !")
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
if (GetTask(23) == 1) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 500)
AddRepute(50)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 50 danh väng, 500 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 1640
toadoy = 3153
NewWorld(51,toadox,toadoy) -- tong
SetFightState(0)
elseif (GetTask(23) == 2) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 1000)
AddRepute(100)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 20 Tói Nguyªn LiÖu, 100 danh väng,1000 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 2047
toadoy = 2594
NewWorld(51, toadox, toadoy);
SetFightState(0)
end
end
end
else
AddGlobalCountNews("Tèng kim kÕt thóc, 2 bªn hßa nhau !")
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
if (GetTask(23) == 1) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 750)
AddRepute(75)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 75 danh väng, 750 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 1640
toadoy = 3153
NewWorld(51,toadox,toadoy) -- tong
SetFightState(0)
elseif (GetTask(23) == 2) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 750)
AddRepute(75)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 750 danh väng,750 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 2047
toadoy = 2594
NewWorld(51, toadox, toadoy);
SetFightState(0)
end
end
end
end
SetGlbMissionV(81,0)
SetGlbMissionV(82,0)
SetGlbMissionV(83,0)
SetGlbMissionV(84,0)
end
end
--if (gio == 8) or (gio == 14) or (gio == 18) or (gio == 21) then
--if (phut == 0) or (phut == 10) or (phut == 20) or (phut == 30) or (phut == 40) or (phut == 50) then
--AddGlobalCountNews("Liªn ®Êu ®ang trong giai ®o¹n b¸o danh, h·y nhanh ®Õn b¸o danh !",1)
--end
--else
--for i=1,GetPlayerCount() do
--PlayerIndex = i
--w,x,y = GetWorldPos()
-- if w == 42 or w == 43 then
-- NewWorld(53, 1603, 3210);
-- SetFightState(0)
-- end
--end
--end
end
function thoigianbosshk()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
if gio >= 7 and gio <= 9 then
if phut == 0 then
--if GetGlbMissionV(90) == 0 then
map = SubWorldID2Idx(53)
bosstieu1 = AddNpc(509,80,map,1513*32,3306*32)
SetNpcSeries(bosstieu1,random(0,4))
IsBoss(bosstieu1,2)
Msg2SubWorld("LiÔu Thanh Thanh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(188/206)")
----
bosstieu2 = AddNpc(510,80,map,1761*32,3206*32)
SetNpcSeries(bosstieu2,random(0,4))
IsBoss(bosstieu2,2)
Msg2SubWorld("DiÖu Nh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(220/200)")
----
bosstieu3 = AddNpc(511,80,map,1637*32,3057*32)
SetNpcSeries(bosstieu3,random(0,4))
IsBoss(bosstieu3,2)
Msg2SubWorld("Tr¬ng T«ng ChÝnh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(204/190)")
AddGlobalCountNews("Boss hoµng kim tiÓu ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn, c¸c nh©n sü h·y cÈn thËn",1)
--SetGlbMissionV(90,1)
--else
--Msg2SubWorld("LiÔu Thanh Thanh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(188/206)")
--Msg2SubWorld("DiÖu Nh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(220/200)")
--Msg2SubWorld("Tr¬ng T«ng ChÝnh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(204/190)")
--end
end
else
--SetGlbMissionV(90,0)
DelNpc(bosstieu1)
DelNpc(bosstieu2)
DelNpc(bosstieu3)
end
if gio >= 2 and gio <= 3 then
if phut == 0 then
--if GetGlbMissionV(90) == 0 then
map = SubWorldID2Idx(9)
bossdai1 = AddNpc(500,100,map,1721*32,3239*32)
SetNpcSeries(bossdai1,random(0,4))
IsBoss(bossdai1,2)
Msg2SubWorld("Gia LuËt TÞ Li ®· xuÊt hiÖn t¹i Sa M¹c II(215/201)")
map = SubWorldID2Idx(8)
bossdai2 = AddNpc(502,100,map,1569*32,3294*32)
SetNpcSeries(bossdai2,random(0,4))
IsBoss(bossdai2,2)
Msg2SubWorld("Cæ B¸ch ®· xuÊt hiÖn t¹i Sa M¹c I (195/205)")
bossdai3 = AddNpc(504,100,map,1398*32,3268*32)
SetNpcSeries(bossdai3,random(0,4))
IsBoss(bossdai3,2)
Msg2SubWorld("YÕn HiÓu Trai ®· xuÊt hiÖn t¹i Sa M¹c I (174/204)")
map = SubWorldID2Idx(8)
bossdai4 = AddNpc(503,100,map,1817*32,2813*32)
SetNpcSeries(bossdai4,random(0,4))
IsBoss(bossdai4,2)
Msg2SubWorld("TuyÒn C« Tö ®· xuÊt hiÖn t¹i M¹c Cao QuËt(226/175)")
map = SubWorldID2Idx(37)
bossdai5 = AddNpc(499,100,map,1399*32,3052*32)
SetNpcSeries(bossdai5,random(0,4))
IsBoss(bossdai5,2)
Msg2SubWorld("§¹o Th¹ch Ch©n Nh©n ®· xuÊt hiÖn t¹i T¬ng D¬ng(174/190)")
bossdai6 = AddNpc(501,100,map,1700*32,3355*32)
SetNpcSeries(bossdai6,random(0,4))
IsBoss(bossdai6,2)
Msg2SubWorld("Hµ Nh©n Ng· ®· xuÊt hiÖn t¹i T¬ng D¬ng(212/209)")
--map = SubWorldID2Idx(38)
--bossdai7 = AddNpc(506,100,map,1601*32,2819*32)
--SetNpcSeries(bossdai7,random(0,4))
--IsBoss(bossdai7,2)
--Msg2SubWorld("B¹ch Doanh Doanh ®· xuÊt hiÖn t¹i BiÖn Kinh(200/176)")
map = SubWorldID2Idx(36)
bossdai8 = AddNpc(507,100,map,1420*32,3270*32)
SetNpcSeries(bossdai8,random(0,4))
IsBoss(bossdai8,2)
Msg2SubWorld("Hµ Linh Phiªu ®· xuÊt hiÖn t¹i Phîng Têng(177/204)")
--map = SubWorldID2Idx(39)
-- bossdai9 = AddNpc(505,100,map,1550*32,3365*32)
-- SetNpcSeries(bossdai9,random(0,4))
-- IsBoss(bossdai9,2)
-- Msg2SubWorld("HuyÒn Gi¸c ®· xuÊt hiÖn t¹i D¬ng Ch©u(193/210)")
--SetGlbMissionV(90,1)
--else
---Msg2SubWorld("Gia Luat Ti Li tai Sa Mac II (215/201)")
--Msg2SubWorld("Co Bach da tai Sa Mac I (195/205)")
--Msg2SubWorld("Yen Hieu Trai tai Sa Mac I (174/204)")
--Msg2SubWorld("Tuyen Co Tu tai Mac Cao Quat (226/175)")
--Msg2SubWorld("Dao Thanh Chan Nhan tai Tuong Duong (174/190)")
-- Msg2SubWorld("Ha Nhan Nga tai Tuong Duong (212/209)")
--Msg2SubWorld("Bach Doanh Doanh tai Bien Kinh (200/176)")
-- Msg2SubWorld("Ha Linh Phieu tai Phuong Tuong (177/204)")
-- Msg2SubWorld("Huyen Giac Dai Su tai Duong Chau (193/210)")
--end
end
else
--SetGlbMissionV(90,0)
DelNpc(bossdai1)
DelNpc(bossdai2)
DelNpc(bossdai3)
DelNpc(bossdai4)
DelNpc(bossdai5)
DelNpc(bossdai6)
--DelNpc(bossdai7)
DelNpc(bossdai8)
--DelNpc(bossdai9)
end
end
function vuotai()
ngay = tonumber(date("%d"))
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
if gio == 1 or gio == 3 or gio == 7 or gio == 9 or gio == 11 or gio == 13 or gio == 15 or gio == 17 or gio == 19 or gio == 21 or gio == 23 then
if phut > 45 then
thongbaova()
elseif phut < 45 and phut > 40 then
tgva = 45-phut
AddGlobalCountNews("Sù kiÖn vît ¶i b¾t ®Çu sau "..tgva.." phót n÷a",1)
elseif phut == 45 then
AddGlobalCountNews("Thêi gian b¸o danh vît ¶i b¾t ®Çu !!!",1)
end
else
if phut == 0 then
chiendauva()
elseif phut == 46 then
vuotaitime()
AddGlobalCountNews("Sù kiÖn vît ¶i kÕt thóc !!!!!!",1)
end
end
if gio == 11 or gio == 17 then
if phut >= 55 then
thoigian = 60-phut
AddGlobalCountNews("Sù kiÖn hoa ®¨ng sÏ b¾t ®Çu sau: "..thoigian.." phót n÷a !",1)
end
end
end
function thongbaova()
w,x,y = GetWorldPos();
a = 60 - phut
for o=1,1000 do
PlayerIndex = o
if GetTaskTemp(25) == 1 or GetTaskTemp(26) == 1 then
Msg2Player("Sù kiÖn vuît ¶i cßn: "..a.." phót n÷a sÏ b¾t ®Çu !")
end
end
end
function chiendauva()
w,x,y = GetWorldPos();
for u = 1,1000 do
PlayerIndex = u
if GetTaskTemp(25) == 1 or GetTaskTemp(26) == 1 then
SetFightState(1)
Msg2Player("Sù kiÖn Vît ¶i b¾t ®Çu. Nhãm cña b¹n cã 45 phót ®Ó vît qua !")
end
end
end
function vuotaitime()
phut = tonumber(date("%M"))
gio = tonumber(date("%H"))
SetGlbMissionV(38,0)
SetGlbMissionV(34,0)
for q = 1,1000 do
PlayerIndex = q
if GetTaskTemp(25) == 1 or GetTaskTemp(26) == 1 then
NewWorld(53, 200*8, 200*16);
SetTaskTemp(25,0)
SetDeathScript("");
SetFightState(0);
SetPunish(0)
Msg2Player("Sù kiÖn Vît ¶i kÕt thóc, B¹n ®· qu¸ 45 phót nhng vÉn toµn m¹ng. Tuy nhiªn, vÉn kh«ng ®ñ ®Ó chiÕn th¾ng !")
end
end
end
function vuotai1()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
w,x,y = GetWorldPos()
if gio == 7 or gio == 9 or gio == 11 or gio == 13 or gio == 15 then
if phut >= 55 and phut < 60 then
thoigian = 60 - phut
AddGlobalCountNews("Vît ¶i ®ang trong giai ®o¹n b¸o danh, cßn "..thoigian.." phót n÷a sÏ b¾t ®Çu",1)
SetGlbMissionV(87,1)
end
elseif gio == 8 or gio == 10 or gio == 12 or gio == 14 or gio == 16 then
if phut == 0 then
AddGlobalCountNews("Vît ¶i chÝnh thøc b¾t ®Çu, thêi gian cßn l¹i ®Ó qua ¶i lµ 30 phót",1)
SetGlbMissionV(87,2)
for i = 1,100 do
PlayerIndex = i
if (w == 25) then
Msg2Player("Vît ¶i chÝnh thøc b¾t ®Çu, thêi gian cßn l¹i ®Ó qua ¶i lµ 30 phót")
SetFightState(1)
end
end
elseif phut == 30 then
AddGlobalCountNews("Ho¹t ®éng vît ¶i ®· kÕt thóc !!",1)
SetGlbMissionV(88,0)
SetGlbMissionV(89,0)
SetGlbMissionV(87,0)
end
end
end
function qua_huy_hoang()
qua1 = AddNPCEx(294,1,53,194,203, 3,9,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
qua2 = AddNPCEx(294,1,53,193,204, 7,2,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
qua3 = AddNPCEx(294,1,53,194,204, 5,5,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
qua4 = AddNPCEx(294,1,53,194,203, 10,10,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
end
function hat_huy_hoang()
hat1 = AddNPCEx(295,1,53,194,203, 3,9,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
hat2 = AddNPCEx(295,1,53,193,204, 7,2,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
hat3 = AddNPCEx(295,1,53,194,204, 5,5,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
hat4 = AddNPCEx(295,1,53,194,203, 10,10,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
end
function del_hat_hh()
DelNpc(hat1)
DelNpc(hat2)
DelNpc(hat3)
DelNpc(hat4)
end
function del_qua_hh()
DelNpc(qua1)
DelNpc(qua2)
DelNpc(qua3)
DelNpc(qua4)
end
function phonglangdo()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
w,x,y = GetWorldPos()
if (gio == 7) or (gio == 19) then
if (phut >= 55) then
AddGlobalCountNews("Thuyen Phong lang do chuan bi khoi hanh, gap Thuyen Phu dang ky",1)
end
elseif (gio == 8) or (gio == 20) then
if (phut >= 0) and (phut < 15) then
batdaupld()
elseif (phut == 15) then
denbopld()
end
end
end
function batdaupld()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
w,x,y = GetWorldPos()
phut1 = 15 - phut
for g=1,100 do
PlayerIndex = g
if (w == 45) then
SetFightState(1)
Msg2Player("Thuyen da bat dau roi ben, con "..phut1.." phut se den Bac Phong Lang Do")
end
end
end
function denbopld()
w,x,y = GetWorldPos()
for u=1,100 do
PlayerIndex = u
if (w == 45) then
NewWorld(46,1331,2861)
SetFightState(1)
Msg2Player("Thuyen da den bo Bac Phong Lang Do !")
end
end
end
[/QUOTE]
em muốn dev chức năng này vào chức năng GM có thể gọi boss tiểu, đại lúc nào cũng được
còn đây là manager
[QUOTE]-------Author: Ohishu
--Date: 06/06/2010
Include("\\Script\\GM.lua")
Include("\\Script\\source\\sourcejx49.lua")
Include("\\Script\\source\\hamchuot.lua")
function no()
end
function manager()
i = GetPlayerCount()
SayEx({"Server ®ang cã <color=yellow>"..i.."<color> ngêi online !",
"LÊy trang bÞ/laytrangbi",
"LÊy vò khÝ/layvukhi",
"LÊy ngùa/layngua",
"Hæ trî admin/hotro",
"Nguyªn liÖu Ðp ®å/nguyenlieu",
"HuyÒn tinh/ht",
"LÊy bÝ kÝp/bk",
"Qu¶n lý ngêi ch¬i/system",
"Tho¸t/Exit"})
end
function nguyenlieu()
AddEventItem(3)
AddEventItem(145)
AddEventItem(146)
AddEventItem(14)
AddEventItem(128)
AddEventItem(129)
end
function hotro()
SayEx({"Server ®ang cã <color=yellow>"..i.."<color> ngêi online !",
"T¨ng kinh nghiÖm/kn",
"TiÒn,danh väng,phuc duyen/diem",
"Tµi l·nh ®¹o/lanhdao",
"Hoµng Kim LÖnh/hkl",
"TiÒn Kú Tr©n C¸c/tienktc",
"Tho¸t/no"})
end
function tienktc()
for i=2,20 do
AddEventItem(152)
AddEventItem(155)
end
end
function hkl()
for i=1,10 do
AddEventItem(49)
end
end
function lanhdao()
for i=1,20 do
AddLeadExp(10000000)
end
end
function ht()
Say("Chon huyen tinh may !",11,
"Huyen tinh 1/ht1",
"Huyen tinh 2/ht1",
"Huyen tinh 3/ht1",
"Huyen tinh 4/ht1",
"Huyen tinh 5/ht1",
"Huyen tinh 6/ht1",
"Huyen tinh 7/ht1",
"Huyen tinh 8/ht1",
"Huyen tinh 9/ht1",
"Huyen tinh 10/ht1",
"Thoat/no")
end
function ht1(sel)
n = sel + 1
AddEventItem(3+n)
AddEventItem(3+n)
AddEventItem(3+n)
Msg2Player("Nhan duoc HT!")
end
function kn()
for i=1,20 do
AddOwnExp(10000000)
end
end
function diem()
Earn(100000000)
AddRepute(10000)
SetTask(12,100000)
SetTask(14,100000)
end
function bk()
for i=75,102 do
AddEventItem(i)
end
for i=161,170 do
AddEventItem(i)
end
end
function laytrangbi()
Say("Xin moi chon !",11,
"+1/hktb",
"+2/hktb",
"+3/hktb",
"+4/hktb",
"+5/hktb",
"+6/hktb",
"+7/hktb",
"+8/hktb",
"+9/hktb",
"+10/hktb",
"Thoat/no")
end
function hktb(sel)
n = sel + 1
SetTaskTemp(34,n)
Say("Xin moi chon !",9,
"ao/ao",
"daychuyen/daychuyen",
"dai/dai",
"giay/giay",
"baotay/baotay",
"non/non",
"ngocboi/ngocboi",
"nhan/nhan",
"thoat/no")
end
function ao()
Say("!!!",3,"Loai 1/ao1","Loai 2/ao2","Thoat/no")
end
function ao1()
for i=1,9 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function ao2()
for i=10,17 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function daychuyen()
for i=18,26 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function dai()
for i=27,46 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function giay()
for i=47,59 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function baotay()
for i=60,73 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function non()
for i=74,82 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
AddItem(0,7,39,GetTaskTemp(34),0,0,5)
end
function ngocboi()
for i=83,94 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function nhan()
for i=95,114 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
--temp 34 , 35
function no()
SetTaskTemp(34,0)
end
function layvukhi()
Say("!!!",3,"Loai 1/vukhi1","Loai 2/vukhi2","Thoat/no")
end
function vukhi1()
for i=115,123 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function vukhi2()
for i=124,131 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function layngua()
Say("Xin moi chon !",10,"Phi Van/ngua","Bon Tieu/ngua","Phien Vu/ngua","Xich Long Cau/ngua","Sieu Quang/ngua","Cop Trang/ngua","Cop Vang/ngua","Cop Den/ngua","Ngua vip/ngua","Thoat/no")
end
function ngua(sel)
--if GetTask(147) == 0 then
n = sel + 1
if n == 1 then
a = 8
b = 10
elseif n == 2 then
a = 6
b = 10
elseif n == 3 then
a = 7
b = 10
elseif n == 4 then
a = 9
b = 10
elseif n == 5 then
a = 11
b = 10
elseif n >= 6 or n <= 9 then
a = 12
b = n - 5
else
end
--SetTask(147,1)
AddItem(0,10,a,b,0,0,0)
Msg2Player("Nhan duoc Ngua")
--else
--Msg2Player("Moi nhan vat chi duoc nhan ngua 1 lan")
--end
end
ai giúp với dev mãi không đc !! gà mà !!
Include("\\Script\\source\\sourcejx49.lua")
Include("\\script\\lien_dau\\liendau_head.lua")
Include("\\script\\phonglangdo\\thoigianpld.lua")
npcadd={0,0,0,0,0}
function OnTimer()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
SubWorld = SubWorldID2Idx(53)
phonglangdo()
vuotai()
thoigianbosshk()
print("So luong Acc online : "..GetPlayerCount().."");
if (gio == 12) or (gio == 18) then
if phut == 0 then
hat_huy_hoang()
Msg2SubWorld("H¹t huy hoµng ®· xuÊt hiÖn t¹i ba l¨ng huyÖn (194/204)")
elseif phut == 10 then
del_hat_hh()
qua_huy_hoang()
Msg2SubWorld("Qu¶ huy hoµng ®· xuÊt hiÖn t¹i ba l¨ng huyÖn (194/204)")
elseif phut == 15 then
del_qua_hh()
end
end
if phut == 6 or phut == 16 or phut == 26 or phut == 36 or phut == 43 then
Msg2SubWorld(" TØ LÖ ChÕ LÖnh Bµi Hoµng Kim lµ 40% ",1)
AddGlobalCountNews(" NhËn Item Theo Lv 80, 120, 140, 150,170",1)
elseif phut == 8 or phut == 18 or phut == 28 or phut == 38 then
AddGlobalCountNews("Server Donate §å + 1 Th«i !! 1 mãn = 20k Vinagame ®Ó tån t¹i sv ",1)
Msg2SubWorld(" Ðp §å TÝm T¹i Thî RÌn Ba L¨ng HuyÖn Vµ Ðp §å Hoµng Kim T¹i Thî RÌn Thµnh ThÞ",1)
end
if ((gio == 10) or (gio == 12) or (gio == 14) or (gio == 16) or (gio == 18) or (gio == 20) or (gio == 22)) and (phut >= 45) then
phutcl = 60 - phut
AddGlobalCountNews("Tèng kim ®ang trong thêi gian b¸o danh, cßn "..phutcl.." phut.",1)
if (phut == 59) then
SetGlbMissionV(81,0)
SetGlbMissionV(82,0)
SetGlbMissionV(83,0)
SetGlbMissionV(84,0)
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
DelNpc(npcadd[1])
DelNpc(npcadd[2])
return
end
end
end
elseif (gio == 11) or (gio == 13) or (gio == 15) or (gio == 17) or (gio == 19) or (gio == 21) or (gio == 23) then
if (phut == 0) then
AddGlobalCountNews("Tèng kim ®¹i chiÕn chÝnh thøc b¾t ®Çu !",1)
elseif (phut == 5) or (phut == 10) then
AddGlobalCountNews("Tèng kim tÝch lòy hiÖn t¹i lµ Tèng : Kim "..GetGlbMissionV(81).." : "..GetGlbMissionV(82),1)
elseif (phut == 20) then
if (GetGlbMissionV(81) > GetGlbMissionV(82)) then
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
idnpc = random(894,898)
tongkim = SubWorldID2Idx(51)
npcadd[2] = AddNpc(idnpc,99,tongkim,1968*32,2700*32)
IsBoss(npcadd[2],2)
SetNpcScript(npcadd[2], "\\script\\tongkim\\nguyensoai.lua");
AddGlobalCountNews("Tèng kim : Nguyªn so¸i phe kim ®· xuÊt hiÖn, h·y cè g¾ng lËp c«ng",1)
return
end
end
elseif (GetGlbMissionV(81) < GetGlbMissionV(82)) then
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
idnpc = random(889,893)
tongkim = SubWorldID2Idx(51)
npcadd[1] = AddNpc(idnpc,99,tongkim,1722*32,3044*32)
IsBoss(npcadd[1],2)
SetNpcScript(npcadd[1], "\\script\\tongkim\\nguyensoai.lua");
AddGlobalCountNews("Tèng kim : Nguyªn so¸i phe tèng ®· xuÊt hiÖn, h·y cè g¾ng lËp c«ng",1)
return
end
end
elseif (GetGlbMissionV(81) == GetGlbMissionV(82)) then
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
tongkim = SubWorldID2Idx(51)
idnpc = random(889,893)
npcadd[1] = AddNpc(idnpc,99,tongkim,1722*32,3044*32)
SetNpcScript(npcadd[1], "\\script\\tongkim\\nguyensoai.lua");
idnpc = random(894,898)
npcadd[2] = AddNpc(idnpc,99,tongkim,1968*32,2700*32)
SetNpcScript(npcadd[2], "\\script\\tongkim\\nguyensoai.lua");
AddGlobalCountNews("Tèng kim : Nguyªn so¸i phe kim vµ tèng ®· xuÊt hiÖn",1)
return
end
end
end
elseif (phut == 30) then
if (GetGlbMissionV(81) > GetGlbMissionV(82)) then
AddGlobalCountNews("Tèng kim ®¹i chiÕn kÕt thóc, phÇn th¾ng thuéc vÒ phe tèng !")
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
if (GetTask(23) == 2) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 500)
AddRepute(50)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 50 danh väng, 500 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 2047
toadoy = 2594
NewWorld(51, toadox, toadoy);
SetFightState(0)
elseif (GetTask(23) == 1) then
for i=1,20 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 1000)
AddRepute(100)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 20 Tói Nguyªn LiÖu, 100 danh väng, 1000 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 1640
toadoy = 3153
NewWorld(51,toadox,toadoy) -- tong
SetFightState(0)
end
end
end
elseif (GetGlbMissionV(81) < GetGlbMissionV(82)) then
AddGlobalCountNews("Tèng kim ®¹i chiÕn kÕt thóc, phÇn th¾ng thuéc vÒ phe kim !")
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
if (GetTask(23) == 1) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 500)
AddRepute(50)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 50 danh väng, 500 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 1640
toadoy = 3153
NewWorld(51,toadox,toadoy) -- tong
SetFightState(0)
elseif (GetTask(23) == 2) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 1000)
AddRepute(100)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 20 Tói Nguyªn LiÖu, 100 danh väng,1000 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 2047
toadoy = 2594
NewWorld(51, toadox, toadoy);
SetFightState(0)
end
end
end
else
AddGlobalCountNews("Tèng kim kÕt thóc, 2 bªn hßa nhau !")
for i=1,200 do
PlayerIndex = i
if (GetUUID() ~= 0) then
if (GetTask(23) == 1) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 750)
AddRepute(75)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 75 danh väng, 750 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 1640
toadoy = 3153
NewWorld(51,toadox,toadoy) -- tong
SetFightState(0)
elseif (GetTask(23) == 2) then
for i=1,10 do
AddEventItem(137)
end
SetTask(21,GetTask(21) + 750)
AddRepute(75)
Msg2Player("Tèng kim kÕt thóc, nhËn ®îc 10 Tói Nguyªn LiÖu, 750 danh väng,750 ®iÓm tÝch lòy")
SetTask(24,0)
SetTask(25,0)
SetTask(26,0)
toadox = 2047
toadoy = 2594
NewWorld(51, toadox, toadoy);
SetFightState(0)
end
end
end
end
SetGlbMissionV(81,0)
SetGlbMissionV(82,0)
SetGlbMissionV(83,0)
SetGlbMissionV(84,0)
end
end
--if (gio == 8) or (gio == 14) or (gio == 18) or (gio == 21) then
--if (phut == 0) or (phut == 10) or (phut == 20) or (phut == 30) or (phut == 40) or (phut == 50) then
--AddGlobalCountNews("Liªn ®Êu ®ang trong giai ®o¹n b¸o danh, h·y nhanh ®Õn b¸o danh !",1)
--end
--else
--for i=1,GetPlayerCount() do
--PlayerIndex = i
--w,x,y = GetWorldPos()
-- if w == 42 or w == 43 then
-- NewWorld(53, 1603, 3210);
-- SetFightState(0)
-- end
--end
--end
end
function thoigianbosshk()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
if gio >= 7 and gio <= 9 then
if phut == 0 then
--if GetGlbMissionV(90) == 0 then
map = SubWorldID2Idx(53)
bosstieu1 = AddNpc(509,80,map,1513*32,3306*32)
SetNpcSeries(bosstieu1,random(0,4))
IsBoss(bosstieu1,2)
Msg2SubWorld("LiÔu Thanh Thanh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(188/206)")
----
bosstieu2 = AddNpc(510,80,map,1761*32,3206*32)
SetNpcSeries(bosstieu2,random(0,4))
IsBoss(bosstieu2,2)
Msg2SubWorld("DiÖu Nh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(220/200)")
----
bosstieu3 = AddNpc(511,80,map,1637*32,3057*32)
SetNpcSeries(bosstieu3,random(0,4))
IsBoss(bosstieu3,2)
Msg2SubWorld("Tr¬ng T«ng ChÝnh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(204/190)")
AddGlobalCountNews("Boss hoµng kim tiÓu ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn, c¸c nh©n sü h·y cÈn thËn",1)
--SetGlbMissionV(90,1)
--else
--Msg2SubWorld("LiÔu Thanh Thanh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(188/206)")
--Msg2SubWorld("DiÖu Nh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(220/200)")
--Msg2SubWorld("Tr¬ng T«ng ChÝnh ®· xuÊt hiÖn t¹i Ba L¨ng HuyÖn(204/190)")
--end
end
else
--SetGlbMissionV(90,0)
DelNpc(bosstieu1)
DelNpc(bosstieu2)
DelNpc(bosstieu3)
end
if gio >= 2 and gio <= 3 then
if phut == 0 then
--if GetGlbMissionV(90) == 0 then
map = SubWorldID2Idx(9)
bossdai1 = AddNpc(500,100,map,1721*32,3239*32)
SetNpcSeries(bossdai1,random(0,4))
IsBoss(bossdai1,2)
Msg2SubWorld("Gia LuËt TÞ Li ®· xuÊt hiÖn t¹i Sa M¹c II(215/201)")
map = SubWorldID2Idx(8)
bossdai2 = AddNpc(502,100,map,1569*32,3294*32)
SetNpcSeries(bossdai2,random(0,4))
IsBoss(bossdai2,2)
Msg2SubWorld("Cæ B¸ch ®· xuÊt hiÖn t¹i Sa M¹c I (195/205)")
bossdai3 = AddNpc(504,100,map,1398*32,3268*32)
SetNpcSeries(bossdai3,random(0,4))
IsBoss(bossdai3,2)
Msg2SubWorld("YÕn HiÓu Trai ®· xuÊt hiÖn t¹i Sa M¹c I (174/204)")
map = SubWorldID2Idx(8)
bossdai4 = AddNpc(503,100,map,1817*32,2813*32)
SetNpcSeries(bossdai4,random(0,4))
IsBoss(bossdai4,2)
Msg2SubWorld("TuyÒn C« Tö ®· xuÊt hiÖn t¹i M¹c Cao QuËt(226/175)")
map = SubWorldID2Idx(37)
bossdai5 = AddNpc(499,100,map,1399*32,3052*32)
SetNpcSeries(bossdai5,random(0,4))
IsBoss(bossdai5,2)
Msg2SubWorld("§¹o Th¹ch Ch©n Nh©n ®· xuÊt hiÖn t¹i T¬ng D¬ng(174/190)")
bossdai6 = AddNpc(501,100,map,1700*32,3355*32)
SetNpcSeries(bossdai6,random(0,4))
IsBoss(bossdai6,2)
Msg2SubWorld("Hµ Nh©n Ng· ®· xuÊt hiÖn t¹i T¬ng D¬ng(212/209)")
--map = SubWorldID2Idx(38)
--bossdai7 = AddNpc(506,100,map,1601*32,2819*32)
--SetNpcSeries(bossdai7,random(0,4))
--IsBoss(bossdai7,2)
--Msg2SubWorld("B¹ch Doanh Doanh ®· xuÊt hiÖn t¹i BiÖn Kinh(200/176)")
map = SubWorldID2Idx(36)
bossdai8 = AddNpc(507,100,map,1420*32,3270*32)
SetNpcSeries(bossdai8,random(0,4))
IsBoss(bossdai8,2)
Msg2SubWorld("Hµ Linh Phiªu ®· xuÊt hiÖn t¹i Phîng Têng(177/204)")
--map = SubWorldID2Idx(39)
-- bossdai9 = AddNpc(505,100,map,1550*32,3365*32)
-- SetNpcSeries(bossdai9,random(0,4))
-- IsBoss(bossdai9,2)
-- Msg2SubWorld("HuyÒn Gi¸c ®· xuÊt hiÖn t¹i D¬ng Ch©u(193/210)")
--SetGlbMissionV(90,1)
--else
---Msg2SubWorld("Gia Luat Ti Li tai Sa Mac II (215/201)")
--Msg2SubWorld("Co Bach da tai Sa Mac I (195/205)")
--Msg2SubWorld("Yen Hieu Trai tai Sa Mac I (174/204)")
--Msg2SubWorld("Tuyen Co Tu tai Mac Cao Quat (226/175)")
--Msg2SubWorld("Dao Thanh Chan Nhan tai Tuong Duong (174/190)")
-- Msg2SubWorld("Ha Nhan Nga tai Tuong Duong (212/209)")
--Msg2SubWorld("Bach Doanh Doanh tai Bien Kinh (200/176)")
-- Msg2SubWorld("Ha Linh Phieu tai Phuong Tuong (177/204)")
-- Msg2SubWorld("Huyen Giac Dai Su tai Duong Chau (193/210)")
--end
end
else
--SetGlbMissionV(90,0)
DelNpc(bossdai1)
DelNpc(bossdai2)
DelNpc(bossdai3)
DelNpc(bossdai4)
DelNpc(bossdai5)
DelNpc(bossdai6)
--DelNpc(bossdai7)
DelNpc(bossdai8)
--DelNpc(bossdai9)
end
end
function vuotai()
ngay = tonumber(date("%d"))
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
if gio == 1 or gio == 3 or gio == 7 or gio == 9 or gio == 11 or gio == 13 or gio == 15 or gio == 17 or gio == 19 or gio == 21 or gio == 23 then
if phut > 45 then
thongbaova()
elseif phut < 45 and phut > 40 then
tgva = 45-phut
AddGlobalCountNews("Sù kiÖn vît ¶i b¾t ®Çu sau "..tgva.." phót n÷a",1)
elseif phut == 45 then
AddGlobalCountNews("Thêi gian b¸o danh vît ¶i b¾t ®Çu !!!",1)
end
else
if phut == 0 then
chiendauva()
elseif phut == 46 then
vuotaitime()
AddGlobalCountNews("Sù kiÖn vît ¶i kÕt thóc !!!!!!",1)
end
end
if gio == 11 or gio == 17 then
if phut >= 55 then
thoigian = 60-phut
AddGlobalCountNews("Sù kiÖn hoa ®¨ng sÏ b¾t ®Çu sau: "..thoigian.." phót n÷a !",1)
end
end
end
function thongbaova()
w,x,y = GetWorldPos();
a = 60 - phut
for o=1,1000 do
PlayerIndex = o
if GetTaskTemp(25) == 1 or GetTaskTemp(26) == 1 then
Msg2Player("Sù kiÖn vuît ¶i cßn: "..a.." phót n÷a sÏ b¾t ®Çu !")
end
end
end
function chiendauva()
w,x,y = GetWorldPos();
for u = 1,1000 do
PlayerIndex = u
if GetTaskTemp(25) == 1 or GetTaskTemp(26) == 1 then
SetFightState(1)
Msg2Player("Sù kiÖn Vît ¶i b¾t ®Çu. Nhãm cña b¹n cã 45 phót ®Ó vît qua !")
end
end
end
function vuotaitime()
phut = tonumber(date("%M"))
gio = tonumber(date("%H"))
SetGlbMissionV(38,0)
SetGlbMissionV(34,0)
for q = 1,1000 do
PlayerIndex = q
if GetTaskTemp(25) == 1 or GetTaskTemp(26) == 1 then
NewWorld(53, 200*8, 200*16);
SetTaskTemp(25,0)
SetDeathScript("");
SetFightState(0);
SetPunish(0)
Msg2Player("Sù kiÖn Vît ¶i kÕt thóc, B¹n ®· qu¸ 45 phót nhng vÉn toµn m¹ng. Tuy nhiªn, vÉn kh«ng ®ñ ®Ó chiÕn th¾ng !")
end
end
end
function vuotai1()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
w,x,y = GetWorldPos()
if gio == 7 or gio == 9 or gio == 11 or gio == 13 or gio == 15 then
if phut >= 55 and phut < 60 then
thoigian = 60 - phut
AddGlobalCountNews("Vît ¶i ®ang trong giai ®o¹n b¸o danh, cßn "..thoigian.." phót n÷a sÏ b¾t ®Çu",1)
SetGlbMissionV(87,1)
end
elseif gio == 8 or gio == 10 or gio == 12 or gio == 14 or gio == 16 then
if phut == 0 then
AddGlobalCountNews("Vît ¶i chÝnh thøc b¾t ®Çu, thêi gian cßn l¹i ®Ó qua ¶i lµ 30 phót",1)
SetGlbMissionV(87,2)
for i = 1,100 do
PlayerIndex = i
if (w == 25) then
Msg2Player("Vît ¶i chÝnh thøc b¾t ®Çu, thêi gian cßn l¹i ®Ó qua ¶i lµ 30 phót")
SetFightState(1)
end
end
elseif phut == 30 then
AddGlobalCountNews("Ho¹t ®éng vît ¶i ®· kÕt thóc !!",1)
SetGlbMissionV(88,0)
SetGlbMissionV(89,0)
SetGlbMissionV(87,0)
end
end
end
function qua_huy_hoang()
qua1 = AddNPCEx(294,1,53,194,203, 3,9,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
qua2 = AddNPCEx(294,1,53,193,204, 7,2,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
qua3 = AddNPCEx(294,1,53,194,204, 5,5,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
qua4 = AddNPCEx(294,1,53,194,203, 10,10,"\\script\\demhuyhoang\\quahuyhoang.lua",5) -- Map : Ba Lang Huyen
end
function hat_huy_hoang()
hat1 = AddNPCEx(295,1,53,194,203, 3,9,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
hat2 = AddNPCEx(295,1,53,193,204, 7,2,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
hat3 = AddNPCEx(295,1,53,194,204, 5,5,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
hat4 = AddNPCEx(295,1,53,194,203, 10,10,"\\script\\demhuyhoang\\hathuyhoang.lua",5) -- Map : Ba Lang Huyen
end
function del_hat_hh()
DelNpc(hat1)
DelNpc(hat2)
DelNpc(hat3)
DelNpc(hat4)
end
function del_qua_hh()
DelNpc(qua1)
DelNpc(qua2)
DelNpc(qua3)
DelNpc(qua4)
end
function phonglangdo()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
w,x,y = GetWorldPos()
if (gio == 7) or (gio == 19) then
if (phut >= 55) then
AddGlobalCountNews("Thuyen Phong lang do chuan bi khoi hanh, gap Thuyen Phu dang ky",1)
end
elseif (gio == 8) or (gio == 20) then
if (phut >= 0) and (phut < 15) then
batdaupld()
elseif (phut == 15) then
denbopld()
end
end
end
function batdaupld()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
w,x,y = GetWorldPos()
phut1 = 15 - phut
for g=1,100 do
PlayerIndex = g
if (w == 45) then
SetFightState(1)
Msg2Player("Thuyen da bat dau roi ben, con "..phut1.." phut se den Bac Phong Lang Do")
end
end
end
function denbopld()
w,x,y = GetWorldPos()
for u=1,100 do
PlayerIndex = u
if (w == 45) then
NewWorld(46,1331,2861)
SetFightState(1)
Msg2Player("Thuyen da den bo Bac Phong Lang Do !")
end
end
end
[/QUOTE]
em muốn dev chức năng này vào chức năng GM có thể gọi boss tiểu, đại lúc nào cũng được
còn đây là manager
[QUOTE]-------Author: Ohishu
--Date: 06/06/2010
Include("\\Script\\GM.lua")
Include("\\Script\\source\\sourcejx49.lua")
Include("\\Script\\source\\hamchuot.lua")
function no()
end
function manager()
i = GetPlayerCount()
SayEx({"Server ®ang cã <color=yellow>"..i.."<color> ngêi online !",
"LÊy trang bÞ/laytrangbi",
"LÊy vò khÝ/layvukhi",
"LÊy ngùa/layngua",
"Hæ trî admin/hotro",
"Nguyªn liÖu Ðp ®å/nguyenlieu",
"HuyÒn tinh/ht",
"LÊy bÝ kÝp/bk",
"Qu¶n lý ngêi ch¬i/system",
"Tho¸t/Exit"})
end
function nguyenlieu()
AddEventItem(3)
AddEventItem(145)
AddEventItem(146)
AddEventItem(14)
AddEventItem(128)
AddEventItem(129)
end
function hotro()
SayEx({"Server ®ang cã <color=yellow>"..i.."<color> ngêi online !",
"T¨ng kinh nghiÖm/kn",
"TiÒn,danh väng,phuc duyen/diem",
"Tµi l·nh ®¹o/lanhdao",
"Hoµng Kim LÖnh/hkl",
"TiÒn Kú Tr©n C¸c/tienktc",
"Tho¸t/no"})
end
function tienktc()
for i=2,20 do
AddEventItem(152)
AddEventItem(155)
end
end
function hkl()
for i=1,10 do
AddEventItem(49)
end
end
function lanhdao()
for i=1,20 do
AddLeadExp(10000000)
end
end
function ht()
Say("Chon huyen tinh may !",11,
"Huyen tinh 1/ht1",
"Huyen tinh 2/ht1",
"Huyen tinh 3/ht1",
"Huyen tinh 4/ht1",
"Huyen tinh 5/ht1",
"Huyen tinh 6/ht1",
"Huyen tinh 7/ht1",
"Huyen tinh 8/ht1",
"Huyen tinh 9/ht1",
"Huyen tinh 10/ht1",
"Thoat/no")
end
function ht1(sel)
n = sel + 1
AddEventItem(3+n)
AddEventItem(3+n)
AddEventItem(3+n)
Msg2Player("Nhan duoc HT!")
end
function kn()
for i=1,20 do
AddOwnExp(10000000)
end
end
function diem()
Earn(100000000)
AddRepute(10000)
SetTask(12,100000)
SetTask(14,100000)
end
function bk()
for i=75,102 do
AddEventItem(i)
end
for i=161,170 do
AddEventItem(i)
end
end
function laytrangbi()
Say("Xin moi chon !",11,
"+1/hktb",
"+2/hktb",
"+3/hktb",
"+4/hktb",
"+5/hktb",
"+6/hktb",
"+7/hktb",
"+8/hktb",
"+9/hktb",
"+10/hktb",
"Thoat/no")
end
function hktb(sel)
n = sel + 1
SetTaskTemp(34,n)
Say("Xin moi chon !",9,
"ao/ao",
"daychuyen/daychuyen",
"dai/dai",
"giay/giay",
"baotay/baotay",
"non/non",
"ngocboi/ngocboi",
"nhan/nhan",
"thoat/no")
end
function ao()
Say("!!!",3,"Loai 1/ao1","Loai 2/ao2","Thoat/no")
end
function ao1()
for i=1,9 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function ao2()
for i=10,17 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function daychuyen()
for i=18,26 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function dai()
for i=27,46 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function giay()
for i=47,59 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function baotay()
for i=60,73 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function non()
for i=74,82 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
AddItem(0,7,39,GetTaskTemp(34),0,0,5)
end
function ngocboi()
for i=83,94 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function nhan()
for i=95,114 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
--temp 34 , 35
function no()
SetTaskTemp(34,0)
end
function layvukhi()
Say("!!!",3,"Loai 1/vukhi1","Loai 2/vukhi2","Thoat/no")
end
function vukhi1()
for i=115,123 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function vukhi2()
for i=124,131 do
AddItem(0,MangTrangBi[i][3],MangTrangBi[i][4],GetTaskTemp(34),0,0,5)
end
end
function layngua()
Say("Xin moi chon !",10,"Phi Van/ngua","Bon Tieu/ngua","Phien Vu/ngua","Xich Long Cau/ngua","Sieu Quang/ngua","Cop Trang/ngua","Cop Vang/ngua","Cop Den/ngua","Ngua vip/ngua","Thoat/no")
end
function ngua(sel)
--if GetTask(147) == 0 then
n = sel + 1
if n == 1 then
a = 8
b = 10
elseif n == 2 then
a = 6
b = 10
elseif n == 3 then
a = 7
b = 10
elseif n == 4 then
a = 9
b = 10
elseif n == 5 then
a = 11
b = 10
elseif n >= 6 or n <= 9 then
a = 12
b = n - 5
else
end
--SetTask(147,1)
AddItem(0,10,a,b,0,0,0)
Msg2Player("Nhan duoc Ngua")
--else
--Msg2Player("Moi nhan vat chi duoc nhan ngua 1 lan")
--end
end
ai giúp với dev mãi không đc !! gà mà !!