telefon.qsrc 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194
  1. # telefon
  2. !2021/05/06
  3. !! Draw screens for mobile phone.
  4. !!
  5. !! The base storage for Contacts is controlled by the Array "$contact". This array is a list of NPC identifiers
  6. !! telling us which ones are in your contact list. There are several other ancillary arrays that support the functions
  7. !! of a contact. Each of these has matching indexes to the $contact array. These are mostly used internally, but a
  8. !! writer can make use of them if they need to.
  9. !!
  10. !! ContactList arrays:
  11. !! $contact[] = NPC code for contact. ('A129', 'A29', 'B13', 'C14')
  12. !! $contactIcon[] = Icon for the contact to use. If path is left off, standard phone icon folder is used. if file extension is left off, '.png' is used
  13. !! $contactOCode[] = Code to execute if call is placed to this contact
  14. !! $contactOSche[] = If statement code to determine schedule for outbound calls
  15. !! $contactICode[] = Code to execute for Incoming call
  16. !! $contactISche[] = if statement code for schedule of incoming calls
  17. !! contactAnon[] = 0 if contact number is known to Sveta, 1 for Anonymous
  18. !! contactToday[] = Calls from this contact today
  19. !! contactWeek[] = Calls from this contact this week
  20. !! contactLastCall[] = last time this Contact called
  21. !
  22. !! Add a contact with AddContact
  23. !! gs 'telefon', 'AddContact', <NPC Code>, <Icon for NPC>, <Code for Incoming Call>, <Limiter for Incoming Call>, <Code for Outgoing Call>, <Limiter for Outgoign Call>, <Code for Incoming SMS>, <Limiter for Incoming SMS>, <Code for Outgoing SMS>, <Limiter for Outgoign SMS>, <Anonymous=1>
  24. !! Example, to Add Mother:
  25. !! gs 'telefon', 'AddContact', 'A29', 'icon_npc1', "gs 'telefon', 'Phone_call'", "hour >= 8 and hour <= 20", "gs 'telefon', 'lover'", "hour >= 8 and hour <= 20", "gs 'telefon', 'SMS_your_lover'", "hour >= 10 and hour <= 16", "gs 'telefon', 'lover_SMS'", "hour >= 10 and hour <= 16", 0
  26. !!
  27. !! Remove a contact with DeleteContact
  28. !! gs 'telefon', 'DeleteContact', <NPC Code>
  29. !! Example, to delete Mom:
  30. !! gs 'telefon', 'DeleteContact', 'A29'
  31. !!
  32. !! Header for Phone Screen. Keeps consistent and in one place
  33. $telefon['header'] = {
  34. if telefon['UnreadSMS'] > 0:
  35. $telefon['SMSstatus'] = 'You have <<telefon[''UnreadSMS'']>> unread message(s)'
  36. else
  37. $telefon['SMSstatus'] = ''
  38. end
  39. $result = '<center>
  40. <b><<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>></b><br>
  41. <TABLE cellspacing="0" width="80%">
  42. <TR>
  43. <TD><img src="images/system/icons/icon_statusbar_left.png"></TD>
  44. <TD><<$telefon[''SMSstatus'']>></TD>
  45. <TD align="right"><img src="images/system/icons/icon_statusbar_right.png"></TD>
  46. </TR>
  47. </TABLE><br>'
  48. }
  49. !! Footer for phone screen. Body should be between these two
  50. $telefon['footer'] = {
  51. if $telefon['backButton'] = '': $telefon['backButton'] = 'gs ''telefon'', ''Phone_menu'''
  52. $result = ' <a href="exec:<<$telefon[''backButton'']>>"><img src="images/system/icons/back.png"></a><br><br>
  53. <a href="exec:gs''stat''">Put Phone Away.</a><br>
  54. </center>'
  55. $telefon['backButton'] = 'gs ''telefon'', ''Phone_menu'''
  56. }
  57. !! ''''This is how we print the screen on to the Additional Dscription window
  58. $telefon['print'] = {
  59. clr
  60. pl func('cleanHTML',dyneval($telefon['header']) + $telefon['body'] + dyneval($telefon['footer']))
  61. }
  62. !! This is the formatting function for a row in the Contact List. SHould be run as a DYNEVAL()
  63. $telefon['contact'] = {
  64. !! Contact Row in phone contact list
  65. !! $ARGS[0] = NPC icon
  66. !! $ARGS[1] = NPC Nickname
  67. !! $ARGS[2] = Code to execute for making a Call
  68. !! $ARGS[3] = if statement for determining if NPC is avaiable
  69. $telefon['ContactIcon'] = $ARGS[0]
  70. $telefon['ContactNickName'] = $ARGS[1]
  71. $telefon['ContactCallCode'] = $ARGS[2]
  72. $telefon['ContactCallSchedule'] = $ARGS[3]
  73. !!If file extension is not given, .png is assumed
  74. if instr($telefon['ContactIcon'],'.') = 0:
  75. $telefon['ContactIcon'] += '.png'
  76. end
  77. !!If path is not given, default phone icon path is assumed
  78. if instr($telefon['ContactIcon'],'/') = 0:
  79. $telefon['ContactIcon'] = 'images/system/phone/icons/' + $telefon['ContactIcon']
  80. end
  81. !!If Contact is not in available timeframe, we disable contact calling
  82. if dyneval('result = iif(<<$telefon["ContactCallSchedule"]>>,1,0)') = 0:
  83. $telefon['ContactCallCode'] = "gs 'telefon', 'phone_call_reject'"
  84. end
  85. $result = '<TR>
  86. <TD><img src="<<$telefon[''ContactIcon'']>>" width="75"></TD>
  87. <TD><<$telefon[''ContactNickName'']>></TD>
  88. <TD align="right"><a href="exec:$callerid = ''<<$telefon[''ContactIcon'']>>'' & <<$telefon[''ContactCallCode'']>>"><b>Call</b></a></TD>
  89. </TR>'
  90. }
  91. if $ARGS[0] = 'AddContact':
  92. !! $ARGS[1] = NPC Array identifier
  93. !! $ARGS[2] = Icon
  94. !! ARGS[3] = Anonymous? 0 if not, 1 if yes
  95. $telefonCon['NPC'] = $ARGS[1]
  96. $telefonCon['Icon'] = $ARGS[2]
  97. telefonCon['Anonymous'] = ARGS[3]
  98. telefonCon['ContactListID'] = arrpos('$contact', $telefonCon['NPC'])
  99. if telefonCon['ContactListID'] = -1:
  100. telefonCon['ContactListID'] = arrsize('$contact')
  101. $contact[telefonCon['ContactListID']] = $telefonCon['NPC']
  102. $contactOCode[telefonCon['ContactListID']] = ""
  103. $contactOSche[telefonCon['ContactListID']] = "0"
  104. $contactICode[telefonCon['ContactListID']] = ""
  105. $contactISche[telefonCon['ContactListID']] = "0"
  106. $contactOSMSCode[telefonCon['ContactListID']] = ""
  107. $contactOSMSSche[telefonCon['ContactListID']] = "0"
  108. $contactISMSCode[telefonCon['ContactListID']] = ""
  109. $contactISMSSche[telefonCon['ContactListID']] = "0"
  110. end
  111. $contactIcon[telefonCon['ContactListID']] = $telefonCon['Icon']
  112. contactAnon[telefonCon['ContactListID']] = telefonCon['Anonymous']
  113. killvar 'telefonCon'
  114. killvar '$telefonCon'
  115. end & ! --- AddContact ---
  116. if $ARGS[0] = 'SetCallSchedule':
  117. !! $ARGS[1] = NPC Array identifier
  118. !! $ARGS[2] = Code to execute for Call out
  119. !! $ARGS[3] = If statement code to determine schedule for outbound calls
  120. !! $ARGS[4] = Code to execute for Incoming call
  121. !! $ARGS[5] = if statement code for schedule of incoming calls
  122. $telefonCon['NPC'] = $ARGS[1]
  123. telefonCon['ContactListID'] = arrpos('$contact', $telefonCon['NPC'])
  124. if telefonCon['ContactListID'] = -1:
  125. !! If the contact does not exist, create an anonymous contact.
  126. gs 'telefon', 'AddContact', $telefonCon['NPC'], 'icon_na', 1
  127. end
  128. $telefonCon['OutCode'] = $ARGS[2]
  129. if $ARGS[3] ! '': $telefonCon['OutSched'] = $ARGS[3] else $telefonCon['OutSched'] = "0"
  130. $telefonCon['InCode'] = $ARGS[4]
  131. if $ARGS[5] ! '': $telefonCon['InSched'] = $ARGS[5] else $telefonCon['InSched'] = "0"
  132. $contactOCode[telefonCon['ContactListID']] = $telefonCon['OutCode']
  133. $contactOSche[telefonCon['ContactListID']] = $telefonCon['OutSched']
  134. $contactICode[telefonCon['ContactListID']] = $telefonCon['InCode']
  135. $contactISche[telefonCon['ContactListID']] = $telefonCon['InSched']
  136. killvar '$telefonCon'
  137. end & ! --- SetCallSchedule ---
  138. if $ARGS[0] = 'ClearCallSchedule':
  139. $telefonCon['NPC'] = $ARGS[1]
  140. telefonCon['ContactListID'] = arrpos('$contact', $telefonCon['NPC'])
  141. if telefonCon['ContactListID'] = -1: exit
  142. $contactOCode[telefonCon['ContactListID']] = ""
  143. $contactOSche[telefonCon['ContactListID']] = "0"
  144. $contactICode[telefonCon['ContactListID']] = ""
  145. $contactISche[telefonCon['ContactListID']] = "0"
  146. killvar '$telefonCon'
  147. end & ! --- ClearCallSchedule ---
  148. if $ARGS[0] = 'SetSMSSchedule':
  149. !! $ARGS[1] = NPC Array identifier
  150. !! $ARGS[2] = Code to execute for SMS out
  151. !! $ARGS[3] = If statement code to determine schedule for outbound SMS
  152. !! $ARGS[4] = Code to execute for Incoming SMS
  153. !! $ARGS[5] = if statement code for schedule of incoming SMS
  154. $telefonCon['NPC'] = $ARGS[1]
  155. telefonCon['ContactListID'] = arrpos('$contact', $telefonCon['NPC'])
  156. if telefonCon['ContactListID'] = -1:
  157. !! If the contact does not exist, create an anonymous contact.
  158. gs 'telefon', 'AddContact', $telefonCon['NPC'], 'icon_na', 1
  159. end
  160. $telefonCon['OutSMSCode'] = $ARGS[2]
  161. if $ARGS[3] ! "": $telefonCon['OutSMSSched'] = $ARGS[3] else $telefonCon['OutSMSSched'] = "0"
  162. $telefonCon['InSMSCode'] = $ARGS[4]
  163. if $ARGS[5] ! "": $telefonCon['InSMSSched'] = $ARGS[5] else $telefonCon['InSMSSched'] = "0"
  164. $contactOSMSCode[telefonCon['ContactListID']] = $telefonCon['OutSMSCode']
  165. $contactOSMSSche[telefonCon['ContactListID']] = $telefonCon['OutSMSSched']
  166. $contactISMSCode[telefonCon['ContactListID']] = $telefonCon['InSMSCode']
  167. $contactISMSSche[telefonCon['ContactListID']] = $telefonCon['InSMSSched']
  168. killvar '$telefonCon'
  169. end & ! --- SetSMSSchedule ---
  170. if $ARGS[0] = 'ClearSMSSchedule':
  171. $telefonCon['NPC'] = $ARGS[1]
  172. telefonCon['ContactListID'] = arrpos('$contact', $telefonCon['NPC'])
  173. if telefonCon['ContactListID'] = -1: exit
  174. $contactOSMSCode[telefonCon['ContactListID']] = ""
  175. $contactOSMSSche[telefonCon['ContactListID']] = "0"
  176. $contactISMSCode[telefonCon['ContactListID']] = ""
  177. $contactISMSSche[telefonCon['ContactListID']] = "0"
  178. killvar '$telefonCon'
  179. end & ! --- ClearSMSSchedule ---
  180. if $ARGS[0] = 'DeleteContact':
  181. !! $ARGS[1] = NPC Array identifier
  182. $telefonCon['NPC'] = $ARGS[1]
  183. telefonCon['ContactListID'] = arrpos('$contact',$telefonCon['NPC'])
  184. if telefonCon['ContactListID'] > -1:
  185. killvar '$contact', telefonCon['ContactListID']
  186. killvar '$contactIcon', telefonCon['ContactListID']
  187. killvar '$contactOCode', telefonCon['ContactListID']
  188. killvar '$contactOSche', telefonCon['ContactListID']
  189. killvar '$contactICode', telefonCon['ContactListID']
  190. killvar '$contactISche', telefonCon['ContactListID']
  191. killvar '$contactOSMSCode', telefonCon['ContactListID']
  192. killvar '$contactOSMSSche', telefonCon['ContactListID']
  193. killvar '$contactISMSCode', telefonCon['ContactListID']
  194. killvar '$contactISMSSche', telefonCon['ContactListID']
  195. killvar 'contactAnon', telefonCon['ContactListID']
  196. end
  197. killvar 'telefonCon'
  198. killvar '$telefonCon'
  199. end &! --- DeleteContact ---
  200. if $ARGS[0] = 'ContactList':
  201. $telefon['body'] = '
  202. <font size=6>Contacts</font><br>
  203. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_call.png" height="80" width="80"><br><br>
  204. <TABLE cellspacing="0" width="80%">'
  205. !!iterating all Contacts
  206. i=0
  207. :contactloop2
  208. if i < arrsize('$contact'):
  209. if contactAnon[i] = 0:
  210. $telefon['body'] += dyneval($telefon['contact'],$contactIcon[i],$npc_nickname[$contact[i]],$contactOCode[i],$contactOSche[i])
  211. end
  212. i += 1
  213. jump 'contactloop2'
  214. end
  215. !! Oddball Contacts
  216. if telalla > 0:
  217. $telefon['body'] += dyneval($telefon['contact'],'icon_ira1','Alla',"$telsob = 'Alla' & gt 'telefon', 'mobilaraz'","hour >= 8 and hour <= 20")
  218. end
  219. if telmasha > 0:
  220. $telefon['body'] += dyneval($telefon['contact'],'icon_masha','Masha',"$telsob = 'Masha' & gt 'telefon', 'mobilaraz'","hour >= 8 and hour <= 20")
  221. end
  222. !! iterating all lovers
  223. lover_number = 0
  224. :loverloop2
  225. if pcs_lovers[lover_number] = 1 and svidanie[lover_number] = 0:
  226. $telefon['body'] += dyneval($telefon['contact'],'icon_bf'+lover_picture[lover_number],$loverdesc[lover_number],"lover_number = <<lover_number>> & gt 'telefon', 'callingTheLover', <<lover_number>>","hour > 6 and hour < 20")
  227. end
  228. lover_number += 1
  229. if lover_number < arrsize('pcs_lovers'): jump 'loverloop2'
  230. $telefon['body'] += '</TABLE><br>'
  231. dynamic $telefon['print']
  232. killvar 'i'
  233. killvar 'lover_number'
  234. end &! --- ContactList ---
  235. !! Reset Contact Call Stats Daily and Weekly
  236. !!
  237. !! ARGS[1] = New Week if 1, 0 if same week
  238. if $ARGS[0] = 'DailyStatRefresh':
  239. i=0
  240. :DailyStatRefLoop
  241. if i < arrsize('$contact'):
  242. contactToday[i] = 0
  243. if ARGS[1] = 1:
  244. contactWeek[i] = 0
  245. end
  246. i += 1
  247. jump 'DailyStatRefLoop'
  248. end
  249. killvar 'i'
  250. end
  251. !! Determine if any Incoming calls should happen
  252. !!
  253. !! ARGS[1] = Previous totminut
  254. !! ARGS[2] = Current totminut
  255. if $ARGS[0] = 'IncomingCheck':
  256. telefIncCheck['PrevTotalMinutes'] = ARGS[1]
  257. telefIncCheck['NewTotalMinutes'] = ARGS[2]
  258. if telefIncCheck['PrevTotalMinutes'] > telefIncCheck['NewTotalMinutes'] or telefon['LastIncCallCheck'] > telefIncCheck['NewTotalMinutes'] or telefon['LastIncCallCheck'] = 0:
  259. !! Time Cheat has been used, so we should do some cleanup
  260. telefon['LastIncCallCheck'] = telefIncCheck['NewTotalMinutes']
  261. end
  262. !! Limit the number of calls per day
  263. !! right now allow every 60 minutes
  264. if telefIncCheck['NewTotalMinutes'] - telefon['LastIncCallCheck'] > 60 and menu_off = 0 and phone_off = 0:
  265. telefon['LastIncCallCheck'] = telefIncCheck['NewTotalMinutes']
  266. gs 'telefon','IncomingCallChooser'
  267. end
  268. killvar 'telefIncCheck'
  269. end
  270. if $ARGS[0] = 'IncomingCallChooser':
  271. !! When an Incoming call happens, choose who it comes from
  272. !! Add Contacts
  273. i=0
  274. :telefonIncLoop1
  275. if i < arrsize('$contact'):
  276. if $contactICode[i] ! "":
  277. if dyneval('result = iif(<<$contactISche[i]>>,1,0)') = 1:
  278. j = arrsize('$telefIncCall')
  279. if contactAnon[i] = 1:
  280. $telefIncIcon[j] = "images/system/phone/decline.png"
  281. $telefIncName[j] = "Unknown Caller"
  282. else
  283. $telefIncIcon[j] = $contactIcon[i]
  284. $telefIncName[j] = $npc_nickname[$contact[i]]
  285. end
  286. $telefIncCall[j] = $contactICode[i]
  287. $telefIncNPC[j] = $contact[i]
  288. end
  289. end
  290. i += 1
  291. jump 'telefonIncLoop1'
  292. end
  293. !! Add Lovers
  294. i=0
  295. :telefonIncLoop2
  296. if i < 3 and hour > 5 and hour < 20:
  297. if pcs_lovers[i] = 1 and svidanie[i] = 0 and loverday[i] ! daystart and rand(1,100) > 95:
  298. j = arrsize('$telefIncCall')
  299. $telefIncCall[j] = "cls & gs 'telefon', 'lover', <<i>>"
  300. $telefIncIcon[j] = 'images/characters/shared/headshots_generic/<<lover_picture[i]>>.jpg'
  301. $telefIncName[j] = $loverdesc[i]
  302. end
  303. i += 1
  304. jump 'telefonIncLoop2'
  305. end
  306. if arrsize('$telefIncCall') > 0:
  307. j = rand(0,arrsize('$telefIncCall')-1)
  308. if $telefIncNPC[j] ! "":
  309. i = arrpos('$contact',$telefIncNPC[j])
  310. contactLastCall[i] = totminut
  311. contactToday[i] += 1
  312. contactWeek[i] += 1
  313. end
  314. gs 'telefon', 'IncomingCall', $telefIncIcon[j], $telefIncName[j], $telefIncCall[j]
  315. end
  316. killvar 'i'
  317. killvar 'j'
  318. killvar '$telefIncIcon'
  319. killvar '$telefIncName'
  320. killvar '$telefIncCall'
  321. killvar '$telefIncNPC'
  322. end
  323. if $ARGS[0] = 'IncomingCall':
  324. !! $ARGS[1] = Icon for contact
  325. !! $ARGS[2] = Nickname of contact
  326. !! $ARGS[3] = Code to execute for this Call
  327. $telefonIncC['Icon'] = $ARGS[1]
  328. $telefonIncC['Name'] = $ARGS[2]
  329. $telefonIncC['Code'] = $ARGS[3]
  330. PLAY 'sound/old_phone.mp3',30
  331. $telefon['body'] = '
  332. <font size=6><<$telefonIncC["Name"]>> calling</font><br>
  333. <img src="<<$telefonIncC["Icon"]>>" width="200"><br>
  334. <br>
  335. <br>
  336. <br>
  337. <a href="exec:<<$telefonIncC["Code"]>>"><img src="images/system/phone/call_accept.png"></a>
  338. <a href="exec:gt $loc, $loc_arg"><img src="images/system/phone/decline.png"></a><br>
  339. <b><font color="red">Your phone is ringing</font></b><br>'
  340. dynamic $telefon['print']
  341. killvar '$telefonIncC'
  342. end
  343. if $ARGS[0] = 'Phone_notebook':
  344. gs 'housing', 'rent'
  345. $telefon['body'] = '
  346. <font size=6>Planner</font><br>
  347. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_notebook.png" height="80" width="80"><br>
  348. <<year>>-<<$month>>-<<day>>, <<$week[week]>><br><br>'
  349. rent1 = -1
  350. rent4 = -1
  351. !! TODO: Will have to change this too, to handle more than 2 rentals.
  352. if func('homes_properties', 'is_property_of_status', 'rented', 'city_apartment') : rent1 = func('homes_properties', 'get_rent_days', 'city_apartment')
  353. if func('homes_properties', 'is_property_of_status', 'rented', 'old_town_apartment') : rent4 = func('homes_properties', 'get_rent_days', 'old_town_apartment')
  354. d1 = day
  355. w1 = week
  356. m1 = month
  357. y1 = year
  358. i = 0
  359. $list = '<br>&emsp;<b>•</b> '
  360. :pnotebook
  361. daynum = daystart+i
  362. $calendarday = ''
  363. if m1 = 1 and d1 >= 1 and d1 <= 8:
  364. $calendarday += $list + 'New Year holidays'
  365. if d1 = 1:$calendarday += ', New Year'
  366. if d1 = 7:$calendarday += ', Christmas'
  367. end
  368. if m1 = 2 and d1 = 23:$calendarday += $list + 'Defender of Fatherland Day'
  369. if m1 = 3 and d1 = 8:$calendarday += $list + 'Women''s Day'
  370. if m1 = 5 and d1 = 1:$calendarday += $list + 'Spring and Labor Day'
  371. if m1 = 5 and d1 = 2:$calendarday += $list + 'National holiday'
  372. if m1 = 5 and d1 = 9:$calendarday += $list + 'Victory Day'
  373. if m1 = 6 and d1 = 12:$calendarday += $list + 'Russia Day'
  374. if m1 = 6 and d1 = 13:$calendarday += $list + 'National holiday'
  375. if m1 = 11 and d1 = 4:$calendarday += $list + 'Unity Day'
  376. if mid($start_type,1,2) = 'sg' and SchoolAtestat = 0:
  377. if m1 = 1 and d1 = 1:$calendarday += $list + 'First day of Winter break.'
  378. if m1 = 1 and d1 = 15:$calendarday += $list + 'Last day of Winter break.'
  379. if m1 = 3 and d1 = 20:$calendarday += $list + 'First day of Spring break.'
  380. if m1 = 3 and d1 = 26:$calendarday += $list + 'Last day of Spring break.'
  381. if y1 = 2017 and m1 = 5 and d1 = 25:$calendarday += $list + 'Graduation Day!'
  382. if m1 = 6 and d1 = 1:$calendarday += $list + 'First day of Summer break.'
  383. if m1 = 8 and d1 = 31:$calendarday += $list + 'Last day of Summer break.'
  384. if m1 = 11 and d1 = 4:$calendarday += $list + 'First day of Autumn break.'
  385. if m1 = 11 and d1 = 11:$calendarday += $list + 'Last day of Autumn break.'
  386. end
  387. if daynum >= daylastperiod+28 and daynum < daylastperiod+31:$calendarday += $list + '<font color=''red''><b>Menstruation!</b></font>'
  388. if daynum >= daylastperiod+12 and daynum < daylastperiod+14:$calendarday += $list + '<font color=#336600><b>Ovulation!</b></font>'
  389. if pregchem >= 6720:$calendarday += $list + '<font color=''red''><b>Birthing day!</b></font>'
  390. if w1 < 5 and (workSec >= 1 or BurgerQW['Secretary'] = 1):$calendarday += $list + 'Working as a secretary. <i>(9:00 - 17:00)</i>'
  391. if w1 < 5 and workFabrika = 1:
  392. $calendarday += $list + 'Working as a seamstress. '
  393. if age < 18:$calendarday += '<i>(16:00 - 20:00)</i>' else $calendarday += '<i>(8:00 - 16:00)</i>'
  394. end
  395. if w1 > 1 and w1 <= 5 and workhosp = 1:$calendarday += $list + 'Working as a nurse. <i>(8:00 - 16:00)</i>'
  396. if worksalon = 1 and (w1 = 1 or w1 = 3 or w1 = 5):$calendarday += $list + 'Working as a masseuse. <i>(9:00 - 17:00)</i>'
  397. !! if maidqw > 0:$calendarday += '<br>&emsp;<b>•</b> Working as maid. <i>(16:00 - 19:00)</i>'
  398. if pfilmday[i] > 0:$calendarday += $list + 'Porn shoot: <i><<$porndesc[pfilmday[i]]>></i>'
  399. if d1 = 25 and (BurgerQW['Secretary'] = 1 or workKafe['job'] = 1 or workhosp = 1 or worksalon = 1 or tanwork = 1 or workSec = 1 or workFabrika = 1):$calendarday += $list + '<i>Pay day!</i>'
  400. if d1 = nyp_day and m1 = 12 and SchoolAtestat = 0 and mid($start_type,1,2) = 'sg':$calendarday += $list + 'New Year''s party at 14:00!'
  401. if (npc_QW['A33']-2) mod 2 = 1 and sisboyday+1 = daynum:
  402. if sisboytrioQW = 1:
  403. $calendarday += $list + '<font color="orange">Threesome with Anya and Roma at 18:00</font>'
  404. else
  405. $calendarday += $list + '<font color="orange">Anya having sex with Roma at 18:00</font>'
  406. end
  407. end
  408. if sisboyparty = 2 and sisboyparty_day+1 = daynum:$calendarday += $list + '<font color="orange">Party at Rex''s, gathering before 18:00 at Community Center</font>'
  409. if rent1 = 0:$calendarday += $list + 'Rent on city apartment expires!'
  410. if rent4 = 0:$calendarday += $list + 'Rent on Pushkin apartment expires!'
  411. if birthday = d1 and birthmonth = m1:$calendarday += $list + 'My birthday!'
  412. if kid > 0:
  413. k1 = kid
  414. :kiddieloop
  415. if daykid[k1] = d1 and monthkid[k1] = m1:$calendarday += $list + 'Birthday of my <<$polreb[k1]>> <<$kidname[k1]>>, my <<kid>>. baby!'
  416. if k1 > 1:k1 -= 1 & jump 'kiddieloop'
  417. end
  418. if $calendarday ! '':
  419. $telefon['body'] += '<b><<$monthName[m1]>> <<d1>>, <<$week[w1]>>:</b>'
  420. $telefon['body'] += $calendarday +'<br>'
  421. end
  422. if i < 14:
  423. rent1 -= 1
  424. rent4 -= 1
  425. i += 1
  426. w1 += 1
  427. if w1 > 7:w1 = 1
  428. d1 += 1
  429. if monthsend[m1] < d1:
  430. m1 += 1 & d1 = 1
  431. if m1 = 13: m1 = 1 & y1 += 1
  432. end
  433. jump 'pnotebook'
  434. end
  435. killvar 'calendarday'
  436. killvar 'rent1'
  437. killvar 'rent4'
  438. killvar 'd1'
  439. killvar 'w1'
  440. killvar 'm1'
  441. killvar 'y1'
  442. killvar 'daynum'
  443. dynamic $telefon['print']
  444. end &! --- Phone_notebook ---
  445. !!----------------------------------------Camera-------------------------------------------------
  446. !!for viewing photos on your phone
  447. if $ARGS[0] = 'Phone_pictures':
  448. gt 'phone_selfies', 'selfies'
  449. end
  450. !!picking the selfie image when taking photos, this sets the location variable
  451. !{
  452. $ARGS[1] is phone location if left blank it is a generic selfie (one of the locations in $selfieLoc[])
  453. $ARGS[2] is for flashing when clothed if left blank then it is not flashing
  454. }
  455. if $ARGS[0] = 'Phone_camera_selfie':
  456. minut += rand(5,7)
  457. if $ARGS[1] ! '':
  458. gs 'telefon', 'Phone_selfie_image', $ARGS[1], $ARGS[2]
  459. else
  460. phone_rand = RAND(1,selfieClotot[0])
  461. dynamic '<<$selfieLoc[0]>>_closelfie[<<phone_rand>>] = 1'
  462. gs 'stat'
  463. if usePopUps = 1:
  464. msg '<img src="images/pc/activities/phone/selfies/<<$selfieLoc[0]>>/clothed/<<$selfieFilePrefix[0]>><<phone_rand>>.jpg">'
  465. else
  466. view 'images/pc/activities/phone/selfies/<<$selfieLoc[0]>>/clothed/<<$selfieFilePrefix[0]>><<phone_rand>>.jpg'
  467. end
  468. end
  469. !if cumsumbod-cumsumvag-cumsumass > 0: phone_rand = RAND (m,n) - for SELF in the semen
  470. !if photo_event_pic = x: phone_rand = RAND (x,y) - for photos during the events (by heart)
  471. !msg '<img src="images/system/phone/phone_selfie<<phone_rand>>.jpg">'
  472. end
  473. !!taking selfies, this chooses a random image for the location for clothed, underwear and nude
  474. !{
  475. $ARGS[1] is phone location (one of the locations in $selfieLoc[])
  476. $ARGS[2] is for flashing when clothed if left blank then it is not flashing
  477. }
  478. if $ARGS[0] = 'Phone_selfie_image':
  479. if $ARGS[2] = '':
  480. if PCloswimwear = 1:
  481. !!changing to and unmixed variable so the rng will work
  482. if Enable_Android = 1:
  483. temp_swim = selfieSwimtot[arrpos('$selfieLoc', $ARGS[1], 1)]
  484. else
  485. temp_swim = selfieSwimtot[arrpos(1, '$selfieLoc', $ARGS[1])]
  486. end
  487. if temp_swim > 0:
  488. phone_rand = rand(1, temp_swim)
  489. !!Setting the image owned flag to 1
  490. dynamic '<<$ARGS[1]>>_swim[<<phone_rand>>] = 1'
  491. gs 'stat'
  492. if usePopUps = 1:
  493. msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/bikini/<<phone_rand>>.jpg">'
  494. else
  495. view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/bikini/<<phone_rand>>.jpg'
  496. end
  497. end
  498. elseif $clothingworntype ! 'nude':
  499. !!changing to and unmixed variable so the rng will work
  500. if Enable_Android = 1:
  501. temp_clotot = selfieClotot[arrpos('$selfieLoc', $ARGS[1], 1)]
  502. else
  503. temp_clotot = selfieClotot[arrpos(1, '$selfieLoc', $ARGS[1])]
  504. end
  505. if temp_clotot > 0:
  506. phone_rand = rand(1, temp_clotot)
  507. !!Setting the image owned flag to 1
  508. dynamic '<<$ARGS[1]>>_closelfie[<<phone_rand>>] = 1'
  509. gs 'stat'
  510. if usePopUps = 1:
  511. msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/clothed/<<phone_rand>>.jpg">'
  512. else
  513. view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/clothed/<<phone_rand>>.jpg'
  514. end
  515. end
  516. elseif $pantyworntype ! 'none':
  517. if Enable_Android = 1:
  518. temp_undtot = selfieUndtot[arrpos('$selfieLoc', $ARGS[1], 1)]
  519. else
  520. temp_undtot = selfieUndtot[arrpos(1, '$selfieLoc', $ARGS[1])]
  521. end
  522. if temp_undtot > 0:
  523. phone_rand = rand(1, temp_undtot)
  524. dynamic '<<$ARGS[1]>>_undselfie[<<phone_rand>>] = 1'
  525. gs 'stat'
  526. if usePopUps = 1:
  527. msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/underwear/<<phone_rand>>.jpg">'
  528. else
  529. view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/underwear/<<phone_rand>>.jpg'
  530. end
  531. end
  532. else
  533. if Enable_Android = 1:
  534. temp_nudtot = selfieNudtot[arrpos('$selfieLoc', $ARGS[1], 1)]
  535. else
  536. temp_nudtot = selfieNudtot[arrpos(1, '$selfieLoc', $ARGS[1])]
  537. end
  538. if temp_nudtot > 0:
  539. phone_rand = rand(1, temp_nudtot)
  540. dynamic '<<$ARGS[1]>>_nudselfie[<<phone_rand>>] = 1'
  541. gs 'stat'
  542. if usePopUps = 1:
  543. msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/nude/<<phone_rand>>.jpg">'
  544. else
  545. view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/nude/<<phone_rand>>.jpg'
  546. end
  547. end
  548. end
  549. else
  550. if $ARGS[2] = 'tits':
  551. if Enable_Android = 1:
  552. temp_titflash = selfieTitflash[arrpos('$selfieLoc', $ARGS[1], 1)]
  553. else
  554. temp_titflash = selfieTitflash[arrpos(1, '$selfieLoc', $ARGS[1])]
  555. end
  556. if temp_titflash > 0:
  557. phone_rand = rand(1, temp_titflash)
  558. dynamic '<<$ARGS[1]>>_titflash[<<phone_rand>>] = 1'
  559. gs 'stat'
  560. if usePopUps = 1:
  561. msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/titflash/<<phone_rand>>.jpg">'
  562. else
  563. view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/titflash/<<phone_rand>>.jpg'
  564. end
  565. end
  566. elseif $ARGS[2] = 'ass':
  567. if Enable_Android = 1:
  568. temp_assflash = selfieAssflash[arrpos('$selfieLoc', $ARGS[1], 1)]
  569. else
  570. temp_assflash = selfieAssflash[arrpos(1, '$selfieLoc', $ARGS[1])]
  571. end
  572. if temp_assflash > 0:
  573. phone_rand = rand(1, temp_assflash)
  574. dynamic '<<$ARGS[1]>>_assflash[<<phone_rand>>] = 1'
  575. gs 'stat'
  576. if usePopUps = 1:
  577. msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/assflash/<<phone_rand>>.jpg">'
  578. else
  579. view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/assflash/<<phone_rand>>.jpg'
  580. end
  581. end
  582. elseif $ARGS[2] = 'pussy':
  583. if Enable_Android = 1:
  584. temp_pussyflash = selfiePussyflash[arrpos('$selfieLoc', $ARGS[1], 1)]
  585. else
  586. temp_pussyflash = selfiePussyflash[arrpos(1, '$selfieLoc', $ARGS[1])]
  587. end
  588. if temp_pussyflash > 0:
  589. phone_rand = rand(1, temp_pussyflash)
  590. dynamic '<<$ARGS[1]>>_pussyflash[<<phone_rand>>] = 1'
  591. gs 'stat'
  592. if usePopUps = 1:
  593. msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/pussyflash/<<phone_rand>>.jpg">'
  594. else
  595. view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/pussyflash/<<phone_rand>>.jpg'
  596. end
  597. end
  598. end
  599. end
  600. end
  601. !!taking selfies in the shower or bath
  602. if $ARGS[0] = 'Phone_selfie_image_bathing':
  603. minut += rand(5,7)
  604. if $ARGS[1] = 'shower':
  605. !!changing to and unmixed variable so the rng will work
  606. if Enable_Android = 1:
  607. temp_showertot = selfieShowertot[arrpos('$selfieLoc', 'bathroom', 1)]
  608. else
  609. temp_showertot = selfieShowertot[arrpos(1, '$selfieLoc', 'bathroom')]
  610. end
  611. phone_rand = rand(1, temp_showertot)
  612. !!Setting the image owned flag to 1
  613. bathroom_showerselfie[phone_rand] = 1
  614. gs 'stat'
  615. if usePopUps = 1:
  616. msg '<img src="images/pc/activities/phone/selfies/bathroom/shower/<<phone_rand>>.jpg">'
  617. else
  618. view 'images/pc/activities/phone/selfies/bathroom/shower/<<phone_rand>>.jpg'
  619. end
  620. elseif $ARGS[1] = 'bath':
  621. if Enable_Android = 1:
  622. temp_bathtot = selfieBathtot[arrpos('$selfieLoc', 'bathroom', 1)]
  623. else
  624. temp_bathtot = selfieBathtot[arrpos(1, '$selfieLoc', 'bathroom')]
  625. end
  626. phone_rand = rand(1, temp_bathtot)
  627. bathroom_bathselfie[phone_rand] = 1
  628. gs 'stat'
  629. if usePopUps = 1:
  630. msg '<img src="images/pc/activities/phone/selfies/bathroom/bath/<<phone_rand>>.jpg">'
  631. else
  632. view 'images/pc/activities/phone/selfies/bathroom/bath/<<phone_rand>>.jpg'
  633. end
  634. end
  635. end
  636. !!for taking photos - only selfies for now
  637. if $ARGS[0] = 'Phone_camera':
  638. gs 'phone_selfies', 'Phone_selfie_totals'
  639. if $locclass = 'bedr':
  640. $phone_loc = 'bedroom'
  641. elseif $locclass = 'kitr':
  642. $phone_loc = 'kitchen'
  643. elseif $locclass = 'livingr':
  644. $phone_loc = 'livingroom'
  645. elseif $locclass = 'changingroom':
  646. $phone_loc = 'changingroom'
  647. elseif $locclass = 'city_park':
  648. $phone_loc = 'park'
  649. elseif $locclass = 'locker':
  650. $phone_loc = 'locker'
  651. elseif $locclass = 'beach':
  652. $phone_loc = 'beach'
  653. elseif $locclass = 'classroom':
  654. $phone_loc = 'classroom'
  655. elseif $locclass = 'school_bathroom':
  656. $phone_loc = 'school_bathroom'
  657. elseif $locclass = 'restroom':
  658. $phone_loc = 'restroom'
  659. elseif $location_type = 'bathroom':
  660. $phone_loc = 'bathroom'
  661. else
  662. $phone_loc = ''
  663. end
  664. $telefon['body'] = '<font size=6>Camera</font><br>
  665. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_camera.png" height="80" width="80"><br><br>'
  666. !! Take a selfie depending on which clothes you are wearing
  667. $telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'' "><b>Take a selfie</b></a><br>'
  668. !! Flashing selfie
  669. if $clothingworntype ! 'nude' and $phone_loc <> '':
  670. if Enable_Android = 1:
  671. locIndex = arrpos('$selfieLoc', $phone_loc,1)
  672. else
  673. locIndex = arrpos(1, '$selfieLoc', $phone_loc)
  674. end
  675. if (pcs_inhib >= 35 or exhibitionist_lvl > 0 or $phone_loc = 'bedroom') and selfieTitflash[locIndex] > 0:
  676. $telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''tits'' "><b>Flash your tits for a selfie</b></a><br>'
  677. end
  678. if (exhibitionist_lvl > 0 or $phone_loc = 'bedroom') and selfieAssflash[locIndex] > 0:
  679. $telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''ass'' "><b>Flash your ass for a selfie</b></a><br>'
  680. end
  681. if (exhibitionist_lvl > 1 or $phone_loc = 'bedroom') and selfiePussyflash[locIndex] > 0:
  682. $telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''pussy'' "><b>Flash your pussy for a selfie</b></a><br>'
  683. end
  684. end
  685. dynamic $telefon['print']
  686. end
  687. !!-----------------------------------end of Camera------------------------------------------
  688. !!-----------------------------------start of sms------------------------------------------
  689. !{
  690. Send SMS lists the current contacts, then clicking on a contact gives a list of messages that can be sent.
  691. Receive messages lists the sms messages sent to the player, these can be deleted, they will be in bold until read.
  692. To add an incoming message
  693. gs 'telefon', 'add_sms', 'A1', 'Test message the text goes here', 'images/pc/activities/phone/selfies/bathroom/underwear/1.jpg', 'images/pc/activities/phone/selfies/school_bathroom/pussyflash/1.jpg'
  694. A1 is the NPC code (A1 is Dmitriy Nosov "Dimka")
  695. You can have up to 4 pictures attached to the message
  696. To add an out going message that can be sent
  697. gs 'telefon', 'add_sms_to_send', 'A1', 'Test message the text goes here'
  698. To add a contact if it doesn't exist
  699. if arrpos('$contact', 'A1') = -1: gs 'telefon', 'AddContact', 'A1', 'images/characters/shared/headshots_main/big1.jpg', "", "0", "", "0", "", "0", "", "0", 0
  700. SMS Arrays storing received messages and messages that can be sent
  701. Received Messages
  702. telefon['UnreadSMS'] = number of unread SMS messages
  703. $SMSContact[] = NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
  704. $SMSMessage[] = text for the sms message
  705. $SMSReplies[] = text for the replies
  706. $SMSTime[] = date time the message was received
  707. $SMSPicture1[] = url for first picture sent as part of the message
  708. $SMSPicture2[] = url for second picture sent as part of the message
  709. $SMSPicture3[] = url for third picture sent as part of the message
  710. $SMSPicture4[] = url for fourth picture sent as part of the message
  711. SMSMessageRead[] = 0 unread, 1 read
  712. Send Messages
  713. $SMSSendContact[] = NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
  714. $SMSSendMessage[] = text for the sms message
  715. $SMSSendCode[] = Code to execute for Incoming call
  716. SMSSendRepeatable[] = 0 delete option after send, 1 don't delete option
  717. $SMSSendDeleteId[] = id passed by the caller
  718. }
  719. if $ARGS[0] = 'Phone_sms':
  720. $telefon['body'] = '
  721. <font size=6>SMS</font><br>
  722. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
  723. $telefon['body'] += '<b><a href="exec:gs ''telefon'', ''send_sms''">Send new SMS</a></b><br>'
  724. $telefon['body'] += '<TABLE cellspacing="0" width="80%"><TR><TH>Icon</TH><TH>Name</TH><TH align="right">Received</TH><TH></TH></TR>'
  725. !!iterating all Messages
  726. !!reset and recalculate unread messages count, in case they get out of sync
  727. telefon['UnreadSMS'] = 0
  728. i=0
  729. :smsloop
  730. if i < arrsize('$SMSContact'):
  731. !! if the person sending is in the contact list display the names and icon
  732. telefon['contactid'] = arrpos('$contact',$SMSContact[i])
  733. if telefon['contactid'] = -1:
  734. $telefonCon['NPCName'] = ''
  735. $telefonCon['Icon'] = 'icon_na.png'
  736. else
  737. $telefonCon['NPCName'] = $npc_nickname[$contact[telefon['contactid']]]
  738. $telefonCon['Icon'] = $contactIcon[telefon['contactid']]
  739. end
  740. if SMSMessageRead[i] = 0: telefon['UnreadSMS'] += 1
  741. $telefon['body'] += dyneval($telefon['SMS'],i,$telefonCon['Icon'],$telefonCon['NPCName'],$SMSTime[i],SMSMessageRead[i])
  742. i += 1
  743. jump 'smsloop'
  744. end
  745. $telefon['body'] += '<b><a href="exec:gs ''telefon'', ''delete_sms'',''0'',''all''">Delete All</a></b><br>'
  746. $telefon['body'] += '</TABLE><br>'
  747. dynamic $telefon['print']
  748. killvar 'i'
  749. end &! --- Phone_sms ---
  750. !{
  751. New SMS Message
  752. If NPC is not in the contacts list of the phone it will be displayed as unknown until the contact has been added
  753. $ARGS[1] = NPC code for contact. ('A129', 'A29', 'B13', 'C14')
  754. $ARGS[2] = Message text to be displayed
  755. $ARGS[3] = Replies to the message (optional)
  756. $ARGS[4] = path to a picture to be displayed (optional)
  757. $ARGS[5] = path to a picture to be displayed (optional)
  758. $ARGS[6] = path to a picture to be displayed (optional)
  759. $ARGS[7] = path to a picture to be displayed (optional)
  760. }
  761. if $ARGS[0] = 'add_sms':
  762. $SMSContact[telefon['SMSCount']] = $ARGS[1]
  763. $SMSMessage[telefon['SMSCount']] = $ARGS[2]
  764. $SMSReplies[telefon['SMSCount']] = $ARGS[3]
  765. $SMSTime[telefon['SMSCount']] = '<<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>> <<$week[week]>> <<day>> <<$month>> <<year>>'
  766. $SMSPicture1[telefon['SMSCount']] = $ARGS[4]
  767. $SMSPicture2[telefon['SMSCount']] = $ARGS[5]
  768. $SMSPicture3[telefon['SMSCount']] = $ARGS[6]
  769. $SMSPicture4[telefon['SMSCount']] = $ARGS[7]
  770. SMSMessageRead[telefon['SMSCount']] = 0
  771. telefon['SMSCount'] += 1
  772. telefon['UnreadSMS'] += 1
  773. end
  774. if $ARGS[0] = 'delete_sms':
  775. telefon['SMSid'] = ARGS[1]
  776. killvar '$SMSContact', telefon['SMSid']
  777. killvar '$SMSMessage', telefon['SMSid']
  778. killvar '$SMSReplies', telefon['SMSid']
  779. killvar '$SMSTime', telefon['SMSid']
  780. killvar '$SMSPicture1', telefon['SMSid']
  781. killvar '$SMSPicture2', telefon['SMSid']
  782. killvar '$SMSPicture3', telefon['SMSid']
  783. killvar '$SMSPicture4', telefon['SMSid']
  784. killvar 'SMSMessageRead', telefon['SMSid']
  785. telefon['SMSCount'] -= 1
  786. if $ARGS[2] = 'all' and telefon['SMSCount'] > 0 :
  787. gs 'telefon','delete_sms','0','all'
  788. end
  789. gs 'telefon', 'Phone_sms'
  790. end
  791. if $ARGS[0] = 'show_sms':
  792. telefon['SMSid'] = ARGS[1]
  793. !!set to read and update the number of unread messages
  794. if SMSMessageRead[telefon['SMSid']] = 0:
  795. telefon['UnreadSMS'] -= 1
  796. SMSMessageRead[telefon['SMSid']] = 1
  797. end
  798. !! Get image and name if in phone contacts otherwise show unknown
  799. telefon['contactid'] = arrpos('$contact',$SMSContact[telefon['SMSid']])
  800. if telefon['contactid'] = -1:
  801. $telefonCon['NPCName'] = ''
  802. $telefonCon['Icon'] = 'icon_na.png'
  803. else
  804. $telefonCon['NPCName'] = $npc_nickname[$contact[telefon['contactid']]]
  805. $telefonCon['Icon'] = $contactIcon[telefon['contactid']]
  806. end
  807. !!If file extension is not given, .png is assumed
  808. if instr($telefonCon['Icon'],'.') = 0:
  809. $telefonCon['Icon'] += '.png'
  810. end
  811. !!If path is not given, default phone icon path is assumed
  812. if instr($telefonCon['Icon'],'/') = 0:
  813. $telefonCon['Icon'] = 'images/system/phone/icons/' + $telefonCon['Icon']
  814. end
  815. $telefon['body'] = '
  816. <font size=6>SMS</font><br>
  817. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
  818. $telefon['body'] += '<table cellspacing="0" width="80%">'
  819. $telefon['body'] += '<tr><tr><img height=100 src="<<$telefonCon[''Icon'']>>"></td><td><<$telefonCon[''NPCName'']>></td></tr>'
  820. $telefon['body'] += '<tr><td colspan="2"><<$SMSMessage[telefon[''SMSid'']]>></td></tr>'
  821. if $SMSReplies[telefon['SMSid']] <> '':
  822. !$telefon['body'] += '<tr><th colspan="2" style="font-size:120%">Reply</th></tr>'
  823. $telefon['body'] += '<tr><th> </th></tr>'
  824. $telefon['body'] += '<tr><td colspan="2"><<$SMSReplies[telefon[''SMSid'']]>></td></tr>'
  825. end
  826. if $SMSPicture1[telefon['SMSid']] <> '':
  827. $telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture1[telefon[''SMSid'']]>>"></td></tr>'
  828. end
  829. if $SMSPicture2[telefon['SMSid']] <> '':
  830. $telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture2[telefon[''SMSid'']]>>"></td></tr>'
  831. end
  832. if $SMSPicture3[telefon['SMSid']] <> '':
  833. $telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture3[telefon[''SMSid'']]>>"></td></tr>'
  834. end
  835. if $SMSPicture4[telefon['SMSid']] <> '':
  836. $telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture4[telefon[''SMSid'']]>>"></td></tr>'
  837. end
  838. $telefon['body'] += '</table><br>'
  839. $telefon['backButton'] = 'gs ''telefon'', ''Phone_sms'' '
  840. dynamic $telefon['print']
  841. end
  842. !! This is the formatting function for a row in the SMS message table. SHould be run as a DYNEVAL()
  843. !{
  844. SMS Row in messages table
  845. ARGS[0] = message id
  846. $ARGS[1] = NPC icon
  847. $ARGS[2] = NPC Nickname
  848. $ARGS[3] = Time received
  849. ARGS[4] = 0 unread, 1 read
  850. }
  851. $telefon['SMS'] = {
  852. telefon['SMSid'] = ARGS[0]
  853. $telefon['ContactIcon'] = $ARGS[1]
  854. $telefon['ContactNickName'] = $ARGS[2]
  855. $telefon['SMSTime'] = $ARGS[3]
  856. telefon['SMSStatus'] = ARGS[4]
  857. !!If file extension is not given, .png is assumed
  858. if instr($telefon['ContactIcon'],'.') = 0:
  859. $telefon['ContactIcon'] += '.png'
  860. end
  861. !!If path is not given, default phone icon path is assumed
  862. if instr($telefon['ContactIcon'],'/') = 0:
  863. $telefon['ContactIcon'] = 'images/system/phone/icons/' + $telefon['ContactIcon']
  864. end
  865. !! unread will be bold
  866. if telefon['SMSStatus'] = 0:
  867. $telefon['SMSstyle1'] = '<b>'
  868. $telefon['SMSstyle2'] = '</b>'
  869. else
  870. $telefon['SMSstyle1'] = ''
  871. $telefon['SMSstyle2'] = ''
  872. end
  873. $result = '<TR>
  874. <TD><img height=100 src="<<$telefon[''ContactIcon'']>>"></TD>
  875. <TD><<$telefon[''SMSstyle1'']>><<$telefon[''ContactNickName'']>><<$telefon[''SMSstyle2'']>></TD>
  876. <TD align="right"><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''show_sms'', <<telefon[''SMSid'']>>"><<$telefon[''SMSTime'']>></a><<$telefon[''SMSstyle2'']>></TD>
  877. <TD><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''delete_sms'', <<telefon[''SMSid'']>>">Delete</a><<$telefon[''SMSstyle2'']>></TD>
  878. </TR>'
  879. }
  880. !! List of Contacts that you can send sms messages to
  881. if $ARGS[0] = 'send_sms':
  882. $telefon['backButton'] = 'gs ''telefon'', ''Phone_sms'''
  883. $telefon['body'] = '
  884. <font size=6>Send SMS</font><br>
  885. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
  886. if $subscription['metered_calls'] = 1 and $subscription['sms_limit'] > 0:
  887. $telefon['body'] += '<br/>'
  888. $telefon['body'] += '<b>You still can send <<$subscription[''sms_limit'']>> text messages on your contract</b>'
  889. end
  890. !! Colour correction for editor ''''
  891. $telefon['body'] += '<TABLE cellspacing="0" width="80%">'
  892. !!iterating all Contacts
  893. i=0
  894. :smscontactloop
  895. if i < arrsize('$contact'):
  896. if contactAnon[i] = 0:
  897. $telefon['body'] += dyneval($telefon['contactsms'],i)
  898. end
  899. i += 1
  900. jump 'smscontactloop'
  901. end
  902. $telefon['body'] += '</TABLE><br>'
  903. dynamic $telefon['print']
  904. killvar 'i'
  905. end
  906. !! This is the formatting function for a row in the Contact List. SHould be run as a DYNEVAL()
  907. !! $ARGS[0] = index of contact in the conntact arrays
  908. $telefon['contactsms'] = {
  909. !! Contact Row in phone contact list
  910. $telefon['ContactIcon'] = $contactIcon[ARGS[0]]
  911. $telefon['ContactNPCcode'] = $contact[ARGS[0]]
  912. !!If file extension is not given, .png is assumed
  913. if instr($telefon['ContactIcon'],'.') = 0:
  914. $telefon['ContactIcon'] += '.png'
  915. end
  916. !!If path is not given, default phone icon path is assumed
  917. if instr($telefon['ContactIcon'],'/') = 0:
  918. $telefon['ContactIcon'] = 'images/system/phone/icons/' + $telefon['ContactIcon']
  919. end
  920. $result = '
  921. <TR>
  922. <TD><img src="<<$telefon[''ContactIcon'']>>" width="75"></TD>
  923. <TD><<$npc_nickname[$telefon[''ContactNPCcode'']]>></TD>
  924. <TD><a href="exec:gs ''telefon'', ''npcSendListSms'', ''<<$telefon[''ContactNPCcode'']>>''">New Message</a></TD>
  925. </TR>'
  926. }
  927. !! List of SMS messages available to be sent to an NPC
  928. !! $ARGS[1] = NPC code for the contact we want to display messages for
  929. if $ARGS[0] = 'npcSendListSms':
  930. $telefon['backButton'] = 'gs ''telefon'', ''send_sms'' '
  931. $telefon['body'] = '
  932. <font size=6>Send SMS</font><br>
  933. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
  934. $telefon['body'] += '<TABLE cellspacing="0" width="80%">'
  935. !!iterating all send sms messages
  936. i=0
  937. :npcSendListSmsLoop
  938. if i < arrsize('$SMSSendContact'):
  939. if $SMSSendContact[i] = $ARGS[1]:
  940. $telefon['body'] += dyneval($telefon['smsMessageToSend'],i)
  941. end
  942. i += 1
  943. jump 'npcSendListSmsLoop'
  944. end
  945. $telefon['body'] += '</TABLE><br>'
  946. dynamic $telefon['print']
  947. killvar 'i'
  948. end
  949. !! This is the formatting function for a row in the messages to send List. SHould be run as a DYNEVAL()
  950. !! ARGS[0] = index of the message
  951. $telefon['smsMessageToSend'] = {
  952. $telefon['ContactNPCcode'] = $SMSSendContact[ARGS[0]]
  953. $result = '
  954. <TR>
  955. <TD><<$npc_nickname[$telefon[''ContactNPCcode'']]>></TD>
  956. <TD><a href="exec: gs ''telefon'', ''smsSendMessage'', ''<<ARGS[0]>>''"><<$SMSSendMessage[ARGS[0]]>></a></TD>
  957. </TR>'
  958. }
  959. if $ARGS[0] = 'smsSendMessage':
  960. dynamic '<<$SMSSendCode[ARGS[1]]>>'
  961. gs 'internet_mobile', 'send_sms'
  962. if SMSSendRepeatable[ARGS[1]] = 0:
  963. gs 'telefon', 'delete_sms_send_index', ARGS[1]
  964. end
  965. gs 'telefon', 'Phone_sms'
  966. end
  967. !{
  968. Add a new message that can be sent by the player
  969. $ARGS[1] NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
  970. $ARGS[2] text for the sms message
  971. $ARGS[3] Code to execute when the sms is sent
  972. ARGS[4] 0 delete option after send, 1 dont delete option
  973. $ARGS[5] id passed by the caller to identify the option to be deleted if it needs to be removed from the options
  974. }
  975. if $ARGS[0] = 'add_sms_to_send':
  976. i = arrsize('$SMSSendContact')
  977. $SMSSendContact[i] = $ARGS[1]
  978. $SMSSendMessage[i] = $ARGS[2]
  979. $SMSSendCode[i] = $ARGS[3]
  980. SMSSendRepeatable[i] = ARGS[4]
  981. $SMSSendDeleteId[i] = $ARGS[5]
  982. end
  983. if $ARGS[0] = 'delete_sms_send_index':
  984. killvar '$SMSSendContact', ARGS[1]
  985. killvar '$SMSSendMessage', ARGS[1]
  986. killvar '$SMSSendCode', ARGS[1]
  987. killvar 'SMSSendRepeatable', ARGS[1]
  988. killvar '$SMSSendDeleteId', ARGS[1]
  989. end
  990. !{
  991. $ARGS[1] = NPC code for contact. ('A129', 'A29', 'B13', 'C14')
  992. $ARGS[2] = Delete id of the message ($SMSSendDeleteId)
  993. }
  994. if $ARGS[0] = 'delete_sms_send_id':
  995. $telefon['SMStoDeleteFound'] = 'No'
  996. i = 0
  997. :findSmsToDeleteLoop
  998. if (i < arrsize('$SMSSendContact')) and $telefon['SMStoDeleteFound'] = 'No':
  999. if $SMSSendContact[i] = $ARGS[1] and $SMSSendDeleteId[i] = $ARGS[2]:
  1000. gs 'telefon', 'delete_sms_send_index', i
  1001. $telefon['SMStoDeleteFound'] = 'Yes'
  1002. end
  1003. i += 1
  1004. jump 'findSmsToDeleteLoop'
  1005. end
  1006. end
  1007. if $ARGS[0] = 'IncomingSMSCheck':
  1008. i=0
  1009. :telefonIncSMSLoop
  1010. if i < arrsize('$contact'):
  1011. if $contactISMSCode[i] ! "":
  1012. if dyneval('result = iif(<<$contactISMSSche[i]>>,1,0)') = 1:
  1013. dynamic $contactISMSCode[i]
  1014. end
  1015. end
  1016. i += 1
  1017. jump 'telefonIncSMSLoop'
  1018. end
  1019. killvar 'i'
  1020. end
  1021. !!-----------------------------------end of sms------------------------------------------
  1022. if $ARGS[0] = 'Phone_wheather':
  1023. $telefon['body'] = '
  1024. <font size=6>Weather</font><br>
  1025. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_weather.png" height="80" width="80"><br><br>
  1026. <b>Temperature:</b><br>
  1027. <<$temperature>>. <<$osadki>><br>
  1028. P.O.P. today is <<weatherFall>>%<br>'
  1029. dynamic $telefon['print']
  1030. end &! --- Phone_wheather ---
  1031. if $ARGS[0] = 'Phone_calendar':
  1032. $telefon['body'] = '
  1033. <font size=6>Calendar</font><br>
  1034. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_calendar.png" height="80" width="80"><br><br>
  1035. <B>Today:</B><br>
  1036. <<$week[week]>>, <<day>> <<$month>> <<year>><br>'
  1037. dynamic $telefon['print']
  1038. end &! --- Phone_calendar ---
  1039. if $ARGS[0] = 'Phone_media':
  1040. $telefon['body'] = '
  1041. <font size=6>Media</font><br>
  1042. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_music.png" height="80" width="80"><br>
  1043. <b>This option is not active</b><br>'
  1044. dynamic $telefon['print']
  1045. end &! --- Phone_media ---
  1046. if $ARGS[0] = 'Phone_menu':
  1047. if phone_off = 0:
  1048. $telefon['body'] = '
  1049. <a href="exec:gs ''telefon'', ''Phone_camera'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_camera.png" height="80" width="80"></a>
  1050. <a href="exec:gs ''telefon'', ''Phone_calendar'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_calendar.png" height="80" width="80"></a>
  1051. <a href="exec:gs ''telefon'', ''Phone_pictures'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_pictures.png" height="80" width="80"></a>
  1052. <br>
  1053. <a href="exec:gs ''telefon'', ''Phone_media'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_music.png" height="80" width="80"></a>
  1054. <a href="exec:gs ''telefon'', ''Phone_notebook'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_notebook.png" height="80" width="80"></a>
  1055. <a href="exec:gs ''telefon'', ''Phone_wheather'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_weather.png" height="80" width="80"></a>
  1056. <br>
  1057. <a href="exec:gs ''telefon'', ''ContactList'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_call.png" height="80" width="80"></a>
  1058. <a href="exec:gs ''telefon'', ''Phone_sms'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"></a>
  1059. <a href="exec:gs ''telefon'', ''Phone_megafon'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_megafon.png" height="80" width="80"></a>
  1060. <br>'
  1061. if menu_off = 1:
  1062. $telefon['body'] += '<a href="exec:gs ''obj_din'', ''menu_disabled''"><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_settings.png" height="80" width="80"></a><br>'
  1063. else
  1064. $telefon['body'] += '<a href="exec:killvar ''menu_page'' & gs ''Cheatmenu_din'' & dynamic $cheatmenu[''setting'']"><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_settings.png" height="80" width="80"></a><br>'
  1065. end
  1066. dynamic $telefon['print']
  1067. else
  1068. '<font color="red"><b>Your phone is disabled for this event</b></font>'
  1069. end
  1070. end &! --- Phone_menu ---
  1071. if $ARGS[0] = 'Add_contact':
  1072. $dummy = INPUT('Enter a note:')
  1073. $contact[arrsize('$contact')] = dyneval($telefon['contact'],$ARGS[1],$dummy,$ARGS[2])
  1074. killvar '$dummy'
  1075. end &! --- Add_contact ---
  1076. if $ARGS[0] = 'telotkaz':
  1077. cla
  1078. minut += 10
  1079. '<<$ARGS[1]>>, "Sorry, I''m busy right now, maybe next time."'
  1080. act 'Hangup':gt 'telefon', 'fin'
  1081. end &! --- telotkaz ---
  1082. if $ARGS[0] = 'fin':
  1083. killvar 'lover_number'
  1084. cla
  1085. gt $loc, $loc_arg
  1086. end
  1087. if $ARGS[0] = 'setup':
  1088. !! array $$phonetheme_name is built.
  1089. !! might need a tweak to have it rebuilt when new themes are available.
  1090. $phonetheme_name[0] = 'Custom_Standard'
  1091. $phonetheme_name[1] = 'Bimbo'
  1092. $phonetheme_name[2] = 'Custom_Aluminus'
  1093. $phonetheme_name[3] = 'Custom_Bottlecapped'
  1094. $phonetheme_name[4] = 'Custom_Galactic'
  1095. $phonetheme_name[5] = 'Custom_Vectored'
  1096. $phonetheme_name[6] = 'Custom_Veneer'
  1097. $phonetheme_name[7] = 'Custom_Voidwalker'
  1098. $phonetheme_name[8] = 'Custom_Voidwalker Red'
  1099. $phonetheme_name[9] = 'Custom_Voidwalker Toxic'
  1100. $phonetheme_name[10] = 'Gopnik'
  1101. $phonetheme_name[11] = 'Sports'
  1102. $phonetheme_name[12] = 'Succubus'
  1103. $phonetheme_name[13] = 'Woodshop'
  1104. phonetheme[0] = 1
  1105. gs 'phone_selfies', 'Phone_selfie_totals'
  1106. end
  1107. !!=================================================================!!
  1108. !! !!
  1109. !! OLD STUFF and EVENTS !!
  1110. !! !!
  1111. !!=================================================================!!
  1112. !--------------------------------------------------------------------------------------------------
  1113. ! Old telephone system. Some of this should be removed.
  1114. if $ARGS[0] = 'phone_ring':
  1115. $telefon['body'] = '
  1116. <font size=6><<$caller>> calling</font><br>
  1117. <img src="<<$callerid>>"><br>
  1118. <br>
  1119. <br>
  1120. <br>
  1121. <br>'
  1122. dynamic $telefon['print']
  1123. end &! --- phone_ring ---
  1124. if $ARGS[0] = 'phone_call_receive':
  1125. $telefon['body'] = '
  1126. <font size=6>Talking to <<$caller>></font><br>
  1127. <img src="<<$callerid>>"><br>'
  1128. dynamic $telefon['print']
  1129. end &! --- phone_call_receive ---
  1130. if $ARGS[0] = 'phone_balance':
  1131. if subscription['monthly_calls'] = 0 and subscription['metered_calls'] < 4:
  1132. if subscription['monthly_calls'] = 0 and subscription['monthly_calls-date'] > 0:
  1133. $contractmessage = '<font size=6>Your mobile contract has expired, you have renew it or buy some minutes.</font><br>'
  1134. elseif subscription['metered_calls'] < 4 and subscription['metered_calls-date'] > 0:
  1135. $contractmessage = '<font size=6>Not enough minutes left on your contract to make a call</font><br>'
  1136. else
  1137. $contractmessage = '<font size=6>You don''t have a valid contract, you should buy one at MegFon.</font><br>'
  1138. end
  1139. $telefon['body'] = '
  1140. <<$contractmessage>>
  1141. <img src="<<$callerid>>"><br><br>
  1142. <a href="exec:gs ''telefon'', ''Phone_menu'' "><img src="images/system/phone/decline.png"></a><br>'
  1143. dynamic $telefon['print']
  1144. wait 3500
  1145. cla
  1146. gt $loc, $loc_arg
  1147. killvar 'contractmessage'
  1148. elseif subscription['metered_calls'] > 4:
  1149. subscription['metered_calls'] -= 4
  1150. end
  1151. end &! --- phone_balance ---
  1152. if $ARGS[0] = 'Phone_call':
  1153. $telefon['body'] = '
  1154. <font size=6>Calling <<$npc_nickname[''A29'']>></font><br>
  1155. <img src="images/system/phone/icons/icon_npc1.png"><br><br>
  1156. <a href="exec:gs ''telefon'', ''Phone_contactlist'' "><img src="images/system/phone/decline.png"></a><br>'
  1157. dynamic $telefon['print']
  1158. wait 1500
  1159. minut += 1
  1160. $callerid = 'images/system/phone/icons/icon_npc1.png'
  1161. gs 'telefon', 'phone_balance'
  1162. $callerid = 'images/system/phone/icons/icon_npc1.png'
  1163. gs 'telefon', 'phone_call_reject'
  1164. end &! --- Phone_call ---
  1165. if $ARGS[0] = 'phone_call_reject':
  1166. $telefon['body'] = '
  1167. <font size=6>Calling...</font><br>
  1168. <img src="<<$callerid>>"><br><br>
  1169. <a href="exec:gs ''telefon'', ''Phone_contactlist'' "><img src="images/system/phone/decline.png"></a><br>'
  1170. dynamic $telefon['print']
  1171. end &! --- phone_call_reject ---
  1172. if $ARGS[0] = 'Phone_megafon':
  1173. if subscription['monthly_calls'] = 1:
  1174. $contractmessage = 'You have a valid monthly contract that will renew on <<subscription[''monthly_calls-date'']>>/<<month+1>>'
  1175. elseif subscription['metered_calls'] = 1:
  1176. $contractmessage = 'You have a valid minutes based contract that still has <<subscription[''metered_calls'']>> minuets left'
  1177. elseif subscription['monthly_calls'] = 0 and subscription['monthly_calls-date'] > 0:
  1178. $contractmessage = '<font size=6>Your mobile contract has expired, you have renew it or buy some minutes.</font><br>'
  1179. elseif subscription['metered_calls'] < 4 and subscription['metered_calls-date'] > 0:
  1180. $contractmessage = '<font size=6>You have a minute based plan, but it doesn''t have enough minutes left to make a call</font><br>'
  1181. else
  1182. $contractmessage = '<font size=6>You don''t have any valid contracts, you should buy one at MegaFon.</font><br>'
  1183. end
  1184. $telefon['body'] = '
  1185. <font size=6>MegaFon</font><br>
  1186. <img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_megafon.png" height="80" width="80"><br><br>
  1187. <b><<$contractmessage>></b>'
  1188. dynamic $telefon['print']
  1189. killvar '$contractmessage'
  1190. end &! --- Phone_megafon ---
  1191. if $ARGS[0] = 'Edit_Custom_list':
  1192. clr
  1193. dummyas = arrsize('$contact')
  1194. :din_bad_as1
  1195. dummyas -= 1
  1196. if dummyas >= 0:
  1197. $dummyedit = $contact[dummyas]
  1198. $dummyedit1 = dyneval('$result = ''</a><a href="exec:killvar ''''$contact'''',<<dummyas>> & gs ''''telefon'''', ''''Edit_Custom_list'''' "><b>Remove</b>'' ')
  1199. $dummyedit2 = $replace($dummyedit,'<b>Call</b>',$dummyedit1)
  1200. pl $dummyedit2
  1201. jump 'din_bad_as1'
  1202. end
  1203. killvar 'dummyas'
  1204. killvar 'dummyedit'
  1205. killvar 'dummyedit1'
  1206. killvar 'dummyedit2'
  1207. pl'<center><a href="exec:gs ''telefon'', ''Phone_menu'' "><img src="images/system/icons/back.png"></a></center>'
  1208. !dynamic $telefon['print']
  1209. end &! --- Edit_Custom_list ---
  1210. if $ARGS[0] = 'mobilaraz':
  1211. cls
  1212. cla
  1213. gs'din_bad'
  1214. $caller = '<<$telsob>>'
  1215. gs 'telefon','phone_balance'
  1216. gs 'telefon','phone_call_receive'
  1217. willAgree = (rand(0, 10) > 3)
  1218. '"Yes, I''m listening," says a voice from the speaker.'
  1219. if month > 5 and temper > 20 and sunWeather = 1:
  1220. act 'Invite to the park':
  1221. cla
  1222. '"Let''s go for a walk in the park."'
  1223. if willAgree:
  1224. '<<$telsob>>, "See you in the park in an hour."'
  1225. act 'Go':
  1226. if $clothingworntype = 'nude':
  1227. gs 'clothing','wear_last_worn'
  1228. gs 'underwear','wear'
  1229. end
  1230. gt 'parksvid'
  1231. end
  1232. else
  1233. gs 'telefon','telotkaz',$telsob
  1234. end
  1235. end
  1236. end
  1237. act 'Invite to a movie':
  1238. cla
  1239. '"Want to go see a movie?"'
  1240. if willAgree:
  1241. '<<$telsob>>, "See you at the movie theater in an hour."'
  1242. act 'Go':gt 'kinosvid'
  1243. else
  1244. gs 'telefon','telotkaz',$telsob
  1245. end
  1246. end
  1247. act 'Invite to the pool hall':
  1248. cla
  1249. '"Let''s play pool."'
  1250. if willAgree:
  1251. '<<$telsob>>, "See you at the pool hall in an hour."'
  1252. act 'Go':
  1253. if $clothingworntype = 'nude':
  1254. gs 'clothing','wear_last_worn'
  1255. gs 'underwear','wear'
  1256. end
  1257. gt 'billsvid'
  1258. end
  1259. else
  1260. gs 'telefon','telotkaz',$telsob
  1261. end
  1262. end
  1263. act 'Invite to the cafe':
  1264. cla
  1265. '"Let''s go to the cafe."'
  1266. if willAgree:
  1267. '<<$telsob>>, "See you at the cafe in an hour."'
  1268. act 'Go':
  1269. if $clothingworntype = 'nude':
  1270. gs 'clothing','wear_last_worn'
  1271. gs 'underwear','wear'
  1272. end
  1273. gt 'kafesvid'
  1274. end
  1275. else
  1276. gs 'telefon','telotkaz',$telsob
  1277. end
  1278. end
  1279. act 'Invite to the casino':
  1280. cla
  1281. '"Let''s go to the casino."'
  1282. if willAgree:
  1283. '<<$telsob>>, "See you in the casino in an hour."'
  1284. act 'Go':
  1285. if $clothingworntype = 'nude':
  1286. gs 'clothing','wear_last_worn'
  1287. gs 'underwear','wear'
  1288. end
  1289. gt 'kazinosvid'
  1290. end
  1291. else
  1292. gs 'telefon','telotkaz',$telsob
  1293. end
  1294. end
  1295. act 'Hangup':gt 'telefon', 'fin'
  1296. end
  1297. !----------------End Old Telephone----------------------------
  1298. !-----------------------------------------------------------------------------
  1299. ! Support for Hardcoded Lovers (BF/GF)
  1300. if $ARGS[0] = 'callingTheLover' and loverGender[ARGS[1]] = 1:
  1301. cls
  1302. cla
  1303. gs'din_bad'
  1304. lover_number = ARGS[1]
  1305. $caller = '<<$loverdesc[lover_number]>>'
  1306. $telsob = $caller
  1307. $callerid = 'images/characters/shared/headshots_generic/'+lover_picture[lover_number]+'.jpg'
  1308. gs 'telefon','phone_balance'
  1309. gs 'telefon','phone_call_receive'
  1310. willAgree = (rand(0, 10) > 3)
  1311. '"Yes, I''m listening," says a voice from the speaker.'
  1312. if month > 5 and temper > 20 and sunWeather = 1:
  1313. act 'Invite to the park':
  1314. cla
  1315. '"Let''s go for a walk in the park."'
  1316. if willAgree:
  1317. '<<$telsob>>, "See you in the park in an hour."'
  1318. act 'Go':
  1319. if $clothingworntype = 'nude':
  1320. gs 'clothing','wear_last_worn'
  1321. gs 'underwear','wear'
  1322. end
  1323. gt 'parksvid'
  1324. end
  1325. else
  1326. gs 'telefon','telotkaz',$telsob
  1327. end
  1328. end
  1329. end
  1330. act 'Invite to a movie':
  1331. cla
  1332. '"Want to go see a movie?"'
  1333. if willAgree:
  1334. '<<$telsob>>, "See you at the movie theater in an hour."'
  1335. act 'Go':
  1336. if $clothingworntype = 'nude':
  1337. gs 'clothing','wear_last_worn'
  1338. gs 'underwear','wear'
  1339. end
  1340. gt 'kinosvid'
  1341. end
  1342. else
  1343. gs 'telefon','telotkaz',$telsob
  1344. end
  1345. end
  1346. if $home['town'] = 'city':
  1347. act 'Invite to the pool hall':
  1348. cla
  1349. '"Let''s play pool."'
  1350. if willAgree:
  1351. '<<$telsob>>, "See you at the pool hall in an hour."'
  1352. act 'Go':
  1353. if $clothingworntype = 'nude':
  1354. gs 'clothing','wear_last_worn'
  1355. gs 'underwear','wear'
  1356. end
  1357. gt 'billsvid'
  1358. end
  1359. else
  1360. gs 'telefon','telotkaz',$telsob
  1361. end
  1362. end
  1363. end
  1364. act 'Invite to the cafe':
  1365. cla
  1366. '"Let''s go to the cafe."'
  1367. if willAgree:
  1368. '<<$telsob>>, "See you at the cafe in an hour."'
  1369. act 'Go':
  1370. if $clothingworntype = 'nude':
  1371. gs 'clothing','wear_last_worn'
  1372. gs 'underwear','wear'
  1373. end
  1374. gt 'kafesvid'
  1375. end
  1376. else
  1377. gs 'telefon','telotkaz',$telsob
  1378. end
  1379. end
  1380. act 'Invite to the casino':
  1381. cla
  1382. '"Let''s go to the casino."'
  1383. if willAgree:
  1384. '<<$telsob>>, "See you in the casino in an hour."'
  1385. act 'Go':
  1386. if $clothingworntype = 'nude':
  1387. gs 'clothing','wear_last_worn'
  1388. gs 'underwear','wear'
  1389. end
  1390. gt 'kazinosvid'
  1391. end
  1392. else
  1393. gs 'telefon','telotkaz',$telsob
  1394. end
  1395. end
  1396. act 'I think we should break up...':
  1397. cla
  1398. 'She sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
  1399. gs 'lover', 'remove', lover_number
  1400. act 'Hangup':gt 'telefon', 'fin'
  1401. end
  1402. act 'Hangup':gt 'telefon', 'fin'
  1403. end
  1404. if $ARGS[0] = 'callingTheLover' and loverGender[ARGS[1]] = 0:
  1405. cls
  1406. cla
  1407. gs'din_bad'
  1408. lover_number = ARGS[1]
  1409. $caller = '<<$loverdesc[lover_number]>>'
  1410. $callerid = 'images/characters/shared/headshots_generic/'+lover_picture[lover_number]+'.jpg'
  1411. gs 'telefon','phone_balance'
  1412. gs 'telefon','phone_call_receive'
  1413. willAgree = (rand(0, 10) > 3)
  1414. '"Yes, I''m listening," says a voice from the speaker.'
  1415. if month > 5 and temper > 20 and sunWeather = 1:
  1416. act 'Invite to the park':
  1417. cla
  1418. '"Let''s go for a walk in the park."'
  1419. if willAgree:
  1420. '<<$loverdesc[lover_number]>>, "See you in the park in an hour."'
  1421. act 'Go':
  1422. if $clothingworntype = 'nude':
  1423. gs 'clothing','wear_last_worn'
  1424. gs 'underwear','wear'
  1425. end
  1426. gt 'svidboy', 'parksvid'
  1427. end
  1428. else
  1429. gs 'telefon','telotkaz',$loverdesc[lover_number]
  1430. end
  1431. end
  1432. end
  1433. act 'Invite to a movie':
  1434. cla
  1435. '"Want to go see a movie?"'
  1436. if willAgree:
  1437. '<<$loverdesc[lover_number]>>, "See you at the movie theater in an hour."'
  1438. act 'Go':
  1439. if $clothingworntype = 'nude':
  1440. gs 'clothing','wear_last_worn'
  1441. gs 'underwear','wear'
  1442. end
  1443. gt 'svidboy', 'kinosvid'
  1444. end
  1445. else
  1446. gs 'telefon','telotkaz',$loverdesc[lover_number]
  1447. end
  1448. end
  1449. if $home['town'] = 'city':
  1450. act 'Invite to the pool hall':
  1451. cla
  1452. '"Let''s play pool."'
  1453. if willAgree:
  1454. '<<$loverdesc[lover_number]>>, "See you at the pool hall in an hour."'
  1455. act 'Go':gt 'svidboy', 'billsvid'
  1456. else
  1457. gs 'telefon','telotkaz',$loverdesc[lover_number]
  1458. end
  1459. end
  1460. end
  1461. act 'Invite to the cafe':
  1462. cla
  1463. '"Let''s go to the cafe."'
  1464. if willAgree:
  1465. '<<$loverdesc[lover_number]>>, "See you at the cafe in an hour."'
  1466. act 'Go':
  1467. if $clothingworntype = 'nude':
  1468. gs 'clothing','wear_last_worn'
  1469. gs 'underwear','wear'
  1470. end
  1471. gt 'svidboy', 'kafesvid'
  1472. end
  1473. else
  1474. gs 'telefon','telotkaz',$loverdesc[lover_number]
  1475. end
  1476. end
  1477. act 'I think we should break up...':
  1478. cla
  1479. 'He sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
  1480. gs 'lover', 'remove', lover_number
  1481. act 'Hangup':gt 'telefon', 'fin'
  1482. end
  1483. act 'Hangup':gt 'telefon', 'fin'
  1484. end
  1485. if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 0:
  1486. cla
  1487. clr
  1488. lover_number = ARGS[1]
  1489. ring = 0
  1490. lover_days = daystart - loverday[lover_number]
  1491. !gs 'stat'
  1492. !gs 'telefon','phone_call_receive'
  1493. svetrand = rand(0, 5)
  1494. if svetrand = 0:$sveta = 'cutie'
  1495. if svetrand = 1:$sveta = 'honey'
  1496. if svetrand = 2:$sveta = 'sweetie'
  1497. if svetrand = 3:$sveta = 'baby'
  1498. if svetrand = 4:$sveta = 'hot stuff'
  1499. if svetrand = 5:$sveta = '<<$pcs_nickname>>'
  1500. 'Hey <<$sveta>>, it''s me, <<$loverdesc[lover_number]>>. How''s it going?'
  1501. act 'Reply':
  1502. cla
  1503. '"Pretty good, you?"'
  1504. '<<$loverdesc[lover_number]>>, "Great, but I kind of miss you, can we meet today?"'
  1505. if (pregchem / 24) <= lover_days and knowpreg = 1 and pregtalk = 0:
  1506. act 'Tell him he''s going to be a dad':
  1507. cla
  1508. pregtalk = 1
  1509. '"Honey, I''m pregnant with your child."'
  1510. if haraklover[lover_number] = 0:
  1511. if loverrelation[lover_number] >= 90:
  1512. loverlove[lover_number] = 1
  1513. '<<$loverdesc[lover_number]>>, "This is wonderful! We have to celebrate!"'
  1514. 'You start talking about living together. <<$loverdesc[lover_number]>> tells you that he is not against it on principle, but first he wants you to meet his parents.'
  1515. 'He warns you that his mother is very demanding and rigorous. <<$loverdesc[lover_number]>> says that he loves his mother and does not want to upset her. Therefore, you must look gorgeous, wear a dress from a boutique, and have well-groomed and curled hair and makeup in moderation.'
  1516. 'When you are totally ready <<$loverdesc[lover_number]>> will take you to his parents.'
  1517. act 'Hang up':gt 'telefon', 'fin'
  1518. act 'Meet tonight':
  1519. cla
  1520. svidanie[lover_number] = 1
  1521. '"How about this evening?"'
  1522. '<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
  1523. act 'Pick a time':
  1524. cla
  1525. meetday[lover_number] = daystart
  1526. meethour[lover_number] = input ("When do you want to be picked up? It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
  1527. if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
  1528. '"How about <<meethour[lover_number]>>:00?"'
  1529. '<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
  1530. act 'Hang up':gt 'telefon', 'fin'
  1531. end
  1532. end
  1533. elseif loverrelation[lover_number] < 90:
  1534. money += 20000
  1535. '<<$loverdesc[lover_number]>> "I''m not yet ready to become a dad. I''ll give you the money for an abortion. Get rid of the child.'
  1536. act 'Hang up':gt 'telefon', 'fin'
  1537. end
  1538. elseif haraklover[lover_number] = 1:
  1539. money += 20000
  1540. '<<$loverdesc[lover_number]>> "I''m not yet ready to become a dad. I''ll give you the money get an abortion.'
  1541. act 'Hang up':gt 'telefon', 'fin'
  1542. elseif haraklover[lover_number] = 2:
  1543. pregtalk = 0
  1544. '<<$loverdesc[lover_number]>>, "What? You whore! Someone fucked your pussy, and now you drop it on me. You''re dumped.'
  1545. gs 'lover', 'remove', lover_number
  1546. act 'Hang up':gt 'telefon', 'fin'
  1547. end
  1548. end
  1549. elseif (pregchem / 24) > lover_days and knowpreg = 1 and pregtalk = 0:
  1550. act 'Honey, you will soon become a dad':
  1551. cla
  1552. loverrelation[lover_number] = 0
  1553. '"Honey, I''m pregnant with your child."'
  1554. '<<$loverdesc[lover_number]>>, "How the fuck did I manage that? Unless I own a time-machine and went back to before we met and fucked you, it''s someone else''s, go and tell him. I don''t want to see you again, goodbye."'
  1555. act 'Hang up.':gt 'telefon', 'fin'
  1556. end
  1557. elseif week > 1 and week < 5 and workKafe['job'] = 1:
  1558. act 'Sorry, I''m working today':
  1559. cla
  1560. '"Sorry, I''m working today."'
  1561. '<<$loverdesc[lover_number]>>, "Okay, I''ll call tomorrow."'
  1562. act 'Hang up':gt 'telefon', 'fin'
  1563. end
  1564. end
  1565. act 'Tonight':
  1566. cla
  1567. loverrelation[lover_number] += 1
  1568. svidanie[lover_number] = 1
  1569. meetday[lover_number] = daystart
  1570. '"How about this evening?"'
  1571. '<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
  1572. act 'Pick a time':
  1573. cla
  1574. meethour[lover_number] = input ("When do you want to be picked up. It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
  1575. if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
  1576. '"How about <<meethour[lover_number]>>:00?."'
  1577. '<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
  1578. act 'Hang up':gt 'telefon', 'fin'
  1579. end
  1580. end
  1581. act 'Maybe tomorrow':
  1582. cla
  1583. loverrelation[lover_number] -= 1
  1584. '"I''m busy today. Call tomorrow."'
  1585. if loverrelation[lover_number] <= 0:'<<$loverdesc[lover_number]>>, Are you fucking me, you know what. Suck my dick.' & gs 'lover', 'remove', lover_number
  1586. if loverrelation[lover_number] > 0:'(<<$loverdesc[lover_number]>>) - Okay, I''ll call tomorrow.'
  1587. act 'Hang up': gt 'telefon', 'fin'
  1588. end
  1589. act 'I think we should break up...':
  1590. cla
  1591. 'He sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
  1592. gs 'lover', 'remove', lover_number
  1593. act 'Hang up': gt 'telefon', 'fin'
  1594. end
  1595. end
  1596. act 'Hang up (end relationship)':
  1597. cla
  1598. gs 'lover', 'remove', lover_number
  1599. gt 'telefon', 'fin'
  1600. end
  1601. end
  1602. if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 1:
  1603. cla
  1604. clr
  1605. lover_number = ARGS[1]
  1606. ring = 0
  1607. lover_days = daystart - loverday[lover_number]
  1608. !gs 'stat'
  1609. !gs 'telefon','phone_call_receive'
  1610. svetrand = rand(0, 5)
  1611. if svetrand = 0:$sveta = 'cutie'
  1612. if svetrand = 1:$sveta = 'honey'
  1613. if svetrand = 2:$sveta = 'sweetie'
  1614. if svetrand = 3:$sveta = 'baby'
  1615. if svetrand = 4:$sveta = 'hot stuff'
  1616. if svetrand = 5:$sveta = '<<$pcs_nickname>>'
  1617. 'Hey <<$sveta>>, it''s me, <<$loverdesc[lover_number]>>. How''s it going?'
  1618. act 'Reply':
  1619. cla
  1620. '"Pretty good, you?"'
  1621. '<<$loverdesc[lover_number]>>, "Great, but I kind of miss you, can we meet today?"'
  1622. act 'Tonight':
  1623. cla
  1624. loverrelation[lover_number] += 1
  1625. svidanie[lover_number] = 1
  1626. meetday[lover_number] = daystart
  1627. '"How about this evening?"'
  1628. '<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
  1629. act 'Pick a time':
  1630. cla
  1631. meethour[lover_number] = input ("When do you want to be picked up. It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
  1632. if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
  1633. '"How about <<meethour[lover_number]>>:00?."'
  1634. '<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
  1635. act 'Hang up':gt 'telefon', 'fin'
  1636. end
  1637. end
  1638. act 'Maybe tomorrow':
  1639. cla
  1640. loverrelation[lover_number] -= 1
  1641. '"I''m busy today. Call tomorrow."'
  1642. if loverrelation[lover_number] <= 0:'<<$loverdesc[lover_number]>>, Are you fucking me, you know what. Fuck off.' & gs 'lover', 'remove', lover_number
  1643. if loverrelation[lover_number] > 0:'(<<$loverdesc[lover_number]>>) - Okay, I''ll call tomorrow.'
  1644. act 'Hang up': gt 'telefon', 'fin'
  1645. end
  1646. act 'I think we should break up...':
  1647. cla
  1648. 'She sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
  1649. gs 'lover', 'remove', lover_number
  1650. act 'Hang up': gt 'telefon', 'fin'
  1651. end
  1652. end
  1653. act 'Hang up (end relationship)':
  1654. cla
  1655. gs 'lover', 'remove', lover_number
  1656. gt 'telefon', 'fin'
  1657. end
  1658. end
  1659. !---------------------- End of Lover support
  1660. !!-----------------------------------EVENTS------------------------------------------
  1661. ! Generic Calls for dates
  1662. !! NPC Date
  1663. !! ARGS[1] = contactlist index
  1664. !! $ARGS[2] = Date Location
  1665. if $ARGS[0] = 'NPCDate':
  1666. Call4Date["ContactIndex"] = ARGS[1]
  1667. $Call4Date["Location"] = $ARGS[2]
  1668. $Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
  1669. $Call4Date["CallerName"] = $npc_nickname[$Call4Date["NPC"]]
  1670. !! These variables are setup for certain downstream functions
  1671. $caller = $Call4Date["CallerName"]
  1672. $callerid = $contactIcon[Call4Date["ContactIndex"]]
  1673. $boydesc = $Call4Date["CallerName"]
  1674. pcs_mood += 10
  1675. npc_rel[$Call4Date["NPC"]] += 3
  1676. if $Call4Date["Location"] = 'city_park':
  1677. if npc_gender[$Call4Date["NPC"]] = 0:
  1678. gt 'dateM','datepark'
  1679. else
  1680. gt 'dateF','datepark'
  1681. end
  1682. elseif $Call4Date["Location"] = 'movie':
  1683. if npc_gender[$Call4Date["NPC"]] = 0:
  1684. gt 'dateM','datecinema'
  1685. else
  1686. !Not implemented yet
  1687. !gt 'dateF','datecinema'
  1688. end
  1689. elseif $Call4Date["Location"] = 'bar':
  1690. if npc_gender[$Call4Date["NPC"]] = 0:
  1691. gt 'dateM','datebar'
  1692. else
  1693. gt 'dateF','datebar'
  1694. end
  1695. elseif $Call4Date["Location"] = 'cafe':
  1696. if npc_gender[$Call4Date["NPC"]] = 0:
  1697. gt 'dateM','datecafe'
  1698. else
  1699. !Not implemented yet
  1700. !gt 'dateF','datecafe'
  1701. end
  1702. end
  1703. killvar 'Call4Date'
  1704. killvar '$Call4Date'
  1705. end
  1706. !! Sveta Calls the NPC
  1707. !! ARGS[1] = contactlist index
  1708. if $ARGS[0] = 'SvetaCallsNPC':
  1709. cls
  1710. cla
  1711. Call4Date["ContactIndex"] = ARGS[1]
  1712. $Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
  1713. $Call4Date["CallerName"] = $npc_nickname[$Call4Date["NPC"]]
  1714. if npc_gender[$Call4Date["NPC"]] = 0:
  1715. $Call4Date["NPC-he"] = 'he'
  1716. $Call4Date["NPC-He"] = 'He'
  1717. $Call4Date["NPC-his"] = 'his'
  1718. $Call4Date["NPC-His"] = 'His'
  1719. else
  1720. $Call4Date["NPC-he"] = 'her'
  1721. $Call4Date["NPC-He"] = 'Her'
  1722. $Call4Date["NPC-his"] = 'hers'
  1723. $Call4Date["NPC-His"] = 'Hers'
  1724. end
  1725. !! These variables are setup for certain downstream functions
  1726. $caller = $Call4Date["CallerName"]
  1727. $callerid = $contactIcon[Call4Date["ContactIndex"]]
  1728. gs 'telefon','phone_balance'
  1729. gs 'telefon','phone_call_receive'
  1730. Call4Date["willAgree"] = (rand(0, 10) > 3)
  1731. '"Yes, I''m listening," says a voice from the speaker.'
  1732. act 'Ask to meet':
  1733. cla
  1734. '"Let''s meet up."'
  1735. act 'Continue':gt 'telefon', 'NPCCallsForDate', Call4Date["ContactIndex"]
  1736. end
  1737. if month > 5 and temper > 20 and sunWeather = 1:
  1738. act 'Invite to the park':
  1739. cla
  1740. '"Let''s go for a walk in the park."'
  1741. if Call4Date["willAgree"]:
  1742. '<<$Call4Date["CallerName"]>>, "See you in the park in an hour."'
  1743. act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'city_park'
  1744. else
  1745. gs 'telefon','telotkaz',$Call4Date["CallerName"]
  1746. end
  1747. end
  1748. end
  1749. act 'Invite to a movie':
  1750. cla
  1751. '"Want to go see a movie?"'
  1752. if Call4Date["willAgree"]:
  1753. '<<$Call4Date["CallerName"]>>, "See you at the movie theater in an hour."'
  1754. act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'movie'
  1755. else
  1756. gs 'telefon','telotkaz',$Call4Date["CallerName"]
  1757. end
  1758. end
  1759. if $home['town'] = 'city':
  1760. act 'Invite to the bar':
  1761. cla
  1762. '"Let''s go to the bar."'
  1763. if Call4Date["willAgree"]:
  1764. '<<$Call4Date["CallerName"]>>, "See you at the bar in an hour."'
  1765. act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'bar'
  1766. else
  1767. gs 'telefon','telotkaz',$Call4Date["CallerName"]
  1768. end
  1769. end
  1770. end
  1771. act 'Invite to the cafe':
  1772. cla
  1773. '"Let''s go to the cafe."'
  1774. if Call4Date["willAgree"]:
  1775. '<<$Call4Date["CallerName"]>>, "See you at the cafe in an hour."'
  1776. act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'cafe'
  1777. else
  1778. gs 'telefon','telotkaz',$Call4Date["CallerName"]
  1779. end
  1780. end
  1781. !!Willpower checks for resistance
  1782. if npc_rel[$Call4Date["NPC"]] <= 25:
  1783. $Call4Date["loverResist"] = 'easy'
  1784. elseif npc_rel[$Call4Date["NPC"]] <= 50:
  1785. $Call4Date["loverResist"] = 'medium'
  1786. else
  1787. $Call4Date["loverResist"] = 'hard'
  1788. end
  1789. gs 'willpower', 'misc', 'self', $Call4Date["loverResist"]
  1790. if will_cost <= pcs_willpwr:
  1791. act 'I think we should break up... (<<will_cost>> Willpower)':
  1792. *clr & cla
  1793. gs 'willpower', 'pay', 'self'
  1794. gs 'stat'
  1795. '<<$Call4Date["NPC-He"]>> sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
  1796. gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
  1797. act 'Hang up': gt 'telefon', 'fin'
  1798. end
  1799. else
  1800. act 'I think we should break up... (<font color="red"><<will_cost>> Willpower</font>)':
  1801. '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  1802. end
  1803. end
  1804. act 'Hangup':gt 'telefon', 'fin'
  1805. killvar 'Call4Date'
  1806. killvar '$Call4Date'
  1807. killvar '$DateNickName'
  1808. end
  1809. !! NPC Calls Sveta for a Date
  1810. !! ARGS[1] = $contact index number
  1811. if $ARGS[0] = 'NPCCallsForDate':
  1812. cla
  1813. clr
  1814. Call4Date["ContactIndex"] = ARGS[1]
  1815. $Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
  1816. if npc_gender[$Call4Date["NPC"]] = 0:
  1817. $Call4Date["NPC-he"] = 'he'
  1818. $Call4Date["NPC-He"] = 'He'
  1819. $Call4Date["NPC-his"] = 'his'
  1820. $Call4Date["NPC-His"] = 'His'
  1821. else
  1822. $Call4Date["NPC-he"] = 'her'
  1823. $Call4Date["NPC-He"] = 'Her'
  1824. $Call4Date["NPC-his"] = 'hers'
  1825. $Call4Date["NPC-His"] = 'Hers'
  1826. end
  1827. !!Pick a nickname that caller will use for Sveta
  1828. $DateNickName[0] = 'cutie'
  1829. $DateNickName[1] = 'honey'
  1830. $DateNickName[2] = 'sweetie'
  1831. $DateNickName[3] = 'baby'
  1832. $DateNickName[4] = 'hot stuff'
  1833. $DateNickName[5] = '<<$pcs_nickname>>'
  1834. $Call4Date['SvetaName'] = $DateNickName[rand(0, arrsize('$DateNickName'))]
  1835. $Call4Date['CallerName'] = $npc_nickname[$Call4Date["NPC"]]
  1836. !! These variables are setup for certain downstream functions
  1837. $caller = $Call4Date["CallerName"]
  1838. $callerid = $contactIcon[Call4Date["ContactIndex"]]
  1839. 'Hey <<$Call4Date["SvetaName"]>>, it''s me, <<$Call4Date["CallerName"]>>. How''s it going?'
  1840. act 'Answer':
  1841. cla
  1842. '"Pretty good, you?"'
  1843. '<<$Call4Date["CallerName"]>>, "Great, but I kind of miss you, can we meet today?"'
  1844. if week > 1 and week < 5 and workKafe['job'] = 1:
  1845. act 'Sorry, I''m working today':
  1846. cla
  1847. '"Sorry, I''m working today."'
  1848. '<<$Call4Date["CallerName"]>>, "Okay, I''ll call tomorrow."'
  1849. act 'Hang up':gt 'telefon', 'fin'
  1850. end
  1851. end
  1852. act 'Tonight':
  1853. cla
  1854. npc_rel[$Call4Date["NPC"]] += 1
  1855. contMeetDay[Call4Date["ContactIndex"]] = daystart
  1856. '"How about this evening?"'
  1857. '<<$Call4Date["CallerName"]>>, "Sounds great! When can I come to pick you up?"'
  1858. act 'Pick a time':
  1859. cla
  1860. contMeetHour[Call4Date["ContactIndex"]] = input ("When do you want to be picked up. It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
  1861. if contMeetHour[Call4Date["ContactIndex"]] <= hour or contMeetHour[Call4Date["ContactIndex"]] > 23:contMeetHour[Call4Date["ContactIndex"]] = 20
  1862. '"How about <<contMeetHour[Call4Date["ContactIndex"]]>>:00?."'
  1863. '<<$Call4Date["CallerName"]>>, "Okay <<$Call4Date["SvetaName"]>>, see you at <<contMeetHour[Call4Date["ContactIndex"]]>>:00."'
  1864. act 'Hang up':gt 'telefon', 'fin'
  1865. end
  1866. end
  1867. act 'Maybe tomorrow':
  1868. cla
  1869. npc_rel[$Call4Date["NPC"]] -= 1
  1870. '"I''m busy today. Call tomorrow."'
  1871. if npc_rel[$Call4Date["NPC"]] <= 0:'<<$Call4Date["CallerName"]>>, Are you fucking me, you know what. Suck my dick.' & gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
  1872. if npc_rel[$Call4Date["NPC"]] > 0:'(<<$Call4Date["CallerName"]>>) - Okay, I''ll call tomorrow.'
  1873. act 'Hang up': gt 'telefon', 'fin'
  1874. end
  1875. !!Willpower checks for resistance
  1876. if npc_rel[$Call4Date["NPC"]] <= 25:
  1877. $Call4Date["loverResist"] = 'easy'
  1878. elseif npc_rel[$Call4Date["NPC"]] <= 50:
  1879. $Call4Date["loverResist"] = 'medium'
  1880. else
  1881. $Call4Date["loverResist"] = 'hard'
  1882. end
  1883. gs 'willpower', 'misc', 'self', $Call4Date["loverResist"]
  1884. if will_cost <= pcs_willpwr:
  1885. act 'I think we should break up... (<<will_cost>> Willpower)':
  1886. *clr & cla
  1887. gs 'willpower', 'pay', 'self'
  1888. gs 'stat'
  1889. '<<$Call4Date["NPC-He"]>> sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
  1890. gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
  1891. act 'Hang up': gt 'telefon', 'fin'
  1892. end
  1893. else
  1894. act 'I think we should break up... (<font color="red"><<will_cost>> Willpower</font>)':
  1895. '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  1896. end
  1897. end
  1898. end
  1899. act 'Hang up (end relationship)':
  1900. cla
  1901. gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
  1902. gt 'telefon', 'fin'
  1903. end
  1904. killvar 'Call4Date'
  1905. killvar '$Call4Date'
  1906. killvar '$DateNickName'
  1907. end
  1908. --- telefon ---------------------------------