JavaScript is required. Please enable it to continue.
Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
,
,
,
,
,
<div class="chat"> <b>The Great pirate</b>: write your own story! One day you wake up not expecting to be any different: a year ago when your ship was captured by pirates you had no chance to do anything else but to join them. And since then you sail in Caribbean seas doing whatever you captain orders you. But tonight your captain died after few days fighting measles. And after pirate funeral crew voted... and you became the captain. Now you decide to build a future for yourself. Proceed life of a pirate or become mailman, soldier, or a trader. It is up to you now: will you hunt glory, gold, sink ships or conquer girl's hearts. What is your new name, captain? <<textbox "$pname" "John River">> What is your ship's name? <<textbox "$sname" "Good Revenge">> [[Set sail!|Map System][$player.name to $pname, $player.shipname to $sname]] </div>
<<nobr>> <<set $version to "v.1.1.0">> <<set $femalesnumber to 0>> <<set $maxfemales to 28>> <<set _picslist to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]>> <<set $imagepath to "https://the-great-pirate.hostingerapp.com/pics/">> <<set $activemissions to []>> <<set $attackNumber to 0>> <<set $hullbasedmg = 12>> <<set $sailsbasedmg = 12>> <<set $gameDate to new Date(1684, 5, 19, 3, 24)>> <<set $moveonmap = 50>> <<set $defeatedships to []>> <<set $player to { name : "", ship : "Sloop", shipname: "Bermuda Sloop", maxspeed : 2, speed : 2.75, hull : 100, hullstr : 1, maneuverability : 4, loadedguns : 3, guns : 3, maxguns: 5, fired : 0, crew : 26, maxcrew : 45, cargo : 0, sails : 100, sailstr : 1, loot : 10, fame : 0, shootingposition: 0, mapX : 650, mapY : 50, Spain : 0, France : 0, Netherlands : 0, England : 0, Pirates : 0, pic : "sloop.jpg", letterofmarque : "none" }>> <<set $history to { missionscompleted : 0, missionsfailed : 0, totalmissions : 0, seabattlesfought : 0, seabatltesfled : 0, shipssunk : 0, peoplekilled : 0, cannonsdestroyed : 0, crewlost : 0, citiesvisited : 0, girlsvisited : 0, lootplundered : 0 }>> <<set $mapArray to [ [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], [0,0,0,0,0,0,0,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,1,1,0,0,0,0,1,1,1,0,0,6,0,0,0,0,0,0,0,0,0,0], [0,0,1,1,1,0,0,0,0,0,0,7,1,0,0,1,1,0,0,0,0,0,0,0,0], [1,1,1,1,0,0,0,0,0,0,0,0,0,0,5,1,9,0,10,11,0,0,0,0,0], [1,1,1,1,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,12,0,0], [1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0], [1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,0,0], [1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,14,1,1,1,1,1,1,1,1,0], [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]>> /% No, Name, top, left, Wealth, Population, Country, Color, Shipyard, Tavern, Bank, Jail, Market, Last crew hiring, x, y, Governor, Mayor %/ <<set $cities to [ [0, "Placeholder", 800, 900, 3, 200, "England", "orange", 1, 1, 0, 0, 0, "", 0, 0, 0, 0], [1, "Placeholder", 800, 950, 3, 200, "France", "orange", 1, 1, 0, 0, 0, "", 0, 0, 0, 0], [2, "St. Augustine", 10, 450, 3, 200, "Spain", "orange", 1, 1, 0, 0, 0, "", 1, 9, 0, 1], [3, "Nassau", 111, 533, 4, 350, "Netherlands", "yellow", 1, 1, 1, 1, 0, "", 3, 11, 1, 1], [4, "Havana", 188, 404, 5, 400, "Spain", "orange", 1, 1, 1, 1, 0, "", 5, 8, 1, 1], [5, "Port-pau-Prince", 341, 729, 4, 300, "France", "blue", 1, 1, 0, 0, 0, "", 8, 14, 1, 1], [6, "Tortuga", 258, 691, 1, 200, "Pirates", "black", 1, 1, 0, 0, 0, "", 6, 14, 0, 0], [7, "Santiago de Cuba", 290, 600, 3, 300, "England", "red", 1, 1, 1, 0, 0, "", 7, 11, 0, 1], [8, "Kingston", 368, 578, 4, 400, "England", "red", 1, 1, 1, 1, 0, "", 9, 11, 1, 1], [9, "Santo Domingo", 347, 802, 5, 700, "Spain", "orange", 1, 1, 1, 1, 0, "", 8, 16, 0, 1], [10, "San Germán", 362, 910, 2, 200, "Spain", "orange", 1, 1, 0, 0, 0, "", 8, 18, 0, 1], [11, "San Juan", 352, 950, 3, 300, "Spain", "orange", 1, 1, 0, 0, 0, "", 8, 19, 0, 1], [12, "St. Kitts", 387, 1095, 3, 300, "France", "blue", 1, 1, 0, 0, 0, "", 9, 22, 0, 1], [13, "Saint-Pierre", 475, 1125, 4, 500, "France", "blue", 1, 1, 0, 0, 0, "", 11, 22, 0, 1], [14, "Sexy Beach", 691, 779, 0, 1, "Pirates", "white", 0, 0, 0, 0, 0, "", 13, 15, 0, 0] ]>> <<set _malenames to ["Alonso", "Andrés", "Antonio", "Cristóbal", "Diego", "Francisco", "Gonzalo", "Hernán", "Hernando", "Juan", "Pedro", "Rodrigo", "John", "Abraham", "Brian"]>> <<set _femalenames to ["Aquila", "Amphilis", "Anis", "Annabell", "Arabella", "Audrey", "Augusta", "Aurelia", "Avis", "Azoah", "Barbara", "Barsheba", "Bethsaby", "Blanche", "Blythe", "Bridget", "Cecily", "Charissima", "Christabella", "Christiana", "Dessorell", "Diana", "Dinah", "Dorcas", "Edonie", "Etheldreda", "Eunice", "Euphanie", "Fanstine", "Grisell", "Hezekiah", "Honoria", "Jemima", "Jeronomie", "Keziah", "Leah", "Leticia", "Lettice", "Lucretia", "Mariella", "Marina", "Mirabel", "Mildred", "Millicent", "Monica", "Muriel", "Nazareth", "Octavia", "Pauline", "Penelope", "Philippa", "Phillis", "Phoebe", "Priscilla", "Rhoda", "Rosamond", "Sebeliah", "Sustillian", "Tabitha", "Tamar", "Theodora", "Thodorien", "Theodosia", "Thomasin", "Tryphena", "Ursula ", "Valentine", "Vecula", "Verily", "Veronica", "Zipporah "]>> <<set _surnames to ["Appleyard", "Astley", "Bassingborne", "Bassinson", "Bongoman", "Bryant", "Bunday", "Chaplin", "Fairbrother", "Fairefax", "Faken", "Firmin", "Grantham", "Gillbride", "Hamond", "Hansill", "Moore", "Myhill", "Osborne", "Palgrane", "Parker", "Paston", "Pole", "Sampson", "Schuldam", "Sheldrake", "Shovell", "Wentworth", "Woolstone", "Bennet", "Clease", "Clopton", "Elling ", "Friswell ", "Knevett ", "Oley", "Parnell", "Pagrane ", "Palgrave ", "Swithin", "Wellthean ", "Willoughby ", "Wyborough ", "Annison"]>> <<set $NPCs = []>> <<set _charcount to 0>> <<for $i to 2; $i lt $cities.length; $i++>> <<set $cities[$i][13] to new Date(1684, 5, 10, 3, 15)>> <<if $cities[$i][0] neq 14>> <<for _j to 0; _j lt 5; _j++>> <<set _tempNPC = {}>> <<set _tempNPC.id to _charcount>> <<set _charcount++>> <<set _tempNPC.cityid to $cities[$i][0]>> <<set _tempNPC.city to $cities[$i][1]>> <<if _j eq 0 and $cities[$i][8] eq 1>><<set _tempNPC.location to "Shipyard">> <<elseif _j eq 1 and $cities[$i][9] eq 1>><<set _tempNPC.location to "Tavern">> /%<<elseif _j eq 5 and $cities[$i][10] eq 1>><<set _tempNPC.location to "Bank">> <<elseif _j eq 6 and $cities[$i][11] eq 1>><<set _tempNPC.location to "Jail">> <<elseif _j eq 7 and $cities[$i][12] eq 1>><<set _tempNPC.location to "Market">>%/ <<elseif _j eq 2 and $cities[$i][16] eq 1>><<set _tempNPC.location to "Governor">> <<elseif _j eq 3 and $cities[$i][17] eq 1>><<set _tempNPC.location to "Mayor">> <<else>> <<set _tempNPC.location to "City">> <</if>> <<set _tempNPC.sex = ["male", "female"].random()>> <<set _tempNPC.country = $cities[$i][6]>> <<if _tempNPC.sex eq "male">> <<set _tempNPC.name = _malenames.random()>> <<set _tempNPC.folder ="0m">> <<else>> <<set _tempNPC.name = _femalenames.random()>> <<set $femalesnumber++>> <<if $femalesnumber lte $maxfemales>> <<set _tempNPC.folder to _picslist.random()>> <<run _picslist.delete(_tempNPC.folder)>> <<else>> <<set _tempNPC.folder to "0">> <</if>> <</if>> <<set _tempNPC.surname = _surnames.random()>> <<set _tempNPC.affection = 0>> <<set _tempNPC.lasttalk to new Date(1684, 5, 11, 3, 15)>> <<set _tempNPC.age = random(18, 40)>> <<set $NPCs.push(_tempNPC)>> <</for>> <</if>> <</for>> <<set $maxNPCpics to [ [0, 100, 200, 0, 0, 0], [5, 111, 213, 403, 504, 702], [2, 103, 207, 403, 503, 702], [3, 107, 212, 405, 505, 702], [3, 109, 211, 404, 503, 702], [3, 104, 211, 403, 507, 703], [4, 103, 213, 403, 505, 702], [7, 105, 210, 406, 508, 703], [4, 103, 212, 405, 509, 704], [4, 106, 208, 408, 507, 704], [4, 104, 212, 406, 505, 703], [2, 110, 214, 404, 510, 703], [3, 109, 216, 408, 507, 703], [2, 106, 217, 407, 512, 703], [5, 107, 211, 408, 507, 704], [4, 112, 222, 408, 512, 704], [2, 106, 216, 407, 513, 705], [3, 105, 213, 403, 511, 703], [2, 110, 214, 406, 509, 705], [3, 109, 211, 403, 514, 703], [3, 108, 210, 407, 512, 704], [2, 108, 213, 408, 512, 704], [4, 109, 213, 403, 511, 703], [2, 109, 212, 404, 510, 702], [3, 109, 214, 407, 512, 705], [5, 110, 215, 404, 507, 704], [2, 105, 214, 404, 514, 701], [6, 111, 216, 405, 513, 703], [6, 105, 210, 405, 509, 704], ]>> <<set $positionX to 13>> <<set $positionY to 2>> <</nobr>> /%<<for _i = 0; _i < $NPCs.length; _i++>> $NPCs[_i].id : <<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">> City = <<print $NPCs[_i].city>>, <<print $NPCs[_i].location>> Name = <<print $NPCs[_i].name>> <<print $NPCs[_i].surname>>, Age = <<print $NPCs[_i].age>>, <<print $NPCs[_i].sex>> <<print $NPCs[_i].affection>> <<print $NPCs[_i].lasttalk>> <</for>> %/ <<include Ships>> <<display "Mission types">>
<<nobr>><<display "Encounter">> <<script>>UIBar.show()<</script>> <<display "Location 2">> <div class="navigation">Captain, where we should sail? <div class="navfix"> <div class="navbox"> <<if $mapArray[$positionY-1][$positionX-1] eq 0>> <<button[[Northwest]]>><</button>> <<elseif $mapArray[$positionY-1][$positionX-1] gt 1>> <span class="navcity">[[""+ $cities[$mapArray[$positionY-1][$positionX-1]][1] + ""|City][$positionY--;$positionX--; $player.mapY -= $moveonmap; $player.mapX -= $moveonmap]]</span> <</if>></div> <div class="navbox"> <<if $mapArray[$positionY-1][$positionX] eq 0>> <<button[[North]]>> <</button>> <<elseif $mapArray[$positionY-1][$positionX] gt 1>> <span class="navcity">[[""+ $cities[$mapArray[$positionY-1][$positionX]][1]+""|City][$positionY--; $player.mapY -= $moveonmap]]</span> <</if>></div> <div class="navbox"> <<if $mapArray[$positionY-1][$positionX+1] eq 0>> <<button[[Northeast]]>> <</button>> <<elseif $mapArray[$positionY-1][$positionX+1] gt 1>> <span class="navcity">[[""+ $cities[$mapArray[$positionY-1][$positionX+1]][1]+""|City][$positionY--;$positionX++; $player.mapY -= $moveonmap; $player.mapX += $moveonmap]]</span> <</if>></div> </div> <div class="navfix"> <div class="navbox"> <<if $mapArray[$positionY][$positionX-1] eq 0>> <<button[[West]]>> <</button>> <<elseif $mapArray[$positionY][$positionX-1] gt 1>> <span class="navcity">[[""+ $cities[$mapArray[$positionY][$positionX-1]][1]+""|City][$positionX--; $player.mapX -= $moveonmap]]</span> <<endif>> </div> <div class="navbox"></div> <div class="navbox"> <<if $mapArray[$positionY][$positionX+1] eq 0>> <<button[[East]]>> <</button>> <<elseif $mapArray[$positionY][$positionX+1] gt 1>> <span class="navcity">[[""+ $cities[$mapArray[$positionY][$positionX+1]][1]+""|City][$positionX++; $player.mapX += $moveonmap]] </span> <<endif>> </div> </div> <div class="navfix"> <div class="navbox"> <<if $mapArray[$positionY+1][$positionX-1] eq 0>> <<button[[Southwest]]>> <</button>> <<elseif $mapArray[$positionY+1][$positionX-1] gt 1>> <span class="navcity">[[""+ $cities[$mapArray[$positionY+1][$positionX-1]][1]+""|City][$positionY++;$positionX--; $player.mapY += $moveonmap; $player.mapX -= $moveonmap]]</span> <</if>></div> <div class="navbox"> <<if $mapArray[$positionY+1][$positionX] eq 0>> <<button[[South]]>> <</button>> <<elseif $mapArray[$positionY+1][$positionX] gt 1>> <span class="navcity">[[""+$cities[$mapArray[$positionY+1][$positionX]][1]+""|City][$positionY++; $player.mapY += $moveonmap]]</span> <<endif>> </div> <div class="navbox"> <<if $mapArray[$positionY+1][$positionX+1] eq 0>> <<button[[Southeast]]>> <</button>> <<elseif $mapArray[$positionY+1][$positionX+1] gt 1>> <span class="navcity">[[""+ $cities[$mapArray[$positionY+1][$positionX+1]][1]+""|City][$positionY++;$positionX++; $player.mapY += $moveonmap; $player.mapX += $moveonmap]]</span> <</if>></div> </div></div> <</nobr>> <<script>>ga("send", "event", "passage", "loaded", "Map");<</script>>
<<nobr>> <<script>>UIBar.hide()<</script>> <</nobr>> <div class="chat"> <<Help 1>> Current distance between ships <<print $distance>>. Your command, captain: <b>GUNS:</b>You have <<print $player.loadedguns>>/<<print $player.guns>> loaded.<<if $distance gt 1>> You are too far away for your guns. <<elseif $player.guns gt 0>> <<if $player.loadedguns gt 0>> [[Target hull!|Target hull]] | [[Target sails!|Target sails]] | [[Target crew!|Target crew]] | [[Target cannons!|Target guns]] | [[Fire at will!|Target default]] <<else>> Guns are reloading... <</if>> <<else>> You have no cannons left! [[Surrender]]. <</if>> <b>NAVIGATION</b>: [[Evasive maneuvers]] | [[Improve firing position]] <<if $distance gt 0>>| [[Close up|Closer]] <</if>>| [[Drop back|Backoff]]<<nobr>> <<if $distance gte 1.5>> | [[Flee from battle|Map System][$history.seabatltesfled++]]. <<else>> <<if $player.crew <=6 or $player.guns <=2 or $player.sails <=30 or $player.hull <=10>>| [[Surrender]]. <</if>> <</if>> <<if $player.hull <= 0>> <<goto "Dead End">> <</if>> <<if $player.crew <=0 or $player.guns <=0 or $player.sails <=10 or $player.hull <=10>> <<goto "Surrender">> <</if>> <</nobr>></div> <<script>>ga("send", "event", "passage", "loaded", "Fight");<</script>>
<<nobr>> <<set $positionY -= 1>> <<set $player.mapY -= $moveonmap>> <<set _traveltime = 12 / $player.sails * $player.speed / 3 * 100 * 60>> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<<nobr>> <<set $positionY += 1>> <<set $player.mapY += $moveonmap>> <<set _traveltime = 12 / $player.sails * $player.speed / 3 * 100 * 60 >> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<<nobr>> <<set $positionX += 1>> <<set $player.mapX += $moveonmap>> <<set _traveltime = 12 / $player.sails * $player.speed / 3 * 100 * 60>> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<<nobr>> <<set $positionX -= 1>> <<set $player.mapX -= $moveonmap>> <<set _traveltime = 12 / $player.sails * $player.speed / 3 * 100 * 60>> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<span id="map"> <<nobr>> <<for $i to 0; $i lt $mapArray.length; $i++>> <<for $k to 0; $k lt $mapArray[$i].length; $k++>> <<if $k eq $positionX and $i eq $positionY>> <font color="Red"><<print "⛵">></font> <<elseif $mapArray[$i][$k] eq 0>> <font color="DodgerBlue"><<print "~">></font> <<elseif $mapArray[$i][$k] eq 1>> <font color="green"><<print "#">></font> <<elseif $mapArray[$i][$k] eq 2>> <div color="white" class="tooltip"><<print "⚑">><span class="tooltiptext">City</span></div> <</if>> <</for>> <<print "<br>">> <</for>> <</nobr>> </span>
<<if $cities[$mapArray[$positionY][$positionX]][0] eq 14>> <<goto "SexyBeach">><</if>> <div class="chat">Welcome to <<print $cities[$mapArray[$positionY][$positionX]][1]>>. City controlled by <<print $cities[$mapArray[$positionY][$positionX]][6]>>. City has population of <<print $cities[$mapArray[$positionY][$positionX]][5]>>. City's wealth: <<print $cities[$mapArray[$positionY][$positionX]][4]>>. City has: <<if $cities[$mapArray[$positionY][$positionX]][8] eq 1>> [[Shipyard]]<</if>> <<if $cities[$mapArray[$positionY][$positionX]][9] eq 1>> [[Tavern]]<</if>> <<if $cities[$mapArray[$positionY][$positionX]][10] eq 1>> [[Bank]]<</if>> <<if $cities[$mapArray[$positionY][$positionX]][11] eq 1>> [[Jail]]<</if>> <<if $cities[$mapArray[$positionY][$positionX]][12] eq 1>> [[Market]]<</if>> <<if $cities[$mapArray[$positionY][$positionX]][16] eq 1>> [[Governor]]<</if>> <<if $cities[$mapArray[$positionY][$positionX]][17] eq 1>> [[Mayor]]<</if>> <<set $currentcity = $cities[$mapArray[$positionY][$positionX]][1]>> You see townfolk: <<nobr>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "City" >><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">> [[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]] |<</if>><</capture>> <</for>> <</nobr>> [[Sail away|Map System]] </div> <<script>>ga("send", "event", "passage", "loaded", "Visit City");<</script>>
<<display "Stats">>
<<print String.format("{0} {1} {2}, {3}", GameDays[$gameDate.getDay()], GameMonths[$gameDate.getMonth()], $gameDate.getDate(), $gameDate.getFullYear() )>> <<time24hr>> ------ <b><<print $player.name>></b> <<print $player.ship + " " + $player.shipname>> Hull: <<print $player.hull>>% Sails: <<print $player.sails>>% Cannons: <<print $player.guns*2>> Ship crew: <<print $player.crew>> Gold: <<print $player.loot>> Fame: <<print $player.fame>> Country affections: Spain <<print $player.Spain>> England <<print $player.England>> Netherlands <<print $player.Netherlands>> France <<print $player.France>> Letter of marque: <<print $player.letterofmarque>> [[Missions list|Mission list]] [[Ship list]] ------ <<print $version>> <a href="https://www.patreon.com/bePatron?u=22572849" data-patreon-widget-type="become-patron-button" target=”_blank”><<print "<img style=\"width:150px\" src=\""+ $imagepath +"PatronButton.png\">">></a> <a href="https://the-great-pirate.hostingerapp.com/highscores.php" target="_blank"><b>High scores</b></a>
<<nobr>> <<if $attackNumber gt 11>> <<set $attackNumber to 11>> <</if>> <<if $attackNumber gt 2>> <<set $chance to random($attackNumber, 12)>> <<if $chance eq 11>> You see a ship in horizon! [[Investigate|Investigate2]] it. <<set $attackNumber to 1>> <<goto Investigate2>> <<elseif $chance eq 12>> You have been attacked by enemy ship [[Fight|Closer]]. <<set $attackNumber to 1>> <<goto Investigate2>> <</if>> <</if>> <<set $attackNumber++>> <</nobr>> <<script>>ga("send", "event", "passage", "loaded", "Encounter");<</script>>
<div class="chat">You see a ship in horizon! Your best scouts try to determine as much as possible about the ship: <<nobr>> <<set $values = [ 1, 2, 3]>> <<set $randguns = [ [ 8, 9, 10, 11, 12], [ 5, 6, 7, 8, 9], [ 2, 3, 4, 5, 6] ]>> <<set $randcrew = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24]>> <<set _firstname = ["Hard", "Yellow", "Orange", "Black", "Blue", "Royal", "Fancy", "Deadly", "Mean", "Terrible", "HMS", "Admirable"]>> <<set _secondname = ["Hector", "Fellowship", "Warwick", "Swann", "Satisfaction", "Pearl", "Mermaid", "Nightingale", "Drake", "Merlin", "Forrester", "Lily", "Swallow", "Revenge", "Rose", "Parrot", "Basilisk", "Concordia", "Loius", "Russell", "Knight", "Vanguard"]>> <<set _flags = ["Spain", "England", "Netherlands", "France", "Pirate"]>> <<set $enemy to { name : "None", ship : "Sloop", speed : 2, hull : 100, sails : 100, maneuverability : 3, guns : 6, fired : 0, loadedguns : 0, crew : 18, loot : 0, shootingposition: 0, flag: _flags.random(), }>> <<set $startenemy to $enemy>> <<set $startplayer to $player>> <<set $playerlosses to { hull : 0, sails : 0, crew : 0, guns : 0, miss :0 }>> <<set $playerdmg to { hull : 0, sails : 0, crew : 0, guns : 0, miss :0 }>> <<set $enemy.name = _firstname.random() + " " + _secondname.random()>> <<set $enemy.speed = $values.random()>> <<set $enemy.maneuverability = $values.random()>> <<set $enemy.guns = $randguns[$enemy.speed-1].random()>> <<set $enemy.loadedguns = $enemy.guns>> <<set $player.loadedguns = $player.guns>> <<set $enemy.crew = $randcrew.random()>> <<set $enemy.loot = $enemy.speed * 10 + $enemy.maneuverability * 5 + $enemy.guns * 10 + $enemy.crew *5>> <<set $enemy.shootingposition=random(1,3)/10>> <<set $player.shootingposition=random(1,3)/10>> <<set $distance = 1 + 0.1 * random(1,5)>> <<set $windadv=random(1,0)>> <</nobr>> You encounter another ship, which looks like a <<print $enemy.ship>>. The distance between ships is <<print $distance>> nautical miles. It has <<print $enemy.flag>>'s flag. Looks like you <<if $windadv eq 0>>do not <</if>>have wind advantage. Ship <<print $enemy.ship>> looks like has speed of <<print $enemy.speed>>, <<print $enemy.hull>>% hull, maneuverability <<print $enemy.maneuverability>>, <<print $enemy.guns*2>> guns, <<print $enemy.crew>> crew. <<if $windadv eq 0>> You do not have wind advantage. <<else>> You have wind advantage. <</if>> /% <<set $attackNumber to 1>> <<if $chance eq 12>> You decide to Attack|Closer][$history.seabattlesfought++. You decide to flee|Map System. <<elseif $chance eq 13>> Ship is attacking you, you have no other chance than to // fight|Closer][$history.seabattlesfought++. %/ <</if>> </div>
<table> <tr> <td style="width:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$player.pic+"\">">></td> <td> <div class="chat"><<nobr>> <<if $windadv eq 0>><<display "Enemy decision">><</if>> <<set $hits to { hull : 0, sails : 0, crew : 0, guns : 0, miss :0 }>> <<set $player.gunnerskill = 1>> <<set _positioneff = $player.shootingposition * ($target.hull + $target.sails + $target.crew + $target.guns + 30) / ($target.hull + $target.sails + $target.crew + $target.guns)>> <<set $target.hull = $target.hull *_positioneff>> <<set $target.sails = $target.sails *_positioneff>> <<set $target.crew = $target.crew *_positioneff * $distance_mod>> <<set $target.guns = $target.guns *_positioneff * $distance_mod>> <<for _i to 0; _i lt $player.loadedguns; _i++>> <<set _hit to random(1,100)>> <<if _hit <= $target.hull>> <<set $hits.hull++>> <<set $enemy.hull -= Math.round($hullbasedmg * $distance_mod * $player.gunnerskill / $enemy.hullstr * random(7,13) / 10)>> <<elseif _hit lte ($target.hull + $target.sails)>> <<set $hits.sails++>> <<set $enemy.sails -= Math.round($sailsbasedmg * $distance_mod * $player.gunnerskill / $enemy.sailstr * random(7,13) / 10)>> <<elseif _hit lte ($target.hull + $target.sails + $target.crew)>> <<set $hits.crew++>> <<set $enemy.crew -= 3>> <<elseif _hit lte ($target.hull + $target.sails + $target.crew + $target.guns)>> <<if $enemy.guns gt 0>> <<set $hits.guns++>> <<set $enemy.guns-->> <<set $enemy.loadedguns-->> <<if $enemy.loadedguns < 0>> <<set $enemy.loadedguns = 0>><</if>> <<else>> <<set $hits.hull++>> <<set $enemy.hull -= Math.round($hullbasedmg * $distance_mod * $player.gunnerskill / $enemy.hullstr * random(7,13) / 10)>> <</if>> <<else>> <<set $hits.miss++>> <<set $playerdmg.miss++>> <</if>> <</for>> <<set $player.loadedguns = 0>> <<set $player.fired = 1>> Your gunner man executes comannd in best of his abilities. On the right moment he fires all canons. After smoke fades, you can see results. Total hits on enemy ship: <<print $hits.hull>> hull, <<print $hits.sails>> sails, <<print $hits.crew>> crew, <<print $hits.guns>> cannons, <<print $hits.miss>> missed.<<display "Reload player">> <<if $windadv eq 1>><<display "Enemy decision">><</if>><</nobr>></div> </td><td style="width:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$enemy.pic+"\">">></td></tr> <tr> <td> <<display "Fight stats">> </td> <td> <<include "Fight">> </td> <td> <<display "Enemy stats">> </td> </tr> </table> <<script>>ga("send", "event", "passage", "loaded", "Fight-shoot");<</script>>
/%<<print "<img src=\""+ $imagepath +"sloop2.PNG\">">>%/ <div class="chat"><<print $enemy.ship>> "<<print $enemy.name>>": Hull:<<print $enemy.hull>>% Sails:<<print $enemy.sails>>% Fighting cannons:<<print $enemy.loadedguns>>/<<print $enemy.guns>> Crew:<<print $enemy.crew>> Speed: <<print $enemy.speed>> Maneuverability:<<print $enemy.maneuverability>> Range efficiency: <<Nums2words $distance_mod>> Shooting angle: <<Nums2words $enemy.shootingposition>> Wind advantage: <b><<if $windadv eq 0>>Yes<<else>>No<</if>></b><<Help 4>></div>
<table> <tr> <td style="size:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$player.pic+"\">">></td> <td><<nobr>> <div class="chat"><<if $windadv eq 0>><<display "Enemy decision">><</if>> <<set $distance -= $player.speed * $player.sails / 100 * 0.1 * (random(97,103))/100>> <<set $player.shootingposition -= 0.1 * $player.sails/100>> <<set $enemy.shootingposition -= 0.1 * $player.sails/100>> <<display "Reload player">> <<fixpositions>> <<if $windadv eq 1>><<display "Enemy decision">><</if>> You get closer.</div> <</nobr>> </td> <td style="size:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$enemy.pic+"\">">></td></tr> <tr> <td> <<display "Fight stats">> </td> <td> <<include "Fight">> </td> <td> <<display "Enemy stats">> </td> </tr> </table> <<script>>ga("send", "event", "passage", "loaded", "Fight-closer");<</script>>
<table> <tr> <td style="size:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$player.pic+"\">">></td> <td> <<nobr>> <div class="chat"><<if $windadv eq 0>><<display "Enemy decision">><</if>> <<set $distance += $player.speed * $player.sails / 100 * 0.1 * (random(97,103))/100>> <<set $player.shootingposition -= 0.1 * $player.sails/100>> <<display "Reload player">> <<fixpositions>> <<if $windadv eq 1>><<display "Enemy decision">><</if>> You retreat a bit. </div> <</nobr>> </td><td style="size:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$enemy.pic+"\">">></td></tr> <tr> <td> <<display "Fight stats">> </td> <td> <<include "Fight">> </td> <td> <<display "Enemy stats">> </td></tr></table> <<script>>ga("send", "event", "passage", "loaded", "Backoff");<</script>>
<<nobr>> <<if $enemy.hull < 20 or $enemy.sails < 20 or $enemy.guns <= 1 or $enemy.crew < 2>> Enemy [[surrenders|Loot ship]]. <<elseif $distance <= 0.6 and $enemy.shootingposition >= 0.6 and $enemy.loadedguns >= $enemy.guns-1 >> <<display "Shoot Enemy">> <<elseif $enemy.loadedguns < $enemy.guns>> <<display "Reload Enemy">> Enemy does evasive manuevers. <<display "Evasive Maneuvers Enemy">> <<elseif $distance >0.5>> Enemy decides to move closer <<set $distance -= $enemy.speed * $enemy.sails / 100 * 0.1 * (random(97,103))/100 >> <<set $enemy.shootingposition -= 0.1 * $enemy.sails/100>> <<set $player.shootingposition -= 0.1 * $enemy.sails/100>> <<fixpositions>> <<else>> <<display "IFP Enemy">> <</if>> <</nobr>> <<Help 2>>
<div class="chat"> Your ship has sank. You are dead. GAME OVER. [[Your game score|Score]] </div> <<script>>ga("send", "event", "passage", "loaded", "DEAD END Sink ship");<</script>> <<set $history.peoplekilled += $startenemy.crew-$enemy.crew>> <<set $history.cannonsdestroyed += $startenemy.guns-$enemy.guns>> <<set $history.crewlost += $startplayer.crew-$player.crew>>
<<nobr>><<set $shiptypes to []>> <<set _ship to { ship : "Sloop", sizemin : 7, sizemax : 9, speedmin : 10, speedmax : 12, hullstr : 1, sailstr : 1, maneuverability : 5, minguns : 3, maxguns : 5, mincrew : 24, maxcrew : 40, mincargo : 24, maxcargo : 40, pic : "sloop.jpg", desc : " - More speed, less cargo <br> - Excellent evasive capabilities <br> - Ability to escape from almost any ship" }>> <<set $shiptypes.push(_ship)>> <<set _ship to { ship : "Caravel", sizemin : 12, sizemax : 18, speedmin : 6, speedmax : 8, hullstr : 1.05, sailstr : 0.95, maneuverability : 4, minguns : 2, maxguns : 4, mincrew : 16, maxcrew : 32, mincargo : 50, maxcargo : 60, pic : "caravel.jpg", desc : " - Fragile sails <br> - Limited capacity <br> - Limited crew" }>> <<set $shiptypes.push(_ship)>> <<set _ship to { ship : "Brigantine", sizemin : 23, sizemax : 40, speedmin : 9, speedmax : 10, hullstr : 1.1, sailstr : 1.1, maneuverability : 3, minguns : 5, maxguns : 9, mincrew : 50, maxcrew : 90, mincargo : 50, maxcargo : 200, pic : "brigantine-v2.jpg", desc : " - Good speed and manuevrability <br> - Large crew required" }>> <<set $shiptypes.push(_ship)>> <</nobr>>
<div class="chat">You and your ship surrenders. You get to jail. GAME OVER. [[Your game score|Score]] </div> <<script>>ga("send", "event", "passage", "loaded", "DEAD END Surrender");<</script>>
<<script>>UIBar.show()<</script>> <div class="chat">Enemy rises WHITE FLAG. Congrats. [[Continue journey|Map System]] | [[Take over the ship|Take over]]. You get <<print $enemy.loot>> gold from it. <<nobr>> <<set $player.loot += $enemy.loot>> <<set $player.fame++>> <<set $player.loadedguns to $player.guns>> <<if $enemy.flag neq $player.letterofmarque>> <<set $player[$player.letterofmarque]++>> <</if>> <<set $history.shipssunk++>> <<set $history.peoplekilled += $startenemy.crew-$enemy.crew>> <<set $history.cannonsdestroyed += $startenemy.guns-$enemy.guns>> <<set $history.crewlost += $startplayer.crew-$player.crew>> <<set $history.lootplundered += $enemy.loot>> <<set $defeatedships.push($enemy.name)>> <</nobr>> During battle enemy did damage to your ship: <<print $startplayer.hull-$player.hull>>% damage to hull. <<print $startplayer.sails-$player.sails>>% damage to sails. <<print $startplayer.crew-$player.crew>> crewmembers lost. <<print $startplayer.guns-$player.guns>> destroyed cannons. <<print $playerlosses.miss>> shots missed your ship. During battle you did to enemy's ship: <<print $startenemy.hull-$enemy.hull>>% damage to hull. <<print $startenemy.sails-$enemy.sails>>% damage to sails. <<print $startenemy.crew-$enemy.crew>> crewmembers lost. <<print $startenemy.guns-$enemy.guns>> destroyed cannons. <<print $playerdmg.miss>> shots missed by you. <<set $player[$enemy.flag]-->> <<display "Enemy stats">> </div> <<script>>ga("send", "event", "passage", "loaded", "Fight-loot");<</script>>
<<nobr>> <<set $target to { hull : 28.5, sails : 16.5, crew : 7.5, guns : 7.5, miss : 40 }>> <</nobr>> <<script>>ga("send", "event", "passage", "loaded", "Fight-Target hull");<</script>> <<display "Shoot">>
<<nobr>> <<set $target to { hull : 16.5, sails : 28.5, crew : 7.5, guns : 7.5, miss : 40 }>> <</nobr>> <<script>>ga("send", "event", "passage", "loaded", "Fight-target sails");<</script>> <<display "Shoot">>
<<nobr>> <<set $target to { hull : 16.5, sails : 16.5, crew : 13, guns : 8, miss : 47 }>> <</nobr>> <<script>>ga("send", "event", "passage", "loaded", "Fight-Target crew");<</script>> <<display "Shoot">>
<<nobr>><<set $target to { hull : 16.5, sails : 16.5, crew : 8, guns : 13, miss : 47 }>> <</nobr>> <<script>>ga("send", "event", "passage", "loaded", "Fight-Target guns");<</script>> <<display "Shoot">>
<<nobr>><<set $target to { hull : 20, sails : 20, crew : 10, guns : 10, miss : 40 }>> <</nobr>> <<script>>ga("send", "event", "passage", "loaded", "Fight-Target default");<</script>> <<display "Shoot">>
<<nobr>><<set $distance_mod = 1.1 - $distance>> <<if $distance_mod < 0>> <<set $distance_mod = 0>> <</if>> <<if $distance_mod > 1>> <<set $distance_mod = 1>> <</if>> /%<<print "<img src=\""+ $imagepath +"sloop.PNG\">">>%/ <</nobr>> <div class="chat">Your ship: Hull: <<print $player.hull>>% Sails: <<print $player.sails>>% Fighting cannons: <<print $player.loadedguns>>/<<print $player.guns>> Crew: <<print $player.crew>> Speed: <<print $player.speed>> Maneuverability: <<print $player.maneuverability>> Range efficiency: <<Nums2words $distance_mod>> Shooting angle: <<Nums2words $player.shootingposition>> Wind advantage: <b><<if $windadv eq 1>>Yes<<else>>No<</if>></b><<Help 3>></div>
<table> <tr> <td style="size:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$player.pic+"\">">></td> <td> <<nobr>><div class="chat"><<if $windadv eq 0>><<display "Enemy decision">><</if>><<nobr>> <<set $enemy.shootingposition -= 0.3 * $player.sails/100>> <<set $player.shootingposition -= 0.15 * $player.sails/100>> <<display "Reload player">> <<fixpositions>><</nobr>> You try to evade enemy line of fire. <<if $windadv eq 1>><<display "Enemy decision">><</if>></div> <</nobr>> </td> <td style="size:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$enemy.pic+"\">">></td></tr> <tr> <td> <<display "Fight stats">> </td> <td> <<include "Fight">> </td> <td> <<display "Enemy stats">> </td> </tr> </table> <<script>>ga("send", "event", "passage", "loaded", "Fight-evasive");<</script>>
<table> <tr> <td style="width:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$player.pic+"\">">></td> <td> <<nobr>><div class="chat"> <<if $windadv eq 0>><<display "Enemy decision">><</if>> <<set $player.shootingposition += 0.5 * $player.sails/100>> <<display "Reload player">> <<fixpositions>> You try to get into better firing position. <<if $windadv eq 1>><<display "Enemy decision">><</if>></div><</nobr>> </td> <td style="width:300px;text-align: center;"><<print "<img src=\""+ $imagepath +$enemy.pic+"\">">></td> </tr> <tr> <td> <<display "Fight stats">> </td> <td> <<include "Fight">> </td> <td> <<display "Enemy stats">> </td> </tr> </table> <<script>>ga("send", "event", "passage", "loaded", "Fight-improve position");<</script>>
<<nobr>> <<if $player.fired eq 1>> <<set $player.fired = 0>> <<else>> <<set _loadingeff = $player.crew/$player.guns/5>> <<if _laodingeff gt 1>> <<set _loadingeff to 1>> <</if>> <<set $player.loadedguns += _loadingeff * $player.guns / 2 * (100-random(1,6))/100>> <<set $player.loadedguns = ~~$player.loadedguns>> <<if $player.loadedguns > $player.guns>> <<set $player.loadedguns to $player.guns>> <</if>> <</if>> <</nobr>>
<<nobr>> <<if $enemy.fired eq 1>> <<set $enemy.fired = 0>> <<else>> <<set _enloadingeff = $enemy.crew/$enemy.guns/5>> <<if _enlaodingeff gt 1>> <<set _enloadingeff to 1>> <</if>> <<set $enloading = _enloadingeff * $enemy.guns / 2 * (100-random(1,6))/100>> <<if $enloading < 0 >> <<set $enloading = 1>> <</if>> <<set $enemy.loadedguns += ~~$enloading>> <<if $enemy.loadedguns> $enemy.guns>> <<set $enemy.loadedguns to $enemy.guns>> <</if>> <</if>> Enemy has <<print $enemy.loadedguns>>/<<print $enemy.guns>> cannons loaded. <</nobr>>
Enemy decides to attack: <<nobr>> <<set $enhits to { hull : 0, sails : 0, crew : 0, guns : 0, miss :0 }>> <<set $crewhitchance = 10 * $distance_mod + 40>> <<set $gunshitchance = 10 * $distance_mod + $crewhitchance>> <<set $enemy.gunnerskill = 1>> <<for _i to 0; _i lt $enemy.loadedguns; _i++>> <<set _hit to random(1,100)>> <<if _hit lte 20>> <<set $enhits.hull++>> <<set $player.hull -= Math.round($hullbasedmg * $distance_mod * $enemy.gunnerskill * random(7,13) / 10)>> <<elseif _hit lte 40>> <<set $enhits.sails++>> <<set $player.sails -= Math.round($sailsbasedmg * $distance_mod * $enemy.gunnerskill * random(7,13) / 10)>> <<elseif _hit lte $crewhitchance>> <<set $enhits.crew++>> <<set $player.crew -= 3>> <<elseif _hit lte $gunshitchance>> <<if $player.guns gt 0>> <<set $player.guns-->> <<set $player.loadedguns-->> <<if $player.loadedguns < 0>> <<set $player.loadedguns = 0>><</if>> <<set $enhits.guns++>> <<else>> <<set $enhits.hull++>> <<set $player.hull -= Math.round($hullbasedmg * $distance_mod * $enemy.gunnerskill * random(7,13) / 10)>> <</if>> <<else>> <<set $enhits.miss++>> <<set $playerlosses.miss++>> <</if>> <</for>> <<set $enemy.loadedguns = 0>> <<set $enemy.fired = 1>> <</nobr>> Enemy total hits: <<print $enhits.hull>> hull, <<print $enhits.sails>> sails, <<print $enhits.crew>> crew, <<print $enhits.guns>> cannons, <<print $enhits.miss>> missed.
<<nobr>>Enemy gets ready for shooting position. <<set $enemy.shootingposition += 0.5 * $enemy.sails/100>> <<fixpositions>> <</nobr>>
<<nobr>> <<set $player.shootingposition -= 0.3 * $enemy.sails/100>> <<set $enemy.shootingposition -= 0.15 * $enemy.sails/100>> <<fixpositions>> <</nobr>>
/* Date & Time Widget Setup */ <<set window.GameDays to [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ]; window.GameMonths to [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; /* Below we have to use the multi-parameter version of the Date constructor, rather than the date string version, because the date string version treats a missing timezone offset as UTC. While there are ways to determine players' timezone offsets, so they could be added to a date string, it's more convenient simply to use the multi-parameter constructor. The point of this is so that you can simply initialize the game world clock to whatever date and time you wish without having to worry about the players' timezone offsets, while still ensuring that they all see the same game world dates and times. */ /* params: year , month(0-based) , day , hour(24H) , minute [, second ] */ $gameDate to new Date(2015, 2, 17, 3, 24); /* e.g. Mar 17, 2015 03:24 */ >> /* Date & Time Advancement Widget Definitions */ /* Adds the specified number of minutes. */ <<widget "addmins">>\ <<run $gameDate.setMinutes($gameDate.getMinutes() + $args[0])>>\ <</widget>> /* Adds the specified number of hours. */ <<widget "addhours">>\ <<run $gameDate.setHours($gameDate.getHours() + $args[0])>>\ <</widget>> /* Adds the specified number of days. */ <<widget "adddays">>\ <<run $gameDate.setHours($gameDate.getHours() + $args[0] * 24)>>\ <</widget>> /* Date & Time Printing Widget Definitions */ /* Prints the current date ("{weekday} {month} {day}, {year}"). */ <<widget "date">>\ <<print String.format("{0} {1} {2}, {3}", GameDays[$gameDate.getDay()], GameMonths[$gameDate.getMonth()], $gameDate.getDate(), $gameDate.getFullYear() )>>\ <</widget>> /* Prints the current time (12H). */ <<widget "time12hr">>\ <<if $gameDate.getHours() eq 0>>\ 12\ <<elseif $gameDate.getHours() gt 12>>\ <<print $gameDate.getHours() - 12>>\ <<else>>\ <<print $gameDate.getHours()>>\ <</if>>:\ <<if $gameDate.getMinutes() lt 10>>0<</if>><<print $gameDate.getMinutes()>> \ <<if $gameDate.getHours() gte 12>>PM<<else>>AM<</if>>\ <</widget>> /* Prints the current time (24H). */ <<widget "time24hr">>\ <<if $gameDate.getHours() lt 10>>0<</if>><<print $gameDate.getHours()>>:\ <<if $gameDate.getMinutes() lt 10>>0<</if>><<print $gameDate.getMinutes()>>\ <</widget>> /* Prints the current date and time (12H). */ <<widget "datetime">><<date>> <<time12hr>> (<<time24hr>>)<</widget>>
<<nobr>> <div class="relative"> <<print "<img src=\""+ $imagepath +"Map1.png\">">> <<for $i to 2; $i lt $cities.length; $i++>> <<print "<div class=\"absolute\" style=\"top:"+$cities[$i][2]+"px; left:"+$cities[$i][3]+"px\"><div class=\"tooltip\"><font color=\""+$cities[$i][7]+"\"><<if $cities[$i][0] neq 14>>⚑<<else>> <</if>></font><span class=\"tooltiptext\">"+$cities[$i][1]+"</span></div></div>">> <</for>> <<print "<div class=\"absolute\" style=\"top:" + $player.mapY +"px; left:" + $player.mapX + "px\"><font color=\"Black\">⛵</font></div>">> </div> <</nobr>>
<<display "Location 2">> <<display "Encounter">> <<nobr>> <div class="relative"> <div class="navfix"> <div class="navbox"></div> <div class="navbox"> <<if $player.mapY - $moveonmap >= 0 >> [[North2]] <</if>> </div> <div class="navbox"></div> </div> <div class="navfix"> <div class="navbox"> <<if $player.mapX-$moveonmap >= 0>> [[West2]]<</if>> </div> <div class="navbox"></div> <div class="navbox"> <<if $player.mapX+$moveonmap <= 1235>> [[East2]] <</if>> </div> </div> <div class="navfix"> <div class="navbox"></div> <div class="navbox"> <div class="navbox"> <<if $player.mapY + $moveonmap <= 800 >> [[South2]] <</if>> </div> <div class="navbox"></div> </div> </div> <</nobr>>
<<set $player.mapY -= $moveonmap>> <<adddays 1>> <<display "Map System2">>
<<set $player.mapX -= $moveonmap>> <<adddays 1>> <<display "Map System2">>
<<set $player.mapX += $moveonmap>> <<adddays 1>> <<display "Map System2">>
<<set $player.mapY += $moveonmap>> <<adddays 1>> <<display "Map System2">>
<<nobr>> <<set $positionY -= 1>> <<set $positionX -= 1>> <<set $player.mapY -= $moveonmap>> <<set $player.mapX -= $moveonmap>> <<set _traveltime = 18 / $player.sails * $player.speed / 3 * 100 * 60>> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<<nobr>> <<set $positionY -= 1>> <<set $positionX += 1>> <<set $player.mapY -= $moveonmap>> <<set $player.mapX += $moveonmap>> <<set _traveltime = 18 / $player.sails * $player.speed / 3 * 100 * 60>> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<<nobr>> <<set $positionY += 1>> <<set $positionX -= 1>> <<set $player.mapY += $moveonmap>> <<set $player.mapX -= $moveonmap>> <<set _traveltime = 18 / $player.sails * $player.speed / 3 * 100 * 60>> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<<nobr>> <<set $positionY += 1>> <<set $positionX += 1>> <<set $player.mapY += $moveonmap>> <<set $player.mapX += $moveonmap>> <<set _traveltime = 18 / $player.sails * $player.speed / 3 * 100 * 60 >> <<addmins _traveltime>> <</nobr>> <<display "Map System">>
<<nobr>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "Shipyard" >> <<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">><div class="chat">[[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]] </div><</if>><</capture>> <</for>> <</nobr>> <div class="chat">In shipyard you can: <<if $player[$cities[$mapArray[$positionY][$positionX]][6]] lt -2>> You can not get any ship services in this city, because of your recent activities against <<print $cities[$mapArray[$positionY][$positionX]][6]>>. <<else>> [[Repair your hull|Repair Hull]] for <<print (100-$player.hull) * $player.hullstr>> gold. [[Repair your sails|Repair Sails]] for <<print (100-$player.sails) * $player.sailstr>> gold. <</if>> <<if $player[$cities[$mapArray[$positionY][$positionX]][6]] lt 0>> You can not buy cannons in this city, because of your recent activities against <<print $cities[$mapArray[$positionY][$positionX]][6]>>. <<else>> [[Buy couple cannons|Buy cannon]] for 100 gold. <</if>> [[Back to city|City]] </div> <<script>>ga("send", "event", "passage", "loaded", "Shipyard");<</script>>
<div class="chat"><<if $player.loot > (100-$player.hull) * $player.hullstr>><<nobr>> <<set $player.loot -= (100-$player.hull) * $player.hullstr>> <<set $player.hull = 100>> Your hull is repaired. <</nobr>> <<else>> You do not have enough money. <</if>> </div> <<include "Shipyard">>
<div class="chat"><<if $player.loot > (100-$player.sails) * $player.sailstr>><<nobr>> <<set $player.loot -= (100-$player.sails) * $player.sailstr>> <<set $player.sails = 100>><</nobr>> Your sails are repaired. <<else>> You do not have enough money. <</if>></div> <<include "Shipyard">>
<div class="chat"><<nobr>><<if $player.guns < $player.maxguns>> <<if $player.loot >= 100>> <<set $player.guns++>> <<set $player.loot -= 100>> You bought 2 cannons.<br> [[Buy couple more?|Buy cannon]] <<else>> You do not have enough money. <</if>> <<else>> Your ship can not fit any more cannons. <</if>> <</nobr>> [[Shipyard]] | [[City]] </div>
<<nobr>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "Tavern" >> <<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">> <<set $tavernpcid to $NPCs[_i].id>><div class="chat">[[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]]</div><</if>><</capture>> <</for>> <</nobr>> <div class="chat"><<nobr>> <<set _lasttime = Math.floor(($gameDate - $cities[$mapArray[$positionY][$positionX]][13])/3.6e6/24)>> <<if $player[$cities[$mapArray[$positionY][$positionX]][6]] lt -2>> You can not get any crew members in this city, because of your recent activities against <<print $cities[$mapArray[$positionY][$positionX]][6]>>. <<else>> <<if _lasttime gte 7>> [[Hire crew]] <<else>> You hired crew here just <<print _lasttime>> days ago. Please come back later. <</if>> <</if>> <</nobr>> <<if $player.loot gte 5>>Also you can [[watch some sexy girls|Brothel][$player.loot -= 5]] for 5 gold. <</if>> [[Back to city|City]]</div> <<script>>ga("send", "event", "passage", "loaded", "Tavern");<</script>>
<div class="chat"><<if $player.crew < $player.maxcrew>> <<nobr>> <<set _hiring to $NPCs[$tavernpcid].affection * 0.5 + $cities[$NPCs[$tavernpcid].cityid][5] * 0.0075 + $player[$cities[$mapArray[$positionY][$positionX]][6]] * 0.3 + $player.fame * 0.3>> <<set _hiring to Math.floor(_hiring)>> <</nobr>> You hired <<print _hiring>> inexperienced sailors.<<nobr>> <<set $cities[$mapArray[$positionY][$positionX]][13] to $gameDate>> <<set $player.crew += _hiring>><</nobr>> <<else>> Your ship can not fit any more crew. <</if>> </div> <<include "Tavern">>
<<nobr>> <<widget "fixpositions">> <<silently>> <<if $enemy.shootingposition lt 0.05>> <<set $enemy.shootingposition=0.05>> <<elseif $enemy.shootingposition gt 1>> <<set $enemy.shootingposition=1>> <</if>> <<if $player.shootingposition lt 0.05>> <<set $player.shootingposition=0.05>> <<elseif $player.shootingposition gt 1>> <<set $player.shootingposition=1>> <</if>> <<if $distance lt 0>> <<set $distance to 0>> <</if>> <</silently>> <</widget>> <</nobr>>
<<nobr>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "Bank" >> <<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">>[[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]]<</if>><</capture>> <</for>> <</nobr>> <div class="chat"> To be developed. [[City]]</div> <<script>>ga("send", "event", "passage", "loaded", "Bank");<</script>>
<<nobr>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "Jail" >> <<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">> [[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]] <</if>><</capture>> <</for>> <</nobr>> <div class="chat"> To be developed. [[City]] </div> <<script>>ga("send", "event", "passage", "loaded", "Jail");<</script>>
<<nobr>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "Market" >><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">> [[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]] <</if>><</capture>> <</for>> <</nobr>> To be developed [[City]]
<<widget "Nums2words">> <<nobr>> <<if $args[0] < 0.1>><font color=red>Impossible</font> <<elseif $args[0] < 0.2>><font color=red>Poor</font> <<elseif $args[0] < 0.4>><font color=orange>Inadequate</font> <<elseif $args[0] < 0.6>><font color=darkkhaki>Average</font> <<elseif $args[0] < 0.8>><font color=olive>Good</font> <<elseif $args[0] < 0.9>><font color=green>Excellent</font> <<else>><font color=darkgreen>Perfect</font> <</if>> <</nobr>> <</widget>>
<<widget "AddNPC">> <<set _tempNPC = {}>> <<set _tempNPC.city to $args[0]>> <<set _tempNPC.location to $args[1]>> <<set _tempNPC.name = ["Anne", "Bob", "Chuck"].random()>> <<set _tempNPC.age = random(18, 40)>> <<set $NPCs.push(_tempNPC)>> <</widget>>
<<addmins 4>> <div class="chat">You have a chance to talk with <<print $NPCs[$talkto].name>> <<print $NPCs[$talkto].surname>> (affection: <<print $NPCs[$talkto].affection>>).</div> <<if $NPCs[$talkto].sex eq "female">> <<set _affection to $NPCs[$talkto].affection>> <<if _affection gt 2>> <<set _affection to 2>> <</if>> <<if _affection lt 0>> <<set _affection to 0>> <</if>> <<set _maxpic to $maxNPCpics[$NPCs[$talkto].folder][_affection]>> <<if $NPCs[$talkto].affection eq 0>> <<set _minpic to 0>> <<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/00"+random(_minpic, _maxpic)+".jpg\">">> <<elseif $NPCs[$talkto].affection eq 1>> <<set _minpic to 100>><<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/"+random(_minpic, _maxpic)+".jpg\">">> <<else>> <<set _minpic to 200>><<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/"+random(_minpic, _maxpic)+".jpg\">">> <</if>> <</if>> <<nobr>> <<set _nonewmission to 0>> <<for _i to 0; _i lt $activemissions.length; _i++>> <<capture _i>> <<if $activemissions[_i].NPC_from eq $talkto and $activemissions[_i].rewarded eq 0>> <<if $activemissions[_i].completed eq 0>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[$talkto].folder+"\\profile.jpg\">">> You have not completed given mission.</div> <<set _nonewmission to 1>> <<elseif $activemissions[_i].completed eq 1 and $activemissions[_i].rewarded eq 0>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[$talkto].folder+"\\profile.jpg\">">>Thank you for completing my task. Here is your <<print $activemissions[_i].rewardgold>> gold as reward.</div> <<set $player.fame += $activemissions[_i].rewardfame>> <<set $NPCs[$talkto].affection += $activemissions[_i].rewardaff>> <<set $player.loot += $activemissions[_i].rewardgold>> <<set _cityfaction to $cities[$mapArray[$positionY][$positionX]][6]>> <<if _cityfaction eq "England">> <<set $player.England += $activemissions[_i].rewardcountry>> <<elseif _cityfaction eq "Spain">> <<set $player.Spain += $activemissions[_i].rewardcountry>> <<elseif _cityfaction eq "France">> <<set $player.France += $activemissions[_i].rewardcountry>> <<elseif _cityfaction eq "Netherlands">> <<set $player.Netherlands += $activemissions[_i].rewardcountry>> <</if>> <<set $activemissions[_i].rewarded = 1>> <<elseif $activemissions[_i].completed eq -1 and $activemissions[_i].rewarded eq 0>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[$talkto].folder+"\\profile.jpg\">">> I'm dissapointed. <<set $NPCs[$talkto].affection -= $activemissions[_i].rewardaff>> <<set $activemissions[_i].rewarded = 1>></div> <</if>> <</if>> <<if $activemissions[_i].NPC_to eq $talkto and $activemissions[_i].completed eq 0>> <div class="chat"> [[We have to talk privately|Mission end]] <<set $missionend to $activemissions[_i].id>> <<set _nonewmission to 1>></div> <</if>> <</capture>> <</for>> <<set _givemission to random(0,3)>> <<set _lasttimemission = Math.floor(($gameDate - $NPCs[$talkto].lasttalk)/3.6e6/24)>> <</nobr>> <<if (_givemission gt 0) and (_lasttimemission gte 2) and (_nonewmission eq 0)>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[$talkto].folder+"\\profile.jpg\">">>- Hi stranger, I would like to ask you a favor.</div> <<nobr>> <<set _possiblemissions to []>> <<for _i = 0; _i < $missiontypes.length; _i++>> <<capture $missiontypes[_i].id>> <<if $NPCs[$talkto].location eq "Mayor">> <<if ($missiontypes[_i].requiredaff lte $NPCs[$talkto].affection) and ($missiontypes[_i].requiredfame lte $player.fame) and ($missiontypes[_i].mayor eq 1)>> <<set _possiblemissions.push($missiontypes[_i].id)>> <</if>> <<elseif $NPCs[$talkto].location eq "Governor">> <<if $missiontypes[_i].requiredaff lte $NPCs[$talkto].affection and $missiontypes[_i].requiredfame lte $player.fame and $missiontypes[_i].governor eq 1>> <<set _possiblemissions.push($missiontypes[_i].id)>> <</if>> <<elseif $missiontypes[_i].governor eq 0 and $missiontypes[_i].mayor eq 0>> <<if $missiontypes[_i].requiredaff lte $NPCs[$talkto].affection>> <<set _possiblemissions.push($missiontypes[_i].id)>> <</if>> <</if>> <</capture>> <</for>> <</nobr>> <<if _possiblemissions.length gt 0>> <<nobr>> <<set _selectedmission to _possiblemissions.random()>> <<set _possibletargets to[]>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>> <<if $missiontypes[_selectedmission].restrictions eq "city">> <<if $NPCs[_i].city eq $currentcity and $NPCs[_i].id neq $talkto>> <<set _possibletargets.push($NPCs[_i].id)>> <</if>> <<elseif $missiontypes[_selectedmission].restrictions eq "country">> <<if $NPCs[_i].country eq $NPCs[$talkto].country and $NPCs[_i].id neq $talkto>> <<set _possibletargets.push($NPCs[_i].id)>> <</if>> <<elseif $NPCs[_i].id neq $talkto>> <<set _possibletargets.push($NPCs[_i].id)>> <</if>> <</capture>> <</for>> <<set _selectedtarget to _possibletargets.random()>> <<set $actmission to { NPC_from : $NPCs[$talkto].id, NPC_to: $NPCs[_selectedtarget].id, name: $missiontypes[_selectedmission].name, description: $missiontypes[_selectedmission].description, reason:$missiontypes[_selectedmission].reasons, solution:$missiontypes[_selectedmission].solution, mtypeid:$missiontypes[_selectedmission].id, reactionF: $missiontypes[_selectedmission].reactionF, reactionP: $missiontypes[_selectedmission].reactionP, reactionN: $missiontypes[_selectedmission].reactionN, rewardfame: $missiontypes[_selectedmission].rewardfame, rewardaff: $missiontypes[_selectedmission].rewardaff, rewardgold: $missiontypes[_selectedmission].rewardgold, rewardcountry: $missiontypes[_selectedmission].rewardcountry, completed: 0, rewarded: 0 }>> <</nobr>> <<set _isfemale to $NPCs[_selectedtarget].sex eq "female">> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[$talkto].folder+"\\profile.jpg\">">><b><<persdata _selectedtarget >> <<print $actmission.name>></b>. <<print $missiontypes[_selectedmission].description>> <<persdata _selectedtarget>>? <<SheHe _isfemale She He>> <<print $actmission.reason>></div> <<set $NPCs[$talkto].lasttalk to $gameDate>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath+$NPCs[$talkto].folder +"\\profile.jpg\">">>Do you accept the mission? [[Yes|Accepted]] [[No|City]]</div> <<else>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath+$NPCs[$talkto].folder +"\\profile.jpg\">">> I have no missions to give to you right now. </div> <</if>> <<elseif _lasttimemission < 2 >> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath+$NPCs[$talkto].folder +"\\profile.jpg\">">>You have to wait at least 2 days since your last mission.</div> <</if>> <<if $NPCs[$talkto].location eq "Mayor">> <<if $player.letterofmarque neq $NPCs[$talkto].country>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath+$NPCs[$talkto].folder +"\\profile.jpg\">">> - I like you, maybe you would like to have this <<print $NPCs[$talkto].country>> letter of Marque? [[Yes|Mayor][$player.letterofmarque to $NPCs[$talkto].country]] [[No|Mayor]]</div> <</if>> <</if>> <<if $NPCs[$talkto].affection gt 2 and $NPCs[$talkto].sex eq "female" and $NPCs[$talkto].folder neq 0>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath+$NPCs[$talkto].folder +"\\profile.jpg\">">>Wanna have a private talk in my room? [[Yes|Bed]] [[No|City]] </div> <</if>> /% [[Add affection|TalktoNPC][$NPCs[$talkto].affection++]] %/ [[City]] <<script>>ga("send", "event", "passage", "loaded", "Talk to NPC");<</script>>
<<nobr>> <<set _cityfaction to $cities[$mapArray[$positionY][$positionX]][6]>> <<if _cityfaction eq "England">> <<set _neededrel to $player.England>> <<elseif _cityfaction eq "Spain">> <<set _neededrel to $player.Spain>> <<elseif _cityfaction eq "France">> <<set _neededrel to $player.France>> <<elseif _cityfaction eq "Netherlands">> <<set _neededrel to $player.Netherlands>> <</if>> <<if _neededrel gt 5>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "Governor" >><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">> <div class="chat">[[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]] <</if>></div><</capture>> <</for>> <<else>> <div class="chat">Governor is not interested in common folk. Come back then you will do few good deeds to his country.</div> <</if>> <</nobr>> <div class="chat">[[City]] </div> <<script>>ga("send", "event", "passage", "loaded", "Governor");<</script>>
<div class="chat"><<nobr>><<if $player.fame gt 4>> <<for _i = 0; _i < $NPCs.length; _i++>> <<capture $NPCs[_i].id>><<if $NPCs[_i].city eq $currentcity and $NPCs[_i].location eq "Mayor" >><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[_i].folder+"\\profile.jpg\">">> [[""+ $NPCs[_i].name+" "+$NPCs[_i].surname+""|TalktoNPC][$talkto to $NPCs[_i].id]] <</if>><</capture>> <</for>> <<else>> Mayor is not interested in common folk. Come back then you will be at least a little bit famous.<</if>><</nobr>> [[City]] </div> <<script>>ga("send", "event", "passage", "loaded", "Mayor");<</script>>
/% No, Name, required aff, required fame, required country relations, source: governor, mayor, townfolk, country requirement, target, description, possible reasons %/ <<nobr>> <<set $missiontypes to []>> <<set _mission to { id : 0, name: "debt", requiredaff: 0, requiredfame: 0, requiredcntryrel: 0, governor: 0, mayor: 0, target: "person", description: "Could you talk to", restrictions: "city", reasons: "owes me great deal of money. I would like to get it back.", solution: "Could you give back the money you owe?", reactionF: "Yes, there is no need to send notoriuos pirate!", reactionP: "Ok, I will", reactionN: "No", rewardfame: 0, rewardaff: 1, rewardcountry: 0, rewardgold: 10 }>> <<set $missiontypes.push(_mission) >> <<set _mission to { id : 1, name: "insult to cat", requiredaff: 0, requiredfame: 0, requiredcntryrel: 0, governor: 0, mayor: 0, target: "person", description: "Could you talk to", restrictions: "city", reasons: "insulted my cat. I demand appology.", solution: "You have to apologise.", reactionF: "Yes, there is no need to send notoriuos pirate!", reactionP: "Ok, I will.", reactionN: "No.", rewardfame: 0, rewardaff: 1, rewardcountry: 0, rewardgold: 10 }>> <<set $missiontypes.push(_mission) >> <<set _mission to { id : 2, name: "letter", requiredaff: 0, requiredfame: 0, requiredcntryrel: 0, governor: 0, mayor: 0, target: "person", description: "Could you bring this letter to", restrictions: "country", reasons: "has not written to me in months. ", solution: "Here is letter for you.", reactionF: "Thanks!", reactionP: "Thanks...", reactionN: "No, I won't accept.", rewardfame: 0, rewardaff: 1, rewardcountry: 0, rewardgold: 20 }>> <<set $missiontypes.push(_mission) >> <<set _mission to { id : 3, name: "special Cutlass", requiredaff: 0, requiredfame: 0, requiredcntryrel: 0, governor: 0, mayor: 0, target: "person", description: "Could you talk to", restrictions: "none", reasons: "borrowed my Cutlass. I would like to get it back.", solution: "Could you give back the Cutlass you owe?", reactionF: "Yes, there is no need to send notoriuos pirate!", reactionP: "Ok, I will", reactionN: "No", rewardfame: 0, rewardaff: 1, rewardcountry: 0, rewardgold: 30 }>> <<set $missiontypes.push(_mission) >> <<set _mission to { id : 4, name: "special Cutlass", requiredaff: 0, requiredfame: 0, requiredcntryrel: 0, governor: 1, mayor: 1, target: "person", description: "Could you talk to", restrictions: "none", reasons: "borrowed my Cutlass. I would like to get it back.", solution: "Could you give back the Cutlass you owe?", reactionF: "Yes, there is no need to send notoriuos pirate!", reactionP: "Ok, I will", reactionN: "No", rewardfame: 0, rewardaff: 1, rewardcountry: 0, rewardgold: 30 }>> <<set $missiontypes.push(_mission) >> <<set _mission to { id : 5, name: "important letter", requiredaff: 0, requiredfame: 3, requiredcntryrel: 0, governor: 1, mayor: 1, target: "person", description: "Could you bring this very important letter to", restrictions: "none", reasons: "This is secret. I count on your discretion.", solution: "This is very important letter. I can not tell you from whom, but you will understand.", reactionF: "Yes, thank you!", reactionP: "Ok, I will", reactionN: "No", rewardfame: 1, rewardaff: 1, rewardcountry: 1, rewardgold: 50 }>> <<set $missiontypes.push(_mission) >> <<set _mission to { id : 6, name: "very important letter", requiredaff: 1, requiredfame: 3, requiredcntryrel: 0, governor: 1, mayor: 1, target: "person", description: "You know we have issues with other countries in region. I understand you have capable ship. Could you deliver this letter to ", restrictions: "none", reasons: "This is secret mission. I count on your discretion.", solution: "I got special delivery from your friend.", reactionF: "Yes, thank you. Unload them behind the dock, thanks.", reactionP: "Ok, thanks", reactionN: "No, I do no accept", rewardfame: 1, rewardaff: 1, rewardcountry: 1, rewardgold: 50 }>> <<set $missiontypes.push(_mission) >> <<set _mission to { id : 7, name: "gun delivery", requiredaff: 2, requiredfame: 3, requiredcntryrel: 0, governor: 1, mayor: 1, target: "person", description: "You know we have issues with other countries in region. I understand you have capable ship. Could you deliver these weapons to ", restrictions: "none", reasons: "This is secret mission. I count on your discretion.", solution: "I got special delivery from your friend. Full ship of deliveries", reactionF: "Yes, thank you. Unload them behind the dock, thanks.", reactionP: "Ok, thanks", reactionN: "No, I do no accept", rewardfame: 1, rewardaff: 1, rewardcountry: 2, rewardgold: 100 }>> <<set $missiontypes.push(_mission) >> <</nobr>>
<<nobr>> <<set _totalaff to 0>> <<set _playeraff to 0>> <<for _i = 0; _i < $NPCs.length; _i++>> <<if $NPCs[_i].sex eq "female" and $NPCs[_i].folder neq 0>> <<set _totalaff += 3>> <<if $NPCs[_i].affection gt 3>> <<set _playeraff +=3>> <<elseif $NPCs[_i].affection lt 0>><<set _playeraff +=0>> <<else>> <<set _playeraff += $NPCs[_i].affection>> <</if>> <</if>> <</for>> <<set _girlsaffected to Math.round(_playeraff / _totalaff * 10000)/100 >> <</nobr>> Looks like you uncovered _girlsaffected % of all NSFW content. Your missions list: <<for _i to 0; _i lt $activemissions.length; _i++>> <<print _i+1>>. <<persdata $activemissions[_i].NPC_from>> asked me to talk to <<persdata $activemissions[_i].NPC_to>> about <<set _isfemale to ($NPCs[$activemissions[_i].NPC_to].sex eq "female")>><<SheHe _isfemale her his>><<print $activemissions[_i].name>>. <<if $activemissions[_i].completed eq 1>> <font color="green">Completed</font><<elseif $activemissions[_i].completed eq -1>> <font color="red">Failed</font><</if>><<if $activemissions[_i].rewarded eq 1>>, rewarded.<</if>> <br> <</for>> <<back>>
<<nobr>> <<widget "persdata">><<print $NPCs[$args[0]].name>> <<print $NPCs[$args[0]].surname>> from <<print $NPCs[$args[0]].city>> <</widget>> <</nobr>>
<<addmins 2>> <<set $actmission.id = $activemissions.length>> <<set $activemissions.push($actmission)>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[$talkto].folder+"\\profile.jpg\">">>Thank you! [[Back to city|City]]</div> <<script>>ga("send", "event", "passage", "loaded", "Acceptedmission");<</script>>
<<addmins 4>> <<set _who to $activemissions[$missionend].NPC_from>> <div class="chat">Hey, look, <<persdata _who>> asked me talk with you about <<print $activemissions[$missionend].name>>. <<print $activemissions[$missionend].solution>></div> <<nobr>> <<set _positive to 0>> <<if $player.fame gt 3>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath+$NPCs[$talkto].folder +"\\profile.jpg\">">>$activemissions[$missionend].reactionF </div> <<set _positive to 1>> <<set $activemissions[$missionend].completed to 1>> <<elseif random(0,1) eq 1>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath +$NPCs[$talkto].folder+"\\profile.jpg\">">>$activemissions[$missionend].reactionP</div> <<set _positive to 1>> <<set $activemissions[$missionend].completed to 1>> <<else>> <div class="chat"><<print "<img class=\"portrait\" src=\""+ $imagepath+$NPCs[$talkto].folder+"\\profile.jpg\">">>$activemissions[$missionend].reactionN </div> <<set $activemissions[$missionend].completed to -1>> <</if>> <</nobr>> <div class="chat"><<if _positive eq 1>> Good, your mission is over, come back to <<persdata $activemissions[$missionend].NPC_from>> for reward. <</if>></div> [[City]] <<script>>ga("send", "event", "passage", "loaded", "Missionreward");<</script>>
<<include "Mission types">> <<for _i = 0; _i < $missiontypes.length; _i++>> <b>Christiana Palgrave from Kingston <<print $missiontypes[_i].name>></b>. <<print $missiontypes[_i].description>> Christiana Palgrave from Kingston? <<print $missiontypes[_i].reasons>> Hey, look, John Shovell asked me talk with you about $missiontypes[_i].name. $missiontypes[_i].solution <</for>>
<<nobr>> <<widget "SheHe">> <<if $args[0] is true>>$args[1]<<else>>$args[2]<</if>> <</widget>> <</nobr>>
<<script>>UIBar.show()<</script>> <<nobr>> <<for _i to 0; _i lt $activemissions.length; _i++>> <<set $history.totalmissions++>> <<if $activemissions[_i].completed eq 1>> <<set $history.missionscompleted++>> <<elseif $activemissions[_i].completed eq -1>> <<set $history.missionsfailed++>> <</if>> <</for>> <</nobr>> During your short pirate life you completed $history.missionscompleted missions and failed in $history.missionsfailed missions. Total amount of taken missions: $history.totalmissions. During your career as a pirate you fought on $history.seabattlesfought sea battles (fled $history.seabatltesfled of them) and sunk $history.shipssunk ships. <<if $defeatedships.length > 0>> List of ships defeated: <<for _i = 0; _i < $defeatedships.length; _i++>> - <<print $defeatedships[_i]>> <</for>> <</if>> During your battles you killed $history.peoplekilled enemies, destoyed $history.cannonsdestroyed enemy's cannons. Under your command $history.crewlost brave men and women died, and you plundered $history.lootplundered gold. Overall, you managed to gain $player.fame points of fame. You are as famous as <<if $player.fame < 10>>... no one. <<else>>:<</if>><<nobr>> <<if $player.fame >= 10>> [[Calico Jack|https://en.wikipedia.org/wiki/Calico_Jack]] <</if>> <<if $player.fame > 15>> [[Black Bart|https://en.wikipedia.org/wiki/Bartholomew_Roberts]] <</if>> <<if $player.fame > 20>> [[Roche Braziliano|https://en.wikipedia.org/wiki/Roche_Braziliano]] <</if>> <<if $player.fame > 25>> [[François l'Olonnais|https://en.wikipedia.org/wiki/Fran%C3%A7ois_l%27Olonnais]] <</if>> <<if $player.fame > 30>> [[Stede Bonnet|https://en.wikipedia.org/wiki/Stede_Bonnet]] <</if>> <<if $player.fame > 35>> [[Jean Lafitte|https://en.wikipedia.org/wiki/Jean_Lafitte]] <</if>> <<if $player.fame > 40>> [[Captain Kidd|https://en.wikipedia.org/wiki/William_Kidd]] <</if>> <<if $player.fame > 45>> [[Blackbeard|https://en.wikipedia.org/wiki/Blackbeard]] <</if>> <<if $player.fame > 50>> [[Henry Morgan|https://en.wikipedia.org/wiki/Henry_Morgan]] <</if>> <<if $player.fame > 70>> there is on one more famous... <</if>> <<if $player.fame > 100>> ok, ok - [[Jack Sparrow|https://en.wikipedia.org/wiki/Jack_Sparrow]]. But he is no a real pirate. Like you are. Congrats. <</if>> <</nobr>> <<include Sendscore>> <<script>>ga("send", "event", "passage", "loaded", "Score");<</script>>
<<addmins 19>> <<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/"+random(200, $maxNPCpics[$NPCs[$talkto].folder][2])+".jpg\">">> <<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/"+random(400, $maxNPCpics[$NPCs[$talkto].folder][3])+".gif\">">> <<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/"+random(500, $maxNPCpics[$NPCs[$talkto].folder][4])+".gif\">">> <<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/"+random(500, $maxNPCpics[$NPCs[$talkto].folder][4])+".gif\">">> <<print "<img src=\""+ $imagepath + $NPCs[$talkto].folder +"\/"+random(700, $maxNPCpics[$NPCs[$talkto].folder][5])+".gif\">">> [[One more|Bed]] [[Back to talking|TalktoNPC]] <<script>>ga("send", "event", "passage", "loaded", "NPCbed");<</script>>
<<set _pic to random(0, 50)>> <<print "<img src=\""+ $imagepath + "brothel\/"+_pic+".gif\">">> <div class="chat">[[Back|Tavern]]</div> <<script>>ga("send", "event", "passage", "loaded", "Brothel");<</script>>
<<display "Init">> This game is a complete work of fiction, adapted to 17th century pirates in Caribbean history. Designed mostly from information found on wikipedia and similar sources. Some of the themes contained within include <b>adult themes and pictures</b>. If you are <b>not of legal age to view this material</b>, 18 or 21 in most cases, or if any of the subject matters listed may offend you in any way please close this game now and promptly delete it. If you are the owner of any images used and wish them to be removed from this game then please send me a PM at [[Discord|https://discord.gg/RpqEu5Y]]. I strive to make this game bug free, but due to its complexity it is very likely bugs can be found. Please take a minute to report them on [[Discord|https://discord.gg/RpqEu5Y]], and I will do my best to fix all bugs found. And yes, you can help develop this game by becoming <a href="https://www.patreon.com/bePatron?u=22572849" data-patreon-widget-type="become-patron-button"> a Patron!</a>. Do you wish to continue? [[Yes|Start]] [[No|https://www.cnn.com]] <<script>>ga("send", "event", "passage", "loaded", "Disclaimer");<</script>>
<<if random(1,2) eq 1>> <div class="chat">Welcome to <<print $cities[$mapArray[$positionY][$positionX]][1]>>. It looks empty now.</div> <<else>><div class="chat">Welcome to <<print $cities[$mapArray[$positionY][$positionX]][1]>>.</div> <<set $secret_folder to ["G1\/", "G2\/", "G3\/"]>> <<set _folder to $secret_folder.random()>> <<print "<img src=\""+ $imagepath + _folder +"1.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"2.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"3.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"4.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"5.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"6.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"7.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"8.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"9.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"10.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"11.jpg\">">> <<print "<img src=\""+ $imagepath + _folder +"12.jpg\">">> <</if>> <div class="chat">[[Sail away|Map System]] </div> <<script>>ga("send", "event", "passage", "loaded", "Sexy beach");<</script>>
<<nobr>> <<widget "Help">> <div class="help-tip"> <<if $args[0] eq 1>><p>Time to decide what is next. <<if $player.loadedguns eq $player.guns>> <br> Your all guns are loaded, you should look for opportunity to fire.<br><br> You can order gunners to <b>target hull, sails, crew or cannons</b>. However not everyone can execute your orders perfectly, but they do best within their abilities and current conditions. You can improve conditions by navigating to <b>better position (range and angle wise)</b>. You always can let them <b>fire at will</b> - try to hit what ever is easiest for each gunner. <<else>> <br> Probably you need to wait for your guns to be loaded. Best tactics should be doing <b>evasive manuevers</b> - to worsen enemy's shooting angle.<</if>> <br><br>You can give <b>navigational commands</b> in order to improve your position or worsen enemy's. <br><br>If you drop back far away you can <b>flee from battle</b>. </p> <<elseif $args[0] eq 2>><p>This is screen what was done by enemy and you last turn.</p> <<elseif $args[0] eq 3>><p> <b>Range efficiency</b> shows how effective (how much damage does) your cannons in current range. You can <b>Close up</b> to improve it.<br><br> <b>Shooting angle</b> shows how easy for your gunners to target your enemy at current position. You can <b> Improve firing position </b> to improve that.<br><br> <b> Wind advantage</b> shows if you have wind advantage in battle. Ship with wind advantage acts first.</p> <<elseif $args[0] eq 4>><p><b>Range efficiency</b> shows how effective (how much damage does) enemy's cannons in current range. You can <b>Drop back</b> to worsen it.<br><br> <b>Shooting angle</b> shows how easy for enemy's gunners to target your ship at current position. You can perform <b>Evasive manuevers</b> to worsen it for enemy.<br><br> <b> Wind advantage</b> shows if enemy has wind advantage in battle. Ship with wind advantage acts first.</p> <</if>> </div> <</widget>> <</nobr>>
<<nobr>> <<set _msnsprcnt = Math.round($history.missionscompleted / $history.totalmissions * 10000)/100 >> <<set _seawinrate = Math.round(($history.seabattlesfought-$history.seabatltesfled-1) / $history.seabattlesfought * 10000)/100 >> <<set _totalaff to 0>> <<set _playeraff to 0>> <<for _i = 0; _i < $NPCs.length; _i++>> <<if $NPCs[_i].sex eq "female" and $NPCs[_i].folder neq 0>> <<set _totalaff += 3>> <<if $NPCs[_i].affection gt 3>> <<set _playeraff +=3>> <<elseif $NPCs[_i].affection lt 0>><<set _playeraff +=0>> <<else>> <<set _playeraff += $NPCs[_i].affection>> <</if>> <</if>> <</for>> <<set _girlsaffected to Math.round(_playeraff / _totalaff * 10000)/100 >> <</nobr>> Would you like to submit your score to this months rankings? <form action="https://the-great-pirate.hostingerapp.com/addhighscore.php" method="post"> Name: <input type="text" name="name" value="Anonymous"> <<print '<input type="hidden" name="pname" value="' + $player.name + '" readonly>'>><<nobr>> <<print '<input type="hidden" name="fame" value="' + $player.fame + '">'>> <<print '<input type="hidden" name="loot" value="' + $history.lootplundered + '">'>> <<print '<input type="hidden" name="msnsprcnt" value="' + _msnsprcnt + '">'>> <<print '<input type="hidden" name="seabattles" value="' + $history.seabattlesfought + '">'>> <<print '<input type="hidden" name="seawinrate" value="' + _seawinrate + '">'>> <<print '<input type="hidden" name="peoplekilled" value="' + $history.peoplekilled + '">'>> <<print '<input type="hidden" name="crewlost" value="' + $history.crewlost + '">'>> <<print '<input type="hidden" name="girlsprcnt" value="' + _girlsaffected + '">'>> <<print '<input type="hidden" name="version" value="' + $version + '">'>><</nobr>> <input type="submit" value="Submit" target="_blank"> </form>
<<nobr>> <<if $player.fame lt 2>> <<set _pickship to 0>> <<elseif $player.fame lt 4>> <<set _pickship to random(0,1)>> <<else>> <<set _pickship to random(0,$shiptypes.length-1)>> <</if>> <<set _firstname = ["Hard", "Yellow", "Orange", "Black", "Blue", "Royal", "Fancy", "Deadly", "Mean", "Terrible", "HMS", "Admirable"]>> <<set _secondname = ["Hector", "Fellowship", "Warwick", "Swann", "Satisfaction", "Pearl", "Mermaid", "Nightingale", "Drake", "Merlin", "Forrester", "Lily", "Swallow", "Revenge", "Rose", "Parrot", "Basilisk", "Concordia", "Loius", "Russell", "Knight", "Vanguard"]>> <<set _flags = ["Spain", "England", "Netherlands", "France", "Pirate"]>> <<set _size to random($shiptypes[_pickship].sizemin, $shiptypes[_pickship].sizemax)>> <<set _speed to random($shiptypes[_pickship].speedmin, $shiptypes[_pickship].speedmax)>> <<set _guns to random($shiptypes[_pickship].minguns, $shiptypes[_pickship].maxguns)>> <<set _crew to random($shiptypes[_pickship].mincrew, $shiptypes[_pickship].maxcrew)>> <<set _cargo to random($shiptypes[_pickship].mincargo, $shiptypes[_pickship].maxcargo)>> <<set $enemy to { name : "None", ship : $shiptypes[_pickship].ship, size : _size, speed : _speed / 4, hull : 100, sails : 100, hullstr : $shiptypes[_pickship].hullstr, sailstr : $shiptypes[_pickship].sailstr, maneuverability : $shiptypes[_pickship].maneuverability, guns : _guns, maxguns : $shiptypes[_pickship].maxguns, maxcrew : $shiptypes[_pickship].maxcrew, fired : 0, loadedguns : 0, crew : _crew, cargo : _cargo, loot : 0, shootingposition: 0, flag: _flags.random(), pic: $shiptypes[_pickship].pic, }>> <<set $enemy.name = _firstname.random() + " " + _secondname.random()>> <<set $enemy.loadedguns = $enemy.guns>> <<set $enemy.loot = $enemy.speed * 10 + $enemy.maneuverability * 5 + $enemy.guns * 10 + $enemy.crew *5 + $enemy.cargo>> <<set $enemy.shootingposition=random(1,3)/10>> <<set $player.shootingposition=random(1,3)/10>> <<set $distance = 1 + 0.1 * random(1,5)>> <<set $windadv=random(1,0)>> <<set $startenemy to $enemy>> <<set $startplayer to $player>> <<set $playerlosses to { hull : 0, sails : 0, crew : 0, guns : 0, miss :0 }>> <<set $playerdmg to { hull : 0, sails : 0, crew : 0, guns : 0, miss :0 }>> <</nobr>> <div class="chat">You see a ship in horizon! Your best scouts try to determine as much as possible about the ship. It looks like a <<print $enemy.ship + " " + $enemy.name>>. The distance between ships is <<print $distance>> nautical miles. It has <<print $enemy.flag>>'s flag. Looks like you <<if $windadv eq 0>>do not <</if>>have wind advantage. Looks like <<print $enemy.name>> has speed of <<print $enemy.speed * 4>> knots, <<print $enemy.hull>>% hull and $enemy.sails % sails, maneuverability <<print $enemy.maneuverability>>, <<print $enemy.guns*2>> cannons, <<print $enemy.crew>> crew. <<if $windadv eq 0>> You do not have wind advantage. <<else>> You have wind advantage. <</if>> <<set $attackNumber to 1>> <<if $chance eq 11>> You decide to [[Attack|Closer][$history.seabattlesfought++]]. You decide to [[flee|Map System]]. <<elseif $chance eq 12>> Ship is attacking you, you have no other chance than to [[fight|Closer][$history.seabattlesfought++]]. <</if>> </div>
<<set $player.shipname to $enemy.name>> <<set $player.ship to $enemy.ship>> <<set $player.speed to $enemy.speed>> <<set $player.hull to $enemy.hull>> <<set $player.hullstr to $enemy.hullstr>> <<set $player.sails to $enemy.sails>> <<set $player.sailstr to $enemy.sailstr>> <<set $player.maneuverability to $enemy.maneuverability>> <<set $player.guns to $enemy.guns>> <<set $player.loadedguns to $player.guns>> <<set $player.maxguns to $enemy.maxguns>> <<set $player.maxcrew to $enemy.maxcrew>> <<set $player.pic to $enemy.pic>> <div class="chat"> You taken over enemy ship [[Continue journey|Map System]] </div>
<div class="slrow"> <<for _i = 0; _i < $shiptypes.length; _i++>> <div class="slcolumnpic"> <<print "<img src=\""+ $imagepath +$shiptypes[_i].pic+"\">">> </div> <</for>> </div> <div class="slrow"> <<for _i = 0; _i < $shiptypes.length; _i++>> <div class="slcolumnt"> <div style="text-align:center"><b><<print $shiptypes[_i].ship>></b></div> <<print "Size: " + $shiptypes[_i].sizemin + " - " + $shiptypes[_i].sizemax + " m long">> <<print "Speed: "+ $shiptypes[_i].speedmin + " - " + $shiptypes[_i].speedmax + " knots">> <<print "Cannons: " + $shiptypes[_i].minguns * 2 + " - " + $shiptypes[_i].maxguns * 2>> <<print "Normal crew: " + $shiptypes[_i].mincrew + " - " + $shiptypes[_i].maxcrew>> <<print "Cargo hold: " + $shiptypes[_i].mincargo + " - " + $shiptypes[_i].maxcargo + " t">> <<print "Hull strength: ">> <<Str2words $shiptypes[_i].hullstr>> <<print "Sail strength: ">> <<Str2words $shiptypes[_i].sailstr>> <<print "Manuervability: " + $shiptypes[_i].maneuverability>> <<print "<br>" + $shiptypes[_i].desc>> </div> <</for>> </div>
<<widget "Str2words">><<nobr>> <<if $args[0] < 0.95>><font color=red>poor</font> <<elseif $args[0] < 1>><font color=red>inadequate</font> <<elseif $args[0] < 1.05>><font color=orange>average</font> <<elseif $args[0] < 1.1>><font color=darkkhaki>above average</font> <<elseif $args[0] < 1.15>><font color=green>good</font> <<elseif $args[0] < 1.2>><font color=darkgreen>excellent</font> <<else>><font color=darkgreen>perfect</font> <</if>><</nobr>><</widget>>