Coldfront Forums

Go Back   Coldfront Forums > Kingdom of Loathing > Seaside Town
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Seaside Town On-topic chat about KoL and its community

View Poll Results: Was This Helpful?
Yes 0 0%
No 0 0%
I don't own a mac 3 100.00%
Voters: 3. You may not vote on this poll

Reply
 
LinkBack Thread Tools Display Modes
Old February 9th, 2008, 09:24 PM   #1 (permalink)
Z000
 
Join Date: Feb 2008
Posts: 0
Z000 is on a distinguished road
Default poop deck simulator

hello all…

i wrote a simulation to help people get the powerful cursed zombie pirate costume

the simulation shows how much items/meat/substats you can receive in 1000 adventures in the poop deck, and how many times you can fight the scary pirate (which drops the rare items)

unfortunately, the wiki does not have the drop rates for the items, so that's as far as the simulator goes

this should be as accurate as the data on the wiki

it's written in applescript, so unfortunately it will only run on macs

if you have a mac, copy this code, paste it into Script Editor (/Applications/Applescript/Script Editor) and run it.

Code:
global meat, substat, sk, ok, gk, sc, oc, gc, piece, onion, biscut, rum, black, cannonball, skull, scroll, chests_o, wacky_k, warty_k, wealthy_k, whiny_k, witty_k, yohohoyo, cannonball_c, fish_oil, copper_c, v_lemon, booty_c, g_pegleg, b_wine, silver_c, w_rapier, scary, meat2, ocmc
set {meat, substat, sk, ok, gk, sc, oc, gc, piece, onion, biscut, rum, black, cannonball, skull, scroll, chests_o, wacky_k, warty_k, wealthy_k, whiny_k, witty_k, yohohoyo, cannonball_c, fish_oil, copper_c, v_lemon, booty_c, g_pegleg, b_wine, silver_c, w_rapier, scary, meat2, ocmc} to {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}

--change this number for number of adventures
repeat 1000 times
	set num to random number from 1 to 31
	if num = 31 then
		SaOCftVB()
	else
		fight(num)
	end if
end repeat

done()

on SaOCftVB()
	set meat to meat - 977
	set ocmc to ocmc + 1
	set num to random number from 1 to 6
	
	if num = 1 then
		set sk to sk + 1
	else if num = 2 then
		set ok to ok + 1
	else if num = 3 then
		set gk to gk + 1
	else if num = 4 then
		set sc to sc + 1
	else if num = 5 then
		set oc to oc + 1
	else if num = 6 then
		set gc to gc + 1
	end if
	
	if (sk ≠ 0 and sc ≠ 0) then
		set sk to sk - 1
		set sc to sc - 1
		openchest()
	end if
	
	if (ok ≠ 0 and oc ≠ 0) then
		set ok to ok - 1
		set oc to oc - 1
		openchest()
	end if
	
	if (gk ≠ 0 and gc ≠ 0) then
		set gk to gk - 1
		set gc to gc - 1
		openchest()
	end if
	
end SaOCftVB

on openchest()
	set num to random number from 3 to 5
	repeat num times
		set itm to random number from 1 to 8
		if itm = 1 then
			set piece to piece + 1
		else if itm = 2 then
			set onion to onion + 1
		else if itm = 3 then
			set biscut to biscut + 1
		else if itm = 4 then
			set rum to rum + 1
		else if itm = 5 then
			set black to black + 1
		else if itm = 6 then
			set cannonball to cannonball + 1
		else if itm = 7 then
			set skull to skull + 1
		else if itm = 8 then
			set scroll to scroll + 1
		end if
	end repeat
	set chests_o to chests_o + 1
end openchest

