| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 856 人关注过本帖
标题:求大神们指导下这个应该怎么写
只看楼主 加入收藏
nb9801
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2015-1-3
收藏
 问题点数:0 回复次数:0 
求大神们指导下这个应该怎么写
这是个德国的人写的魔兽世界辅助 他提供接口让我们可以自己写战斗模块。具体的我找人翻译了下。。认真看还是可以看得懂。
求有经验的大神指导下应该怎么写 如果你有什么好的想法可以 联系QQ:658291

如何写CC的中英文对照  【翻译的不是太好但如果是会写代码的应该看得懂】
1.    Mr.LazyRaider - Your Guide to Writing a LazyRaider CC
4/26/12 - Version 1.0
Mr.LazyRaider- 帮助您写作LazyRaider CC4/26/12- 1.0版本
What is this
This is is a guide and template designed to help you to create your own CC for use with CombatBot, LazyRaider or Raidbot. you can find the at the links below. (combat bot is already packed with honorbuddy)
这是什么
这是个指南和型板设计来帮助您创作你自己用在CombatBot,LazyRaider或Raidbot的CC.
您可以在以下的网站找到这些。(Combat bot 已经和 honerbuddy 包在一起了)[文件夹里有提供LazyRaider-2018]
http://www.
http://www.

What is a LazyRaider CustomClass?    什么是 LazyRaider CustomClass?
A LazyRaider CC is a CustomClass built specifically for use with LazyRaider or Similar bots, as LazyRaider is ment to be used while you control movement it makes it very easy for us to make one for just about any class. all our CC is going to do is run our combat rotation if we get into combat and have something targeted.
LazyRaider CC 是个 CustomClass 特别建来使用在 LazyRaider 或 类似的机器,
如 LazyRaider 是在您控制行动时使用的这使得它很容易让我们做一个几乎任何类。
我们全部的CC会做的是运行我们的作战轮换如果我们进入战斗,并有针对性的东西。
What if ive never coded before?    如果我重来没有coded过?
Then you will want to go over my Custom Class Creation Guide to learn how to setup your project in visual studio.
那你就要去我的的 定制创建指南 学怎么设定您的工程在 Visual Studio。
http://www.

So what do i do?   那我应该要做什么?
first things first you wanna get your project setup in visual studio and add the proper references to honorbuddy.exe and fasmdll_managed.dll
第一件事您要做的是要把你的工程设定在 Visual Studio 然后添加适当引用到honerbuddy.exe 和 fasmdll_managed.dll
once thats done scroll down to the bottom of the post for and download. MrLazyRaider.cs this is a template i made for you packed with some extra methods to help you with the Custom Class Creation process. feel free to rename MrLazyRaider.cs to MrLazyRaider - *classname or other unique name here* so you know thats what your working on.

那个做完了后把网页拉到下面然后下载 MrLazyRaider.cs【文件包里有提供】 我给你做的这个型板包括一些多余的方法来帮助您在定制创建中。您可以随意的把 MrLazyRaider.cs 的名改成
MrLazyRaider-*班名或别的唯一的名称*
once you have that done, there are only a couple of things inside a CC we need to worry about when writing a LazyRaider CC.
这样您就知道你在做什么。那个做完了后,只剩下一些东西我们需要担心在写 LazyRaider CC 的时候。
________________________________________
the first thing is.
第一件是
Code:
//Change WoWClass.***** to change the class your routine works for.
public override WoWClass Class { get { return WoWClass.Mage; } }
as you can see i took the time to comment everything for you, and this should be easy to find. this tells honorbuddy What Class this is suppose to be used on. and by default its set to mage. you can easily change this by replacing mage. with what class you want.
您可以看到我发时间来吧全部东西写给你们,这应该很容易找。 这会告诉 honerbuddy 什么类应该用什么。默认情况下,它设定为法师。您可以很容易的换掉,就把法师改成你要的类。
For Example.  比如
Code:
//Change WoWClass.***** to change the class your routine works for.
public override WoWClass Class { get { return WoWClass.Warlock; } }
if you have your visual studio project setup correctly visual studio should try and auto complete what your trying to do. but by changing it to Warlock our code will now run for a Warlock instead of a mage.
如果您有把你的Visual studio 工程设置好, Visual Studio 会试和自动完成您要做的事。可是把他换成术士,我们的编写就会为术士运行而不会为法师。
________________________________________
the second thing is.
if you scroll down a bit you should find this.
第二件是。  如果你把网页拉下面一点你会找到这个
Code:
 public override void Combat()
        {
            //All your code goes here.
            //Wrapped Items.
            //CastSpell(SpellName) & CastSpell(SpellName, WoWUnit)
            if(HaveManaPotion() && ManaPotionReady() && Me.ManaPercent <= 30)
            {
                UseManaPotion();
            }
            if (HaveHealthPotion() && HealthPotionReady() && Me.HealthPercent <= 30)
            {
                UseHealthPotion();
            }


        }
