Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API Example script
Author Message
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #31
RE: API Example script
(27-12-2012 06:00 PM)KRS_LAN Wrote:  
(27-12-2012 05:40 PM)Topper42 Wrote:  A unit with end health == 0 is not excluded it just has the damageRatio = 1 which means full repair costs.

Thanks for the reply, but that's not at all what I said.

"a completely destroyed unit (which isn't included in battle)".

So this means units which have a start health of 0.

Anyway, I think I have solved it myself. The game ignores these units all together along with units which are disabled.

Yep, completly right Smile
27-12-2012 06:00 PM
 Search   Quote 
FRISH Offline
Posting Freak
*****

Posts: 2,415
Joined: Feb 2012
Post: #32
RE: API Example script
(27-12-2012 05:17 PM)Topper42 Wrote:  What are you talking about? Is this in any kind related to this thread?

I was showing appreciation for this which mr meaniefais made it look like I was talking to him D:

[Image: utEo2eW.jpg]
27-12-2012 06:53 PM
 Search   Quote 
alwaysshariff Offline
Junior Member
**

Posts: 4
Joined: Jun 2012
Post: #33
RE: API Example script
Darn my ancestors. Where do I find this script. I have no knowledge of these except I google find a script and install. Bugger all that did to me. Please you learned friends of this community. Gissa chance to enjoy the game without all knows all: indulgance. thank you
27-12-2012 07:02 PM
 Search   Quote 
FRISH Offline
Posting Freak
*****

Posts: 2,415
Joined: Feb 2012
Post: #34
RE: API Example script
(27-12-2012 07:02 PM)alwaysshariff Wrote:  Darn my ancestors. Where do I find this script. I have no knowledge of these except I google find a script and install. Bugger all that did to me. Please you learned friends of this community. Gissa chance to enjoy the game without all knows all: indulgance. thank you

http://userscripts.org/scripts/show/155079

[Image: utEo2eW.jpg]
27-12-2012 07:05 PM
 Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #35
RE: API Example script
(27-12-2012 06:53 PM)FRISH Wrote:  
(27-12-2012 05:17 PM)Topper42 Wrote:  What are you talking about? Is this in any kind related to this thread?

I was showing appreciation for this which mr meaniefais made it look like I was talking to him D:

Ahh ok, the post order is completly screwed.
27-12-2012 07:33 PM
 Search   Quote 
FRISH Offline
Posting Freak
*****

Posts: 2,415
Joined: Feb 2012
Post: #36
RE: API Example script
Yep, which adds to the confusion Big Grin

[Image: utEo2eW.jpg]
27-12-2012 07:51 PM
 Search   Quote 
StryfeASphears Offline
Junior Member
**

Posts: 33
Joined: Nov 2012
Post: #37
RE: API Example script
(27-12-2012 07:05 PM)FRISH Wrote:  
(27-12-2012 07:02 PM)alwaysshariff Wrote:  Darn my ancestors. Where do I find this script. I have no knowledge of these except I google find a script and install. Bugger all that did to me. Please you learned friends of this community. Gissa chance to enjoy the game without all knows all: indulgance. thank you

http://userscripts.org/scripts/show/155079

installed this in tampermonkey and it doesn't work or show up at all!

Edit:Ok used the error finder in tampermonkey it now works!
(This post was last modified: 28-12-2012 01:04 AM by StryfeASphears.)
28-12-2012 12:32 AM
 Search   Quote 
Peluski17 Offline
Member
***

Posts: 133
Joined: Nov 2012
Post: #38
RE: API Example script
Topper42, what are the file locations for the Total Victory, Victory, and Total Defeat icons? I like how you used them in your advanced script and I would like to incorporate them into my own.

Thanks for all your help!
28-12-2012 03:10 AM
 Search   Quote 
Peluski17 Offline
Member
***

Posts: 133
Joined: Nov 2012
Post: #39
RE: API Example script
(26-12-2012 05:00 PM)Topper42 Wrote:  I, also work on an advanced version but i'm not sure if i will release it.

Just a little peak, so the scripting competition may begin Wink

[Image: combatwindow.png]

Is the loot data obtained from the simulation found within the data parameter in OnSimulateBattleFinished: function(data) assuming it's written following the API Example?
28-12-2012 07:08 AM
 Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #40
RE: API Example script
(28-12-2012 03:10 AM)Peluski17 Wrote:  Topper42, what are the file locations for the Total Victory, Victory, and Total Defeat icons? I like how you used them in your advanced script and I would like to incorporate them into my own.

Thanks for all your help!

Here you go:

Code:
"FactionUI/icons/icon_reports_total_victory.png"
"FactionUI/icons/icon_reports_total_defeat.png"
"FactionUI/icons/icon_reports_victory.png"
"FactionUI/icons/icon_reports_defeat.png"
28-12-2012 06:53 PM
 Search   Quote 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)