on fight(num)
	set itm to random number from 1 to 1000
	set substat to substat + 30
	
	if num ≤ 6 then
		set wacky_k to wacky_k + 1
		set meat to meat + (random number from 88 to 96)
		if itm ≤ 51 then set yohohoyo to yohohoyo + 1
		if itm ≥ 904 then set cannonball_c to cannonball_c + 1
		return
		
	else if num ≤ 12 then
		set warty_k to warty_k + 1
		set meat to meat + (random number from 74 to 96)
		if itm ≤ 291 then set fish_oil to fish_oil + 1
		if itm ≥ 292 and itm ≤ 388 then set copper_c to copper_c + 1
		if itm ≥ 709 then set v_lemon to v_lemon + 1
		return
		
	else if num ≤ 18 then
		set wealthy_k to wealthy_k + 1
		set meat to meat + (random number from 184 to 214)
		if itm ≤ 101 then set booty_c to booty_c + 1
		if itm ≥ 952 then set g_pegleg to g_pegleg + 1
		return
		
	else if num ≤ 24 then
		set whiny_k to whiny_k + 1
		set meat to meat + (random number from 90 to 102)
		if itm ≤ 294 then set b_wine to b_wine + 1
		return
		
	else
		set witty_k to witty_k + 1
		set meat to meat + (random number from 99 to 110)
		if itm ≤ 95 then set silver_c to silver_c + 1
		if itm ≥ 904 then set w_rapier to w_rapier + 1
	end if
end fight

on done()
	display dialog "cursed pieces of thirteen: " & piece & "
cursed black pearl onions: " & onion & "
cursed sea biscuts: " & biscut & "
cursed bottles of rum: " & rum & "
cursed bottles of black-label rum: " & black & "
cursed cannonballs: " & cannonball & "
cursed voodoo skulls: " & skull & "
cursed dirty joke scrolls: " & scroll & "
simple ancient cursed keys: " & sk & "
ornate ancient cursed keys: " & ok & "
gilded ancient cursed keys: " & gk & "
ancient cursed foot lockers: " & sc & "
ornate ancient cursed chests: " & oc & "
gilded ancient cursed chests: " & gc & "
yohohoyos: " & yohohoyo & "
cannonball charrrms: " & cannonball_c & "
fish liver oils: " & fish_oil & "
copper ha'penny charrrms: " & copper_c & "
vinegar-soaked lemon slices: " & v_lemon & "
booty chest charrrms: " & booty_c & "
solid gold peglegs: " & g_pegleg & "
bilge wine: " & b_wine & "
silver tounge charrrms: " & silver_c & "
witty rapiers: " & w_rapier with title "Do you want your possessions identified?"
	
	display dialog "you gained " & substat & " substats" with title "Do you want to see your attributes?"
	
	display dialog "you killed " & wacky_k & " wacky pirates
you killed " & warty_k & " warty pirates
you killed " & wealthy_k & " wealthy pirates
you killed " & whiny_k & " whiny pirates
you killed " & witty_k & " witty pirates" with title "Do you want to see an account of creatures vanquished?"
	
	display dialog "you opened " & chests_o & " chests
you received the \"O Cap'm, My Cap'm\" adventure " & ocmc & " times
you gained " & meat & " meat" with title "Do you want to see your conduct?"
	
	display dialog "Do you want to use your cursed pieces of thirteen?"
	
	repeat piece times
		set coin to 1
		
		repeat while coin = 1
			set num to random number from 1 to 3
			
			if num ≤ 2 then
				set scary to scary + 1
				
			else
				set meat2 to meat2 + (random number from 501 to 1000)
				set coin to 0
			end if
			
		end repeat
	end repeat
	
	display dialog "You used " & piece & " cursed pieces of thirteen
You killed " & scary & " scary pirates
You gained " & meat2 & " meat, bringing your total to " & meat + meat2 & " meat"
	
	display dialog "1000 adventures
normal item/meat drop rate
normal combat rate
belowdecks unlocked
curse magnet effect while using pieces of 13
moxie ≥ 127
not going to locations during \"O Cap'm, My Cap'n\"
1 in 31 chance of receiving \"O Cap'm, My Cap'n\"
accurate data on The KoL Wiki
(kol.coldfront.net/thekolwiki/)" with title "This simulation assumes the following:"
	
end done
Z000 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 07:02 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0 RC6