sangpronhat
27-10-09, 10:28 PM
timer.lua
hathuyhoang = {
{
{182,"Me Cung Nghiet Long Dong",236,206},
{167,"Diem Thuong Son",196,193},
{200,"Me Cung Co Duong Dong",195,210},
{92,"Thuc Cuong Son",236,193}
},
{
{322,"Truong Bach Son Bac",204,231},
{321,"Truong Bach Son Nam",175,186},
{225,"Son Dong Sa Mac Tang 1",174,203},
{226,"Son Dong Sa Mac Tang 2",215,200},
{227,"Son Dong Sa Mac Tang 3",187,205}
},
{
{248,"Mac Cao Quat",191,200},
{247,"Phong Lang Do",153,168}
}
};
hathoangkim = {
{341,"Mac Bac Thao Nguyen",181,155},
{333,"Hoa Son Phai",179,200},
{181,"Me Cung Luong Thuy Dong",204,191},
{243,"Lam Du Quan",218,205}
};
demhuyhoang = {{12,0},{12,10},{12,20}};
hathh = 1110
quahh = 1111
hathk = 1117
quahk = 1118
ngau_nhien1 = 0
ngau_nhien2 = 0
ngau_nhien3 = 0
ngau_nhien4 = 0
qua_hh_sc = nil
qua_hh_tc = nil
qua_hh_cc = nil
qua_hk = nil
loai = 0
function OnTimer()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
idx = SubWorldID2Idx(326)
SubWorld = idx
for i=1,getn(demhuyhoang) do
if gio == demhuyhoang[i][1] and phut == demhuyhoang[i][2] and giay == 0 then
tao_hat_hh_hk()
break
elseif gio == demhuyhoang[i][1] and phut == demhuyhoang[i][2] + 5 and giay == 1 then
tao_qua_hh_hk()
break
elseif gio == demhuyhoang[i][1] and phut == (demhuyhoang[i][2] + 5) and giay == 10 then
duoc_hai()
elseif gio == demhuyhoang[i][1] and phut == (demhuyhoang[i][2] +9) then
xoa_hat_qua_hh_hk()
end
end
end
function tao_hat_hh_hk()
-------------hat huy hoan
loai = random(1,4)
if loai == 1 then
----------so cap-----------
ngau_nhien1 = random(1,4)
map_index = SubWorldID2Idx(hathuyhoang[1][ngau_nhien1][1])
map_name = hathuyhoang[1][ngau_nhien1][2]
POSX = hathuyhoang[1][ngau_nhien1][3]*8*32
POSY = hathuyhoang[1][ngau_nhien1][4]*16*32
hat_hh_sc = AddNpc(hathh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hh_sc,"\\script\\event\\demhuyhoang\\hathuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 2 then
---------trung cap---------
ngau_nhien2 = random(1,5)
map_index = SubWorldID2Idx(hathuyhoang[2][ngau_nhien2][1])
map_name = hathuyhoang[2][ngau_nhien2][2]
POSX = hathuyhoang[2][ngau_nhien2][3]*8*32
POSY = hathuyhoang[2][ngau_nhien2][4]*16*32
hat_hh_tc = AddNpc(hathh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hh_tc,"\\script\\event\\demhuyhoang\\hathuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 3 then
---------Cao cap-------------
ngau_nhien3 = random(1,2)
map_index = SubWorldID2Idx(hathuyhoang[3][ngau_nhien3][1])
map_name = hathuyhoang[3][ngau_nhien3][2]
POSX = hathuyhoang[3][ngau_nhien3][3]*8*32
POSY = hathuyhoang[3][ngau_nhien3][4]*16*32
hat_hh_cc = AddNpc(hathh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hh_cc,"\\script\\event\\demhuyhoang\\hathuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Huy Hoang xuat hien o ["..map_name.."]")
else
-----------hat hoang kim
ngau_nhien4 = random(1,4)
map_index = SubWorldID2Idx(hathoangkim[ngau_nhien4][1])
map_name = hathoangkim[ngau_nhien4][2]
POSX = hathoangkim[ngau_nhien4][3]*8*32
POSY = hathoangkim[ngau_nhien4][4]*16*32
hat_hk = AddNpc(hathk,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hk,"\\script\\event\\demhuyhoang\\hathoangkim.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Hoang Kim xuat hien o ["..map_name.."]")
end
end
function tao_qua_hh_hk()
idx = SubWorldID2Idx(326)
SubWorld = idx
SetMissionV(7,0)
-------------qua huy hoan
if loai == 1 then
----------so cap-----------
DelNpc(hat_hh_sc)
map_index = SubWorldID2Idx(hathuyhoang[1][ngau_nhien1][1])
map_name = hathuyhoang[1][ngau_nhien1][2]
POSX = hathuyhoang[1][ngau_nhien1][3]*8*32
POSY = hathuyhoang[1][ngau_nhien1][4]*16*32
qua_hh_sc = AddNpc(quahh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hh_sc,"\\script\\event\\demhuyhoang\\quahuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 2 then
---------trung cap---------
DelNpc(hat_hh_tc)
map_index = SubWorldID2Idx(hathuyhoang[2][ngau_nhien2][1])
map_name = hathuyhoang[2][ngau_nhien2][2]
POSX = hathuyhoang[2][ngau_nhien2][3]*8*32
POSY = hathuyhoang[2][ngau_nhien2][4]*16*32
qua_hh_tc = AddNpc(quahh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hh_tc,"\\script\\event\\demhuyhoang\\quahuyhoang1.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 3 then
---------Cao cap-------------
DelNpc(hat_hh_cc)
map_index = SubWorldID2Idx(hathuyhoang[3][ngau_nhien3][1])
map_name = hathuyhoang[3][ngau_nhien3][2]
POSX = hathuyhoang[3][ngau_nhien3][3]*8*32
POSY = hathuyhoang[3][ngau_nhien3][4]*16*32
qua_hh_cc = AddNpc(quahh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hh_cc,"\\script\\event\\demhuyhoang\\quahuyhoang2.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Huy Hoang xuat hien o ["..map_name.."]")
else
-----------qua hoang kim
DelNpc(hat_hk)
map_index = SubWorldID2Idx(hathoangkim[ngau_nhien4][1])
map_name = hathoangkim[ngau_nhien4][2]
POSX = hathoangkim[ngau_nhien4][3]*8*32
POSY = hathoangkim[ngau_nhien4][4]*16*32
qua_hk = AddNpc(quahk,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hk,"\\script\\event\\demhuyhoang\\quahoangkim.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Hoang Kim xuat hien o ["..map_name.."]")
end
end
function duoc_hai()
idx = SubWorldID2Idx(326)
SubWorld = idx
SetMissionV(7,1)
end
function xoa_hat_qua_hh_hk()
DelNpc(qua_hh_sc)
DelNpc(qua_hh_tc)
DelNpc(qua_hh_cc)
DelNpc(qua_hk)
end
hathuyhoang.lua
function main()
Say("<bclr=red>Hat Huy Hoang<bclr> : Toi la loai thuc vat rat quy hiem !",0)
end
hathoangkim.lua
function main()
Say("<bclr=red>Hat Hoang Kim<bclr> : Toi la loai thuc vat rat tuy hiem kho kiem hon ca <color=yellow>Hat Huy Hoang<color> !",0)
end
quahuyhoang.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai == 0 then
if GetLevel() <= 89 then
DelNpc(1111)
AddEventItem(112)
Msg2Player("Ban da hai thanh cong Qua Huy Hoang (Thap)")
else
Msg2Player("Dang cap duoi 89 moi hai duoc toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
quahuyhoang1.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai == 0 then
if GetLevel() >= 90 and GetLevel() <= 119 then
DelNpc(1111)
AddEventItem(113)
Msg2Player("Ban da hai thanh cong Qua Huy Hoang (trung)")
else
Msg2Player("Dang cap tu 90 - 119 moi hai duco toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
quahuyhoang2.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai==0 then
if GetLevel() >= 120 then
DelNpc(1111)
AddEventItem(114)
Msg2Player("Ban da hai thanh cong Qua Huy Hoang (Cao)")
else
MSg2Player("Dang cap tu 120 tro len moi hai duoc toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
quahoangkim.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Hoang Kim<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Hoang Kim<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai==0 then
if GetLevel() >= 120 then
DelNpc(1118)
AddEventItem(115)
Msg2Player("Ban da hai thanh cong Qua Qua Hoang Kim")
else
Msg2Player("Dang cap tu 120 tro len moi hai duco toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
npc_use_qua_hh_hk.lua
function main()
Say("<color=red>SangProNhat<color> : Nha nguoi muon su dung loai qua nao !",5,
"Qua huy hoang (thap)/hht",
"Qua huy hoang (trung)/hhtr",
"Qua huy hoang (cao)/hhc",
"Qua hoang kim/hk",
"Ta chi xem qua thoi/out")
end
function hht()
if GetLevel() <= 89 then
if HaveItem(112) == 1 then
DelItem(112)
AddOwnExp(500000)
Msg2Player("Nhan duoc 500.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua huy hoang (thap) ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua huy hoang (thap) phai co dang cap tu <color=red>89<color> tro xuong")
end
end
function hhtr()
if GetLevel() >= 90 and GetLevel() <= 119 then
if HaveItem(113) == 1 then
DelItem(113)
AddOwnExp(2000000)
Msg2Player("Nhan duoc 2.000.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua Qua Huy Hoang (trung) ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua Qua Huy Hoang (trung) phai co dang cap tu <color=red>90 den 119<color>")
end
end
function hhc()
if GetLevel()>=120 then
if HaveItem(114) == 1 then
DelItem(114)
AddOwnExp(300000)
Msg2Player("Nhan duoc 3.000.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua Qua Huy Hoang (cao) ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua Qua Huy Hoang (cao) phai co dang cap tu <color=red>120<color> tro len")
end
end
function hk()
if GetLevel() >= 120 then
if HaveItem(115) == 1 then
DelItem(115)
AddOwnExp(3000000)
Msg2Player("Nhan duoc 30.000.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua Qua Hoang Kim ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua Qua Hoang Kim phai co dang cap tu <color=red>120<color> tro len")
end
end
function out()
end
Cách xài :
Chép vô Script\event\
Mở map 326
Thêm Queskey
Qua Huy Hoang (thap) 4 117 \spr\item\questkey\huihuangzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1
Qua Huy Hoang (trung) 4 118 \spr\item\questkey\huihuangzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1
Qua Huy Hoang (cao) 4 119 \spr\item\questkey\huihuangzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1
Qua Hoang Kim 4 120 \spr\item\questkey\huangjinzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1Thêm Npcs.txt
hat Huy Hoang hat Huy Hoang 辉煌之种 3 6 0 passerby204 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0
Qua Huy Hoang Qua Huy Hoang 辉煌之果 3 6 0 passerby205 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0
Hat Hoang Kim Hat Hoang Kim 黄金之种 3 6 0 passerby206 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0
Qua Hoang Kim Qua Hoang Kim 黄金之果 3 6 0 passerby207 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0Npcres\人物类型.txt
passerby204 NormalNpc spr\npcres\passerby\passerby204
passerby205 NormalNpc spr\npcres\passerby\passerby205
passerby206 NormalNpc spr\npcres\passerby\passerby206
passerby207 NormalNpc spr\npcres\passerby\passerby207Npcres\普通npc资 源.txt
passerby204 passerby204.spr passerby204.spr passerby204.spr
passerby205 passerby205.spr passerby205.spr passerby205.spr
passerby206 passerby206.spr passerby206.spr passerby206.spr
passerby207 passerby207.spr passerby207.spr passerby207.spr TimerTask.txt
11 \script\event\demhuyhoang\timer.luaCode Start Timer :
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
OpenMission(1)
StartMissionTimer(1,11,18);
endCÒn nhiều bug nhưng tính năng cơ bản okie
Chẳng bít có ai mong tui trở về jx hong nhĩ
\:D/:D
Link MapList.ini
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
Quà tặng mọi người trong forum
hathuyhoang = {
{
{182,"Me Cung Nghiet Long Dong",236,206},
{167,"Diem Thuong Son",196,193},
{200,"Me Cung Co Duong Dong",195,210},
{92,"Thuc Cuong Son",236,193}
},
{
{322,"Truong Bach Son Bac",204,231},
{321,"Truong Bach Son Nam",175,186},
{225,"Son Dong Sa Mac Tang 1",174,203},
{226,"Son Dong Sa Mac Tang 2",215,200},
{227,"Son Dong Sa Mac Tang 3",187,205}
},
{
{248,"Mac Cao Quat",191,200},
{247,"Phong Lang Do",153,168}
}
};
hathoangkim = {
{341,"Mac Bac Thao Nguyen",181,155},
{333,"Hoa Son Phai",179,200},
{181,"Me Cung Luong Thuy Dong",204,191},
{243,"Lam Du Quan",218,205}
};
demhuyhoang = {{12,0},{12,10},{12,20}};
hathh = 1110
quahh = 1111
hathk = 1117
quahk = 1118
ngau_nhien1 = 0
ngau_nhien2 = 0
ngau_nhien3 = 0
ngau_nhien4 = 0
qua_hh_sc = nil
qua_hh_tc = nil
qua_hh_cc = nil
qua_hk = nil
loai = 0
function OnTimer()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
idx = SubWorldID2Idx(326)
SubWorld = idx
for i=1,getn(demhuyhoang) do
if gio == demhuyhoang[i][1] and phut == demhuyhoang[i][2] and giay == 0 then
tao_hat_hh_hk()
break
elseif gio == demhuyhoang[i][1] and phut == demhuyhoang[i][2] + 5 and giay == 1 then
tao_qua_hh_hk()
break
elseif gio == demhuyhoang[i][1] and phut == (demhuyhoang[i][2] + 5) and giay == 10 then
duoc_hai()
elseif gio == demhuyhoang[i][1] and phut == (demhuyhoang[i][2] +9) then
xoa_hat_qua_hh_hk()
end
end
end
function tao_hat_hh_hk()
-------------hat huy hoan
loai = random(1,4)
if loai == 1 then
----------so cap-----------
ngau_nhien1 = random(1,4)
map_index = SubWorldID2Idx(hathuyhoang[1][ngau_nhien1][1])
map_name = hathuyhoang[1][ngau_nhien1][2]
POSX = hathuyhoang[1][ngau_nhien1][3]*8*32
POSY = hathuyhoang[1][ngau_nhien1][4]*16*32
hat_hh_sc = AddNpc(hathh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hh_sc,"\\script\\event\\demhuyhoang\\hathuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 2 then
---------trung cap---------
ngau_nhien2 = random(1,5)
map_index = SubWorldID2Idx(hathuyhoang[2][ngau_nhien2][1])
map_name = hathuyhoang[2][ngau_nhien2][2]
POSX = hathuyhoang[2][ngau_nhien2][3]*8*32
POSY = hathuyhoang[2][ngau_nhien2][4]*16*32
hat_hh_tc = AddNpc(hathh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hh_tc,"\\script\\event\\demhuyhoang\\hathuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 3 then
---------Cao cap-------------
ngau_nhien3 = random(1,2)
map_index = SubWorldID2Idx(hathuyhoang[3][ngau_nhien3][1])
map_name = hathuyhoang[3][ngau_nhien3][2]
POSX = hathuyhoang[3][ngau_nhien3][3]*8*32
POSY = hathuyhoang[3][ngau_nhien3][4]*16*32
hat_hh_cc = AddNpc(hathh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hh_cc,"\\script\\event\\demhuyhoang\\hathuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Huy Hoang xuat hien o ["..map_name.."]")
else
-----------hat hoang kim
ngau_nhien4 = random(1,4)
map_index = SubWorldID2Idx(hathoangkim[ngau_nhien4][1])
map_name = hathoangkim[ngau_nhien4][2]
POSX = hathoangkim[ngau_nhien4][3]*8*32
POSY = hathoangkim[ngau_nhien4][4]*16*32
hat_hk = AddNpc(hathk,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(hat_hk,"\\script\\event\\demhuyhoang\\hathoangkim.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Hat Hoang Kim xuat hien o ["..map_name.."]")
end
end
function tao_qua_hh_hk()
idx = SubWorldID2Idx(326)
SubWorld = idx
SetMissionV(7,0)
-------------qua huy hoan
if loai == 1 then
----------so cap-----------
DelNpc(hat_hh_sc)
map_index = SubWorldID2Idx(hathuyhoang[1][ngau_nhien1][1])
map_name = hathuyhoang[1][ngau_nhien1][2]
POSX = hathuyhoang[1][ngau_nhien1][3]*8*32
POSY = hathuyhoang[1][ngau_nhien1][4]*16*32
qua_hh_sc = AddNpc(quahh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hh_sc,"\\script\\event\\demhuyhoang\\quahuyhoang.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 2 then
---------trung cap---------
DelNpc(hat_hh_tc)
map_index = SubWorldID2Idx(hathuyhoang[2][ngau_nhien2][1])
map_name = hathuyhoang[2][ngau_nhien2][2]
POSX = hathuyhoang[2][ngau_nhien2][3]*8*32
POSY = hathuyhoang[2][ngau_nhien2][4]*16*32
qua_hh_tc = AddNpc(quahh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hh_tc,"\\script\\event\\demhuyhoang\\quahuyhoang1.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Huy Hoang xuat hien o ["..map_name.."]")
elseif loai == 3 then
---------Cao cap-------------
DelNpc(hat_hh_cc)
map_index = SubWorldID2Idx(hathuyhoang[3][ngau_nhien3][1])
map_name = hathuyhoang[3][ngau_nhien3][2]
POSX = hathuyhoang[3][ngau_nhien3][3]*8*32
POSY = hathuyhoang[3][ngau_nhien3][4]*16*32
qua_hh_cc = AddNpc(quahh,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hh_cc,"\\script\\event\\demhuyhoang\\quahuyhoang2.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Huy Hoang xuat hien o ["..map_name.."]")
else
-----------qua hoang kim
DelNpc(hat_hk)
map_index = SubWorldID2Idx(hathoangkim[ngau_nhien4][1])
map_name = hathoangkim[ngau_nhien4][2]
POSX = hathoangkim[ngau_nhien4][3]*8*32
POSY = hathoangkim[ngau_nhien4][4]*16*32
qua_hk = AddNpc(quahk,1,map_index,POSX,POSY,1,"SangProNhat",1)
SetNpcScript(qua_hk,"\\script\\event\\demhuyhoang\\quahoangkim.lua")
Msg2SubWorld("Nhan sy vo lam chu y co nguoi phat hien Qua Hoang Kim xuat hien o ["..map_name.."]")
end
end
function duoc_hai()
idx = SubWorldID2Idx(326)
SubWorld = idx
SetMissionV(7,1)
end
function xoa_hat_qua_hh_hk()
DelNpc(qua_hh_sc)
DelNpc(qua_hh_tc)
DelNpc(qua_hh_cc)
DelNpc(qua_hk)
end
hathuyhoang.lua
function main()
Say("<bclr=red>Hat Huy Hoang<bclr> : Toi la loai thuc vat rat quy hiem !",0)
end
hathoangkim.lua
function main()
Say("<bclr=red>Hat Hoang Kim<bclr> : Toi la loai thuc vat rat tuy hiem kho kiem hon ca <color=yellow>Hat Huy Hoang<color> !",0)
end
quahuyhoang.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai == 0 then
if GetLevel() <= 89 then
DelNpc(1111)
AddEventItem(112)
Msg2Player("Ban da hai thanh cong Qua Huy Hoang (Thap)")
else
Msg2Player("Dang cap duoi 89 moi hai duoc toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
quahuyhoang1.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai == 0 then
if GetLevel() >= 90 and GetLevel() <= 119 then
DelNpc(1111)
AddEventItem(113)
Msg2Player("Ban da hai thanh cong Qua Huy Hoang (trung)")
else
Msg2Player("Dang cap tu 90 - 119 moi hai duco toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
quahuyhoang2.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Huy Hoang<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai==0 then
if GetLevel() >= 120 then
DelNpc(1111)
AddEventItem(114)
Msg2Player("Ban da hai thanh cong Qua Huy Hoang (Cao)")
else
MSg2Player("Dang cap tu 120 tro len moi hai duoc toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
quahoangkim.lua
hai = 0
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
if GetMissionV(7) == 0 then
Say("<bclr=red>Qua Hoang Kim<bclr> : Nguoi muon an mot loai qua quy hiem dang con song sao !",0)
elseif GetMissionV(7) == 1 then
Say("<bclr=red>Qua Hoang Kim<bclr> : Qua chin roi nguoi co muon hai khong !",2,"Tat nhien ta muon/hai","Ta khong du kha nang/out")
end
end
function hai()
if hai==0 then
if GetLevel() >= 120 then
DelNpc(1118)
AddEventItem(115)
Msg2Player("Ban da hai thanh cong Qua Qua Hoang Kim")
else
Msg2Player("Dang cap tu 120 tro len moi hai duco toi")
end
else
Say("Qua ngon nhat da bi nguoi khac hai mat roi gio con vo nguoi muon lay ha !",0)
end
end
function out()
end
npc_use_qua_hh_hk.lua
function main()
Say("<color=red>SangProNhat<color> : Nha nguoi muon su dung loai qua nao !",5,
"Qua huy hoang (thap)/hht",
"Qua huy hoang (trung)/hhtr",
"Qua huy hoang (cao)/hhc",
"Qua hoang kim/hk",
"Ta chi xem qua thoi/out")
end
function hht()
if GetLevel() <= 89 then
if HaveItem(112) == 1 then
DelItem(112)
AddOwnExp(500000)
Msg2Player("Nhan duoc 500.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua huy hoang (thap) ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua huy hoang (thap) phai co dang cap tu <color=red>89<color> tro xuong")
end
end
function hhtr()
if GetLevel() >= 90 and GetLevel() <= 119 then
if HaveItem(113) == 1 then
DelItem(113)
AddOwnExp(2000000)
Msg2Player("Nhan duoc 2.000.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua Qua Huy Hoang (trung) ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua Qua Huy Hoang (trung) phai co dang cap tu <color=red>90 den 119<color>")
end
end
function hhc()
if GetLevel()>=120 then
if HaveItem(114) == 1 then
DelItem(114)
AddOwnExp(300000)
Msg2Player("Nhan duoc 3.000.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua Qua Huy Hoang (cao) ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua Qua Huy Hoang (cao) phai co dang cap tu <color=red>120<color> tro len")
end
end
function hk()
if GetLevel() >= 120 then
if HaveItem(115) == 1 then
DelItem(115)
AddOwnExp(3000000)
Msg2Player("Nhan duoc 30.000.000 diem kinh nghiem !")
else
Say("Nguoi khong co qua Qua Hoang Kim ta khong giup di duoc",0)
end
else
Talk(1,"","Su dung qua Qua Hoang Kim phai co dang cap tu <color=red>120<color> tro len")
end
end
function out()
end
Cách xài :
Chép vô Script\event\
Mở map 326
Thêm Queskey
Qua Huy Hoang (thap) 4 117 \spr\item\questkey\huihuangzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1
Qua Huy Hoang (trung) 4 118 \spr\item\questkey\huihuangzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1
Qua Huy Hoang (cao) 4 119 \spr\item\questkey\huihuangzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1
Qua Hoang Kim 4 120 \spr\item\questkey\huangjinzhiguo.spr 41 1 1 An vao se tang gap doi cong luc 1Thêm Npcs.txt
hat Huy Hoang hat Huy Hoang 辉煌之种 3 6 0 passerby204 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0
Qua Huy Hoang Qua Huy Hoang 辉煌之果 3 6 0 passerby205 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0
Hat Hoang Kim Hat Hoang Kim 黄金之种 3 6 0 passerby206 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0
Qua Hoang Kim Qua Hoang Kim 黄金之果 3 6 0 passerby207 0 0 0 0 0 22 30 400 700 140 36 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0Npcres\人物类型.txt
passerby204 NormalNpc spr\npcres\passerby\passerby204
passerby205 NormalNpc spr\npcres\passerby\passerby205
passerby206 NormalNpc spr\npcres\passerby\passerby206
passerby207 NormalNpc spr\npcres\passerby\passerby207Npcres\普通npc资 源.txt
passerby204 passerby204.spr passerby204.spr passerby204.spr
passerby205 passerby205.spr passerby205.spr passerby205.spr
passerby206 passerby206.spr passerby206.spr passerby206.spr
passerby207 passerby207.spr passerby207.spr passerby207.spr TimerTask.txt
11 \script\event\demhuyhoang\timer.luaCode Start Timer :
function main()
idx = SubWorldID2Idx(326)
SubWorld = idx
OpenMission(1)
StartMissionTimer(1,11,18);
endCÒn nhiều bug nhưng tính năng cơ bản okie
Chẳng bít có ai mong tui trở về jx hong nhĩ
\:D/:D
Link MapList.ini
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
Quà tặng mọi người trong forum