function Myrw_init(view)
if view.IsInit then
view.add(new.bmpbutton("await.change","chajian_btn.bmp"));
return;
end
-- 异步回调方式调用服务端函数
local object = view.find("await.change");
object.enable = 1;
object.xpos = 130;
object.ypos = 60;
object.event = function(object,event)
if event == Cevent.click then
<?
function unsafe.sayhello(player,tbl)
NLG.SystemMessage(player,tostring(tbl[1]))
end
?>
unsafe.sayhello({"早安,熊弟弟"})
<?
function unsafe.changeMetamo(player,tbl)
local metamoid = tonumber(tbl[1])
Char.SetData(player,%对象_形象%,metamoid);
Char.SetData(player,%对象_原形%,metamoid);
Char.SetData(player,%对象_原始图档%,metamoid);
NLG.UpChar(player);
return {'已经变身成['..metamoid.."] 真漂亮,快给大家看看吧!!"}
end
?>
local ret = unsafe.changeMetamo({104870});
Cli.SysMessage(tostring(ret[1]),4,3);
end
end
end
<?
function Client.ShowView(player,id,func)
Client.WaitABRunScript(player,"new.ShowView("..id..","..func..")");
end
function Event.RegTalkEvent.Test(player,msg,color,font)
if msg == '/0' then
Client.RunABundle(player,'test.lua')
Client.ShowView(player,501,"Myrw_init")
end
end
?>