PDA

View Full Version : [JX] bàn nào rành script xem giúp mình với



carotkhoaitay
08-04-15, 02:31 PM
Include("\\script\\lib\\awardtemplet.lua");
function main()
dofile("script/event/birthday_jieri/200905/npc/npc_zhanxin_zunzhe.lua")
local tbSay = {}
tinsert(tbSay,"NhËn kü n¨ng hæ trî t©n thñ./hotrotanthu")
tinsert(tbSay,"NhËn lÖnh bµi hæ trî t©n thñ./lenhbaihotrotanthu")
tinsert(tbSay,"NhËn thuong cap do./nhanthuongcap")
tinsert(tbSay,"NhËn m¸u hæ trî t©n thñ./nhanmau")
tinsert(tbSay,"Hæ trî häc vâ c«ng/HoTroSkill")
tinsert(tbSay,"KÕt thóc ®èi tho¹i/Quit")
Say("Hæ trî t©n thñ", getn(tbSay), tbSay)

end


function lenhbaihotrotanthu()

AddItem(6,1,4257,0,0,0,0)

end

function nhanthuongcap()

local tbSay = {}
tinsert(tbSay,"NhËn thuong cap 80/cap80")
tinsert(tbSay,"NhËn thuong cap 100/cap100")
tinsert(tbSay,"NhËn nhan thuong cap 120/cap120")
tinsert(tbSay,"NhËn thuong cap 150/cap150")
tinsert(tbSay,"Nhan thuong cap 180/cap180")
tinsert(tbSay,"KÕt thóc ®èi tho¹i/Quit")
Say("Hæ trî t©n thñ", getn(tbSay), tbSay)

end


function cap80()
if (GetLevel ()>80 ) then
local nSel = GetFactionNo()
Talk (1, "", "<color = red > Ban Chua len cap 80 di luyen them di");
Return end
if (nSel >= 1) then
Talk (1, "", "<color = red > Ban Da Nhan Phan Thuong Nay roi muon lay nua ak");
Return end
if (CheckRoom(3 ,5)== 0) then
Talk (1, "", "<color = red > ban vui long sap xep hanh trang lai de tranh roi vat pham");
Return end
--AddItem()--

end
function cap100()
if (GetLevel ()>100 ) then
local nSel = GetFactionNo()
Talk (1, "", "<color = red > Ban Chua len cap 100 di luyen them di");
Return end
if (nSel >= 1) then
Talk (1, "", "<color = red > Ban Da Nhan Phan Thuong Nay roi muon lay nua ak");
Return end
if (CheckRoom(3 ,5)== 0) then
Talk (1, "", "<color = red > ban vui long sap xep hanh trang lai de tranh roi vat pham");
Return end
--AddItem()--

end
function cap120()
if (GetLevel ()>120 ) then
local nSel = GetFactionNo()
Talk (1, "", "<color = red > Ban Chua len cap 120 di luyen them di");
Return end
if (nSel >= 1) then
Talk (1, "", "<color = red > Ban Da Nhan Phan Thuong Nay roi muon lay nua ak");
Return end
if (CheckRoom(3 ,5)== 0) then
Talk (1, "", "<color = red > ban vui long sap xep hanh trang lai de tranh roi vat pham");
Return end
--AddItem()--

end
function cap150()
if (GetLevel ()>150 ) then
local nSel = GetFactionNo()
Talk (1, "", "<color = red > Ban Chua len cap 150 di luyen them di");
Return end
if (nSel >= 1) then
Talk (1, "", "<color = red > Ban Da Nhan Phan Thuong Nay roi muon lay nua ak");
Return end
if (CheckRoom(3 ,5)== 0) then
Talk (1, "", "<color = red > ban vui long sap xep hanh trang lai de tranh roi vat pham");
Return end
--AddItem()--

end

function cap180()
if (GetLevel ()>180 ) then
local nSel = GetFactionNo()
Talk (1, "", "<color = red > Ban Chua len cap 180 di luyen them di");
Return end
if (nSel >= 1) then
Talk (1, "", "<color = red > Ban Da Nhan Phan Thuong Nay roi muon lay nua ak");
Return end
if (CheckRoom(3 ,5)== 0) then
Talk (1, "", "<color = red > ban vui long sap xep hanh trang lai de tranh roi vat pham");
Return end
--AddItem()--

