PDA

View Full Version : Script Gm set Kha han va Quoc chu cho nguoi chơi



banynavy
10-08-10, 08:25 AM
;))Chỉ là trich đoạn code trong muốn cho nó chạy được tren sv bạn thì phai chinh lại Ranking va va GM.lua


function cvhd()-----------------------GM-------------------------------------------------------
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(331)
AddLocalNews("Hoang De <color=red>"..GetName().."<color>da dang co o Lam An")
Msg2MSAll("Hoang De <color=green>"..GetName().."<color>da dang co o Lam An")
SetCurCamp(8)
SetCamp(8)
SetRank(64)
AddEventItem(20)
SetLogoutRV()
Msg2Player("Hoang De <color=green>"..GetName().."<color>da dang co o Lam An")
end;
function cvkh()-----------------------GM-------------------------------------------------------
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(331)
AddLocalNews("Kha Han <color=red>"..GetName().."<color>da dang co o Bien Kinh")
Msg2MSAll("Kha Han <color=green>"..GetName().."<color>da dang co o Bien Kinh")
SetCurCamp(8)
SetCamp(8)
SetRank(63)
SetLogoutRV()
AddEventItem(20)
SetLogoutRV()
Msg2Player("Kha Han <color=green>"..GetName().."<color>da dang co o Bien Kinh")
end;
function xcvkh()-----------------------GM-------------------------------------------------------
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(331)
AddLocalNews("Kha Han <color=red>"..GetName().."<color>da chuyen vi")
Msg2MSAll("Kha Han <color=green>"..GetName().."<color>da chuyen vi")
SetCurCamp(1)
SetCamp(1)
SetRank(16)
DelItem(20)
KickOutSelf()
SetLogoutRV()
Msg2Player("Khi Thoat He Thong Tu Khoi Phuc Nhan Vat Ban Dau.")
end;
function xcvhd()-----------------------GM-------------------------------------------------------
gmidx=PlayerIndex
PlayerIndex=GetTaskTemp(331)
AddLocalNews("Hoang De <color=red>"..GetName().."<color>da da chuyen vi")
Msg2MSAll("Hoang De <color=green>"..GetName().."<color>da da chuyen vi")
SetCurCamp(1)
SetCamp(1)
SetRank(15)
DelItem(20)
SetLogoutRV()
KickOutSelf()
Msg2Player("Khi Thoat He Thong Tu Khoi Phuc Nhan Vat Ban Dau.")
end;

banynavy
10-08-10, 08:27 AM
@-)script quoc chủ

