PDA

View Full Version : [Script ] Phù Tự Do



davidtuan25
26-12-11, 08:40 AM
Hihi , mới làm được cái script hông biết giúp ít được gì hông nhưng share cho anh em chơi
Phù đa năng [ Có thể tự đến nơi chọn tọa độ ]

Include("\\Script\\loanchien\\addquailoanchien.lua")


function Move(nMap,nX,nY,nOffsetX,nOffsetY,nFightState)
if (nOffsetX==nil) then nOffsetX=0 end
if (nOffsetY==nil) then nOffsetY=0 end
posx = floor((nX+nOffsetX/10)*8)
posy = floor((nY+nOffsetY/10)*16)
NewWorld(nMap, posx, posy);
SetFightState(nFightState);
end;


function main()
SayEx({"Ban muon su dung gi o Vo Anh Phu ?",
"Di Chuyen /nn",
end


function nn()
abc = "Chua co"
Say("<color=cyan>Toa do muon di chuyen:<color> Toa do X : <color=yellow>"..abc.."<color>",11,"0/luupass","1/luupass","2/luupass","3/luupass","4/luupass","5/luupass","6/luupass","7/luupass","8/luupass","9/luupass","Thoat./no");
end

function luupass(sel)
n = sel + 1
if n == 1 then
a = 0
SetTask(181,a)
nn2()
elseif n == 2 then
a = 1
SetTask(181,a)
nn2()
elseif n == 3 then
a = 2
SetTask(181,a)
nn2()
elseif n == 4 then
a = 3
SetTask(181,a)
nn2()
elseif n == 5 then
a = 4
SetTask(181,a)
nn2()
elseif n == 6 then
a = 5
SetTask(181,a)
nn2()
elseif n == 7 then
a = 6
SetTask(181,a)
nn2()
elseif n == 8 then
a = 7
SetTask(181,a)
nn2()
elseif n == 9 then
a = 8
SetTask(181,a)
nn2()
elseif n == 10 then
a = 9
SetTask(181,a)
nn2()
end
end

function nn2()
Say("<color=cyan><color>\nToa do : <color=yellow>"..a.." ? <color>",11,"0/luupas","1/luupas","2/luupas","3/luupas","4/luupas","5/luupas","6/luupas","7/luupas","8/luupas","9/luupas","Thoat./no");
end

function luupas(sel)
m = sel + 1
if m == 1 then
b = 0
mm()
elseif m == 2 then
b = 1
SetTask(182,b)
mm()
elseif m == 3 then
b = 2
SetTask(182,b)
mm()
elseif m == 4 then
b = 3
SetTask(182,b)
mm()
elseif m == 5 then
b = 4
SetTask(182,b)
mm()
elseif m == 6 then
b = 5
SetTask(182,b)
mm()
elseif m == 7 then
b = 6
SetTask(182,b)
mm()
elseif m == 8 then
b = 7
SetTask(182,b)
mm()
elseif m == 9 then
b = 8
SetTask(182,b)
mm()
elseif m == 10 then
b = 9
SetTask(182,b)
mm()
end
end

function mm()
Say("<color=cyan><color>\nToa do : <color=yellow>"..a..""..b.." ? <color>",11,"0/luupa","1/luupa","2/luupa","3/luupa","4/luupa","5/luupa","6/luupa","7/luupa","8/luupa","9/luupa","Thoat./no");
end

function luupa(sel)
v = sel + 1
if v == 1 then
c = 0
SetTask(183,c)
xx()
elseif v == 2 then
c = 1
SetTask(183,c)
xx()
elseif v == 3 then
c = 2
SetTask(183,c)
xx()
elseif v == 4 then
c = 3
SetTask(183,c)
xx()
elseif v == 5 then
c = 4
SetTask(183,c)
xx()
elseif v == 6 then
c = 5
SetTask(183,c)
xx()
elseif v == 7 then
c = 6
SetTask(183,c)
xx()
elseif v == 8 then
c = 7
SetTask(183,c)
xx()
elseif v == 9 then
c = 8
SetTask(183,c)
xx()
elseif v == 10 then
c = 9
SetTask(183,c)
xx()
end
end

function xx()
hjk = "Chua co"
Say("<color=cyan>Toa do muon di chuyen:\n<color> Toa do X : <color=yellow>"..a..""..b..""..c.."\n<color>Toa do Y : <color=yellow> "..hjk.." <color>",11,"0/luup","1/luup","2/luup","3/luup","4/luup","5/luup","6/luup","7/luup","8/luup","9/luup","Thoat./no");
end

function luup(sel)
d = sel + 1
if d == 1 then
h = 0
SetTask(184,h)
ff()
elseif d == 2 then
h = 1
SetTask(184,h)
ff()
elseif d == 3 then
h = 2
SetTask(184,h)
ff()
elseif d == 4 then
h = 3
SetTask(184,h)
ff()
elseif d == 5 then
h = 4
SetTask(184,h)
ff()
elseif d == 6 then
h = 5
SetTask(184,h)
ff()
elseif d == 7 then
h = 6
SetTask(184,h)
ff()
elseif d == 8 then
h = 7
SetTask(184,h)
ff()
elseif d == 9 then
h = 8
SetTask(184,h)
ff()
elseif d == 10 then
h = 9
SetTask(184,h)
ff()
end
end

function ff()
Say("<color=cyan><color>\nToa do Y : <color=yellow>"..h.." ? <color>",11,"0/luu","1/luu","2/luu","3/luu","4/luu","5/luu","6/luu","7/luu","8/luu","9/luu","Thoat./no");
end

function luu(sel)
t = sel + 1
if t == 1 then
j = 0
SetTask(185,j)
uu()
elseif t == 2 then
j = 1
SetTask(185,j)
uu()
elseif t == 3 then
j = 2
SetTask(185,j)
uu()
elseif t == 4 then
j = 3
SetTask(185,j)
uu()
elseif t == 5 then
j = 4
SetTask(185,j)
uu()
elseif t == 6 then
j = 5
SetTask(185,j)
uu()
elseif t == 7 then
j = 6
SetTask(185,j)
uu()
elseif t == 8 then
j = 7
SetTask(185,j)
uu()
elseif t == 9 then
j = 8
SetTask(185,j)
uu()
elseif t == 10 then
j = 9
SetTask(185,j)
uu()
end
end

function uu()
Say("<color=cyan><color>\nToa do Y : <color=yellow>"..h..""..j.." ? <color>",11,"0/lu","1/lu","2/lu","3/lu","4/lu","5/lu","6/lu","7/lu","8/lu","9/lu","Thoat./no");
end

function lu(sel)
e = sel + 1
if e == 1 then
k = 0
SetTask(186,k)
ll()
elseif e == 2 then
k = 1
SetTask(186,k)
ll()
elseif e == 3 then
k = 2
SetTask(186,k)
ll()
elseif e == 4 then
k = 3
SetTask(186,k)
ll()
elseif e == 5 then
k = 4
SetTask(186,k)
ll()
elseif e == 6 then
k = 5
SetTask(186,k)
ll()
elseif e == 7 then
k = 6
SetTask(186,k)
ll()
elseif e == 8 then
k = 7
SetTask(186,k)
ll()
elseif e == 9 then
k = 8
SetTask(186,k)
ll()
elseif e == 10 then
k = 9
SetTask(186,k)
ll()
end
end

function ll()
Say("<color=cyan>Toa do muon di chuyen:\n<color> Toa do X : <color=yellow>"..a..""..b..""..c.."\n<color>Toa do Y : <color=yellow> "..h..""..j..""..k.." \nHay chon cho minh mot ban do muon den :<color>",7,"Ba lang huyen/map","Tuong duong/map","Bien kinh/map","Thanh do/map","Phuong tuong/map","Duong chau/map","Thoat./no");
end

function map(sel)
w = sel + 1
nx = (""..GetTask(181)..""..GetTask(182)..""..GetTask(183).."")
ny = (""..GetTask(184)..""..GetTask(185)..""..GetTask(186).."")
if w == 1 then -- Thu tu maps 1 [ Ba lang huyen ]
map = 53 -- Id map
Msg2Player(""..GetTask(181)..""..GetTask(182)..""..GetTask(183)..","..GetTask(184)..""..GetTask(185)..""..GetTask(186).."")
NewWorld(map,(nx*8),(ny*16));
end
end

Mới làm có cái BLH thôi, có gì các bạn tự thêm vào rồi đổi lại ID map

davidtuan25
29-12-11, 06:25 PM
Script có sai gì không vậy mấy bác