Player login will not run automatically.

You must enter the command [ShowTool

I hope you can help me.

public static void OnShowTool(CommandEventArgs args)
{
Mobile mobile = args.Mobile;
if (mobile is PlayerMobile)
{
PlayerMobile pm = mobile as PlayerMobile;
pm.CloseGump(typeof(ShowTool));
pm.SendGump(new ShowTool(pm));
}
}
 

Attachments

  • ShowTool.cs
    1.7 KB · Views: 23
If you want a player toolbar that launches on login, I recommend you use the GM toolbar that was already written and included with ServUO and modify it for player use. It will be vastly easier than starting over from scratch.
 
No scripts will be written. Can only be modified simply
If you want a player toolbar that launches on login, I recommend you use the GM toolbar that was already written and included with ServUO and modify it for player use. It will be vastly easier than starting over from scratch.
 
[QUOTE =“13440130,帖子:65659,成员:1017”]在检测登录游戏的脚本里设置一下就可以了,用不着打命令[/ QUOTE]
不知道哪个档案,请告知
 
谢喽老铁
[doublepost=1553370406][/doublepost]
PlayerMobile pm = mobile as PlayerMobile;
pm.CloseGump(typeof(ShowTool));
pm.SendGump(new ShowTool(pm));


把这段复制到int mobileCount = World.Mobiles.Count;底下就行了
额。。添加后出错。。。QQ图片20190324034505.png
 
修改后得到一下错误QQ图片20190324040244.png
[doublepost=1553371518][/doublepost][QUOTE =“13440130,帖子:65703,成员:1017”]这样应该可以了[/ QUOTE]
QQ图片20190324040244.png
 
upload_2019-3-24_4-25-2.png
[doublepost=1553372814][/doublepost][QUOTE =“13440130,帖子:65705,会员:1017”]截图看看你33行是什么[/ QUOTE]
upload_2019-3-24_4-25-17.png
 
[QUOTE =“13440130,帖子:65707,成员:1017”] PlayerMobile pm =(PlayerMobile)m;
改成这句[/ QUOTE]
搞定了。谢谢
 
Back