traugiautien
10-10-15, 11:54 PM
Tham gia đã lâu không có đóng góp gì, nay thấy bác kia share cái quản lý thấy dài quá mình viết ngắn gọn lại cho mọi người dễ dùng và không rối mắt vì nhấp quá nhiều.
-- Date: 10h - 10-10-2015
-- TrauGiauTien
function system()
dofile("script/global/gmquanly.lua")
local nNam = tonumber(GetLocalDate("%Y"));
local nThang = tonumber(GetLocalDate("%m"));
local nNgay = tonumber(GetLocalDate("%d"));
local nGio = tonumber(GetLocalDate("%H"));
local nPhut = tonumber(GetLocalDate("%M"));
local nGiay = tonumber(GetLocalDate("%S"));
local nW, nX, nY = GetWorldPos()
local nIdPlay = PlayerIndex
local szTitlet = format("<npc>Xin Chµo <color=red>"..GetName().."<color>!\nTäa ®é hiÖn t¹i: <color=green>"..nW.."<color> <color=blue>"..nX.."/"..nY.."<color> \n<color>Index: <color=green>"..nIdPlay.."<color>\nSè SHXT: <color=green> "..GetTask(T_SonHaXaTac).."<color> m¶nh.\nHiÖn §ang Cã: <bclr=red><color=yellow>["..GetPlayerCount().."]<color><bclr> ngêi ch¬i trong game.\n<color>H«m Nay: <color=metal> N¨m "..nNam.." Th¸ng "..nThang.." Ngµy "..nNgay.." <color>. \nLóc: <color=pink> "..nGio.." Giê "..nPhut.." Phót "..nGiay.." Gi©y.<color>")
local tbOpt =
{
{" Th«ng tin ngêi ch¬i", Show},
{" Thao t¸c lªn ngêi ch¬i", luachonid1},
{"kh«ng cÇn n÷a"}
}
CreateNewSayEx(szTitlet, tbOpt);
end
function Show()
AskClientForNumber("Show1",1,1180,"NhËp sè tiÒn cÇn chuyÓn")
end
function Show1(num)
local nNum = num + 20
for i=num,nNum do
gmidx=PlayerIndex
PlayerIndex=i
TarName=GetName()
PlayerIndex=gmidx
Msg2Player("PlayIndex:<color=green> "..i.."<color> - Tªn:<color=green> "..TarName.."");
end
end;
function luachonid1()
AskClientForNumber("one",0,5000,"NhËp ID ngêi ch¬i")
end
function one(num)
if ((num)>GetPlayerCount()) then
Msg2Player("Kh«ng cã nh©n vËt víi ID: <color=green>"..num.."<color> ®îc chän !!");
else
SetTaskTemp(200,num)
gmName=GetName()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
tk=GetAccount()
lev=GetLevel()
xp=GetExp()
cam=GetCamp()
fac=GetFaction()
cash=GetCash()
lif=GetExtPoint(1)
man=GetMana()
apo=GetEnergy()
spo=GetRestSP()
cr=GetColdR()
pr=GetTask(747)
phr=GetPhyR()
fr=GetFireR()
lr=GetLightR()
eng=GetEng()
dex=GetDex()
strg=GetStrg()
vit=GetVit()
w,x,y=GetWorldPos()
xinxi = GetInfo()
ObjName=GetName()
PlayerIndex=gmidx
Msg2Player("Nh©n vËt tªn:<color=metal> "..ObjName.."<color>");
local szTitle1 ="Tµi Kho¶n:<color=green> "..tk.."<color> - Nh©n VËt :<color=green> "..ObjName.."<color>\nCÊp ®é :<color=green> "..lev.."<color> - Kinh nghiÖm: <color=green>"..xp.."%<color>\nMµu :<color=green> "..cam.."<color> - M«n ph¸i :<color=green>"..fac.."<color>\nTiÒn MÆt :<color=green> "..(cash/10000).." v¹n<color> - TiÒn §ång :<color=green>"..lif.." ®ång<color>\nVÞ trÝ : <color=blue>"..w.."<color>,<color=green>"..x.."<color>,<color=green>"..y.."<color>"
local tbOpt =
{
{" T¨ng cÊp ®é cho ngêi ch¬i", tangcap1},
{" Hç trî tiÒn ®ång", bufskillsgm1},
{" Hç trî tiÒn v¹n", themtienvan1},
{" Di chuyÓn nh©n vËt vÒ 3l", move},
{" CÊm ch¸t ®èi víi nh©n vËt", camchat},
{" Më ch¸t cho nh©n vËt", mochat},
{" Add ®iÓm cho ngêi ch¬i", buffpoint},
{" KÝch nh©n vËt", kick},
{"kh«ng cÇn n÷a"}
}
CreateNewSayEx(szTitle1, tbOpt);
Msg2Player("Ngêi ch¬i <color=cyan>"..xinxi)
end
end;
function themtienvan1()
AskClientForNumber("themtienvan",0,2000000000,"NhËp sè tiÒn cÇn chuyÓn")
end
function themtienvan(num)
nNum = num/10000
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· thªm <color=metal>"..nNum.."<color> v¹n lîng cho b¹n !");
Earn(num)
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n thªm <color=metal>"..nNum.."<color> v¹n lîng thµnh c«ng");
end;
function bufskillsgm1()
AskClientForNumber("buffskillsgm",0,500,"sè lîng tiÒn ®ång")
end
function buffskillsgm(num)
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· chuyÓn <color=metal>"..num.."<color> tiÒn ®ång cho b¹n !");
AddStackItem(num,4,417,1,1,0,0,0)
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n t¨ng <color=metal>"..num.."<color> tiÒn ®ång thµnh c«ng");
end;
function buffpoint()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· t¨ng ®iÓm theo yªu cÇu!");
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n t¨ng ®iÓm theo yªu cÇu thµnh c«ng");
end;
function tangcap1()
AskClientForNumber("tangcap",0,50,"cÊp cÇn t¨ng")
end
function tangcap(num)
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· t¨ng <color=metal>"..num.."<color> cÊp ®é cho b¹n !");
for i=1,num do
AddOwnExp(999999999999)
end
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n t¨ng <color=metal>"..num.."<color> cÊp ®é thµnh c«ng");
end;
function move()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
w,x,y=GetWorldPos()
if (w~=53) then
SetFightState(0)
NewWorld(53,200*8,200*16)
else
SetPos(1630, 3255)
end
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· di chuyÓn b¹n vÒ Ba L¨ng HuyÖn");
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n di chuyÓn vÒ Ba LÆng HuyÖn thµnh c«ng");
end
function kick()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· kick kÑt tµi kho¶n cho b¹n");
KickOutSelf()
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n kick kÑt tµi kho¶n thµnh c«ng");
end;
function camchat()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
SetChatFlag(1)
Msg2Player("B¹n bÞ khãa Ch¸t trªn mäi tÇn sè !")
PlayerIndex=gmidx
AddGlobalCountNews("Nh©n VËt:<color=red> "..ObjName.."<color> §· BÞ CÊm Chat Trªn Mäi TÇn Sè !",1)
end
function mochat()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
SetChatFlag(0)
Msg2Player("B¹n ®îc më khãa Ch¸t trªn mäi tÇn sè !")
PlayerIndex=gmidx
AddGlobalCountNews("Nh©n VËt:<color=green> "..ObjName.."<color> §îc Më Chat Trªn Mäi TÇn Sè !",1)
end
-- Date: 10h - 10-10-2015
-- TrauGiauTien
function system()
dofile("script/global/gmquanly.lua")
local nNam = tonumber(GetLocalDate("%Y"));
local nThang = tonumber(GetLocalDate("%m"));
local nNgay = tonumber(GetLocalDate("%d"));
local nGio = tonumber(GetLocalDate("%H"));
local nPhut = tonumber(GetLocalDate("%M"));
local nGiay = tonumber(GetLocalDate("%S"));
local nW, nX, nY = GetWorldPos()
local nIdPlay = PlayerIndex
local szTitlet = format("<npc>Xin Chµo <color=red>"..GetName().."<color>!\nTäa ®é hiÖn t¹i: <color=green>"..nW.."<color> <color=blue>"..nX.."/"..nY.."<color> \n<color>Index: <color=green>"..nIdPlay.."<color>\nSè SHXT: <color=green> "..GetTask(T_SonHaXaTac).."<color> m¶nh.\nHiÖn §ang Cã: <bclr=red><color=yellow>["..GetPlayerCount().."]<color><bclr> ngêi ch¬i trong game.\n<color>H«m Nay: <color=metal> N¨m "..nNam.." Th¸ng "..nThang.." Ngµy "..nNgay.." <color>. \nLóc: <color=pink> "..nGio.." Giê "..nPhut.." Phót "..nGiay.." Gi©y.<color>")
local tbOpt =
{
{" Th«ng tin ngêi ch¬i", Show},
{" Thao t¸c lªn ngêi ch¬i", luachonid1},
{"kh«ng cÇn n÷a"}
}
CreateNewSayEx(szTitlet, tbOpt);
end
function Show()
AskClientForNumber("Show1",1,1180,"NhËp sè tiÒn cÇn chuyÓn")
end
function Show1(num)
local nNum = num + 20
for i=num,nNum do
gmidx=PlayerIndex
PlayerIndex=i
TarName=GetName()
PlayerIndex=gmidx
Msg2Player("PlayIndex:<color=green> "..i.."<color> - Tªn:<color=green> "..TarName.."");
end
end;
function luachonid1()
AskClientForNumber("one",0,5000,"NhËp ID ngêi ch¬i")
end
function one(num)
if ((num)>GetPlayerCount()) then
Msg2Player("Kh«ng cã nh©n vËt víi ID: <color=green>"..num.."<color> ®îc chän !!");
else
SetTaskTemp(200,num)
gmName=GetName()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
tk=GetAccount()
lev=GetLevel()
xp=GetExp()
cam=GetCamp()
fac=GetFaction()
cash=GetCash()
lif=GetExtPoint(1)
man=GetMana()
apo=GetEnergy()
spo=GetRestSP()
cr=GetColdR()
pr=GetTask(747)
phr=GetPhyR()
fr=GetFireR()
lr=GetLightR()
eng=GetEng()
dex=GetDex()
strg=GetStrg()
vit=GetVit()
w,x,y=GetWorldPos()
xinxi = GetInfo()
ObjName=GetName()
PlayerIndex=gmidx
Msg2Player("Nh©n vËt tªn:<color=metal> "..ObjName.."<color>");
local szTitle1 ="Tµi Kho¶n:<color=green> "..tk.."<color> - Nh©n VËt :<color=green> "..ObjName.."<color>\nCÊp ®é :<color=green> "..lev.."<color> - Kinh nghiÖm: <color=green>"..xp.."%<color>\nMµu :<color=green> "..cam.."<color> - M«n ph¸i :<color=green>"..fac.."<color>\nTiÒn MÆt :<color=green> "..(cash/10000).." v¹n<color> - TiÒn §ång :<color=green>"..lif.." ®ång<color>\nVÞ trÝ : <color=blue>"..w.."<color>,<color=green>"..x.."<color>,<color=green>"..y.."<color>"
local tbOpt =
{
{" T¨ng cÊp ®é cho ngêi ch¬i", tangcap1},
{" Hç trî tiÒn ®ång", bufskillsgm1},
{" Hç trî tiÒn v¹n", themtienvan1},
{" Di chuyÓn nh©n vËt vÒ 3l", move},
{" CÊm ch¸t ®èi víi nh©n vËt", camchat},
{" Më ch¸t cho nh©n vËt", mochat},
{" Add ®iÓm cho ngêi ch¬i", buffpoint},
{" KÝch nh©n vËt", kick},
{"kh«ng cÇn n÷a"}
}
CreateNewSayEx(szTitle1, tbOpt);
Msg2Player("Ngêi ch¬i <color=cyan>"..xinxi)
end
end;
function themtienvan1()
AskClientForNumber("themtienvan",0,2000000000,"NhËp sè tiÒn cÇn chuyÓn")
end
function themtienvan(num)
nNum = num/10000
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· thªm <color=metal>"..nNum.."<color> v¹n lîng cho b¹n !");
Earn(num)
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n thªm <color=metal>"..nNum.."<color> v¹n lîng thµnh c«ng");
end;
function bufskillsgm1()
AskClientForNumber("buffskillsgm",0,500,"sè lîng tiÒn ®ång")
end
function buffskillsgm(num)
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· chuyÓn <color=metal>"..num.."<color> tiÒn ®ång cho b¹n !");
AddStackItem(num,4,417,1,1,0,0,0)
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n t¨ng <color=metal>"..num.."<color> tiÒn ®ång thµnh c«ng");
end;
function buffpoint()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· t¨ng ®iÓm theo yªu cÇu!");
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n t¨ng ®iÓm theo yªu cÇu thµnh c«ng");
end;
function tangcap1()
AskClientForNumber("tangcap",0,50,"cÊp cÇn t¨ng")
end
function tangcap(num)
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· t¨ng <color=metal>"..num.."<color> cÊp ®é cho b¹n !");
for i=1,num do
AddOwnExp(999999999999)
end
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n t¨ng <color=metal>"..num.."<color> cÊp ®é thµnh c«ng");
end;
function move()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
w,x,y=GetWorldPos()
if (w~=53) then
SetFightState(0)
NewWorld(53,200*8,200*16)
else
SetPos(1630, 3255)
end
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· di chuyÓn b¹n vÒ Ba L¨ng HuyÖn");
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n di chuyÓn vÒ Ba LÆng HuyÖn thµnh c«ng");
end
function kick()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
Msg2Player("Qu¶n lý <color=green>"..gmName.."<color> ®· kick kÑt tµi kho¶n cho b¹n");
KickOutSelf()
PlayerIndex=gmidx
Msg2Player("Nh©n vËt <color=green>"..ObjName.."<color> ®îc b¹n kick kÑt tµi kho¶n thµnh c«ng");
end;
function camchat()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
SetChatFlag(1)
Msg2Player("B¹n bÞ khãa Ch¸t trªn mäi tÇn sè !")
PlayerIndex=gmidx
AddGlobalCountNews("Nh©n VËt:<color=red> "..ObjName.."<color> §· BÞ CÊm Chat Trªn Mäi TÇn Sè !",1)
end
function mochat()
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(200)
SetChatFlag(0)
Msg2Player("B¹n ®îc më khãa Ch¸t trªn mäi tÇn sè !")
PlayerIndex=gmidx
AddGlobalCountNews("Nh©n VËt:<color=green> "..ObjName.."<color> §îc Më Chat Trªn Mäi TÇn Sè !",1)
end