end

function nhanmau()
if CalcFreeItemCellCount() < 10 then
Say("H·y cÊt bít vËt phÈm ®Ó ®¶m b¶o cã 10 « trèng råi h·y më.",0);
return 1;
end
if GetLevel()<90 then
local tbItem = {szName="Ngò Hoa Ngäc Lé Hoµn", tbProp={1, 2, 0, 5, 0, 0}, nCount = 10, nExpiredTime = 10080, nBindState = -2}
Talk(1, "", "B¹n nhËn ®­îc hæ trî nµy ®Õn cÊp 90");
tbAwardTemplet:GiveAwardByList(tbItem, "PhÇn th­ëng t©n thñ");
end
end

function hotrotanthu()
if GetLevel()<90 then
AddSkillState(512,20,1,60*60*18)
AddSkillState(527,5,1,60*60*18)
AddSkillState(313,5,1,60*60*18)
AddSkillState(314,12,1,60*60*18)
AddSkillState(546,1,1,60*60*18)
Talk(1, "", "B¹n sÏ ®­îc nhËn hæ trî kü n¨ng nµy ®Õn cÊp 90");
Msg2Player( "§Õn LÔ quan nhËp m· <color=yellow>PLANGAME<color> ®Ó ®­îc tÆng th­ëng nhÐ" );
tbAwardTemplet:GiveAwardByList(tbItem, "PhÇn th­ëng t©n thñ");
end

end

function Quit() end
tbAllSkill = {
shaolin = {
[1] = {10,14},
[2] = {4,6,8},
[3] = {15},
[4] = {16},
[5] = {20},
[6] = {11,19,271},
[7] = {21,273},
[9] = {318,319,321,709},
},
tianwang = {
[1] = {29,30,34},
[2] = {23,24,26},
[3] = {33},
[4] = {31,35,37},
[5] = {40},
[6] = {42},
[7] = {32,36,41,324},
[9] = {322,323,325,708},
},
tangmen = {
[1] = {45},
[2] = {43,347},
[3] = {303},
[4] = {47,50,54,343},
[5] = {345},
[6] = {349},
[7] = {48,58,249,341},
[9] = {302,339,342,351,710},
},
wudu = {
[1] = {63,65},
[2] = {60,62,67},
[3] = {66,70},
[4] = {64,68,69,384},
[5] = {73,356},
[6] = {72},
[7] = {71,74,75},
[9] = {353,355,390,711},
},
emei = {
[1] = {80,85},
[2] = {77,79},
[3] = {93},
[4] = {82,89,385},
[5] = {86},
[6] = {92},
[7] = {88,91,252,282},
[9] = {328,332,380,712},
},
cuiyan = {
[1] = {99,102},
[2] = {95,97},
[3] = {269},
[4] = {105,113},
[5] = {100},
[6] = {109},
[7] = {108,111,114},
[9] = {336,337,713},
},
gaibang = {
[1] = {119,122},
[2] = {115,116},
[3] = {129},
[4] = {124,274},
[5] = {277},
[6] = {125,128},
[7] = {130,360},
[9] = {357,359,714},
},
tianren = {
[1] = {135,145},
[2] = {131,132,136},
[3] = {137},
[4] = {138,140,141},
[5] = {364},
[6] = {143},
[7] = {142,148,150},
[9] = {361,362,391,715},
},
wudang = {
[1] = {153,155},
[2] = {151,152},
[3] = {159},
[4] = {158,164},
[5] = {160},
[6] = {157},
[7] = {165,166,267},
[9] = {365,368,716},
},
kunlun = {
[1] = {169,179},
[2] = {167,168,171,392},
[3] = {174},
[4] = {172,173,178,393},
[5] = {175,181},
[6] = {90,176},
[7] = {182,275,630},
[9] = {372,375,394,717},
},
}
function HoTroSkill()
local szFaction = GetFaction()
if tbAllSkill[szFaction] == nil then
return
end
for i=1, 7 do
if tbAllSkill[szFaction][i] ~= nil then
for j=1, getn(tbAllSkill[szFaction][i]) do
if HaveMagic(tbAllSkill[szFaction][i][j]) == -1 then
AddMagic(tbAllSkill[szFaction][i][j])
end
end
end
end
Talk(1, "", "Xin chóc mõng b¹n ®· nhËn ®­îc hæ trî kü n¨ng tõ BQT");
end


