treatment "ultimatum.ztt"{ background{ table globals{ } table subjects{ } table summary{ } table contracts{ } table clients{ } table treatments{ } table sessionglobals{ } table participations{ } numsubjects = 2; numgroups = 1; numpracticeperiods = 0; numactualperiods = 1; exchangerate = 1; startendowment = 0; showupfee = 0; noAutoscope = FALSE; firstBoxesOnTop = FALSE; showupfeeawaytext = "You are making losses. Do you want to invest the showupfee in order to continue?"; showupfeeawayyestext = "Yes"; showupfeeawaynotext = "No"; moneyawaytext = "You are making losses. Do you want to continue?"; moneyawayyestext = "Yes"; moneyawaynotext = "No"; bancruptwaittext = "Please wait until the experimenter unlocks your PC."; program{ table = subjects; do{ PieSize = 100; } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; headerbox "Header"{ hasframe = TRUE; height = 10%; top = 0p; cuttop = TRUE; showPeriods = TRUE; showNumPeriods = TRUE; periodtext = "Period"; periodoftext = "of"; practiceperiodprefix = "Trial "; showtime = TRUE; timestr = "Remaining time [sec]:"; pleasedecidetext = "Please reach a decision."; } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Text"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "Please wait until the experiment continues."; } } } } stage "Offer"{ startwaitforall = TRUE; startConditionStr = ""; singleentry = FALSE; singleentrycontinuation = FALSE; timeouttype = ifnoinput; timeout = 60; program{ table = subjects; do{ Participate = if(Player == 1, 1, 0); } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Offer"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You are player 1. There are 100 points to split. Offer player 2 a share:"; } item{ label = "if they accept, they get it and you keep the rest; if they reject it, you both get nothing."; } item{ } item{ label = "Your offer to player 2"; variable = Offer; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = PieSize; } button "OK"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; } } stage "Response"{ startwaitforall = TRUE; startConditionStr = ""; singleentry = FALSE; singleentrycontinuation = FALSE; timeouttype = ifnoinput; timeout = 60; program{ table = subjects; do{ Participate = if(Player == 2, 1, 0); } } program{ table = subjects; do{ Offer = find(same(Group) & Player == 1, Offer); } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Response"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You are player 2."; } item{ label = "Player 1 offers you"; variable = Offer; format = "1"; input = FALSE; } item{ } item{ label = "Do you accept this offer?"; variable = Accept; format = "!radio: 0=\"Reject\"; 1=\"Accept\";"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = 1; } button "OK"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; } } stage "Results"{ startwaitforall = TRUE; startConditionStr = ""; singleentry = FALSE; singleentrycontinuation = FALSE; timeouttype = ifnoinput; timeout = 30; program{ table = subjects; do{ Offer = find(same(Group) & Player == 1, Offer); Accept = find(same(Group) & Player == 2, Accept); Profit = if(Accept == 1, if(Player == 1, PieSize - Offer, Offer), 0); } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Results"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "Player 1 offered player 2"; variable = Offer; format = "1"; input = FALSE; } item{ label = "Player 2"; variable = Accept; format = "!text: 1=\"accepted\"; 0=\"rejected\";"; input = FALSE; } item{ label = "Your payoff"; variable = Profit; format = "1"; input = FALSE; } button "Continue"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; } } roles{ role "S 1"{ } role "S 2"{ } } period "1"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } } }