telefon.qsrc 73 KB

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