bạn nào rành xem dùm mình với, mình chạy thì GS nó ko load dc báo lỗi script

hoivegame
08-04-15, 09:11 PM
bạn fix lại cái ten Return này thành return . Thử gọi 1 trong những function có hàm Return này ra sẽ hiện bug cho bạn xem.

minhclub102
09-04-15, 03:15 PM
bạn nào rành xem dùm mình với, mình chạy thì GS nó ko load dc báo lỗi script

Chụp hình gamerserver post lên mới giúp đc !;))

carotkhoaitay
09-04-15, 04:41 PM
Chụp hình gamerserver post lên mới giúp đc !;))

mình thay chữ Return thanh return thì GS nó k báo lỗi script nữa, nhưng vô game lai không nhận dc đồ :D, phần Additem mình đã thêm vào rồi mà nhận vẫn k thấy đồ

NhanVT
09-04-15, 05:10 PM
Hơi kỳ kỳ mấy chỗ, dòng lệnh hình như đặt không đúng chỗ :|
Xem lại mấy dòng
if (GetLevel
nSel = GetFactionNo()
if (nSel

keo_ngot1418
09-04-15, 08:39 PM
Cho Bạn Nguyên 1 Con NPC Support của mình lun nè - về tự tách ra !
hi vọng giúp ích cho bạn !





Include("\\script\\source\\sourcejx49.lua")
Include("\\dulieu\\listxephang.lua")
Include("\\script\\source\\tasklist.lua")
Include("\\script\\global\\tasklist.lua")
Include("\\script\\global\\chuyensinh.lua")

function main()
tanthub()
SetRank(93)
--maint()
end

function maint()
Talk(1,"","<color=yellow>Thêi Gian OPEN 12:30 - 06/04/2015 <color> Vui Lßng Ngåi Chê Trong Gi©y L¸t NhÐ <color=red>"..GetName().." <pic=25><pic=26><pic=27><pic=28><pic=29><pic=30> !!! ")
Msg2Player("Xem Th«ng Tin T¹i : <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>")
end



function tanthub()
Say("<color=yellow>Hæ Trî :<color> Xin chµo <color=red>"..GetName().."<color> Ng­¬i Muèn NhËn Hæ Trî ë ta kh«ng ?",
8,
"NhËn hç trî t©n thñ/Level20",
"NhËn kü n¨ng 80/skill_90",
"[ MiÔn PhÝ ] kü n¨ng 120/skill122",
"Xãa Skill 120 §i LuyÖn/xoaskill122",
"NhËn Th­ëng CÊp 120/phanthuong3x",
"NhËn Th­ëng CÊp 140/phanthuong4x",
"H·y §­a Ta Vµo Th¨m Tï/vaothamtu",
"Tho¸t/no")
end




function xoaskill122()
mp = GetFaction()
if mp == "Thieu Lam Phai" then
DelMagic(420)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Thien Vuong Bang" then
DelMagic(421)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Duong Mon" then
DelMagic(422)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Ngu Doc Giao" then
DelMagic(423)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Nga My Phai" then
DelMagic(424)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Thuy Yen Mon" then
DelMagic(425)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Cai Bang" then
DelMagic(426)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Thien Nhan Giao" then
DelMagic(427)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Vo Dang Phai" then
DelMagic(428)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
elseif mp == "Con Lon Phai" then
DelMagic(429)
Talk(1,"","Chóc mõng b¹n ®· xoa ®­îc tuyÖt kü 120 cña "..mp)
KickOutSelf()
end
end

function skill122()
mp = GetFaction()
if mp == "Thieu Lam Phai" then
AddMagic(420,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Thien Vuong Bang" then
AddMagic(421,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Duong Mon" then
AddMagic(422,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Ngu Doc Giao" then
AddMagic(423,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Nga My Phai" then
AddMagic(424,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Thuy Yen Mon" then
AddMagic(425,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Cai Bang" then
AddMagic(426,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Thien Nhan Giao" then
AddMagic(427,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Vo Dang Phai" then
AddMagic(428,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
elseif mp == "Con Lon Phai" then
AddMagic(429,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 120 cña "..mp)
end
end

function phanthuong5x()
if GetTask(341) == 0 then
if GetLevel() >= 60 then
SetTask(998, GetTask(998) + 3600*24)
SetTask(341,GetTask(341)+1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 60, 24h tiªn th¶o lé")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end






function skill_90()
if GetLevel() >= 80 then
skill_901()
else
Talk(1,"","B¹n ch­a ®ñ level 80")
end
end
function vaothamtu()
NewWorld(17,1600,3200)
end
function skill_901()
mp = GetFaction()
if mp == "Thieu Lam Phai" then
AddMagic(350,1)
AddMagic(351,1)
AddMagic(353,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Thien Vuong Bang" then
AddMagic(342,1)
AddMagic(347,1)
AddMagic(345,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Duong Mon" then
AddMagic(399,1)
AddMagic(355,1)
AddMagic(358,1)
AddMagic(302,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Ngu Doc Giao" then
AddMagic(327,1)
AddMagic(359,1)
AddMagic(361,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Nga My Phai" then
AddMagic(291,1)
AddMagic(374,1)
AddMagic(370,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Thuy Yen Mon" then
AddMagic(377,1)
AddMagic(378,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Cai Bang" then
AddMagic(362,1)
AddMagic(389,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Thien Nhan Giao" then
AddMagic(328,1)
AddMagic(365,1)
AddMagic(367,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Vo Dang Phai" then
AddMagic(380,1)
AddMagic(382,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
elseif mp == "Con Lon Phai" then
AddMagic(329,1)
AddMagic(385,1)
AddMagic(384,1)
Talk(1,"","Chóc mõng b¹n ®· häc ®­îc tuyÖt kü 90 cña "..mp)
end
end
function thuongkimphong()
SayEx({"<color="..colorS()..">HÖ thèng: ",
"NhËn Th­ëng CÊp 120/phanthuong3x",
"PhÇn Th­ëng CÊp 130/phanthuong4x",
"PhÇn Th­ëng CÊp 60/phanthuong5x",
"PhÇn Th­ëng CÊp 80 [Skill 9x]/skill_90",
"Tho¸t /no"});
end

function tienthaolo()
if GetTask(TaksDenBuTTL) == 0 then

SetTask(998,GetTask(998)+21600)
Msg2Player("B¹n nhËn hç trî t©n thñ thµnh c«ng. B¹n Cã 6h x2 Kinh NghiÖm")
SetTask(TaksDenBuTTL,GetTask(TaksDenBuTTL)+1)
else
Talk(1, "","Ban Da Nhan Roi.")
end
end
function doimau()
SayEx({"<color="..colorS()..">HÖ thèng: ",
--"Mµu Tr¾ng/doimautrang",
"Mµu Vµng/doimauvang",
"Mµu TÝm/doimautim",
"Mµu Xanh/doimauxanh",
"Mµu §á/doimaudo",
"Tho¸t /no"});
end

function doimautrang()
SetCurCamp(0)
end
function doimauvang()
SetCurCamp(1)
end
function doimautim()
SetCurCamp(2)
end
function doimauxanh()
SetCurCamp(3)
end
function doimaudo()
SetCurCamp(4)
end
function nhantrangbikimphong()
if GetTask(349) == 0 then
if GetLevel() >= 50 then
AddItem(0,4,2,5,1,10,10)
AddItem(0,6,4,5,4,10,10)
AddItem(0,5,4,5,4,10,10)
AddItem(0,9,2,5,0,10,10)
AddItem(0,3,1,5,2,10,10)
AddItem(0,8,2,5,3,10,10)
AddItem(0,2,28,5,0,10,10)
AddItem(0,7,14,10,2,10,10)
AddItem(0,3,2,5,1,10,10)
AddEventItem(132)
SetTask(349,GetTask(349)+1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 50, ta sÏ tÆng cho ng­¬i mét bé trang bÞ.")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end

function hotrongua()
if GetTask(350) == 0 then
if GetLevel() >= 50 then
AddItem(0,10,2,10,0,0,0)
SetTask(350,GetTask(350)+1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 50, ta sÏ tÆng cho ng­¬i mét bé trang bÞ.")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end

function hockhc()
if HaveMagic(210) == -1 then
AddMagic(210,1)
Talk(1, "no", "B¹n ®· häc khinh c«ng!!!")
else
Talk(1, "no", "B¹n ®· häc råi nhÐ!!!")
end
end

----

function nhanx2()
if GetTask(TaskKTEXP) == 0 then
SetTask(998,GetTask(998)+2000)
SetTask(TaskKTEXP,GetTask(TaskKTEXP)+1)
Talk(1,"","Hien Nay Ban Dang Co "..GetTask(998).." Giay x2 EXP")
--GetTask+SetTask(TaskX2,60)
else
Talk(1,"","H«m nay b¹n ®· nhËn råi, mai h·y quay l¹i "..GetTask(998).."")
end
end


function bikip9x()
SayEx({"<color="..colorS()..">HÖ thèng: ",
"Thiªn V­¬ng /bktv90",
"ThiÕu L©m /bktl90",
"§­êng M«n /bkdm90",
"Ngò §éc /bknd90",
"Nga My /bknm90",
"Thuý Yªn /bkty90",
"Vâ §ang /bkvd90",
"Thiªn NhÉn /bktn90",
"C«n L«n /bkcl90",
"C¸i Bang /bkcb90",
"Tho¸t /no"});
end
function bkcb90()
--AddEventItem(93)
--AddEventItem(94)
if GetFaction() == "Cai Bang" then
if GetLevel() >= 80 then
if (HaveMagic(362) == -1 or GetMagicLevel(362) == 0)then
--SetTask(45,1)
AddMagic(362,1)
AddMagic(389,1)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(93)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bkcl90()
--AddEventItem(100)
--AddEventItem(101)
--AddEventItem(102)
if GetFaction() == "Con Lon Phai" then
if GetLevel() >= 80 then
if (HaveMagic(384) == -1 or GetMagicLevel(384) == 0)then
--SetTask(46,1)
AddMagic(384,1)
AddMagic(385,1)
AddMagic(329)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(100)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bktn90()
--AddEventItem(95)
--AddEventItem(96)
if GetFaction() == "Thien Nhan Giao" then
if GetLevel() >= 80 then
if (HaveMagic(367) == -1 or GetMagicLevel(367) == 0)then
--SetTask(45,1)
AddMagic(367,1)
AddMagic(365,1)
AddMagic(328)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(95)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bkvd90()
--AddEventItem(98)
--AddEventItem(99)
if GetFaction() == "Vo Dang Phai" then
if GetLevel() >= 80 then
if (HaveMagic(382) == -1 or GetMagicLevel(382) == 0)then
--SetTask(45,1)
AddMagic(382,1)
AddMagic(380,1)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(98)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bkty90()
--AddEventItem(91)
--AddEventItem(92)
if GetFaction() == "Thuy Yen Mon" then
if GetLevel() >= 80 then
if (HaveMagic(377) == -1 or GetMagicLevel(377) == 0)then
--SetTask(45,1)
AddMagic(377,1)
AddMagic(378,1)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(91)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bknm90()
--AddEventItem(88)
--AddEventItem(89)
--AddEventItem(90)
if GetFaction() == "Nga My Phai" then
if GetLevel() >= 80 then
if (HaveMagic(370) == -1 or GetMagicLevel(370) == 0)then
--SetTask(46,1)
AddMagic(370,1)
AddMagic(374,1)
AddMagic(291)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(88)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bknd90()
--AddEventItem(85)
--AddEventItem(86)
--AddEventItem(87)
if GetFaction() == "Ngu Doc Giao" then
if GetLevel() >= 80 then
if (HaveMagic(359) == -1 or GetMagicLevel(359) == 0)then
--SetTask(45,1)
AddMagic(359,1)
AddMagic(361,1)
AddMagic(327)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(85)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bktv90()
if GetFaction() == "Thien Vuong Bang" then
if GetLevel() >= 80 then
if (HaveMagic(347) == -1 or GetMagicLevel(347) == 0)then
--SetTask(46,1)
AddMagic(347,1)
AddMagic(345,1)
AddMagic(342,1)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")

else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bkdm90()
--AddEventItem(81)
--AddEventItem(82)
--AddEventItem(83)
--AddEventItem(84)
if GetFaction() == "Duong Mon" then
if GetLevel() >= 80 then
if (HaveMagic(302) == -1 or GetMagicLevel(302) == 0)then
--SetTask(45,1)
AddMagic(302,1)
AddMagic(355,1)
AddMagic(358,1)
AddMagic(399)
--SetTask(999, GetTask(999) + 10800)
--Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
--DelItem(81)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end
function bktl90()
--AddEventItem(75)
--AddEventItem(76)
--AddEventItem(77)
if GetFaction() == "Thieu Lam Phai" then
if GetLevel() >= 80 then
if (HaveMagic(350) == -1 or GetMagicLevel(350) == 0)then
--SetTask(46,1)
AddMagic(350,1)
AddMagic(353,1)
AddMagic(351,1)
--SetTask(999, GetTask(999) + 10800)
-- Msg2Player("Chóc mõng b¹n nhËn ®­îc kü n¨ng 8x + 3 tiÕng x2 kü n¨ng")
-- DelItem(75)
else
Talk(1,"","<color=red>Kû n¨ng ng­¬i ®· cã kh«ng cÇn ph¶i l·nh ngé nòa lµm g×")
end
else
Talk(1,"","<color=red>Ng­¬i ch­a ®¹t 80,kh«ng thÓ l·nh ngé bÝ kÝp")
end
else
Talk(1,"","<color=red>Kh«ng ph¶i ®Ö tö cho bæn ph¸i , kh«ng thÓ sö dông bÝ kÝp nµy")
end
end

function Level20()
if GetTask(TaskNhanDo) == 0 and GetLevel() < 5 then
for i = 1,75 do
AddOwnExp(999999999)
end
--AddMagic(89,60)
Earn(3000)
SetRank(93)
AddEventItem(2)
AddItem(0,4,2,5,1,10,10)
AddItem(0,6,4,5,4,10,10)
AddItem(0,5,4,5,4,10,10)
AddItem(0,9,2,5,0,10,10)
AddItem(0,3,1,5,2,10,10)
AddItem(0,8,2,5,3,10,10)
AddItem(0,2,28,5,0,10,10)
AddItem(0,7,14,10,2,10,10)
AddItem(0,3,2,5,1,10,10)
AddItem(0,10,2,10,0,0,0)
SetTask(TaskKimPhong, 1)
SetTask(998, GetTask(998) + 3600*3)
SetTask(TaskNhanDo,1)
Msg2Player("B¹n nhËn ®­îc 3 giê tiªn th¶o lé.")
Msg2SubWorld("<color=green>C¸c huynh , tü chiÕu cè em lµ : <color=red>"..GetName().."<color=yellow> võa míi gia nhËp g5vn.net !")
SetTask(TaskNhanDo,1)
else
Talk(1, "","V­ît qu¸ Level 5 kh«ng thÓ nhËn hç trî.")
end
end

function Level50()
if GetTask(TaskKimPhong) == 0 then
if GetLevel() >= 50 then
AddItem(0,4,2,5,1,10,10)
AddItem(0,6,4,5,4,10,10)
AddItem(0,5,4,5,4,10,10)
AddItem(0,9,2,5,0,10,10)
AddItem(0,3,1,5,2,10,10)
AddItem(0,8,2,5,3,10,10)
AddItem(0,2,28,5,0,10,10)
AddItem(0,7,14,10,2,10,10)
AddItem(0,3,2,5,1,10,10)
AddItem(0,10,2,10,0,0,0)
SetTask(TaskKimPhong, 1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 50, ta sÏ tÆng cho ng­¬i mét bé trang bÞ.")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end

----------------------------------------------------------------------------------


function dsct()
dofile("script/source/top.lua")
if getn(Top) == 0 then
Talk(1, "","Míi open server ch­a cËp nhËt danh s¸ch")
return
end
Msg2Player("<color=yellow>[VIP] H¹ng 1 : " .. Top[1][1] .. "<color> - level " .. Top[1][3] .. " - <color=yellow>ChuyÓn sinh : " .. Top[1][4],1)
Msg2Player("<color=cyan>[VIP] H¹ng 2 : " .. Top[2][1] .. "<color> - level " .. Top[2][3] .. " - <color=cyan>ChuyÓn sinh : " .. Top[2][4],1)
Msg2Player("<color=green>[VIP] H¹ng 3 : " .. Top[3][1] .. "<color> - level " .. Top[3][3] .. " - <color=green>ChuyÓn sinh : " .. Top[3][4],1)
Msg2Player("H¹ng 4 : " .. Top[4][1] .. " - level " .. Top[4][3] .. " - ChuyÓn sinh : " .. Top[4][4],1)
Msg2Player("H¹ng 5 : " .. Top[5][1] .. " - level " .. Top[5][3] .. " - ChuyÓn sinh : " .. Top[5][4],1)
Msg2Player("H¹ng 6 : " .. Top[6][1] .. " - level " .. Top[6][3] .. " - ChuyÓn sinh : " .. Top[6][4],1)
Msg2Player("H¹ng 7 : " .. Top[7][1] .. " - level " .. Top[7][3] .. " - ChuyÓn sinh : " .. Top[7][4],1)
Msg2Player("H¹ng 8 : " .. Top[8][1] .. " - level " .. Top[8][3] .. " - ChuyÓn sinh : " .. Top[8][4],1)
Msg2Player("H¹ng 9 : " .. Top[9][1] .. " - level " .. Top[9][3] .. " - ChuyÓn sinh : " .. Top[9][4],1)
Msg2Player("H¹ng 10 : " .. Top[10][1] .. " - level " .. Top[10][3] .. " - ChuyÓn sinh : " .. Top[10][4],1)

end

--=====================================END TEST CHUC NANG=======================
--------------Task Phan Thuong-------------------
function Level50()
if GetTask(TaskKimPhong) == 0 then
if GetLevel() >= 50 then
AddItem(0,4,2,5,1,10,10)
AddItem(0,6,4,5,4,10,10)
AddItem(0,5,4,5,4,10,10)
AddItem(0,9,2,5,0,10,10)
AddItem(0,3,1,5,2,10,10)
AddItem(0,8,2,5,3,10,10)
AddItem(0,2,28,5,0,10,10)
AddItem(0,7,14,10,2,10,10)
AddItem(0,3,2,5,1,10,10)
AddItem(0,10,2,10,0,0,0)
SetTask(TaskKimPhong, 1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 50, ta sÏ tÆng cho ng­¬i mét bé trang bÞ.")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end
-------------------Cap 10-----------------------------------
function phanthuong1x()
if GetTask(337) == 0 then
if GetLevel() >= 20 then
AddItem(0,4,2,5,1,10,10)
AddItem(0,6,4,5,4,10,10)
SetTask(337,GetTask(337)+1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 20, ta sÏ tÆng cho ng­¬i mét bé trang bÞ.")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end
------------------ Cap 20-----
function phanthuong2x()
if GetTask(338) == 0 then
if GetLevel() >= 30 then
AddItem(0,5,4,5,4,10,10)
AddItem(0,9,2,5,0,10,10)

SetTask(338,GetTask(338)+1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 30, ta sÏ tÆng cho ng­¬i mét bé trang bÞ.")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end
----------------------------------------
function phanthuong3x()
if GetTask(Taskcap30) == 0 then
if GetLevel() >= 120 then
AddEventItem(109)
AddEventItem(109)
AddEventItem(109)
AddItem(0,7,15,5,2,10,10)
SetTask(339,GetTask(339)+1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 120, ta sÏ tÆng cho ng­¬i 3 B×nh tiªn th¶o lé , va 1 non dinh quoc")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end
------------------------------------
function phanthuong4x()
if GetTask(340) == 0 then
if GetLevel() >= 140 then
AddItem(0,10,8,8,0,0,0)
SetTask(340,GetTask(340)+1)
else
Talk(1, "", "H·y cè g¾ng ®Æt cÊp 140, ta sÏ tÆng cho ng­¬i mét chiÕn m·")
end
else
Talk(1, "", "Mçi nh©n vËt chØ ®­îc nhËn hç trî t©n thñ 1 lÇn duy nhÊt.")
end
end