PDA

View Full Version : [JX] Map 14x có quái mà đánh chết k có exp sư phụ đâu cứu con !



anhphi97
19-04-13, 06:05 PM
ai giúp em vs
đây là hàm nè xem hộ em đánh chết mà k có exp
exp_14x.lua
----Tri So Exp 1 Con Quai : 80000
---- 141 --> 145 Danh 80 Con Len 1 Cap
----- 146 --> 150 : danh 90 con len 1 cap

Include("\\script\\global\\kinhnghiem\\exp.lua")
Include("\\script\\global\\kinhnghiem\\droprate.lua")
Include("\\script\\missons\\datau\\monter_drop.lua")


function OnDeath()

expmonter()
droprate()
mapsdatau()
tile = random(1,200)
if tile == 10 or tile == 102 then
w,x,y=GetWorldPos()
toadox = x + random(-3,3)
toadoy = y + random(-3,3)
npcmapindex= SubWorldID2Idx(w)
a = random(160,169)
boss=AddNpc(a,90,npcmapindex,toadox*32,toadoy*32)
IsBoss(boss,0)
SetNpcScript(boss, "\\script\\global\\kinhnghiem\\bossxanh.lua")
end
end




__________________________________________________ ____
còn đây là monter14x


__________________
mới vào nghề ai giúp em nhé
Cảnh cáo lần 1
Ko post cả code dài lên !

danghai1993
19-04-13, 06:43 PM
ai giúp em vs

__________________
mới vào nghề ai giúp em nhé

Lần sau bạn nhớ để code trong thẻ cuộn nhé.

Chủ yếu là file này nè: Include("\\script\\global\\kinhnghiem\\exp.lua") :-t

Quote thì cũng có đức tí nha bạn
bạn ko thấy khó chịu nhưng người khác thì có đó

phamngochai2
19-04-13, 06:44 PM
Liên quan đến "exp.lua" bạn nhé.Còn nếu mún sửa được ngay thì trong cái hàm function OnDead() ấy thêm hàm "AddOwnExp(số exp nhận được khi giết 1 con quái)".

anhphi97
19-04-13, 06:47 PM
<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>

HeThongKN={ -- map,kn,tien,level,ngu ba
{1,10000,500,20,1}, --2x
{2,20000,1000,30,1}, --3x
{3,30000,1500,40,1}, --4x
{4,100000,2000,50,1}, --5x
{5,400000,2500,60,1}, --6x
{6,800000,3000,70,1}, --7x
{7,1000000,4500,80,1}, --8x
{8,1400000,6000,90,1}, --9x
{9,1600000,8000,100,1}, --10x
{10,1800000,10000,110,1}, --11x
{11,2000000,15000,120,2}, --12x
{12,2200000,20000,130,2}, --13x
{47,2400000,30000,140,2}, --14x
{14,2600000,40000,150,2}, --15x
{15,2800000,50000,160,2}, --16x
{16,3000000,60000,170,2}, --17x
{49,3200000,70000,180,4}, --18x
{48,3400000,80000,190,4}, --19x
{46,3600000,85000,200,5},
{46,3800000,90000,250,0},

}

expvuotai={
{25,45000,5000}, --Vuot Ai 1
{26,50000,6000}, --Vuot Ai 2
{27,55000,7000}, --Vuot Ai 3
{28,60000,8000}, --Vuot Ai 4
{29,70000,9000}, --Vuot Ai 5
{30,60000,40000}, --Vuot Ai 6
{31,80000,40000}, --Vuot Ai 7
{32,100000,40000}, --Vuot Ai 8
{33,300000,70000}, --Vuot Ai 9
{34,900000,70000} --Vuot Ai 10
}

Include("\\script\\source\\sourcejx49.lua")
Include("\\Script\\source\\tasklist.lua")

function expmonter()
w,x,y = GetWorldPos()
if GetLevel() < 250 then
if w < 17 or w == 48 or w == 49 or w == 46 then
for i=1,getn(HeThongKN) do
if w == HeThongKN[i][1] then
--SetTask(14,GetTask(14)+HeThongKN[i][5])
--Msg2Player("Ban Hien Co "..GetTask(14).." Diem Ngu Ba !")
if GetLevel() >= HeThongKN[i][4] and GetLevel() < HeThongKN[i+1][4] then
if (GetTask(TaskSuDungRuou) >= 1) then
AddOwnExp(HeThongKN[i][2]*GetGlbMissionV(27)*2)
a = random(1,4)
if a == 2 then
Earn(HeThongKN[i][3])
end
else
AddOwnExp(HeThongKN[i][2]*GetGlbMissionV(27))
b = random(1,4)
if b == 2 then
Earn(HeThongKN[i][3])
end

