Could anyone show me how to add multiple passives all in one go?
Here's an example passive adding script:
Code: Select all
{$lua}
if syntaxcheck then return end
local value = "SculptSpells"
local cmdCall = getAddress("cmdCall")
local cmdArgs = getAddress("cmdArgs")
local cmdStr1 = getAddress("cmdStr1")
local cmdStr2 = getAddress("cmdStr2")
PrepareCall("GetHostCharacter")
executeCodeEx(0, nil, cmdCall)
local player = readPointer(cmdArgs + 0x08)
player = readString(player, 256, false)
writeString(cmdStr1, player)
writeBytes(cmdStr1 + #player, 0)
writeString(cmdStr2, value)
writeBytes(cmdStr2 + #value, 0)
PrepareCall("AddPassive")
writePointer(cmdArgs + 0x08, cmdStr1)
writePointer(cmdArgs + 0x18, cmdStr2)
writeQword(cmdArgs + 0x28, 0)
writeQword(cmdArgs + 0x38, 0)
local result = executeCodeEx(0, nil, cmdCall)
if result ~= 1 then
print("command failed")
end
{$asm}
[DISABLE]
And here's an example multi-spell adding script:
Code: Select all
[ENABLE]
{$lua}
if syntaxcheck then return end
local spellList = {
"Target_CreateDestroyWater",
"Target_SpeakWithDead",
"Teleportation_Revivify",
"Target_MistyStep",
"Teleportation_ArcaneGate",
"Projectile_ChainLightning",
"Projectile_Disintegrate",
"Target_Heal",
"Target_RemoveCurse",
"Target_ArcaneLock",
"Shout_WindWalk",
"Target_CircleOfDeath",
"Target_PowerWordKill",
"Target_MF_ConcentratedBlast",
"Zone_MindBlast_MindFlayer",
"Target_ExtractBrain_Player_Mindflayer",
"Target_Invisibility_Greater",
"Shout_ProduceFlame",
"Target_Knock",
}
local cmdCall = getAddress("cmdCall")
local cmdArgs = getAddress("cmdArgs")
local cmdStr1 = getAddress("cmdStr1")
PrepareCall("GetHostCharacter")
executeCodeEx(0, nil, cmdCall)
PrepareCall("AddSpell")
writePointer(cmdArgs + 0x18, cmdStr1)
writeQword(cmdArgs + 0x28, 0)
writeQword(cmdArgs + 0x38, 0)
for spell = 1, #spellList do
uuid = spellList[spell]
writeString(cmdStr1, uuid)
writeBytes(cmdStr1 + #uuid, 0)
local result = executeCodeEx(0, nil, cmdCall)
print(result == 1 and "success added ",uuid or "failed to add ",uuid)
end
print("done")
{$asm}
[DISABLE]
I don't understand enough about what's going on in the code to figure out how to alter the passive one similarly.
edit: Ah with the latest console command code maybe I don't need any of that. I could probably just do...
Code: Select all
{$lua}
if syntaxcheck then return end
passive = {
"CAMP_Volo_ErsatzEye",
"UnarmouredDefence_Barbarian",
"Durable",
"FastMovement",
"MageSlayer_Advantage",
"MageSlayer_AttackCaster",
"MageSlayer_BreakConcentration",
"Mobile_PassiveBonuses",
"Mobile_CounterAttackOfOpportunity",
"Mobile_DashAcrossDifficultTerrain",
"Performer",
"SavageAttacker",
"Sentinel_Attack",
"Sentinel_ZeroSpeed",
"Sentinel_OpportunityAdvantage",
"ShieldMaster_PassiveBonuses",
"ShieldMaster_Block",
"Tough",
"ImmuneToDisarm",
"Regeneration_Vampire",
"Regeneration_Vampire_Spawn",
"SpiderFallResistance",
"UndeadFortitude",
"Smite_Divine_3",
"Alert",
"JackOfAllTrades",
"ReliableTalent",
"LightlyArmored",
"ModeratelyArmored",
"HeavilyArmored"
}
[ENABLE]
AddPassiveToPlayer(passive)
[DISABLE]