这个是比较全的。很多人都是从这里直接复制的。..
http://game.2**.com/zhuanti/h5/guide/2006/06/08/2607035.shtml 但是有问题。..
所以我自己改了改,给你弄一个最全的。绝对能用的。..
英雄无敌5-控制台修改及代码
使用方法如下:
第一步: 在安装文件夹下的profiles里找到autoexec.cfg。记事本打开。最后一行。
加上:setvar dev_console_password = schwinge-des-todes
改后效果:
//============================================================================
// Startup
mainmenu
setvar dev_console_password = schwinge-des-todes
第二步:我的文档mygamesHeroes of Might and Magic V名字input.cfg
打开。找到
// obsolete, but strictly need for compability with some interfaces
bind close_window "ESC"
bind confirm_action "ENTER"
bind show_console "`"(此行自己添加)
第三步:关键一步。。。。打开游戏。。。进入地图。。。按`键
输入enable_cheats
然后会看到诸如使用cheat会失去游戏乐趣的厚道提示云云。。
然后就可以使用控制台了。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
另外。有些特殊的功能比如解除战争迷雾和隐藏操作界面什么的。需要自己修改input.cfg
还有些很BT的作弊键,比如
//adventure debug
bind adventure_teleport "CTRL" + "SHIFT" + "T 传送
bind adventure_remove_object "CTRL" + "D" 移除
//END adventure debug
//combat debug
bind combat_killcreature "CTRL" + "D" 杀死生物
bind combat_creaturegiveturn "CTRL" + "F" 进度条
//end combat debug
代码
(1)普通作弊码
"add_skill + 技能名/数字" 可以给选定英雄加技能,例如在控制台中输入:
add_skill Necromancy
这个可以加巫术
或者在后边加数字:
add_skill 19
可以加寻路术。这些数字对应的技能可以用写字板打开datadata.pakscriptsadvmap-startup.lua这个文件察看
注意这个data.pak是个压缩文件,可以用解压软件(winrar,winzip等)把它打开并把想要的文件解压出来。
用这种方法所加的技能数量是可以超出原有限制,虽然不会显示出来,但是效果还在
add_army 种族代码, 是否升级
加生物
种族代码对应如下:
HEAVEN(圣堂) = 0
PRESERVE(森林) = 1
ACADEMY(学院) = 2
DUNGEON(地牢)= 3
NECRO(不死) = 4
INFERNO(炼狱) = 5
例如:
add_army 5, 0
会给英雄加升级前的7种炼狱生物各十(至于原来的兵会怎样?试过就知道了)
add_army 4, 1
加升级后的七种不死生物各十
add_all_spells
使英雄学会所有魔法,不受技能限制(包括使用这些魔法)
set_hero_luck_morale M N
改变英雄的基本运气(M)和士气(N),例如 set_hero_luck_morale 5 3
show_player_money N
显示玩家N所拥有的资源,例如 show_player_money 2
show_hero_mp
Shows detailed movement point stats for currently selected hero - exact quantity, stats for currently plotted path(how many points it"ll take).
add_exp N
加经验,例如add_exp 5000
add_money N
加金币1000*N,其他所有资源加N
(2)调用函数
上边的都只算小儿科,下边来点真格的
在data.pak或你所解出来的文件夹里的.lua 、.xdb文件里边你通常会看到一大堆函数,游戏中的所有事件(如征兵,学技能等)都是通过这些函数实现的。开始游戏时这些文件会对游戏进行初始化。然而通过控制台你可以在游戏中调用这些函数,也就是说,只要你知道了这些函数,几乎可以人为的实现在游戏中可能实现的一切
要在游戏中使用这些函数,只要调用控制台,在这些函数前加上@,并使用相关参数就可以了。例如:
文件中有这么一句:
GiveExp("Isabell",5000)
会给Isabell 5000经验(太明显啦!)
那么在控制台里,你可以输入:
@GiveExp("x", y)
会给英雄 x 增加经验值 y
或者更简单的:
@Win()
直接取得胜利
@Loose()
失败
下边列几个比较实用的:
@GiveArtefact("x", y)
给英雄x加上物品y,y可以是物品名或者物品代码,
@TeachHeroSpell("Isabell",SPELL_PHANTOM)
使Isabell学会法术PHANTOM, 也可以用法术代码
@AddHeroSkill("Isabell", 13)
加技能13
@AddHeroCreatures( "Agrael", CREATURE_HELL_HOUND, 1000 );
给Agreal加1000只Hell Hound
@SetTownBuildingLimitLevel("Putor", 13, 1);
设定城镇Putor的建设等级
@OpenCircleFog (0, 0, 0, 9999, PLAYER_x);
给第x位玩家开图(地面)
如果是地底的话
@OpenCircleFog (0, 0, 1, 9999, PLAYER_x);
@SetPlayerResource(PLAYER_1,x,y);
把玩家1的资源x设为y,x对应资源GOLD,WOOD,ORE,GEM,SULFER,MERCURY,CRYSTAL ;y对应数字
@ChangeHeroStat( "Isabell", STAT_ATTACK, 9999 );
使Isabell的攻击变为9999
@AddHeroWarMachine("Isabell",1)
给英雄加战争机器
这里的部分代码我会在后边列出,当然你最好可以自己去查lua文件,我比较常用/data/script/里边的
注意: 游戏里显示的名称(如英雄名,城镇名等)往往跟在程序里使用的内部名称不一样,对于英雄名,可以用这个命令
@print(GetPlayerHeroes(PLAYER_x))
显示第x位玩家的英雄名。至于其他的,也可以在/data/text/里边查找,不过比较麻烦,希望有高手能解决这个问题
没见过作弊能这么bt的。不过,我喜欢。
这么强大的控制台并不一定要拿来作弊的,比如说在最后大局已定英雄毒孤求拜时,可以放几百条黑龙出来耍耍
又或者让一队地狱犬在清掉一群骷髅后说:“Mmmmm, yummy......”
活活, yy无限啊
当然这个也可以方便制作mod的玩家进行调试,本来就是debug用的
6月2日更新:
@print(GetObjectPos("heroname"))
会显示英雄的坐标
@SetObjectPos("heroname",x,y,0)
瞬移(地面)
@SetObjectPos("heroname",x,y,1)
瞬移(地底)
@CreateMonster("Peasant",CREATURE_PEASANT,100,30,40,1)
在地底坐标(30,40)处放100个农民
附:
技能代码
物品代码
法术代码(这个好像不止法术而已,而且看起来有点恐怖,如果能全部挖掘的话)
英雄属性
兵种及英雄代码
技能代码
-- Skill type IDs
--
-- Basic Skills
SKILL_LOGISTICS = 1
SKILL_WAR_MACHINES = 2
SKILL_LEARNING = 3
SKILL_LEADERSHIP = 4
SKILL_LUCK = 5
SKILL_OFFENCE = 6
SKILL_DEFENCE = 7
SKILL_SORCERY = 8
SKILL_DESTRUCTIVE_MAGIC = 9
SKILL_DARK_MAGIC = 10
SKILL_LIGHT_MAGIC = 11
SKILL_SUMMONING_MAGIC = 12
-- Class skills
SKILL_TRAINING = 13
SKILL_GATING = 14
SKILL_NECROMANCY = 15
SKILL_AVENGER = 16
SKILL_ARTIFICIER = 17
SKILL_INVOCATION = 18
-- Perks
PERK_PATHFINDING = 19
PERK_SCOUTING = 20
PERK_NAVIGATION = 21
PERK_FIRST_AID = 22
PERK_BALLISTA = 23
PERK_CATAPULT = 24
PERK_INTELLIGENCE = 25
PERK_SCHOLAR = 26
PERK_EAGLE_EYE = 27
PERK_RECRUITMENT = 28
PERK_ESTATES = 29
PERK_DIPLOMACY = 30
PERK_RESISTANCE = 31
PERK_LUCKY_STRIKE = 32
PERK_FORTUNATE_ADVENTURER = 33
PERK_TACTICS = 34
PERK_ARCHERY = 35
PERK_FRENZY = 36
PERK_PROTECTION = 37
PERK_EVASION = 38
PERK_TOUGHNESS = 39
PERK_MYSTICISM = 40
PERK_WISDOM = 41
PERK_ARCANE_TRAINING = 42
PERK_MASTER_OF_ICE = 43
PERK_MASTER_OF_FIRE = 44
PERK_MASTER_OF_LIGHTNINGS = 45
PERK_MASTER_OF_CURSES = 46
PERK_MASTER_OF_MIND = 47
PERK_MASTER_OF_SICKNESS = 48
PERK_MASTER_OF_BLESSING = 49
PERK_MASTER_OF_ABJURATION = 50
PERK_MASTER_OF_WRATH = 51
PERK_MASTER_OF_QUAKES = 52
PERK_MASTER_OF_CREATURES = 53
PERK_MASTER_OF_ANIMATION = 54
-- Knight perks
PERK_HOLY_CHARGE = 55
PERK_PRAYER = 56
PERK_EXPERT_TRAINER = 57
-- Demonlord perks
PERK_CONSUME_CORPSE = 58
PERK_DEMONIC_FIRE = 59
PERK_DEMONIC_STRIKE = 60
-- Necromancer perks
PERK_RAISE_ARCHERS = 61
PERK_NO_REST_FOR_THE_WICKED = 62
PERK_DEATH_SCREAM = 63
-- Ranger perks
PERK_MULTISHOT = 64
PERK_SNIPE_DEAD = 65
PERK_IMBUE_ARROW = 66
-- Wizard perks
PERK_MAGIC_BOND = 67
PERK_MELT_ARTIFACT = 68
PERK_MAGIC_MIRROR = 69
-- Warlock perks
PERK_EMPOWERED_SPELLS = 70
PERK_DARK_RITUAL = 71
PERK_ELEMENTAL_VISION = 72
-- Feats
-- Knight
KNIGHT_FEAT_ROAD_HOME = 73
KNIGHT_FEAT_TRIPLE_BALLISTA = 74
KNIGHT_FEAT_ENCOURAGE = 75
KNIGHT_FEAT_RETRIBUTION = 76
KNIGHT_FEAT_HOLD_GROUND = 77
KNIGHT_FEAT_GUARDIAN_ANGEL = 78
KNIGHT_FEAT_STUDENT_AWARD = 79
KNIGHT_FEAT_GRAIL_VISION = 80
KNIGHT_FEAT_CASTER_CERTIFICATE = 81
KNIGHT_FEAT_ANCIENT_SMITHY = 82
KNIGHT_FEAT_PARIAH = 83
KNIGHT_FEAT_ELEMENTAL_BALANCE = 84
KNIGHT_FEAT_ABSOLUTE_CHARGE = 85
-- Demon Lord
DEMON_FEAT_QUICK_GATING = 86
DEMON_FEAT_MASTER_OF_SECRETS = 87
DEMON_FEAT_TRIPLE_CATAPULT = 88
DEMON_FEAT_GATING_MASTERY = 89
DEMON_FEAT_CRITICAL_GATING = 90
DEMON_FEAT_CRITICAL_STRIKE = 91
DEMON_FEAT_DEMONIC_RETALIATION = 92
DEMON_FEAT_EXPLODING_CORPSES = 93
DEMON_FEAT_DEMONIC_FLAME = 94
DEMON_FEAT_WEAKENING_STRIKE = 95
DEMON_FEAT_FIRE_PROTECTION = 96
DEMON_FEAT_FIRE_AFFINITY = 97
DEMON_FEAT_ABSOLUTE_GATING = 98
-- Necromancer
NECROMANCER_FEAT_DEATH_TREAD = 99
NECROMANCER_FEAT_LAST_AID = 100
NECROMANCER_FEAT_LORD_OF_UNDEAD = 101
NECROMANCER_FEAT_HERALD_OF_DEATH = 102
NECROMANCER_FEAT_DEAD_LUCK = 103
NECROMANCER_FEAT_CHILLING_STEEL = 104
NECROMANCER_FEAT_CHILLING_BONES = 105
NECROMANCER_FEAT_SPELLPROOF_BONES = 106
NECROMANCER_FEAT_DEADLY_COLD = 107
NECROMANCER_FEAT_SPIRIT_LINK = 108
NECROMANCER_FEAT_TWILIGHT = 109
NECROMANCER_FEAT_HAUNT_MINE = 110
NECROMANCER_FEAT_ABSOLUTE_FEAR = 111
-- Ranger
RANGER_FEAT_DISGUISE_AND_RECKON = 112
RANGER_FEAT_IMBUE_BALLISTA = 113
RANGER_FEAT_CUNNING_OF_THE_WOODS = 114
RANGER_FEAT_FOREST_GUARD_EMBLEM = 115
RANGER_FEAT_ELVEN_LUCK = 116
RANGER_FEAT_FOREST_RAGE = 117
RANGER_FEAT_LAST_STAND = 118
RANGER_FEAT_INSIGHTS = 119
RANGER_FEAT_SUN_FIRE = 120
RANGER_FEAT_SOIL_BURN = 121
RANGER_FEAT_STORM_WIND = 122
RANGER_FEAT_FOG_VEIL = 123
RANGER_FEAT_ABSOLUTE_LUCK = 124
-- Wizard
WIZARD_FEAT_MARCH_OF_THE_MACHINES = 125
WIZARD_FEAT_REMOTE_CONTROL = 126
WIZARD_FEAT_ACADEMY_AWARD = 127
WIZARD_FEAT_ARTIFICIAL_GLORY = 128
WIZARD_FEAT_SPOILS_OF_WAR = 129
WIZARD_FEAT_WILDFIRE = 130
WIZARD_FEAT_SEAL_OF_PROTECTION = 131
WIZARD_FEAT_COUNTERSPELL = 132
WIZARD_FEAT_MAGIC_CUSHION = 133
WIZARD_FEAT_SUPRESS_DARK = 134
WIZARD_FEAT_SUPRESS_LIGHT = 135
WIZARD_FEAT_UNSUMMON = 136
WIZARD_FEAT_ABSOLUTE_WIZARDY = 137
-- warlock
WARLOCK_FEAT_TELEPORT_ASSAULT = 138
WARLOCK_FEAT_SHAKE_GROUND = 139
WARLOCK_FEAT_DARK_REVELATION = 140
WARLOCK_FEAT_FAST_AND_FURIOUS = 141
WARLOCK_FEAT_LUCKY_SPELLS = 142
WARLOCK_FEAT_POWER_OF_HASTE = 143
WARLOCK_FEAT_POWER_OF_STONE = 144
WARLOCK_FEAT_CHAOTIC_SPELLS = 145
WARLOCK_FEAT_SECRETS_OF_DESTRUCTION = 146
WARLOCK_FEAT_PAYBACK = 147
WARLOCK_FEAT_ELITE_CASTERS = 148
WARLOCK_FEAT_ELEMENTAL_OVERKILL = 149
WARLOCK_FEAT_ABSOLUTE_CHAINS = 150
物品代码:
ARTIFACT_SWORD_OF_RUINS = 1
ARTIFACT_GREAT_AXE_OF_GIANT_SLAYING = 2
ARTIFACT_WAND_OF_X = 3
ARTIFACT_UNICORN_HORN_BOW = 4
ARTIFACT_TITANS_TRIDENT = 5
ARTIFACT_STAFF_OF_VEXINGS = 6
ARTIFACT_SHACKLES_OF_WAR = 7
ARTIFACT_FOUR_LEAF_CLOVER = 8
ARTIFACT_ICEBERG_SHIELD = 9
ARTIFACT_GOLDEN_SEXTANT = 10
ARTIFACT_CROWN_OF_COURAGE = 11
ARTIFACT_CROWN_OF_MANY_EYES = 12
ARTIFACT_PLATE_MAIL_OF_STABILITY = 13
ARTIFACT_BREASTPLATE_OF_PETRIFIED_WOOD = 14
ARTIFACT_PEDANT_OF_MASTERY = 15
ARTIFACT_NECKLACE_OF_BRAVERY = 16
ARTIFACT_WEREWOLF_CLAW_NECKLACE = 17
ARTIFACT_EVERCOLD_ICICLE = 18
ARTIFACT_NECKLACE_OF_POWER = 19
ARTIFACT_RING_OF_LIGHTING_PROTECTION = 20
ARTIFACT_RING_OF_LIFE = 21
ARTIFACT_RING_OF_HASTE = 22
ARTIFACT_NIGHTMARISH_RING = 23
ARTIFACT_BOOTS_OF_SPEED = 24
ARTIFACT_GOLDEN_HORSESHOE = 25
ARTIFACT_WAYFARER_BOOTS = 26
ARTIFACT_BOOTS_OF_INTERFERENCE = 27
ARTIFACT_ENDLESS_SACK_OF_GOLD = 28
ARTIFACT_ENDLESS_BAG_OF_GOLD = 29
ARTIFACT_ANGEL_WINGS = 30
ARTIFACT_LION_HIDE_CAPE = 31
ARTIFACT_PHOENIX_FEATHER_CAPE = 32
ARTIFACT_CLOAK_OF_MOURNING = 33
ARTIFACT_HELM_OF_ENLIGHTMENT = 34
ARTIFACT_CHAIN_MAIL_OF_ENLIGHTMENT = 35
ARTIFACT_DRAGON_SCALE_ARMOR = 36
ARTIFACT_DRAGON_SCALE_SHIELD = 37
ARTIFACT_DRAGON_BONE_GRAVES = 38
ARTIFACT_DRAGON_WING_MANTLE = 39
ARTIFACT_DRAGON_TEETH_NECKLACE = 40
ARTIFACT_DRAGON_TALON_CROWN = 41
ARTIFACT_DRAGON_EYE_RING = 42
ARTIFACT_DRAGON_FLAME_TONGUE = 43
ARTIFACT_ROBE_OF_MAGI = 44
ARTIFACT_STAFF_OF_MAGI = 45
ARTIFACT_CROWN_OF_MAGI = 46
ARTIFACT_RING_OF_MAGI = 47
ARTIFACT_DWARVEN_MITHRAL_CUIRASS = 48
ARTIFACT_DWARVEN_MITHRAL_GREAVES = 49
ARTIFACT_DWARVEN_MITHRAL_HELMET = 50
ARTIFACT_DWARVEN_MITHRAL_SHIELD = 51
ARTIFACT_SCROLL_OF_SPELL_X = 52
ARTIFACT_GRAAL = 53
ARTIFACT_BOOTS_OF_LEVITATION = 54
ARTIFACT_SKULL_HELMET = 55
ARTIFACT_VALORIOUS_ARMOR = 56
ARTIFACT_BOOTS_OF_SWIFTNESS = 57
ARTIFACT_MOONBLADE = 58
ARTIFACT_RING_OF_CELERITY = 59
ARTIFACT_BAND_OF_CONJURER = 60
ARTIFACT_EARTHSLIDERS = 61
ARTIFACT_RIGID_MANTLE = 62
ARTIFACT_JINXING_BAND = 63
ARTIFACT_BONESTUDDED_LEATHER = 64
ARTIFACT_WISPERING_RING = 65
ARTIFACT_HELM_OF_CHAOS = 66
ARTIFACT_TWISTING_NEITHER = 67
ARTIFACT_SANDALS_OF_THE_SAINT = 68
ARTIFACT_SHAWL_OF_GREAT_LICH = 69
ARTIFACT_RING_OF_DEATH = 70
ARTIFACT_NECROMANCER_PENDANT = 71
ARTIFACT_FREIDA = 72
ARTIFACT_RING_OF_THE_SHADOWBRAND = 73
ARTIFACT_ARTIFACT_EFFECT_COUNT = 74
法术代码:
SPELL_NONE = 0;
SPELL_MAGIC_ARROW = 1;
SPELL_MAGIC_FIST = 2;
SPELL_LIGHTNING_BOLT = 3;
SPELL_ICE_BOLT = 4;
SPELL_FIREBALL = 5;
SPELL_FROST_RING = 6;
SPELL_CHAIN_LIGHTNING = 7;
SPELL_METEOR_SHOWER = 8;
SPELL_IMPLOSION = 9;
SPELL_ARMAGEDDON = 10;
SPELL_CURSE = 11;
SPELL_SLOW = 12;
SPELL_DISRUPTING_RAY = 13;
SPELL_PLAGUE = 14;
SPELL_WEAKNESS = 15;
SPELL_ABILITY_WEAKNING_STRIKE = 16;
SPELL_FORGETFULNESS = 17;
SPELL_BERSERK = 18;
SPELL_BLIND = 19;
SPELL_HYPNOTIZE = 20;
SPELL_UNHOLY_WORD = 21;
SPELL_UNHOLY_WORD_HIT_EFFECT = 22;
SPELL_BLESS = 23;
SPELL_HASTE = 24;
SPELL_STONESKIN = 25;
SPELL_DISPEL = 26;
SPELL_DISPEL_FAIL = 27;
SPELL_BLOODLUST = 28;
SPELL_DEFLECT_ARROWS = 29;
SPELL_DEFLECT_ARROWS_HIT_EFFECT = 30;
SPELL_ANTI_MAGIC = 31;
SPELL_TELEPORT = 32;
SPELL_TELEPORT_FINISH_EFFECT = 33;
SPELL_CELESTIAL_SHIELD = 34;
SPELL_HOLY_WORD = 35;
SPELL_HOLY_WORD_HIT_EFFECT = 36;
SPELL_ARMAGEDDON_HIT_EFFECT = 37;
SPELL_LAND_MINE = 38;
SPELL_WASP_SWARM = 39;
SPELL_PHANTOM = 40;
SPELL_EARTHQUAKE = 41;
SPELL_ANIMATE_DEAD = 42;
SPELL_SUMMON_ELEMENTALS = 43;
SPELL_EFFECT_SUMMON_ELEMENTALS_AIR = 44;
SPELL_EFFECT_SUMMON_ELEMENTALS_EARTH = 45;
SPELL_EFFECT_SUMMON_ELEMENTALS_FIRE = 46;
SPELL_EFFECT_SUMMON_ELEMENTALS_WATER = 47;
SPELL_RESURRECT = 48;
SPELL_SUMMON_BOAT = 49;
SPELL_DIMENSION_DOOR = 50;
SPE
![](images/tx/tx-1217012.jpg)
小菜G
-
* 回复内容中包含的链接未经审核,可能存在风险,暂不予完整展示!
http://www.i**.com/
这里有下的 搜一下就有了