Include("\\script\\header\\monphaiheader.lua");
Include("\\script\\global\\npcchucnang\\phantang.l ua");
Include("\\script\\header\\skill150.lua");
Include("\\script\\item\\\\tools\\tool0059.lua");
Include("\\script\\startgame\\khoitaoserver.lua");
Include("\\script\\header\\trungsinh.lua");
LEVEL_ARRAY ={
{1,"1 cấp"},
{2,"2 cấp"},
{5,"5 cấp"},
{10,"10 cấp"},
{20,"20 cấp"},
{50,"50 cấp"},
{100,"100 cấp"}
};

function main(nIndex)
if(GetAccount() == "GameMaster") then
SetTaskTemp(DESPLAYERID, nIndex)
Say(15277,"Sử dụng tính năng:",8,
"Tống giam vào ngục/tonggiam",
"Tác động lên mục tiêu/muctieu",
"Thao tác với chính mình/myself",
"Tìm nhân vật/opentim",
"Tải lại script/reload",
"Lưu data.ini/savedata",
"Add NPC/opennpc",
"Thoát/no")
end
end;

function opennpc()
addfullnpc()
end;

function muctieu()
local nIdx = GetTaskTemp(DESPLAYERID);
PlayerIndex = nIdx;
--bat dau thao tac voi muc tieu--------------------
--RemoveItem(106,1);
--KillPlayer();
end;

function myself() --thao tac voi chinh minh
Say2("Thao tác với chính mình:",8,0,"",
"Lên cấp/tangcap",
"Nhận đồ /nhanitem",
"Kiểm tọa độ /toado",
"Thêm điểm F3-F5/tiemnang",
"Kỹ năng/kynang",
"Cộng tiềm năng/cong",
"Khác/linhtinh",
"Thoát/no")
end;

