danghai1993
22-10-12, 10:32 AM
Trong file .lua đó sẽ có fần hàm liên wan reset skills 9x thì xoá nó đi là nó ko reset thui ^^
Mình vẫn ko kiếm ra ! Bạn có thể tìm dùm mình ko ? script nó đây :
--Author:Ohishu
----BIG BANG SCRIPT TAY TUY CHUYEN PHAI !
Include("\\script\\source\\sourcejx49.lua")
Include("\\script\\GetFaction.lua")
Include("\\dulieu\\chuyensinhdata.lua")
Include("\\script\\global\\khuvucskill.lua")
skills9x={
{"Thieu Lam",{"V« Tíng Tr¶m",24},{"§¹t Ma §é Giang",20},{"Hoµnh T¶o Thiªn Qu©n",22}},
{"Thien Vuong",{"Ph¸ Thiªn Tr¶m",55},{"Truy Tinh Trôc NguyÖt",57},{"Truy Phong QuyÕt",59}},
{"Duong Mon",{"B¹o Vò Lª Hoa",91},{"NhiÕp Hån NguyÖt ¶nh",88},{"Cöu Cung Phi Tinh",94}},
{"Ngu Doc",{"¢m Phong Thùc Cèt",118},{"HuyÒn ¢m Tr¶m",120}},
{"Nga My",{"Tam Nga TÒ TuyÕt",323},{"Phong S¬ng To¸i ¶nh",149}},
{"Thuy Yen",{"B¨ng Tung V« ¶nh",169},{"B¨ng T©m Tiªn Tö",172}},
{"Cai Bang",{"Phi Long T¹i Thiªn",325},{"Thiªn H¹ V« CÈu",328}},
{"Thien Nhan",{"Thiªn Ngo¹i Lu Tinh",216},{"V©n Long KÝch",214}},
{"Vo Dang",{"Thiªn §Þa V« Cùc",236},{"Nh©n KiÕm Hîp NhÊt",239}},
{"Con Lon",{"Ng¹o TuyÕt Tiªu Phong",269},{"L«i §éng Cöu Thiªn",272}}
}
skills15={
{"Thieu Lam",{"V« Tíng Tr¶m Thîng Thõa",415},{"§¹t Ma §é Giang Thîng Thõa",411},{"Hoµnh T¶o Thiªn Qu©n Thîng Thõa",413}},
{"Thien Vuong",{"Ph¸ Thiªn Tr¶m Thîng Thõa",394},{"Truy Tinh Trôc NguyÖt Thîng Thõa",396},{"Truy Phong QuyÕt Thîng Thõa",398}},
{"Duong Mon",{"B¹o Vò Lª Hoa Thîng Thõa",419},{"NhiÕp Hån NguyÖt ¶nh Thîng Thõa",416},{"Cöu Cung Phi Tinh Thîng Thõa",422}},
{"Ngu Doc",{"¢m Phong Thùc Cèt Thîng Thõa",423},{"HuyÒn ¢m Tr¶m Thîng Thõa",425}},
{"Nga My",{"Tam Nga TÒ TuyÕt Thîng Thõa",433},{"Phong S¬ng To¸i ¶nh Thîng Thõa",437}},
{"Thuy Yen",{"B¨ng Tung V« ¶nh Thîng Thõa",439},{"B¨ng T©m Tiªn Tö Thîng Thõa",442}},
{"Cai Bang",{"Phi Long T¹i Thiªn Thîng Thõa",402},{"Thiªn H¹ V« CÈu Thîng Thõa",406}},
{"Thien Nhan",{"Thiªn Ngo¹i Lu Tinh Thîng Thõa",431},{"V©n Long KÝch Thîng Thõa",429}},
{"Vo Dang",{"Thiªn §Þa V« Cùc Thîng Thõa",444},{"Nh©n KiÕm Hîp NhÊt Thîng Thõa",448}},
{"Con Lon",{"Ng¹o TuyÕt Tiªu Phong Thîng Thõa",452},{"L«i §éng Cöu Thiªn Thîng Thõa",455}}
}
function ktmp()
player_Faction = GetFaction()
if (player_Faction == "Thuy Yen Mon") then
mp = 6
elseif (player_Faction == "Ngu Doc Giao") then
mp = 4
elseif (player_Faction == "Thien Vuong Bang") then
mp = 2
elseif (player_Faction == "Thieu Lam Phai") then
mp = 1
elseif (player_Faction == "Vo Dang Phai") then
mp = 9
elseif (player_Faction == "Thien Nhan Giao") then
mp = 8
elseif (player_Faction == "Duong Mon") then
mp = 3
elseif (player_Faction == "Con Lon Phai") then
mp = 10
elseif (player_Faction == "Nga My Phai") then
mp = 5
elseif (player_Faction == "Cai Bang") then
mp = 7
else
mp = -1
end
return mp
end
function main()
if GetTask(71) == 1 or GetTask(71) == 4 then
SayEx({"<bclr=red><color=yellow>Ph¶n T¨ng<color><bclr> : Ng¬i muèn g× ë ta ?","VÊn §Ò LuyÖn Skill/vetlkn","TÈy kü n¨ng/taykinang","TÈy tiÒm n¨ng/taytiemnang","Rêi khái ®¶o tÈy tñy/roikhoi","Tho¸t/Exit"})
elseif GetTask(71) == 2 then
SayEx({"<bclr=red><color=yellow>Ph¶n T¨ng<color><bclr> : Ng¬i muèn g× ë ta ?","VÊn §Ò LuyÖn Skill/vetlkn","TÈy kü n¨ng/taykinang1","TÈy tiÒm n¨ng/taytiemnang1","Rêi khái ®¶o tÈy tñy/roikhoi","Tho¸t/Exit"})
else
SayEx({"<bclr=red><color=yellow>Ph¶n T¨ng<color><bclr> : Ng¬i muèn g× ë ta ?","VÊn §Ò LuyÖn Skill/vetlkn","Rêi khái ®¶o tÈy tñy/roikhoi","Tho¸t/Exit"})
end
end
function vetlkn()
Say("<color=blue>Ph¶n T¨ng:<color> Xin h·y lùa chän !",3,"LuyÖn Skill/tlkn","KÕt Thóc LuyÖn Skill/kttlkn","Tho¸t/no")
end
function tlkn()
Say("<color=blue>Ph¶n T¨ng:<color> Xin h·y lùa chän !",3,"LuyÖn Skill 90/l9x","LuyÖn Skill 150/l15x","KÕt Thóc LuyÖn Skill/kttlkn","Tho¸t/no")
end
function l9x()
if (GetTask(69) == 0) then
vt = ktmp()
if (vt == -1) then
return
end
sl = getn(skills9x[vt])
if (sl == 3) then
Say("<color=blue>Ph¶n T¨ng:<color> Ng¬i h·y lùa chän kü n¨ng cÇn tu luyÖn",3,skills9x[vt][2][1].."/sk1",skills9x[vt][3][1].."/sk2","Tho¸t/no")
elseif (sl == 4) then
Say("<color=blue>Ph¶n T¨ng:<color> Ng¬i h·y lùa chän kü n¨ng cÇn tu luyÖn",4,skills9x[vt][2][1].."/sk1",skills9x[vt][3][1].."/sk2",skills9x[vt][4][1].."/sk3","Tho¸t/no")
end
else
Talk(1,"no","Ng¬i ®ang trong tr¹ng th¸i <color=red>tu luyÖn kü n¨ng,<color> ph¶i kÕt thóc tu luyÖn míi cã thÓ lùa chän !")
end
end
function sk1()
vt = ktmp()
if (vt == -1) then
return
end
--p = GetRestSP()
--RollbackSkill()
UpdateSkill()
--AddMagicPoint(-p)
if (HaveMagic(skills9x[vt][2][2]) ~= -1) then
AddMagic(skills9x[vt][2][2],GetTask(61))
SetTask(69,skills9x[vt][2][2])
SetTask(70,1)
Msg2Player("B¹n ®· vµo tr¹ng th¸i tu luyÖn kü n¨ng"..skills9x[vt][2][1].." !");
KickOutSelf()
else
Talk(1,"no","Ng¬i cha häc kü n¨ng <color=red>"..skills9x[vt][2][1].." ,<color> kh«ng thÓ tu luyÖn")
end
end
function sk2()
vt = ktmp()
if (vt == -1) then
return
end
--p = GetRestSP()
--RollbackSkill()
UpdateSkill()
--AddMagicPoint(-p)
if (HaveMagic(skills9x[vt][3][2]) ~= -1) then
AddMagic(skills9x[vt][3][2],GetTask(62))
SetTask(69,skills9x[vt][3][2])
SetTask(70,2)
Msg2Player("B¹n ®· vµo tr¹ng th¸i tu luyÖn kü n¨ng"..skills9x[vt][3][1].." !");
KickOutSelf()
else
Talk(1,"no","Ng¬i cha häc kü n¨ng <color=red>"..skills9x[vt][3][1].." ,<color> kh«ng thÓ tu luyÖn")
end
end
function sk3()
vt = ktmp()
if (vt == -1) then
return
end
--p = GetRestSP()
--RollbackSkill()
UpdateSkill()
--AddMagicPoint(-p)
if (HaveMagic(skills9x[vt][4][2]) ~= -1) then
AddMagic(skills9x[vt][4][2],GetTask(63))
SetTask(69,skills9x[vt][4][2])
SetTask(70,3)
Msg2Player("B¹n ®· vµo tr¹ng th¸i tu luyÖn kü n¨ng"..skills9x[vt][4][1].." !");
KickOutSelf()
else
Talk(1,"no","Ng¬i cha häc kü n¨ng <color=red>"..skills9x[vt][4][1].." ,<color> kh«ng thÓ tu luyÖn")
end
end
function kttlkn()
if GetTask(20) < 1 then
kncs = 0
elseif GetTask(20) >= 1 then
kncs = CSTABLE[GetTask(20)][5]
end
if (GetTask(69) ~= 0) then
--knlv = GetLevel()-1
--RollbackSkill()
--vlmt = GetTask(16)
--AddMagicPoint(knlv+vlmt+kncs)
UpdateSkill()
vt = ktmp()
if (vt ~= -1) then
sl = getn(skills9x[vt])
if (sl == 3) then
if (HaveMagic(skills9x[vt][2][2]) ~= -1) then
AddMagic(skills9x[vt][2][2],GetMagicLevel(skills9x[vt][2][2]))
end
if (HaveMagic(skills9x[vt][3][2]) ~= -1) then
AddMagic(skills9x[vt][3][2],GetMagicLevel(skills9x[vt][3][2]))
end
elseif (sl == 4) then
if (HaveMagic(skills9x[vt][2][2]) ~= -1) then
AddMagic(skills9x[vt][2][2],GetMagicLevel(skills9x[vt][2][2]))
end
if (HaveMagic(skills9x[vt][3][2]) ~= -1) then
AddMagic(skills9x[vt][3][2],GetMagicLevel(skills9x[vt][3][2]))
end
if (HaveMagic(skills9x[vt][4][2]) ~= -1) then
AddMagic(skills9x[vt][4][2],GetMagicLevel(skills9x[vt][4][2]))
end
end
kl = getn(skills15[vt])
if (kl == 3) then
if (HaveMagic(skills15[vt][2][2]) ~= -1) then
AddMagic(skills15[vt][2][2],GetMagicLevel(skills15[vt][2][2]))
end
if (HaveMagic(skills15[vt][3][2]) ~= -1) then
AddMagic(skills15[vt][3][2],GetMagicLevel(skills15[vt][3][2]))
end
elseif(kl == 4) then
if (HaveMagic(skills15[vt][2][2]) ~= -1) then
AddMagic(skills15[vt][2][2],GetMagicLevel(skills15[vt][2][2]))
end
if (HaveMagic(skills15[vt][3][2]) ~= -1) then
AddMagic(skills15[vt][3][2],GetMagicLevel(skills15[vt][3][2]))
end
if (HaveMagic(skills15[vt][4][2]) ~= -1) then
AddMagic(skills15[vt][4][2],GetMagicLevel(skills15[vt][4][2]))
end
end
end
SetTask(69,0)
SetTask(70,0)
Msg2Player("B¹n ®· kÕt thóc tr¹ng th¸i tu luyÖn kü n¨ng !");
KickOutSelf()
else
Talk(1,"no","Ng¬i kh«ng trong tr¹ng th¸i <color=red>tu luyÖn kü n¨ng<color> kh«ng thÓ kÕt thóc tu luyÖn")
end
end
function roikhoi()
Say("Ng¬i ch¾c ch¾c muèn rêi khái ®©y chø ?",2,"Ta rêi khái/roikhoi1","Tho¸t/Exit")
end
function roikhoi1()
Msg2Player("B¹n ®· rêi khái ®¶o tÈy tñy !");
NewWorld(53,200*8,200*16);
SetRevPos(19);
SetFightState(0)
SetTask(71,1)
end
function taykinang()
vlmt = GetTask(15)
knlv = GetLevel() - 1
vt = ktmp()
sl = getn(skills9x[vt])
kl = getn(skills15[vt])
if (vt ~= -1) then
if (sl == 3) then
al = GetMagicLevel(skills9x[vt][2][2])
bl = GetMagicLevel(skills9x[vt][3][2])
elseif (sl == 4) then
al = GetMagicLevel(skills9x[vt][2][2])
bl = GetMagicLevel(skills9x[vt][3][2])
cl = GetMagicLevel(skills9x[vt][4][2])
end
if (kl == 3) then
dl = GetMagicLevel(skills15[vt][2][2])
el = GetMagicLevel(skills15[vt][3][2])
elseif(kl == 4) then
fl = GetMagicLevel(skills15[vt][4][2])
dl = GetMagicLevel(skills15[vt][2][2])
el = GetMagicLevel(skills15[vt][3][2])
end
end
RollbackSkill()
AddMagicPoint(-GetMagicPoint())
diemkinang = vlmt + knlv
AddMagicPoint(diemkinang)
UpdateSkill()
--if (vt ~= -1) then
--sl = getn(skills9x[vt])
--if (sl == 3) then
--if (HaveMagic(skills9x[vt][2][2]) ~= -1) then
--AddMagic(skills9x[vt][2][2],al)
--end
--if (HaveMagic(skills9x[vt][3][2]) ~= -1) then
--AddMagic(skills9x[vt][3][2],bl)
--end
--elseif (sl == 4) then
--if (HaveMagic(skills9x[vt][2][2]) ~= -1) then
--AddMagic(skills9x[vt][2][2],al)
--end
--if (HaveMagic(skills9x[vt][3][2]) ~= -1) then
--AddMagic(skills9x[vt][3][2],bl)
--end
--if (HaveMagic(skills9x[vt][4][2]) ~= -1) then
--AddMagic(skills9x[vt][4][2],cl)
--end
--end
--kl = getn(skills15[vt])
--if (kl == 3) then
--if (HaveMagic(skills15[vt][2][2]) ~= -1) then
--AddMagic(skills15[vt][2][2],dl)
--end
--if (HaveMagic(skills15[vt][3][2]) ~= -1) then
--AddMagic(skills15[vt][3][2],el)
--end
--elseif(kl == 4) then
--if (HaveMagic(skills15[vt][2][2]) ~= -1) then
--AddMagic(skills15[vt][2][2],dl)
--end
--if (HaveMagic(skills15[vt][3][2]) ~= -1) then
--AddMagic(skills15[vt][3][2],el)
--end
--if (HaveMagic(skills15[vt][4][2]) ~= -1) then
--AddMagic(skills15[vt][4][2],fl)
--end
--end
--end
if (HaveMagic(344)>=0 ) then
AddMagic(344,1)
end
Talk(1,"KickOutSelf","TÈy tñy kü n¨ng thµnh c«ng !")
end
function taykinang1()
if (GetItemCount(17) >= 1) and (GetItemCount(18) >= 1) and (GetItemCount(19) >= 1) then
DelItem(17)
DelItem(18)
DelItem(19)
vlmt = GetTask(16)
knlv = GetLevel() - 1
vt = ktmp()
sl = getn(skills9x[vt])
kl = getn(skills15[vt])
if (vt ~= -1) then
if (sl == 3) then
al = GetMagicLevel(skills9x[vt][2][2])
bl = GetMagicLevel(skills9x[vt][3][2])
elseif (sl == 4) then
al = GetMagicLevel(skills9x[vt][2][2])
bl = GetMagicLevel(skills9x[vt][3][2])
cl = GetMagicLevel(skills9x[vt][4][2])
end
if (kl == 3) then
dl = GetMagicLevel(skills15[vt][2][2])
el = GetMagicLevel(skills15[vt][3][2])
elseif(kl == 4) then
fl = GetMagicLevel(skills15[vt][4][2])
dl = GetMagicLevel(skills15[vt][2][2])
el = GetMagicLevel(skills15[vt][3][2])
end
end
RollbackSkill()
AddMagicPoint(-GetMagicPoint())
diemkinang = vlmt + knlv
AddMagicPoint(diemkinang)
UpdateSkill()
if (vt ~= -1) then
--sl = getn(skills9x[vt])
if (sl == 3) then
if (HaveMagic(skills9x[vt][2][2]) ~= -1) then
AddMagic(skills9x[vt][2][2],al)
end
if (HaveMagic(skills9x[vt][3][2]) ~= -1) then
AddMagic(skills9x[vt][3][2],bl)
end
elseif (sl == 4) then
if (HaveMagic(skills9x[vt][2][2]) ~= -1) then
AddMagic(skills9x[vt][2][2],al)
end
if (HaveMagic(skills9x[vt][3][2]) ~= -1) then
AddMagic(skills9x[vt][3][2],bl)
end
if (HaveMagic(skills9x[vt][4][2]) ~= -1) then
AddMagic(skills9x[vt][4][2],cl)
end
end
--kl = getn(skills15[vt])
if (kl == 3) then
if (HaveMagic(skills15[vt][2][2]) ~= -1) then
AddMagic(skills15[vt][2][2],dl)
end
if (HaveMagic(skills15[vt][3][2]) ~= -1) then
AddMagic(skills15[vt][3][2],el)
end
elseif(kl == 4) then
if (HaveMagic(skills15[vt][2][2]) ~= -1) then
AddMagic(skills15[vt][2][2],dl)
end
if (HaveMagic(skills15[vt][3][2]) ~= -1) then
AddMagic(skills15[vt][3][2],el)
end
if (HaveMagic(skills15[vt][4][2]) ~= -1) then
AddMagic(skills15[vt][4][2],fl)
end
end
end
if (HaveMagic(344)>=0 ) then
AddMagic(344,1)
end
Talk(1,"KickOutSelf","TÈy tñy kü n¨ng thµnh c«ng !")
else
Talk(1,"no","C¸c h¹ kh«ng cã ®ñ <color=pink>Tö Thñy Tinh<color>, <color=blue>Lam Thñy Tinh<color>, <color=green>Lôc Thñy Tinh<color>")
end
end
function UpdateSkill()
SetTask(62,0)
SetTask(63,0)
SetTask(70,0)
end
as={
{35,25,25,15}, -- kim
{20,35,20,25}, -- moc
{25,25,25,25}, -- thuy
{30,20,30,20}, -- hoa
{20,15,25,40}, -- tho
}
function ResetAP()
player_series = GetSeries() + 1;
SetBasePoint(as[player_series][1],as[player_series][2],as[player_series][3],as[player_series][4]); --tiem nang mac dinh
end;
function taytiemnang()
tnlevel = (GetLevel() - 1) * 5
--if GetTask(197) >= 1 then
--tncs = CSTABLE[GetTask(197)][4]
--else
--tncs = 0
--end
ttk = GetTask(15) * 5
--AddProp(- GetProp())
TayDiem()
--sum = tnlevel+ttk+tncs
sum = tnlevel+ttk
--AddProp(sum)
Talk(1,"KickOutSelf","TÈy tñy tiÒm n¨ng thµnh c«ng !")
end
function taytiemnang1()
if GetItemCount(20) >= 6 then
for i=1,6 do
DelItem(20)
end
tnlevel = (GetLevel() - 1) * 5
--if GetTask(197) >= 1 then
--tncs = CSTABLE[GetTask(197)][4]
--else
--tncs = 0
--end
ttk = GetTask(15) * 5
--AddProp(- GetProp())
TayDiem()
--sum = tnlevel+ttk+tncs
sum = tnlevel+ttk
--AddProp(sum)
Talk(1,"KickOutSelf","TÈy tñy tiÒm n¨ng thµnh c«ng !")
else
Talk(1,"no","C¸c h¹ kh«ng cã ®ñ <color=red>6 Tinh Hång B¶o Th¹ch<color>")
end
end
---------------------------------------------Luyen 150--------------------------------
function l15x()
if (GetTask(69) == 0) then
vt = ktmp()
if (vt == -1) then
return
end
sl = getn(skills15[vt])
if (sl == 3) then
Say("<color=blue>Ph¶n T¨ng:<color> Ng¬i h·y lùa chän kü n¨ng cÇn tu luyÖn",3,skills15[vt][2][1].."/sk15",skills15[vt][3][1].."/sk25","Tho¸t/no")
elseif (sl == 4) then
Say("<color=blue>Ph¶n T¨ng:<color> Ng¬i h·y lùa chän kü n¨ng cÇn tu luyÖn",4,skills15[vt][2][1].."/sk15",skills15[vt][3][1].."/sk25",skills15[vt][4][1].."/sk35","Tho¸t/no")
end
else
Talk(1,"no","Ng¬i ®ang trong tr¹ng th¸i <color=red>tu luyÖn kü n¨ng,<color> ph¶i kÕt thóc tu luyÖn míi cã thÓ lùa chän !")
end
end
function sk15()
vt = ktmp()
if (vt == -1) then
return
end
--p = GetRestSP()
--RollbackSkill()
UpdateSkill5()
--AddMagicPoint(-p)
if (HaveMagic(skills15[vt][2][2]) ~= -1) then
AddMagic(skills15[vt][2][2],GetTask(64))
SetTask(69,skills15[vt][2][2])
SetTask(70,1)
Msg2Player("B¹n ®· vµo tr¹ng th¸i tu luyÖn kü n¨ng"..skills15[vt][2][1].." !");
KickOutSelf()
else
Talk(1,"no","Ng¬i cha häc kü n¨ng <color=red>"..skills15[vt][2][1].." ,<color> kh«ng thÓ tu luyÖn")
end
end
function sk25()
vt = ktmp()
if (vt == -1) then
return
end
--p = GetRestSP()
--RollbackSkill()
UpdateSkill5()
--AddMagicPoint(-p)
if (HaveMagic(skills15[vt][3][2]) ~= -1) then
AddMagic(skills15[vt][3][2],GetTask(65))
SetTask(69,skills15[vt][3][2])
SetTask(70,2)
Msg2Player("B¹n ®· vµo tr¹ng th¸i tu luyÖn kü n¨ng"..skills15[vt][3][1].." !");
KickOutSelf()
else
Talk(1,"no","Ng¬i cha häc kü n¨ng <color=red>"..skills15[vt][3][1].." ,<color> kh«ng thÓ tu luyÖn")
end
end
function sk35()
vt = ktmp()
if (vt == -1) then
return
end
--p = GetRestSP()
--RollbackSkill()
UpdateSkill5()
--AddMagicPoint(-p)
if (HaveMagic(skills15[vt][4][2]) ~= -1) then
AddMagic(skills15[vt][4][2],GetTask(66))
SetTask(69,skills15[vt][4][2])
SetTask(70,3)
Msg2Player("B¹n ®· vµo tr¹ng th¸i tu luyÖn kü n¨ng"..skills15[vt][4][1].." !");
KickOutSelf()
else
Talk(1,"no","Ng¬i cha häc kü n¨ng <color=red>"..skills15[vt][4][1].." ,<color> kh«ng thÓ tu luyÖn")
end
end
function UpdateSkill5()
SetTask(65,0)
SetTask(66,0)
SetTask(70,0)
end
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.