telefon.qsrc 73 KB

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