Combat Report Generator - Test

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Combat Report Generator - Test

    [center]Combat Report:(katin) >>> (precell)Sun, 22.02.2015 - 17:02:43[/center]
    Battle round 1
    UnitsSum Destroyed Sum Destroyed
    Schakal10011
    Attack index70 * 86% = 607 * 81% = 6
    Defense index39040
    Chances of Winning97%3%
    Chances of Espionage0%
    Captured Resources
    Iron0
    Lutinum0
    Water3.200
    Hydrogen 0

    You can add to the board BBcode?

    Source Code

    1. [center]Text[/center]
    2. colspan="number"
  • I urge my request to add BBcode:

    Source Code

    1. [center]Text[/center]
    2. colspan="number"


    Converter code isn't finish yet. I don't know how do add loop. I want it will work under each raport, now it work only in first.

    Source Code

    1. $(document).ready(function() {
    2. $('td[style="text-align:left;"]').addClass('RW'); //Dodanie klasy do komórki tabeli odpowiedzialnej za RW
    3. var MyRC = $('.RW').html();
    4. MyRC = MyRC.replace(/<center>/g, '[center][color=#006666][b]');
    5. MyRC = MyRC.replace(/<\/center>/g, '[/b][/color][/center]');
    6. MyRC = MyRC.replace(/<table style=\"text-align:center;\" width=\"99%\">/g, '[table]');
    7. MyRC = MyRC.replace(/<\/table>/g, '[/table]');
    8. MyRC = MyRC.replace(/<td class=\"main\" width=\"180\">/g, '[td]');
    9. MyRC = MyRC.replace(/<tbody>/g, '');
    10. MyRC = MyRC.replace(/<\/tbody>/g, '');
    11. MyRC = MyRC.replace(/<tr>/g, '[tr]');
    12. MyRC = MyRC.replace(/<\/tr>/g, '[/tr]');
    13. MyRC = MyRC.replace(/<td colspan=\"5\" class=\"main\">/g, '[td]');
    14. MyRC = MyRC.replace(/<td colspan=\"2\" class=\"main\">/g, '[td]');
    15. MyRC = MyRC.replace(/<td>/g, '[td]');
    16. MyRC = MyRC.replace(/<\/td>/g, '[/td]');
    17. MyRC = MyRC.replace(/<td class=\"main\" width=\"20%\">/g, '[td]');
    18. MyRC = MyRC.replace(/<td class=\"main\" width=\"15%\">/g, '[td]');
    19. MyRC = MyRC.replace(/<td class=\"main\">/g, '[td]');
    20. MyRC = MyRC.replace(/<td colspan=\"5\">/g, '[td]');
    21. MyRC = MyRC.replace(/<td class=\"main\" valign=\"top\">/g, '[td]');
    22. MyRC = MyRC.replace(/<td colspan=\"2\">/g, '[td]');
    23. MyRC = MyRC.replace(/<td colspan=\"3\">/g, '[td]');
    24. MyRC = MyRC.replace(/<br>/g, '');
    25. MyRC = MyRC.replace(/<a href="(.*?)">/g, '');
    26. MyRC = MyRC.replace(/<\/a>/g, '');
    27. MyRC = MyRC.replace(/Battle round 1/g, '[color=#0000FF][b]Battle round 1[/b][/color]');
    28. MyRC = MyRC.replace(/Battle round 2/g, '[color=#0000FF][b]Battle round 2[/b][/color]');
    29. MyRC = MyRC.replace(/Battle round 3/g, '[color=#0000FF][b]Battle round 3[/b][/color]');
    30. MyRC = MyRC.replace(/Battle round 4/g, '[color=#0000FF][b]Battle round 4[/b][/color]');
    31. MyRC = MyRC.replace(/Battle round 5/g, '[color=#0000FF][b]Battle round 5[/b][/color]');
    32. MyRC = MyRC.replace(/Units/g, '[b][color=#804000]Units[/color][/b]');
    33. MyRC = MyRC.replace(/Sum/g, '[color=#00BF40][b]Sum [/b][/color]');
    34. MyRC = MyRC.replace(/Destroyed/g, '[b][color=#FF0000]Destroyed [/color][/b]');
    35. MyRC = MyRC.replace(/Captured/g, '[b][color=#009900]Captured[/color][/b]');
    36. MyRC = MyRC.replace(/Details/g, '[b][color=#996600]Details[/color][/b]');
    37. MyRC = MyRC.replace(/Iron/g, '[b]Iron[/b]');
    38. MyRC = MyRC.replace(/Lutinum/g, '[b]Lutinum[/b]');
    39. MyRC = MyRC.replace(/Water/g, '[b]Water[/b]');
    40. MyRC = MyRC.replace(/Hydrogen/g, '[b]Hydrogen [/b]');
    41. MyRC = MyRC.replace(/Resources/g, '[b][color=#009900]Resources[/color][/b]');
    42. $('.RW').append('<div><form action="noaction"><textarea id="bbcode" cols="50" rows="6">'+MyRC+'</textarea><input type="button" class="planet" value="Zaznacz bbCode" onClick="javascript:bbcode.focus();bbcode.select();"></form></div>'); //Dodanie pola tekstowego pod każdym raportem
    43. })
    Display All
  • Combat Report: (precell) >>> (Kamui)2015-09-11 19:38:48

    Battle round 1
    UnitsSum Destroyed Sum Destroyed
    Espionage Probe1000
    Attack index 0 * 94% = 00 * 78% = 0
    Defense index 10
    Chances of Winning 100%0%
    Chances of Espionage 100%

    Captured Resources
    Iron17
    Lutinum17
    Water17
    Hydrogen 17

    Details
    Command Center51
    Research Center15
    Iron Mine90
    Lutinum Refinery82
    Drilling Rig35
    Chemical Plant63
    Advanced Chemical Plant8
    Iron Storage25
    Lutinum Storage25
    Water Tanks7
    Hydrogen Tanks18
    Ship Factory17
    Orbital Defense Station1
    Planetary Shield1
    Fusion Reactor1

    Resources
    Iron429.053
    Lutinum420.136
    Water106.426
    Hydrogen 277.320

    Generator RW by Precell z http://tvmaniacy.pl

    It works ;-)