---------------------------------------------------------
----Author: banynavy
---------------------------------------------------------
Include("\\Script\\global\\sourcejx49.lua (file://\\Script\\global\\sourcejx49.lua)");
Include("\\Script\\global\\serverlib.lua (file://\\Script\\global\\serverlib.lua)");
Include("\\Script\\xaphu.lua (file://\\Script\\xaphu.lua)");
Include("\\Script\\startup_remix.lua (file://\\Script\\startup_remix.lua)");
-------------------------------------------------------------------------------------------------------------------
TENADMIN = {{"GM0001",99},{"GM0002",99},{"GM0003",99},{"GM0004",99},{"",99},{"",99}}
function GMGame()
for i = 1,getn(TENADMIN) do
if GetName() == TENADMIN[i][1] and TENADMIN[i][2] == 99 then
return 1
end
end
end;
--------------------------------------------------------------------------------------------------------------------
function mainQCxx()
if GetRank(64) == 64 then
SayEx({"<color=yellow>Hoang De<color=red>"..GetName().."<color><color>: Ban muon su dung chuc nang nao!",
"Thanh Thi Dai Hong Bao./OnTimer",
"Quyen Nang Cua Hoang De./OpenBox",
"Duy Chuyen ./xaphu",
"Mua Thuoc./thuoc",
"Lay Luong./money",
"Thoat./no"})
elseif (GetRank(63) == 63) then
SayEx({"<color=yellow>Kha Han <color=red>"..GetName().."<color><color>: Ban muon su dung chuc nang nao!",
"Thanh Thi Dai Hong Bao./OnTimer",
"Quyen Nang Cua Hoang De./OpenBox",
"Duy Chuyen ./xaphu",
"Mua Thuoc./thuoc",
"Lay Luong./money",
"Thoat./no"})
elseif GMGame() ==1 then
SayEx({"<color=yellow>GM <color=red>"..GetName().."<color><color>: Ban muon su dung chuc nang nao!",
"Thanh Thi Dai Hong Bao./OnTimer",
"Quyen Nang Cua Hoang De./OpenBox",
"Duy Chuyen ./xaphu",
"Mua Thuoc./thuoc",
"Lay Luong./money",
"Thoat./no"})
else
SayEx({"<color=yellow>Xin chao <color=red>"..GetName().."<color><color>:He thong da nham lan!",
"Khong co chi./delskill",
"Thoat./no"})
end
end;
function OnTimer()-- HONG BAO VAO LUC 23H
gio = {23}
getnowgio = tonumber(date("%H"))
getnowphut = tonumber(date("%M"))
for i = 1,getn(gio) do
if getnowgio == gio[i] and getnowphut == 15 then
mohongbaoxx()
elseif getnowgio == gio[i] and getnowphut == 20 then
mohongbaoxx()
elseif getnowgio == gio[i] and getnowphut == 25 then
mohongbaoxx()
else
donghongbao()
end
end
end;
function money()-- Lay Luong
if (HaveItem(20) == 1)then
Earn(100000000)
DelItem(20)
Talk(1,"","Cac ha da nhan duoc 100,000,000 luong")
else
Talk(1,"","Cac ha khong du ngan luong !")
end
end;
function donghongbao()--close hong bao
if GetRank(64) == 64 then
SayEx({"<color=yellow>Hoang De<color=red>"..GetName().."<color><color>Chua den gio mo hong bao",
"Thoat./no"})
Msg2Player("Thoi gian mo hong bao la:†23h15† & †23h20† & †23h30† trong ngay.")
Talk(1,"","Thoi gian mo hong bao la:†23h15† & †23h20† & †23h30† trong ngay.")
elseif GetRank(63) == 63 then
SayEx({"<color=yellow>Kha Han<color=red>"..GetName().."<color><color>Chua den gio mo hong bao",
"Thoat./no"})
Msg2Player("Thoi gian mo hong bao la:†23h15† & †23h20† & †23h30† trong ngay.")
Talk(1,"","Thoi gian mo hong bao la:†23h15† & †23h20† & †23h30† trong ngay.")
else
Msg2Player("Thoi gian mo hong bao la:†23h15† & †23h20† & †23h30† trong ngay.")
Talk(1,"","Thoi gian mo hong bao la:†23h15† & †23h20† & †23h30† trong ngay.")
end
end;
function thuoc()---open hieu thuoc
if (GetCash() >= 1000000) then
Pay(1000000)
for i=1,60 do AddItem(1,2,0,5,0,0,0) end
Talk(1,"","Cac ha da nhan duoc thuoc")
else
Talk(1,"","Cac ha khong du ngan luong !")
end
end;
function mohongbaoxx()--open hong bao
if GetTask(TaskDaoHanh) <= 300000 then
i = random(1,300)
if i <= 100 then
AddOwnExp(1000*i)
Msg2Player("Nhan duoc "..(1000*i).." diem kinh nghiem.")
elseif i > 100 and i < 150 then
a = random(55,64)
AddEventItem(a)
Msg2Player("Nhan duoc mot vien huyen tinh cap "..(a-54)..".")
elseif i >= 150 and i < 200 then
AddEventItem(0)
Msg2Player("Nhan duoc Tay Tuy Kinh.")
elseif i >= 200 and i < 210 then
AddEventItem(1)
Msg2Player("Nhan duoc Ban Nguoc Tam Kinh.")
elseif i >= 210 and i < 220 then
AddEventItem(2)
Msg2Player("Nhan duoc Thiet La Han.")
elseif i >= 220 and i < 230 then
AddEventItem(85)
Msg2Player("Nhan duoc Vo Lam Mat Tich")
elseif i >= 230 and i < 240 then
AddEventItem(8)
Msg2Player("Nhan duoc Lam Thuy Tinh")
elseif i >= 240 and i < 250 then
AddEventItem(9)
Msg2Player("Nhan duoc Tu Thuy Tinh")
elseif i >= 250 and i < 260 then
AddEventItem(10)
Msg2Player("Nhan duoc Luc Thuy Tinh")
elseif i >= 260 and i < 270 then
AddEventItem(11)
Msg2Player("Nhan duoc Tinh Hong Bao Thach")
elseif i >= 270 and i < 280 then
a = random(3,9)
persen = a/3
if persen == 1 then
AddEventItem(5)
MsgEx("Nhan duoc Phuc Duyen Dai")
elseif persen == 2 then
AddEventItem(4)
MsgEx("Nhan duoc Phuc Duyen Trung")
elseif persen == 3 then
AddEventItem(3)
MsgEx("Nhan duoc Phuc Duyen Tieu")
else
Earn(5000*a)
MsgEx("Nhan duoc "..(5000*a).." luong")
end
elseif i >= 280 and i < 290 then
n = random(65,74)
AddEventItem(n)
MsgEx("Nhan duoc mot cuon bi kip 120")
Msg2MSAll("["..GetName().."] lay duoc 1 cuon bi kip 120")
elseif i >= 290 and i < 300 then
k = random(45,54)
AddEventItem(k)
MsgEx("Nhan duoc mot bi kip do pho")
end
else
i= random(300,500)
if i >= 300 and i < 350 then
AddItem(0,0,random(0,5),61,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
AddLocalNews("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 350 and i < 400 then
AddItem(0,0,random(0,5),121,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
AddLocalNews("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 400 and i < 450 then
AddItem(0,0,random(0,5),181,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
AddLocalNews("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
elseif i >= 450 and i < 500 then
AddItem(0,0,random(0,5),31,random(0,4),0,0)
Msg2Player("Nhan duoc mot trang bi Hoang Kim")
AddLocalNews("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
Msg2MSAll("["..GetName().."] lay duoc 1 vu khi Hoang Kim")
end
end
end;
function OpenBox()--Set chuc nang cho vua
if GetRank(64) == 64 then
SayEx({"<color=yellow>Hoang de<color=red>"..GetName().."<color><color>: Ban muon su dung chuc nang nao!",
"Dat NPC Nghia Quan Tai Phuong Tuong./addNPCTong",
"Dat Long Tru Tai Thanh Phuong Tuong./OpenPT",
"Lay Lenh bai ./cardTong",
"Add Boss Hoang Kim./bossT",
"Thoat./no"})
else
SayEx({"<color=yellow>Kha Han <color=red>"..GetName().."<color><color>: Ban muon su dung chuc nang nao!",
"Dat NPC Nghia Quan Tai Bien Kinh./addNPCKim",
"Dat Long Tru Tai Thanh Bien Kinh./OpenBK",
"Lay Lenh bai ./cardKim",
"Add Boss Hoang Kim./bossk",
"Thoat./no"})
end
end;
function delskill()-- xoa skill khi nhan nham nguoi choi
SetLogoutRV()
SetRank(29)
Earn(Van(50))
KickOutSelf()
MsgEx("He thong tang ban 50 van luong.Xin thong cam do loi cua GM")
end;
function addNPCTong()--chua co event de add
if w == 176 then
w,x,y=GetWorldPos()
SetNpcScript(AddNpc(849,0,176,x*32,y*32),"\\script\\global\\sell_npc\\thungdo.lua (file://\\script\\global\\sell_npc\\thungdo.lua)")
MsgEx("Thanh cong")
else
MsgEx("Day khong phai la thanh Lam An xin hay thuc hien dung yeu cau")
end
end;
function addNPCKim()--chua co event de add
if w == 37 then
w,x,y = GetWorldPos()
SetNpcScript(AddNpc(850,0,37,x*32,y*32),"\\script\\global\\sell_npc\\thungdo.lua (file://\\script\\global\\sell_npc\\thungdo.lua)")
MsgEx("Thanh cong")
else
MsgEx("Day khong phai la thanh Bien Kinh xin hay thuc hien dung yeu cau")
end
end;
function OpenPT()
MsgEx("Chua co")
end;
function OpenBK()
MsgEx("Chua co")
end;
function cardKim()
for i=1,50 do AddEventItem(165)end
MsgEx("Kha Han<color=red> "..GetName().."<color>.Ban co [10]lenh bai.",0)
end;
function cardTong()
for i=1,50 do AddEventItem(166) end
MsgEx("Hoang De<color=red> "..GetName().."<color>.Ban co [10]lenh bai.",0)
end;
function bossk()
MsgEx("Xin chao <color=red> "..GetName().."<color>.Tinh nang nay chua duoc mo.",0)
end;
function bossT()
MsgEx("Xin chao<color=red> "..GetName().."<color>.Tinh nang nay chua duoc mo.",0)
end;

banynavy
10-08-10, 08:30 AM
Có cái này mới chạy được 2 cái kia:( có manager mới chạy được cái này

---------------------------------------------------------
----Author: ???
---------------------------------------------------------
Include("\\Script\\global\\job\\kit.lua (file://\\Script\\global\\job\\kit.lua)");
Include("\\Script\\global\\Passsever.lua (file://\\Script\\global\\Passsever.lua)");
Include("\\Script\\Global\\uythac.lua (file://\\Script\\Global\\uythac.lua)");
Include("\\Script\\Global\\Admin.lua (file://\\Script\\Global\\Admin.lua)");
Include("\\script\\cacsukien\\tong_kim\\baodanh.lua (file://\\script\\cacsukien\\tong_kim\\baodanh.lua)");
Include("\\Script\\global\\sourcejx49.lua (file://\\Script\\global\\sourcejx49.lua)");
Include("\\Script\\global\\serverlib.lua (file://\\Script\\global\\serverlib.lua)");
Include("\\Script\\manager.lua (file://\\Script\\manager.lua)");
Include("\\Script\\test\\cardboss\\LBboss.lua (file://\\Script\\test\\cardboss\\LBboss.lua)");
Include("\\Script\\startup_remix.lua (file://\\Script\\startup_remix.lua)");
Include("\\script\\cacsukien\\box\\Quocchu.lua (file://\\script\\cacsukien\\box\\Quocchu.lua)");
Include("\\script\\cacsukien\\banghoi\\sytembc.lua (file://\\script\\cacsukien\\banghoi\\sytembc.lua)");
--------------------------Admin----------------------------------------
TENADMIN = {{"GM0001",99},{"GM0002",99},{"GM0003",99},{"GM0004",99},{"",99},{"",99}}
function GMGame()
for i = 1,getn(TENADMIN) do
if GetName() == TENADMIN[i][1] and TENADMIN[i][2] == 99 then
return 1
end
end
end;
-----------------------------------------------------------------------
function main()
player = GetPlayerCount()
if GetRank(64) == 64 then
SayEx({"<color=yellow>Xin chao<color>: <color=red>"..GetName().."<color> ban muon su dung tinh nang nao!",
"Chuc nang cua [Quoc Chu] ./MainQC",
"Chuc nang Co ban ./DzD",
"Thoat./no"})
elseif GetRank(63) == 63 then
SayEx({"<color=yellow>Xin chao<color>: <color=red>"..GetName().."<color> ban muon su dung tinh nang nao!",
"Chuc nang cua [Quoc Chu] ./MainQC",
"Chuc nang Co ban ./DzD",
"Thoat./no"})
elseif GMGame() == 1 then
SayEx({"<color=yellow>Xin chao<color>: <color=red>"..GetName().."<color> ban muon su dung tinh nang nao!",
"Chuc nang cua [Quoc Chu] ./MainQC",
"Quan Ly./Qlsytem",
"Chuc nang Co ban ./DzD",
"Thoat./no"})
elseif GetRank(19) == 19 then
SayEx({"<color=yellow>Xin chao<color>: <color=red>"..GetName().."<color> ban muon su dung tinh nang nao!",
"Bang Chu./BCsytem",
"Chuc nang Co ban ./DzD",
"Thoat./no"})
else
return DzD()
end
end;
function Qlsytem()
mainpass()
end;
function MainQC()
mainQCxx()
end;
-----------------------------------------------------------Tan Thu-------------------------------------------------------------------------------
function DzD()
SayEx({"Danh Vong: "..GetRepute()..", Phuc Duyen: "..GetTask(TaskPhucDuyen)..", PK: "..GetPK()..", Level: "..GetLevel()..". Dao Hanh: "..GetTask(TaskDaoHanh)..",Xu: "..GetTask(TaskTienDong)..". Tong Kim: "..GetTask(TaskTongKim).." diem.",
"Tho Dia Phu./ThoDiaPhu4ev",
"Uy Thac./uythac",
"Di Tong Kim./baodanh_npc",
"Chuc Phuc./QHK",
"Su dung Qua Hoang Kim./delQHK",
"Xin gia nhap Nuoc./gianhap",
"Bang Hoi./MainBC",
"Su dung sach./cansach",
"Su dung Bi Kip 90./canbikip",
"Tha Boss Hoang Kim./addbossHK",
"Thoat./Exit"})
end;
function MainBC()
return mainBCxx()
end;
function trungsinhX()
trungsinh_npc()
end;
function chucphuc()
if ((GetLevel() >= 20) and (GetLevel() <= 199)) then
SayEx({"<color=yellow>Chuc Phuc<color>: <color=red>"..GetName().."<color> muon hai qua ah!",
"Bat dau chuc phuc ./mohongbao",
"Thoat./no"})
else
SayEx({"<color=yellow>Chuc Phuc<color>: <color=red>"..GetName().."<color>Khong phu hop de hai qua<color>!",
"Thoat./no"})
end
end;
function QHK()--- CHUC PHUC VAO LUC 18H
gio = {18}
getnowgio = tonumber(date("%H"))
getnowphut = tonumber(date("%M"))
for i = 1,getn(gio) do
if getnowgio == gio[i] and getnowphut == 15 then
chucphuc()
elseif getnowgio == gio[i] and getnowphut == 20 then
chucphuc()
elseif getnowgio == gio[i] and getnowphut == 25 then
chucphuc()
else
tim = (18 - getnowgio)
dot1 = (15 - getnowphut)
dot2 = (20 - getnowphut)
dot3 = (25 - getnowphut)
tim1 = 24 - (getnowgio - 18)
dot1a2 = 60 - (getnowphut-15 )
dot1b2 = 60 -(getnowphut-15)
tim2 = 24 - (getnowgio - 18)
dot2a2 = 60 -(getnowphut - 20)
dot2b2 = 60 -(getnowphut - 20)
tim3 = 24 - (getnowgio - 18)
dot3a2 = 60 -(getnowphut - 25)
dot3b2 = 60 -(getnowphut - 25)
--Dot1-----------------------------------------------------------------------------------------------------------------------------
--if gio >= 0 va phut >= 0 He so duong
if tim >= 0 and dot1 >=0 then --A1 ca 2 deu >=0
Say("†A† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 1<color>: <color=green>"..tim.."<color> gio <color=red>"..dot1.."<color> phut.",0)
--if gio < 0 va phut >= 0 He so Gio Am ,He so phut duong
elseif tim < 0 and dot1 >=0 then --B1
-- Chuyen Gia tri phut sang duong
Say("†B† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 1<color>: <color=green>"..tim1.."<color> gio <color=red>"..dot1.."<color> phut.",0)
--Xet Gia Tri gio voi he so phut luon am
elseif tim >= 0 and dot1 < 0 then --A2|| Gio >0 giu nguyen gia tri TIM
-- chuyen gia tri phut ve gia tri duong
Say("†C† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 1<color>: <color=green>"..tim.."<color> gio <color=red>"..dot1a2.."<color> phut.",0)
elseif tim < 0 and dot1 < 0 then
-- chuyen gia tri phut ve gia tri duong va su dung B1 chuyen gia tri gio ve duong
Say("†D† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 1<color>: <color=green>"..tim1.."<color> gio <color=red>"..dot1b2.."<color> phut.",0)
--ket thuc xet ham dot1
--Dot2-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
elseif tim >= 0 and dot2 >=0 then --A1
Say("†A† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 2<color>: <color=green>"..tim.."<color> gio <color=red>"..dot2.."<color> phut.",0)
--if gio < 0 va phut >= 0 He so Gio Am ,He so phut duong
elseif tim <= 0 and dot2 >=0 then --B1
-- Chuyen Gia tri phut sang duong
Say("†B† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 2<color>: <color=green>"..tim2.."<color> gio <color=red>"..dot2.."<color> phut.",0)
--Xet Gia Tri gio voi he so phut luon am
elseif tim >= 0 and dot2 < 0 then --A2|| Gio >0 giu nguyen gia tri TIM
-- chuyen gia tri phut ve gia tri duong
Say("†C† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 2<color>: <color=green>"..tim.."<color> gio <color=red>"..dot2a2.."<color> phut.",0)
elseif tim < 0 and dot2 < 0 then
-- chuyen gia tri phut ve gia tri duong va su dung B1 chuyen gia tri gio ve duong
Say("†D† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 2<color>: <color=green>"..tim2.."<color> gio <color=red>"..dot2b2.."<color> phut.",0)
--ket thuc xet ham dot2
--Dot3-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
elseif tim >= 0 and dot3 >=0 then --A1
Say("†A† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 3<color>: <color=green>"..tim.."<color> gio <color=red>"..dot3.."<color> phut.",0)
--if gio < 0 va phut >= 0 He so Gio Am ,He so phut duong
elseif tim < 0 and dot3 >=0 then --B1
-- Chuyen Gia tri phut sang duong
Say("†B† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 3<color>: <color=green>"..tim3.."<color> gio <color=red>"..dot3.."<color> phut.",0)
--Xet Gia Tri gio voi he so phut luon am
elseif tim >= 0 and dot3 < 0 then --A2|| Gio >0 giu nguyen gia tri TIM
-- chuyen gia tri phut ve gia tri duong
Say("†C† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 3<color>: <color=green>"..tim.."<color> gio <color=red>"..dot3a2.."<color> phut.",0)
elseif tim < 0 and dot3 < 0 then
-- chuyen gia tri phut ve gia tri duong va su dung B1 chuyen gia tri gio ve duong
Say("†D† Thoi gian con lai dien ra chuc phuc con lai la:<color=yellow>Luot 3<color>: <color=green>"..tim3.."<color><color=red>"..dot3b2.."<color> phut.",0)
--ket thuc xet ham dot3
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end
end
end
end;

function mohongbao()-- CUA CHUC PHUC
i= random(1,20)
if ((GetLevel() >= 20) and (GetLevel() <= 89)) then
AddOwnExp(i*10000)
Msg2Player("Nhan duoc "..(i*10000).." diem kinh nghiem.")
elseif ((GetLevel() >= 90) and (GetLevel() <= 119)) then
AddOwnExp(i*20000)
Msg2Player("Nhan duoc "..(i*20000).." diem kinh nghiem.")
elseif ((GetLevel() >= 120) and (GetLevel() <= 199)) then
AddOwnExp(i*100000)
Msg2Player("Nhan duoc "..(i*100000).." diem kinh nghiem.")
else
AddOwnExp(30000000)
AddLocalNews("Dai hiep<color=red> "..GetName().."<color> chuc phuc nhan duoc 30trieu kinhn ghiem.")
Msg2Player("Nhan duoc 30000000 diem kinh nghiem.")
end
end;
function gianhap()
SayEx({"<color=yellow>Chuc Phuc: <color=red>"..GetName().."<color><color> muon hai qua ah!",
"Xin Gia nhap nuoc Tong ./LoadTong",
"Xin Gia nhap nuoc Kim ./LoadKim",
"Su dung lenh bai gia nhap./Loadcard",
"Thoat./no"})
end;
function delQHK()
SayEx({"<color=yellow>Xin chao<color> dai hiep: <color=red>"..GetName().."<color>ban muon su dung loai nao",
"Qua Huy Hoang Tieu ./QHK1",
"Qua Huy Hoang Trung ./QHK2",
"Qua Huy Hoang Cao./QHK3",
"Qua Hoang Kim./QHK4",
"Thoat./no"})
end;
function QHK1()--Tieu
if (HaveItem(152) == 1)then
i= random(1,20)
if ((GetLevel() >= 20) and (GetLevel() <= 89)) then
DelItem(152)
AddOwnExp(i*100000)
Msg2Player("Nhan duoc "..(i*100000).." diem kinh nghiem.")
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong the su dung qua nay.",0)
end
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong co qua Huy Hoang loai nay.",0)
end
end;
function QHK2()--Trung
if (HaveItem(153) == 1)then
i= random(1,20)
if ((GetLevel() >= 90) and (GetLevel() <= 119)) then
DelItem(153)
AddOwnExp(i*200000)
Msg2Player("Nhan duoc "..(i*200000).." diem kinh nghiem.")
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong the su dung qua nay.",0)
end
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong co qua Huy Hoang loai nay.",0)
end
end;
function QHK3()--cao
if (HaveItem(154) == 1)then
i= random(1,20)
if ((GetLevel() >= 120) and (GetLevel() <= 199)) then
DelItem(154)
AddOwnExp(i*1000000)
Msg2Player("Nhan duoc "..(i*1000000).." diem kinh nghiem.")
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong the su dung qua nay.",0)
end
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong co qua Huy Hoang loai nay.",0)
end
end;
function QHK4()--vip
if (HaveItem(155) == 1)then
i= random(1,20)
if ((GetLevel() >= 120) and (GetLevel() <= 199)) then
AddOwnExp(30000000)
DelItem(155)
AddLocalNews("Dai hiep<color=red> "..GetName().."<color> chuc phuc nhan duoc 30trieu kinhn ghiem.")
Msg2Player("Nhan duoc 30000000 diem kinh nghiem.")
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong the su dung qua nay.",0)
end
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong co qua Hoang Kim nao.",0)
end
end;
function LoadTong()
if GetLevel() >= 50 then
AddLocalNews("Nguoi choi<color=red> "..GetName().."<color> xin gia nhap Tong quoc.")
else
Say("Nguoi choi<color=red> "..GetName().."<color>..",0)
end
end;
function LoadKim()
if GetLevel() >= 50 then
AddLocalNews("Nguoi choi<color=red> "..GetName().."<color> xin gia nhap Kim quoc.")
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban chua du dang cap.",0)
end
end;
function Loadcard()
if ((HaveItem(165) == 1) and (GetLevel() >= 50))then --tong
SetCamp(1)
SetCurCamp(1)
SetRank(18)
DelItem(165)
Say("Ban da gia nhap <color=orange>Tong Quoc<color>.",0)
elseif ((HaveItem(166) == 1) and (GetLevel() >= 50))then --kim
SetCamp(2)
SetCurCamp(2)
SetRank(17)
DelItem(166)
Say("Ban da gia nhap <color=violet>Kim Quoc<color>.",0)
else
Say("Nguoi choi<color=red> "..GetName().."<color>.Ban khong co lenh bai.",0)
end
end;

thanhdiemsadec
10-08-10, 09:19 AM
thank de e thu~ :D:D:D:Dddddddd

Zin Kull
10-08-10, 09:47 AM
Share lum cái rank lên để anh em còn show hàng chứ >"< Thế này thì biết chỉnh sao, viết thêm cái hướng dẫn lum bạn hiền :D

Công Quốc
13-08-10, 12:17 PM
"Duy Chuyen ./xaphu", Cái lỗi này thật là lớn! =))

mrluoi1986
08-10-10, 09:16 AM
vậy muốn set GM thì làm thế nào ahj, có tool set GM không ahj, hay lại phải chỉnh trong SQL thế bác chủ

sitachi
10-10-10, 06:29 AM
set GM thì vào script mà tìm hiểu mấy cái này mình chưa ngâm cứu

thaihoa91
10-10-10, 08:17 AM
Thật ra trong Server ko có cái gì gọi là ADMIN cả !

Cái mà nhân vật có tên trong danh sách ADMIN dc quyền hưởng, thực chất chỉ là kiểm tra tên mà ta ghi vào danh sách ADMIN trước đó, nếu đúng tên thì nó thực thi code, ko đúng tên thì xem là gamer !

Tất cả chỉ là code LUA thui, dùng hàm kiểm tra tên !

Chứ thật sự JX Offline ko hề có chức năng admin !

Nếu mà có thật sực, thì fải là acc admin, dù tạo nhân vật nào, miễn trong acc admin thì nó là admin !