public override void Combat() is the method honorbuddy pulses when in combat since we are writing a CustomClass that ONLY functions in combat, this is where a large majority of our code will be. as you can tell, i took the liberty of including some methods you can use to castspells. and ive included code to automatically use health and Mana potions.
public override void Combat() 是该方法 honerbuddy 脉冲在战斗时,因为我们写的是个 CustomClass 只能操作在战场上,这里就是很多我们的编写会在。你可以看的出来,我拿了自由的时间来放一些方法你可以用来施法。我也放了一些编写让你自动使用红瓶和蓝瓶。
so say i wanted this cc to get into combat and spam fireball.
heres what i would do.
比如说我要这个 CC 去战场里一直丢火球,我们应该这么写。
Code:
 public override void Combat()
        {
            CastSpell("Fireball");


            if(HaveManaPotion() && ManaPotionReady() && Me.ManaPercent <= 30)
            {
                UseManaPotion();
            }
            if (HaveHealthPotion() && HealthPotionReady() && Me.HealthPercent <= 30)
            {
                UseHealthPotion();
            }


        }
of course i left the mana potion stuff in, but we can take it out if we dont want it.

比如说我要这个 CC 去战场里一直丢火球,这就是我会做的。当然了,我把蓝瓶放进去,如果你不要你可以拿出来

1.    Community Methods:
below is a list of methods you can add to your CustomClass to easily add functionality to your customclass.
if you have more to add please follow the formatting i have here, and post them, i will add them as time goes by.

Heres Whats included with MrLazyRaider.
以下是一些方法您可以添加到你的 CustomClass。如果你有更多要添加的话
请按照我这里有的格式和并贴,我以后会添加更多。这是MrLazyRaider里的东西。

AutoAttack();
Starts the Bot AutoAttacking, This works well when used in conjunction with a range check.
自动打();
开始让机器自动打,这个和范围检查一起使用时很好。
Code:
if(Me.CurrentTarget.IsWithinMeleeRange)
{
 AutoAttack();
 }
BuffMe("String");
Checks if We CanBuff ourselves if so then it casts the buff.
Usefull for buffs that always need to be up.
Buff自己("string");
 查一下可不可以buff自己,如果可以他就会自动buff
对一些永远需要得buff很耐用。
Code:
BuffMe("Arcane Intellect");
CastSpell("String");
Checks if we can Cast the Spell if so then Spell is casts on Whatever is currently targeted
用技能("string");
查一下可不可以用技能,如果可以就用在被针对的东西
Code:
CastSpell("Frostbolt");用技能(int);用ID开技能

CastSpell(int);
Casts a Spell by ID
Code:
CastSpell(12345);
CastSpell("String", WoWUnit);
Casts a spell on a WoWUnit, wowunit does not have to be CurrentTarget.
用技能("string", WoWUnit);
 用技能再个WoWUnit, wowunit 不需要是个被针对的东西
Code:
CastSpell("Frostbolt", Me.CurrentTarget.Pet);
CastSpell(int, WoWUnit)
Casts a Spell on a WoWunit, by using a Spell Id  用技能(int, WowUnit) 用技能ID,开技能在个WoWUnit.
Code:
 CastSpell(12345, Me.CurrentTarget);
CurrentAddCount()
returns a count of all units in combat that are targeting you, minus the unit you have targeted.
目前加计数()
返回在战斗中被定位功能,各单位的计数,再减去你单位有针对性。
Code:
if(CurrentAddCount() > 3)
{
CastSpell("Frostnova");
}
HaveManaPotion()   有蓝瓶()
Determines of we have a mana potion or not.  看看你有没有蓝瓶
if(HaveManaPotion())如果(有蓝瓶())
{
your code here.  把你的编号放在这里
}

ManaPotionReady()   准备蓝瓶()
Checks if the ManaPotion we have (if we have one) is ready to be used 查一下你有的蓝瓶(如果有)可以用了吗。
Code:
if(ManaPotionReady())
{
your code here
}
UseManaPotion()  用蓝瓶()
Uses the ManaPotion if one was found and ready to use.  找到可以用的蓝瓶就用。
Code:
if(HaveManaPotion() && ManaPotionReady() && Me.ManaPercent *Less then or Equals* 30)
{
  UseManaPotion();
}
HaveHealthPotion()  有红瓶()
Checks if we have a Health Potion available  查看有没有红瓶
Code:
if(HaveHealthPotion())
HealthPotionReady()  准备红瓶()
Checks if the HealthPotion we had is Ready  查查看你有的红瓶可以用吗
Code:
if(HealthPotionready())
UseHealthPotion()   用红瓶()
Uses the HealthPotion if its not on cooldown  如果可以用,就用
Code:
        if (HaveHealthPotion() && HealthPotionReady() && Me.HealthPercent *Less Than Or Equals* 30)
        {
            UseHealthPotion();
        }
搜索更多相关主题的帖子: designed 魔兽世界 create 德国 接口 
2015-01-04 13:46
快速回复:求大神们指导下这个应该怎么写
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026037 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved