Discussion and Support

Skip to content

It is currently Sat Jan 20, 2018 8:17 am 

Forum rules

Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)

Reply to topic  [ 1 post ] 

Previous topic | Next topic 

  Print view

Author Message
Great Wyrm
Joined: Tue May 26, 2009 7:51 pm
Posts: 2060
Location: Philadelphia, PA
 Post subject: Instructions to make a macro that is called from a mod-set
PostPosted: Sun May 30, 2010 2:25 pm 
jsharen wrote:
(at least until a haste type effect can one day modify attacks)

Hummm... currently there is a Hasted mod-set that does modify attacks. But it modifies all attacks and movement speed.

Delving deeper, I have a JSON object inside the property PrivateJSON called Combat. A key in that object is "magicExtraAttack". If that gets set to 1, the attack sequence will be considered "Hasted".

The mod-set Divine Power gives an example of using this JSON object. Specifically you can check out the macro on the library token: tmDivinePower. What I am suggesting is you create a mod-set called Weapon of Speed and set "magicExtraAttack" to 1 when activated. Here is an untested sample that should be pretty close (note that this does NOT consider other mod-sets setting magicExtraAttack so it is not fool proof):

[H: tToken = json.get( macro.args, "token" ) ]
H: active = json.get( macro.args, "active" ) ]
H: switchToken( tToken ) ]

H: jCombat = json.get(PrivateJSON, "Combat")]
H, IF( json.isEmpty( jCombat ) ): jCombat = json.set( "{}", "magicExtraAttack", 0 ) ]

H, IF( active ), CODE: {
   [ PrivateJSON = json.set( PrivateJSON, "Combat", json.set( jCombat, "magicExtraAttack", 0 ) ) ]
   [ PrivateJSON = json.set( PrivateJSON, "Combat", json.set( jCombat, "magicExtraAttack", 1 ) ) ]


Currently I think only Divine Power toggles this property. So for the short term you should be fine as long as you toggle off/on WeaponOfSpeed any time Divine Power toggles off... kind of a kludge but will work for now.

Display posts from previous:  Sort by  
Reply to topic  [ 1 post ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman