新进人物加回城技能
转自y7y7s原文如下
原作者:排骨米饭~
package custom.SayHello;
//作者 排骨米饭~
//import com.l2jserver.gameserver.Announcements;
import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
public final class SayHello extends Quest
{
public SayHello(int id, String name, String descr)
{
super(id, name, descr);
setOnEnterWorld(true);
}
private static final String qn = "SayHello";
@Override
public String onEnterWorld(L2PcInstance player)
{
player.addSkill(SkillTable.getInstance().getInfo(2213, 10),false);
player.sendSkillList();
return "";
}
public static void main(String[] args)
{
new SayHello(-1, qn, "custom");
}
}
保存为SayHello.java存放到
game\data\scripts\custom\SayHello
记得记得在scripts.cfg里加入
如果要加好几个技能呢? package custom.SayHello;
//作者 排骨米饭~
//import com.l2jserver.gameserver.Announcements;
import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
public final class SayHello extends Quest
{
public SayHello(int id, String name, String descr)
{
super(id, name, descr);
setOnEnterWorld(true);
}
private static final String qn = "SayHello";
@Override
public String onEnterWorld(L2PcInstance player)
{
//修改这里2213 是技能id10是技能等级
player.addSkill(SkillTable.getInstance().getInfo(2213, 10),false);
player.addSkill(SkillTable.getInstance().getInfo(2213, 10),false);
player.addSkill(SkillTable.getInstance().getInfo(2213, 10),false);
player.addSkill(SkillTable.getInstance().getInfo(2213, 10),false);
player.addSkill(SkillTable.getInstance().getInfo(2213, 10),false);
player.sendSkillList();
return "";
}
public static void main(String[] args)
{
new SayHello(-1, qn, "custom");
}
}
国外的端要加回城 能用这个么 asspoo520 发表于 2020-6-23 19:43
国外的端要加回城 能用这个么
不能!~
国外端可以修改enterword那里!~ 为了吟游诗人,这次真学习了! 感谢指点!我是菜鸟
页:
[1]