thaihoa91
05-06-12, 02:11 PM
Hàm lặp tiện lợi vì gọn hơn nhưng sẽ có những npc chui vào góc lag + gốc cây + gốc đá mà đứng chơi :D
còn add bằng tool thì độ chính xác cao hơn
Kết hợp giữa mảng và hàm lặp thì sẽ ổn hơn ! Code mẫu
--Author: thaihoa91
Include("\\Script\\global\\serverlib.lua");
QUAIBALANGHUYEN = {
{212,202,12,8},
{213,203,7,4},
{212,204,11,2},
{216,203,2,2},
{215,203,8,6},
{213,203,6,11},
{217,202,2,12},
{218,202,4,12},
{218,203,10,11},
{217,203,12,7},
{212,201,7,8},
{209,202,7,2},
{217,202,11,12},
{210,200,12,12},
{214,203,2,11},
{211,201,12,1},
{214,203,10,8},
{215,204,10,2},
{215,204,2,5},
{209,201,8,8},
{215,204,5,13},
{219,202,7,11},
{218,202,11,12},
{219,202,7,5},
{209,202,9,11},
{219,199,3,13},
{220,199,3,13},
{212,184,6,5},
{212,183,7,7},
{211,182,8,3},
{220,200,6,12},
{219,200,11,10},
{220,202,6,5},
{219,201,12,8},
{221,203,9,6},
{222,204,5,3},
{222,204,13,12},
{222,205,12,10},
{223,206,5,6},
{222,206,3,2},
{221,200,5,3},
{218,201,13,5},
{223,199,2,13},
{221,199,9,7},
{221,194,3,8},
{222,194,6,12},
{223,195,3,6},
{223,194,11,7},
{223,193,12,9},
{224,192,3,9},
{223,191,9,9},
{222,191,8,6},
{221,191,4,11},
{220,192,5,11},
{223,190,9,4},
{225,189,5,13},
{223,188,11,12},
{222,188,13,12},
{222,188,10,4},
{221,187,13,12},
{221,187,5,11},
{221,186,6,7},
{222,185,11,8},
{223,185,11,8},
{224,186,8,7},
{225,186,7,7},
{225,184,3,5},
{223,184,11,2},
{222,183,7,2},
{221,182,2,4},
{219,182,10,5},
{219,181,4,11},
{220,182,4,2},
{219,184,3,6},
{217,185,12,3},
{217,186,6,12},
{217,186,7,6},
{215,183,11,4},
{214,182,11,8},
{211,182,12,7},
{213,181,5,11},
{219,183,10,8},
{219,182,2,10},
{212,184,4,12},
{220,196,12,9},
{221,195,6,11},
{219,195,6,9},
{219,194,13,9},
{210,185,13,11},
{210,186,10,7},
{209,186,13,3},
{208,186,12,7},
{208,186,6,10},
{208,187,6,10},
{208,188,2,7},
{208,189,3,7},
{208,191,4,3},
{208,192,4,9},
{208,193,5,12},
{208,194,13,13},
{209,195,9,11},
{210,195,12,11},
{212,195,4,3},
{213,195,4,9},
{214,196,6,3},
{215,197,2,4},
{215,198,3,4},
{214,197,6,12},
{215,197,11,4},
{214,196,11,7},
{218,199,6,3},
{218,198,6,4},
{217,197,12,8},
{217,197,11,3},
{214,187,9,2},
{215,187,12,2},
{216,187,12,2},
{217,187,10,13},
{218,188,9,8},
{220,188,2,8},
{208,182,8,11},
{207,182,12,12},
{207,183,11,9},
{207,181,4,12},
{206,182,3,4},
{204,182,9,8},
{202,182,11,8},
{202,182,4,13},
{202,182,4,3},
{203,182,12,5},
{205,183,3,6},
{205,184,2,10},
{204,185,9,10},
{204,186,1,9},
{203,187,1,5},
{201,187,12,7},
{201,188,12,8},
{202,189,4,8},
{203,190,3,9},
{204,190,9,10},
{201,190,13,3},
{202,190,3,10},
{203,190,6,2},
{204,190,11,2},
{205,188,2,11},
{205,188,2,3},
{205,188,13,6},
{207,188,7,10},
{204,187,8,5},
{205,191,8,11},
{207,192,2,2},
{208,192,4,3},
{200,189,4,10},
{199,189,4,3},
{197,187,13,13},
{197,186,7,6},
{198,186,7,3},
{200,185,12,1},
{201,184,10,5},
{201,185,11,2},
{196,184,12,1},
{196,184,8,7},
{194,185,2,11},
{194,186,2,8},
{194,187,3,8},
{195,187,9,7},
{192,184,4,3},
{193,184,2,12},
{195,182,10,12},
{194,183,6,3},
{174,185,13,4},
{176,184,7,7},
{177,183,9,11},
{178,183,13,10},
{180,183,5,10},
{181,183,6,10},
{182,183,9,10},
{182,182,12,10},
{182,182,7,2},
{186,181,4,13},
{183,182,10,3},
{179,183,8,4},
{176,182,10,4},
{174,184,9,8},
{175,188,5,10},
{174,186,12,5},
{176,186,12,10},
{178,186,7,13},
{179,187,7,7},
{182,187,11,13},
{182,186,11,5},
{184,188,6,9},
{185,187,11,6},
{186,186,9,9},
{189,186,2,10},
{190,186,10,13},
{192,187,6,8},
{188,184,9,4},
{188,185,10,6},
{197,190,5,3},
{195,190,10,4},
{193,190,7,4},
{193,188,9,4},
{194,190,5,8},
{191,190,12,12},
{188,191,6,7},
{188,192,11,3},
{188,191,11,9},
{205,203,5,9},
{204,203,8,12},
{204,204,11,5},
{205,203,8,13},
{206,205,3,11},
{207,205,3,12},
{207,204,5,7},
{206,205,11,3},
{187,193,3,2},
{186,194,9,1},
{185,195,12,10},
{185,193,12,1},
{185,192,5,4},
{183,191,11,4},
{183,192,2,4},
{182,190,11,11},
{180,190,3,8},
{181,190,10,8},
{179,192,4,2},
{177,192,12,6},
{177,193,12,9},
{176,194,13,6},
{176,195,4,2},
{175,196,11,3},
{175,197,7,3},
{175,196,13,12},
{174,193,9,2},
{174,193,5,9},
{175,191,10,10},
{175,192,2,5},
{176,189,6,10},
{176,190,6,8},
{175,188,2,4},
{175,189,6,4},
{174,188,13,13},
{184,196,12,4},
{184,197,7,3},
{183,197,8,10},
{182,198,10,11},
{183,199,3,7},
{182,198,6,4},
{182,193,12,6},
{182,194,13,13},
{181,195,3,10},
{180,194,5,3},
{179,196,1,5},
{178,198,12,10},
{177,199,5,7},
{176,201,12,3},
{176,201,6,9},
{177,201,8,9},
{174,202,5,1},
{174,203,5,3},
{174,204,9,10},
{176,204,3,3},
{177,204,8,3},
{177,205,8,4},
{177,206,9,5},
{175,207,10,4},
{174,208,9,10},
{175,209,8,12},
{176,210,8,12},
{178,207,7,10},
{177,208,4,13},
{180,206,8,13},
{179,207,8,8},
{182,204,6,11},
{181,205,4,9},
{184,205,4,5},
{183,204,6,12},
{185,205,6,9},
{187,205,7,9},
{188,206,2,4},
{189,206,3,4},
{189,206,11,11},
{188,206,11,12},
{186,205,5,10},
{186,207,7,10},
{186,207,11,2},
{187,206,8,11},
{183,201,7,2},
{182,201,8,11},
{181,202,13,12},
{181,203,12,10},
{180,203,11,10},
{179,203,6,8},
{178,203,4,8},
{184,201,10,8},
{184,202,7,9},
{184,203,9,11},
{185,200,13,8},
{187,201,1,6},
{187,202,3,6},
{187,203,2,5},
{187,204,1,2},
{187,204,1,10},
{188,202,9,6},
{189,202,10,10},
{189,203,12,10},
{189,205,13,6},
{190,203,13,7},
{192,203,3,8},
{191,203,4,11},
{192,205,13,6},
{192,206,13,3},
{192,206,3,9},
{190,206,9,6},
{193,207,5,2},
{196,204,2,9},
{197,205,1,3},
{196,206,12,6},
{196,207,9,5},
{195,206,7,10},
{194,207,11,5},
{197,207,9,11},
{198,207,7,6},
{199,207,8,11},
{201,208,5,3},
{202,207,12,12},
{202,206,12,13},
{204,206,2,7},
{205,206,8,9},
{179,213,10,4},
{180,212,9,12},
{179,213,4,11},
{179,212,3,9},
{177,213,8,7},
{177,214,8,12},
{177,214,3,3},
{180,213,2,11},
{180,212,10,5},
{183,212,12,8},
{184,212,13,9},
{186,212,3,2},
{186,211,5,2},
{187,211,2,4},
{188,211,6,6},
{189,211,12,12},
{189,212,6,11},
{189,213,10,11},
{191,214,3,2},
{191,214,9,5},
{192,213,6,12},
{192,213,11,2},
{191,212,8,3},
{194,212,9,5},
{193,212,8,9},
{194,211,7,12},
{199,213,8,7},
{199,214,9,5},
{199,215,13,3},
{200,215,10,8},
{199,215,10,9},
{200,214,2,11},
{203,214,4,6},
{203,213,3,8},
{203,212,11,7},
{203,212,2,7},
{202,212,8,2},
{201,212,4,5},
{200,212,5,13},
{205,214,13,10},
{205,214,7,6},
{205,214,7,12},
{206,214,6,5},
{207,212,7,5},
{208,212,6,10},
{208,213,13,8},
{209,213,7,9},
{208,213,10,3},
{206,212,7,3},
{204,212,6,3},
{203,208,8,4},
{204,209,8,9},
{205,210,13,2},
{207,209,7,7},
{207,208,11,5},
{205,207,13,5},
{208,207,8,10},
{210,207,4,11},
{210,206,2,13},
{211,205,4,9},
{211,204,9,9},
{213,206,2,5},
{214,205,7,12},
{214,207,4,5},
{214,208,3,4},
{212,209,8,5},
{211,209,2,12},
{210,208,11,13},
{211,210,2,11},
{213,210,5,12},
{213,211,11,8},
{214,212,8,4},
{213,212,8,10},
{215,212,10,10},
{216,213,5,11},
{216,214,4,13},
{217,213,13,2},
{220,211,11,2},
{220,208,12,7},
{219,212,3,7},
{221,212,1,6},
{222,213,9,5},
{224,211,5,12},
{223,212,8,6},
{218,204,12,9},
{219,205,2,7},
{220,206,7,3},
{217,206,3,11},
{217,208,6,3},
{217,208,3,12},
{216,209,5,3},
{224,211,12,9},
{220,210,11,1},
{220,211,4,10},
{223,208,3,10},
{225,207,5,7},
{225,206,9,6},
{217,209,5,6},
{216,208,13,6},
{218,208,9,8},
{221,209,3,2},
{213,206,9,12},
{191,190,10,5},
{191,191,8,7}
}
function KhoiTaoBaLanghuyen()
for i=1, getn(QUAIBALANGHUYEN) do
IDQuaiBaLang = random(0,14)
AddNPCEx(IDQuaiBaLang,9,53,QUAIBALANGHUYEN[i][1],QUAIBALANGHUYEN[i][2],QUAIBALANGHUYEN[i][3],QUAIBALANGHUYEN[i][4],"\\script\\death\\QuaiBaLang.lua",5)
end
end;
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.