chinh sua lenh do Scrip
Trang 1 trong tổng số 1 trang
chinh sua lenh do Scrip
trc khi dùng lệnh đó thì bạn phải có thẻ Gm,
sau đó bạn gamesever/script/item/class và mở gmcard.lua = notepat ++
típ theo tìm đến chỗ này
function tbGMCard:Reload()
local nRet1 = DoScript("\\script\\item\\class\\gmcard.lua");
local nRet2 = DoScript("\\script\\misc\\gm_role.lua");
GCExcute({"DoScript", "\\script\\misc\\gm_role.lua"});
local szMsg = "Reloaded!!("..nRet1..","..nRet2..GetLocalDate (") %Y-%m-%d %H:%M:%S");
me.Msg(szMsg);
print(szMsg);
end
và thêm dòng này: local nRet3 = DoScript("\\script\\event\\minievent\\newplayergif t.lua");
thì nó sẽ thành
function tbGMCard:Reload()
local nRet1 = DoScript("\\script\\item\\class\\gmcard.lua");
local nRet2 = DoScript("\\script\\misc\\gm_role.lua");
local nRet3 = DoScript("\\script\\event\\minievent\\newplayergif t.lua");
GCExcute({"DoScript", "\\script\\misc\\gm_role.lua"});
local szMsg = "Reloaded!!("..nRet1..","..nRet2..GetLocalDate (") %Y-%m-%d %H:%M:%S");
me.Msg(szMsg);
print(szMsg);
end
Bạn lưu lại.sau đó vào game.Cứ mỗi lần bạn chỉnh sủa túi tân thủ thì nhớ save lại,rồi vào game chọn vào thẻ gm,chọn reload script là đc
đây là hàm add thẻ gm,bạn thêm vào chỗ nào trong túi để add
me.AddItem(18, 1, 400, 1);--the gm
đường dẫn của scripts của" Cẩm nang tân thủ"
Server\gameserver\script\item\class\xinshoubook.lu a
cái nhận thưởng 1 lần làm như sau: trước tiên thêm 1 task.
ở đây tui thêm vào npc nên của tui là tbTest1 còn muốn thêm vào túi tân thủ thj để là tbGift
nhớ khai báo thêm Use_max + taskid_count ở túi tân thủ.
use_max chính là số lần nhận.
Code:
function tbTest1:nhanthuong1lan()
local szMsg = "<color=yellow>Full set Chỉ Nhận Được 1 Lần :\n 1. bạn phải gia nhập Môn Phái.\n 2.bạn phải chọn theo hệ nào(Nội Công-Ngoại Công).<color>";
local tbOpt = {
{"Trang Bị ", self.nhanthuong, self},
{"Ta Chỉ Xem Qua Thôi..."},
};
Dialog:Say(szMsg, tbOpt);
end
function tbTest1:nhanthuong()
local nCount = me.GetTask(self.TaskGourp, self.TaskId_Count);
if nCount >= self.Use_Max then
local szMsg = "<color=yellow>Full set Chỉ Nhận Được 1 Lần :<color>";
local tbOpt = {
{"Bạn đã Nhận Đủ Phần Thưởng..."},
};
Dialog:Say(szMsg, tbOpt);
return 0;
end
if (nCount == 0) then
local szMsg = "<color=yellow>Full set Chỉ Nhận Được 1 Lần :<color>";
local tbOpt = {
{"Trang Bị +16", self.GetEquipFaction, self, 1,12},
{"Ta Chỉ Xem Qua Thôi..."},
};
Dialog:Say(szMsg, tbOpt);
end
me.SetTask(self.TaskGourp, self.TaskId_Count, nCount + 1);
end
sau đó bạn gamesever/script/item/class và mở gmcard.lua = notepat ++
típ theo tìm đến chỗ này
function tbGMCard:Reload()
local nRet1 = DoScript("\\script\\item\\class\\gmcard.lua");
local nRet2 = DoScript("\\script\\misc\\gm_role.lua");
GCExcute({"DoScript", "\\script\\misc\\gm_role.lua"});
local szMsg = "Reloaded!!("..nRet1..","..nRet2..GetLocalDate (") %Y-%m-%d %H:%M:%S");
me.Msg(szMsg);
print(szMsg);
end
và thêm dòng này: local nRet3 = DoScript("\\script\\event\\minievent\\newplayergif t.lua");
thì nó sẽ thành
function tbGMCard:Reload()
local nRet1 = DoScript("\\script\\item\\class\\gmcard.lua");
local nRet2 = DoScript("\\script\\misc\\gm_role.lua");
local nRet3 = DoScript("\\script\\event\\minievent\\newplayergif t.lua");
GCExcute({"DoScript", "\\script\\misc\\gm_role.lua"});
local szMsg = "Reloaded!!("..nRet1..","..nRet2..GetLocalDate (") %Y-%m-%d %H:%M:%S");
me.Msg(szMsg);
print(szMsg);
end
Bạn lưu lại.sau đó vào game.Cứ mỗi lần bạn chỉnh sủa túi tân thủ thì nhớ save lại,rồi vào game chọn vào thẻ gm,chọn reload script là đc
đây là hàm add thẻ gm,bạn thêm vào chỗ nào trong túi để add
me.AddItem(18, 1, 400, 1);--the gm
đường dẫn của scripts của" Cẩm nang tân thủ"
Server\gameserver\script\item\class\xinshoubook.lu a
cái nhận thưởng 1 lần làm như sau: trước tiên thêm 1 task.
ở đây tui thêm vào npc nên của tui là tbTest1 còn muốn thêm vào túi tân thủ thj để là tbGift
nhớ khai báo thêm Use_max + taskid_count ở túi tân thủ.
use_max chính là số lần nhận.
Code:
function tbTest1:nhanthuong1lan()
local szMsg = "<color=yellow>Full set Chỉ Nhận Được 1 Lần :\n 1. bạn phải gia nhập Môn Phái.\n 2.bạn phải chọn theo hệ nào(Nội Công-Ngoại Công).<color>";
local tbOpt = {
{"Trang Bị ", self.nhanthuong, self},
{"Ta Chỉ Xem Qua Thôi..."},
};
Dialog:Say(szMsg, tbOpt);
end
function tbTest1:nhanthuong()
local nCount = me.GetTask(self.TaskGourp, self.TaskId_Count);
if nCount >= self.Use_Max then
local szMsg = "<color=yellow>Full set Chỉ Nhận Được 1 Lần :<color>";
local tbOpt = {
{"Bạn đã Nhận Đủ Phần Thưởng..."},
};
Dialog:Say(szMsg, tbOpt);
return 0;
end
if (nCount == 0) then
local szMsg = "<color=yellow>Full set Chỉ Nhận Được 1 Lần :<color>";
local tbOpt = {
{"Trang Bị +16", self.GetEquipFaction, self, 1,12},
{"Ta Chỉ Xem Qua Thôi..."},
};
Dialog:Say(szMsg, tbOpt);
end
me.SetTask(self.TaskGourp, self.TaskId_Count, nCount + 1);
end
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|