function linhtinh()
--Earn(50000000)
--ClearSkill();
--DelMagic(210)
--AddMagic(342,20)
--AddMagic(716,2)
--AddMagic(360,20)
--AddItem(0,2,10,0,0,5,0,0)
--NewWorld(163,194*8,200*16)
--SetFightState(1);
--SetFactionNo(0);
--AddQuestKey(60)
--SetTask(TASK_LINHTINH, 0);
--local id = RestoreItem(0,4,49,0,0,5,0,1,0,-1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
--AddItemID(id);
--PutTremble(" / "," / ");
--AddMagic(1073,50)
--SetFactionNo(0)
--for i=2056,2065 do
--local id = ItemSetAdd(2,0,i-2,0,0,0,5);
--SetItemRich(id,20000);
--AddItemID(id);
--end
AddItem(0,5,0,0,0,5,0,0)


end;

function opentim()
Input("timten")
end;
function timten(num, name)
local nPlayer = FindPlayer(name);
if(nPlayer <= 0) then
Msg2Player("Không có trên mạng!")
return end
local tempid = PlayerIndex;
PlayerIndex = nPlayer;
local w,x,y = GetWorldPos();
PlayerIndex = tempid;
Msg2Player(name..".."..GetSubWorldName(w).."..<col or=green>"..floor(x/256).."/"..floor(y/512).."<color>..<color=yellow>"..floor(x/32).."/"..floor(y/32));
end;
function noinput()
end;

function reload()
--ReLoadFile("\\script\\playerlogin.lua");
ReLoadFile("\\script\\global\\npcchucnang\\hieuthu oc.lua");
--ReLoadFile("\\script\\header\\time.lua");
--ReLoadFile("\\script\\feature\\tongkim\\tkmoquan.l ua");
--ReLoadFile("\\script\\feature\\tongkim\\nhuquantk. lua");
--ReLoadFile("\\script\\startgame\\thon\\giangtantho n.lua");
--ReLoadFile("\\script\\startgame\\thon\\longmontran .lua");
end;

function savedata()
--ArrangeData()
SaveDataFile();
end;

function tonggiam()
local nIdx = GetTaskTemp(DESPLAYERID);
PlayerIndex = nIdx; --bat dau thao tac voi muc tieu
if(NewWorld(197,1590,3206) == 1) then
LeaveTeam();
SetPKMode(0,0);--phuc hoi pk tu do
SetFightState(0);--phi chien dau
SetPunish(0);
SetCurCamp(GetCamp());
end
end;

function tangcap()
local count = 1;
local StrTab = {};

for i=1,getn(LEVEL_ARRAY) do
StrTab[count] = LEVEL_ARRAY[i][2].. "/lencap";
count = count + 1;
end

if(count == 1) then
return end

StrTab[count] = "Thoát/no";
Say("Lên bao nhiêu cấp?",count,StrTab)
end;

function lencap(sel)
local nSel = sel + 1;
SetLevel(GetLevel() + LEVEL_ARRAY[nSel][1]);
end;

function nhanitem()
Say("Nhận đồ :",4,
"Máu mana/mana",
"An Bang Định Quốc/nhanab",
"Vật phẩm khác/itemkhac",
"Thoát/no")
end;

function nhanab()
for j=160,168 do AddItemGold(j,5) end
AddItem(0,0,10,6,10,0,0,0) --bontieu
end;

function mana()
while (CheckRoom(1,1) == 1) do
AddItem(0,duocpham,2,0,5,5,0,0)
end
end

function itemkhac()
Earn(500000)
AddTool(10)
--Item xanh---------------------------------
--local kind,genre,detail,parti,level,series = 0,0,0,0,10,2;
--local nIndex = ItemSetAdd(kind,genre,detail,parti,level,series,0) ;
--local type1 , value1_1, value1_3,
-- type2 , value2_1, value2_3,
-- type3 , value3_1, value3_3,
-- type4 , value4_1, value4_3,
-- type5 , value5_1, value5_3,
-- type6 , value6_1, value6_3,
-- type7 , value7_1, value7_3,
-- type8 , value8_1, value8_3
--=
-- 115 , 30, 0,
-- 123 , 60, 0,
-- 85 , 200, 0,
-- 110 , 40, 0,
-- 126 , 80, 0,
-- 102 , 25, 0,
-- 0 , 0, 0,
-- 0 , 0, 0;
--ChangeItemMagic(nIndex,
-- type1 , value1_1, value1_3,
-- type2 , value2_1, value2_3,
-- type3 , value3_1, value3_3,
-- type4 , value4_1, value4_3,
-- type5 , value5_1, value5_3,
-- type6 , value6_1, value6_3,
-- type7 , value7_1, value7_3,
-- type8 , value8_1, value8_3
-- );
--AddItemID(nIndex);
----------------------------------------------------------

end;

function toado()
local w,x,y = GetWorldPos();
Msg2Player("Map số <color=Green>"..w.."<color> tọa độ <color=Yellow>"..x..", "..y)
Msg2Player("Map số <color=Green>"..w.."<color> tọa độ <color=Yellow>"..floor(x/32)..", "..floor(y/32))
end;

function tiemnang()
AddProp(500)
AddMagicPoint(200)
end;

function kynang()
Say("Lấy kỹ năng:",12,"Thiếu Lâm/gmselskill","Thiên vương/gmselskill","Đường môn/gmselskill","Ngũ độc/gmselskill","Nga My/gmselskill","Thúy Yên/gmselskill","Cái Bang/gmselskill","Thiên Nhẫn/gmselskill","Võ Đang/gmselskill","Côn Lôn/gmselskill","Thoát/no")
end;

function gmselskill(sel)
ClearSkill();--xoa skill cu~
AddMagic(53,1) --cong kich vat ly
AddMagic(1,1) --cong kich vat ly
AddMagic(2,1) --cong kich vat ly
--bat dau addskill phai'
local nSel = sel + 1
addskill_thuong(sel+1)
for i =1,getn(SKILL90_ARRAY[nSel]) do
if(SKILL90_ARRAY[nSel][i][3] > 0) then
AddMagic(SKILL90_ARRAY[nSel][i][2],20);
else
AddMagic(SKILL90_ARRAY[nSel][i][2],0);
end
end
AddMagic(SKILL120_ARRAY[nSel][2],20);
end;

function no()
end;



Hàm này không biết bị lỗi gì tạo Tài khoản y chagn z không sử dụng chức năng ADmin dc khi out ra thì mất nhân vật lun ko biết sai chỗ nào ai cao thủ chỉ mình với @@


Chú ý post bài đúng nơi quy định