end
elseif GetLevel() >= HeThongKN[i][4] and GetLevel() < HeThongKN[i+2][4] then -- cap hien tai - 20 > kn < cap hien tai
AddOwnExp((floor(HeThongKN[i][2]*GetGlbMissionV(27))/3),2)
c = random(1,5)
if c == 2 then
Earn(floor((HeThongKN[i][3])/3),2)
end
elseif GetLevel() >= HeThongKN[i+2][4] and GetLevel() < HeThongKN[i+4][4] then -- cap hien tai + 20 > kn < cap hien tai + 40
AddOwnExp((floor(HeThongKN[i][2]*GetGlbMissionV(27))/3),2)
d = random(1,5)
if d == 2 then
Earn(floor((HeThongKN[i][3])/3),2)
end
else
AddOwnExp(100)
--Earn(50)
end
end
end
end
end
end

danghai1993
19-04-13, 07:18 PM
<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>

HeThongKN={ -- map,kn,tien,level,ngu ba
{1,10000,500,20,1}, --2x
{2,20000,1000,30,1}, --3x
{3,30000,1500,40,1}, --4x
{4,100000,2000,50,1}, --5x
{5,400000,2500,60,1}, --6x
{6,800000,3000,70,1}, --7x
{7,1000000,4500,80,1}, --8x
{8,1400000,6000,90,1}, --9x
{9,1600000,8000,100,1}, --10x
{10,1800000,10000,110,1}, --11x
{11,2000000,15000,120,2}, --12x
{12,2200000,20000,130,2}, --13x
{47,2400000,30000,140,2}, --14x
{14,2600000,40000,150,2}, --15x
{15,2800000,50000,160,2}, --16x
{16,3000000,60000,170,2}, --17x
{49,3200000,70000,180,4}, --18x
{48,3400000,80000,190,4}, --19x
{46,3600000,85000,200,5},
{46,3800000,90000,250,0},

}

expvuotai={
{25,45000,5000}, --Vuot Ai 1
{26,50000,6000}, --Vuot Ai 2
{27,55000,7000}, --Vuot Ai 3
{28,60000,8000}, --Vuot Ai 4
{29,70000,9000}, --Vuot Ai 5
{30,60000,40000}, --Vuot Ai 6
{31,80000,40000}, --Vuot Ai 7
{32,100000,40000}, --Vuot Ai 8
{33,300000,70000}, --Vuot Ai 9
{34,900000,70000} --Vuot Ai 10
}

Include("\\script\\source\\sourcejx49.lua")
Include("\\Script\\source\\tasklist.lua")

function expmonter()
w,x,y = GetWorldPos()
if GetLevel() < 250 then
if w < 17 or w == 48 or w == 49 or w == 46 then
for i=1,getn(HeThongKN) do
if w == HeThongKN[i][1] then
--SetTask(14,GetTask(14)+HeThongKN[i][5])
--Msg2Player("Ban Hien Co "..GetTask(14).." Diem Ngu Ba !")
if GetLevel() >= HeThongKN[i][4] and GetLevel() < HeThongKN[i+1][4] then
if (GetTask(TaskSuDungRuou) >= 1) then
AddOwnExp(HeThongKN[i][2]*GetGlbMissionV(27)*2)
a = random(1,4)
if a == 2 then
Earn(HeThongKN[i][3])
end
else
AddOwnExp(HeThongKN[i][2]*GetGlbMissionV(27))
b = random(1,4)
if b == 2 then
Earn(HeThongKN[i][3])
end

end
elseif GetLevel() >= HeThongKN[i][4] and GetLevel() < HeThongKN[i+2][4] then -- cap hien tai - 20 > kn < cap hien tai
AddOwnExp((floor(HeThongKN[i][2]*GetGlbMissionV(27))/3),2)
c = random(1,5)
if c == 2 then
Earn(floor((HeThongKN[i][3])/3),2)
end
elseif GetLevel() >= HeThongKN[i+2][4] and GetLevel() < HeThongKN[i+4][4] then -- cap hien tai + 20 > kn < cap hien tai + 40
AddOwnExp((floor(HeThongKN[i][2]*GetGlbMissionV(27))/3),2)
d = random(1,5)
if d == 2 then
Earn(floor((HeThongKN[i][3])/3),2)
end
else
AddOwnExp(100)
--Earn(50)
end
end
end
end
end
end








Bạn xem chỗ này 8-> 30 charrrrrrrrrrrrrrrrrrrrr

ps1990
19-04-13, 08:09 PM
sửa cái số 47 thành 13 xem sao.hoặc xem tên map ấy là gì rồi vào maplist xem id của máp rồi chỉnh lại là okie.

anhphi97
20-04-13, 12:36 PM
ok tks mấy bác để em thữ nhé
hjhj cảm ơn mod đã nhắc tại chưa piết post code h biết r`