Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
1,030
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 110.33 KB | None | 0 0
  1. Global FactionPowers, TreasureList, CharList, LastPhoto, PhotoName, PhotoList, TodaysMonth, TimeOutGo
  2. Global gDispatcher, LegitUsers, CDKeys, muteList, banList, ipblockList, PiratePowers, gGaurdia, ElementalPowers
  3. Global ServerTick, bActionDelay, ActionDelay, ActionDelayTick, ColiseumFlag, WinnerName, RebootTrigger, BallFlag, CurrentCarriers, RestoreTrigger, WarpShortcuts
  4.  
  5. on IncomingMessage (me, movie, group, user, fullMsg)
  6.  
  7. if string(user.name) contains "newchar" then
  8. if string(fullmsg.subject) contains "QueryCreate" or string(fullmsg.subject) contains "GetAttribute" or string(fullmsg.subject) = "937oom" or string(fullmsg.subject) contains "LoadChar" then
  9. else
  10. set WarpUser = string(user.name)
  11. set WarpSubject = string(fullmsg.subject)
  12.  
  13. movie.sendMessage(WarpUser, "2348823473278234327823482347", "x")
  14. exit
  15. end if
  16. end if
  17.  
  18. if string(fullmsg.content) contains "../" or string(fullmsg.content) contains "..\" then
  19. user.sendMessage("KillTheEditorRTG", "x", 0, FALSE, user.name)
  20. exit
  21. end if
  22.  
  23. if string(fullmsg.content) contains ";" then
  24. set the itemdelimiter = ";"
  25. set xxl = string(item 1 of fullmsg.content)
  26. set fullmsg.content = string(item 2 of fullmsg.content)
  27.  
  28. if xxl <> string(user.name) then
  29. exit
  30. end if
  31. end if
  32.  
  33. if string(user.name) <> string(fullmsg.SenderID) then
  34. User.sendMessage("DieScum", "byebye", 0, FALSE, user.name)
  35. exit
  36. end if
  37.  
  38. case fullMsg.subject of
  39.  
  40. "TodaysMonth":
  41. set TodaysMonth = string(fullmsg.content)
  42. set MyName = string(user.name)
  43. UpdateLastLogin(MyName)
  44.  
  45. "WriteDeathMap":
  46. if random(1000) = 1 then RunBoss(me, movie, group, user, fullMsg)
  47. set MyName = string(user.name)
  48. set DMap = string(fullmsg.content)
  49. file("C:\FSOServer\DAT\DM\" & MyName & ".txt").write(DMap)
  50.  
  51.  
  52. "QueryCreate":
  53. ----exit
  54. --------------------------------------------------
  55. set MyName = string(fullmsg.content)
  56. set CharFile = string(fullmsg.content)
  57. --put CharFile
  58. set the itemdelimiter = "`"
  59. set MyCode = item 1 of CharFile
  60. set CharFile = item 2 of CharFile
  61. set the itemdelimiter = ":"
  62. set MyName = item 1 of CharFile
  63.  
  64. set the itemdelimiter = ":"
  65. set MyName = item 1 of MyName
  66.  
  67. set MyFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & ".txt").read
  68.  
  69. if myFile contains ":" then
  70.  
  71. User.sendMessage("Server Response", "Cannot Create", 0, FALSE, user.name)
  72. else
  73. User.sendMessage("Server Response", "Character Created", 0, FALSE, user.name)
  74.  
  75. set StartingMap = file("C:\FSOServer\DAT\Starting Map.txt").read
  76. --set the itemdelimiter = "/"
  77. --set FirstPart = item 1 of CharFile
  78. --set the itemdelimiter = ":"
  79. --put item 1 of StartingMap into item 5 of FirstPart
  80. --put item 2 of StartingMap into item 6 of FirstPart
  81. --set the itemdelimiter = "/"
  82. --put FirstPart into item 1 of CharFile
  83. file("C:\FSOServer\DAT\CHAR\" & string(MyName) & ".txt").write(CharFile)
  84. file("C:\FSOServer\DAT\DM\" & string(MyName) & ".txt").write(StartingMap)
  85. set CharItems = "100|Apple-2:Knife-1:::::::::::::|NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  86. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(CharItems)
  87. set UserIP = movie.sendmessage("system.user.getAddress", "LookingUpIP", User.Name)
  88. set myip = string(UserIP.content.IPAddress)
  89. set myip = myip & return
  90. set thename = user.name & return
  91. file("C:\FSOServer\DAT\Logs\IPLogs\Characters\" & string(user.name) & ".txt").write(myip)
  92. file("C:\FSOServer\DAT\Logs\IPLogs\IPs\" & myip & ".txt").write(thename)
  93. end if
  94.  
  95. "FileTransToYou":
  96. exit --PREVENTS ALL FILEEDITTING
  97. set FileAdmins = file("C:\FSOServer\DAT\SETTINGS\File Admins.txt").read
  98. set MyNamee = "*" & string(user.name) & "*"
  99. set the itemdelimiter = "~"
  100. set TheFolder = item 1 of fullmsg.content
  101. set TheFileName = item 2 of fullmsg.content
  102. set MyNewFileContent = item 3 of fullmsg.content
  103. set FullPathx = TheFolder & "\" & TheFileName
  104.  
  105. if FileAdmins contains MyNamee then
  106. file("C:\FSOServer\DAT\" & FullPathX).write(MyNewFileContent)
  107. User.sendMessage("sqa", "File has been uploaded.", 0, FALSE, user.name)
  108. end if
  109.  
  110.  
  111. "FileTransToMe":
  112. exit --PREVENTS ALL FILEEDITTING
  113. set FileAdmins = file("C:\FSOServer\DAT\SETTINGS\File Admins.txt").read
  114. set MyNamee = "*" & string(user.name) & "*"
  115. set the itemdelimiter = ":"
  116. set TheFolder = item 1 of fullmsg.content
  117. set TheFileName = item 2 of fullmsg.content
  118. set FullPathx = TheFolder & "\" & TheFileName
  119.  
  120. if FileAdmins contains MyNamee then
  121. set TheFile = file("C:\FSOServer\DAT\" & FullPathx).read
  122. User.sendMessage("FTSF", TheFile, 0, FALSE, user.name)
  123. end if
  124.  
  125. "RPG":
  126. set TheRndTxt = string(fullmsg.content)
  127. movie.sendmessage("@AllUsers","RPG",TheRndTxt)
  128.  
  129. "Almsg":
  130. the itemdelimiter = ":"
  131. UserName = string(user.name)
  132. content = string(fullmsg.content)
  133. lMyChar = item 1 of content
  134. lMovieMsg = item 2 of content
  135. movie.sendmessage(lMyChar, "AlertMsg", lMovieMsg)
  136.  
  137. "StartLottery":
  138. hStartLottery
  139. "StopLottery":
  140. hStopLottery
  141. "BuyLotteryTicket":
  142. lMyChar = string(user.name)
  143. hBuyLotteryTicket(lMyChar)
  144. "LotteryStatus":
  145. lMyChar = string(user.name)
  146. hLotteryStatus(lMyChar)
  147.  
  148. "StartTheRaffle":
  149. startRaffle
  150. "StopTheRaffle":
  151. stopRaffle
  152. "BuyTheRaffle":
  153. buyRaffleTicket(user,movie)
  154.  
  155. "Broadcast":
  156. RunBroadcast(me, movie, group, user, fullMsg)
  157.  
  158. "Exousiacast":
  159. set TheName = string(user.name)
  160. set TheBCast = string(fullmsg.content)
  161. set BCastDat = TheName & " tells Exousia " & QUOTE & TheBCast & QUOTE
  162. movie.sendmessage("@Exousia","Exousiacast",BCastDat)
  163.  
  164. "Tamarangcast":
  165. set TheName = string(user.name)
  166. set TheBCast = string(fullmsg.content)
  167. set BCastDat = TheName & " tells Tamarang " & QUOTE & TheBCast & QUOTE
  168. movie.sendmessage("@Tamarang","Tamarangcast",BCastDat)
  169.  
  170. "Baalzamoncast":
  171. set TheName = string(user.name)
  172. set TheBCast = string(fullmsg.content)
  173. set BCastDat = TheName & " tells Baalzamon " & QUOTE & TheBCast & QUOTE
  174. movie.sendmessage("@Baalzamon","Baalzamoncast",BCastDat)
  175.  
  176.  
  177. "EleHolyCast":
  178. set TheName = string(user.name)
  179. set TheBCast = string(fullmsg.content)
  180. set BCastDat = TheName & " tells the Holy Order " & QUOTE & TheBCast & QUOTE
  181. movie.sendmessage("@EleHoly","EleHolyCast",BCastDat)
  182.  
  183. "EleUnholyCast":
  184. set TheName = string(user.name)
  185. set TheBCast = string(fullmsg.content)
  186. set BCastDat = TheName & " tells the Unholy Order " & QUOTE & TheBCast & QUOTE
  187. movie.sendmessage("@EleUnholy","EleUnholyCast",BCastDat)
  188.  
  189. "EleFireCast":
  190. set TheName = string(user.name)
  191. set TheBCast = string(fullmsg.content)
  192. set BCastDat = TheName & " tells the Fire Order " & QUOTE & TheBCast & QUOTE
  193. movie.sendmessage("@EleFire","EleFireCast",BCastDat)
  194.  
  195. "EleWaterCast":
  196. set TheName = string(user.name)
  197. set TheBCast = string(fullmsg.content)
  198. set BCastDat = TheName & " tells the Water Order " & QUOTE & TheBCast & QUOTE
  199. movie.sendmessage("@EleWater","EleWaterCast",BCastDat)
  200.  
  201. "EleEarthCast":
  202. set TheName = string(user.name)
  203. set TheBCast = string(fullmsg.content)
  204. set BCastDat = TheName & " tells the Earth Order " & QUOTE & TheBCast & QUOTE
  205. movie.sendmessage("@EleEarth","EleEarthCast",BCastDat)
  206.  
  207. "EleWindCast":
  208. set TheName = string(user.name)
  209. set TheBCast = string(fullmsg.content)
  210. set BCastDat = TheName & " tells the Wind Order " & QUOTE & TheBCast & QUOTE
  211. movie.sendmessage("@EleWind","EleWindCast",BCastDat)
  212.  
  213.  
  214.  
  215.  
  216.  
  217. "BSmithCustom":
  218. set CustomSmithPack = string(fullmsg.content)
  219. User.sendMessage("BSmithCustom", CustomSmithPack, 0, FALSE, user.name)
  220.  
  221. "EnchantIt":
  222. set CustomSmithPack = string(fullmsg.content)
  223. User.sendMessage("EnchantIt", CustomSmithPack, 0, FALSE, user.name)
  224.  
  225. "EnchantIt2":
  226. set CustomSmithPack = string(fullmsg.content)
  227. User.sendMessage("EnchantIt2", CustomSmithPack, 0, FALSE, user.name)
  228.  
  229. "BSmithCustom2":
  230. set CustomSmithPack = string(fullmsg.content)
  231. User.sendMessage("BSmithCustom2", CustomSmithPack, 0, FALSE, user.name)
  232.  
  233. "SaveCharTickets":
  234. set AmountOfTickets = string(fullmsg.content)
  235. file("C:\FSOServer\DAT\EventTickets\" & string(user.name) & ".txt").write(AmountOfTickets)
  236.  
  237. "SaveNationRank":
  238. set TheRankNumber = string(fullmsg.content)
  239. file("C:\FSOServer\DAT\NationRanks\" & string(user.name) & ".txt").write(TheRankNumber)
  240.  
  241. "SaveCustomQuests":
  242. set TheCustomShit = string(fullmsg.content)
  243. file("C:\FSOServer\DAT\CustomQuests\" & string(user.name) & ".txt").write(TheCustomShit)
  244.  
  245. "SaveNewDataXL":
  246. set the itemdelimiter = "|"
  247. set TheCustomShit = string(fullmsg.content)
  248. set CRank = item 2 of TheCustomShit
  249. set CTickets = item 1 of TheCustomShit
  250. set CQuests = item 3 of TheCustomShit
  251. set PKs = item 4 of TheCustomShit
  252. set PKKs = item 5 of TheCustomShit
  253. set TPPoints = item 6 of TheCustomShit
  254. set Silver = item 7 of ThecustomShit
  255. set Honor = item 8 of TheCustomShit
  256. set PKs = PKs & ":" & PKKs & ":" & Honor
  257. set EventCrap = CTickets & ":" & TPPoints & ":" & Silver
  258. if PKs = ":" or PKs = "::" then
  259. else
  260. file("C:\FSOServer\DAT\PKCount\" & string(user.name) & ".txt").write(PKs)
  261. end if
  262. if CQuests = "" or CQuests = VOID then
  263. else
  264. file("C:\FSOServer\DAT\CustomQuests\" & string(user.name) & ".txt").write(CQuests)
  265. end if
  266. if CRank = "" or CRank = VOID then
  267. else
  268. file("C:\FSOServer\DAT\NationRanks\" & string(user.name) & ".txt").write(CRank)
  269. end if
  270. if CTickets = "" or CTickets = VOID or TPPoints = "" or TPPoints = VOID or Silver = "" or Silver = VOID then
  271. else
  272. file("C:\FSOServer\DAT\EventTickets\" & string(user.name) & ".txt").write(EventCrap)
  273. end if
  274.  
  275. "GetGList":
  276. set Guilds = file("C:\FSOServer\DAT\GUILDS\GuildList.txt").read
  277. User.sendMessage("GLDLST", Guilds, 0, FALSE, user.name)
  278.  
  279. "GuildCreate":
  280. --------------------------------------------------
  281. set MyName = string(fullmsg.content)
  282. set CharFile = string(fullmsg.content)
  283. set the itemdelimiter = ":"
  284. set MyName = item 1 of MyName
  285. set GuildDat = item 2 of CharFile
  286.  
  287. set MyFile = file("C:\FSOServer\DAT\GUILDS\" & string(MyName) & ".txt").read
  288.  
  289. if myFile contains "-" then
  290.  
  291. User.sendMessage("Server Response", "CannnotGuild", 0, FALSE, user.name)
  292. else
  293. User.sendMessage("Server Response", "Guild Created", 0, FALSE, user.name)
  294. file("C:\FSOServer\DAT\GUILDS\" & string(MyName) & ".txt").write(GuildDat)
  295. User.sendMessage("LoadGuild", GuildDat, 0, FALSE, user.name)
  296. set Guilds = file("C:\FSOServer\DAT\GUILDS\GuildList.txt").read
  297. set Guilds = Guilds & MyName & ":"
  298. file("C:\FSOServer\DAT\GUILDS\GuildList.txt").write(Guilds)
  299. end if
  300.  
  301. "937oom":
  302. set TheDt = string(fullmsg.content)
  303. -- set FilNme = file("C:\FSOServer\DAT\SETTINGS\cd.txt").read
  304. -- put string(User.name) & " logs in with code: " & TheDt
  305. if char 4 of TheDt = "" then exit
  306. set HesLegit = 0
  307.  
  308. if CDKeys contains TheDt then
  309. set LegitUsers = LegitUsers & "*" & user.name & "*"
  310. User.sendMessage("okok", "x", 0, FALSE, user.name)
  311. end if
  312.  
  313. "LoadMyGuild":
  314. set MyName = string(fullmsg.content)
  315. set the itemdelimiter = ";"
  316. if string(fullmsg.content) contains ";" then set MyName = string(item 2 of fullmsg.content)
  317. set MyFile = file("C:\FSOServer\DAT\GUILDS\" & string(MyName) & ".txt").read
  318. User.sendMessage("LoadGuild", MyFile, 0, FALSE, user.name)
  319.  
  320. "LoadMyNAlignment":
  321. set MyName = string(fullmsg.content)
  322. set the itemdelimiter = ";"
  323. if string(fullmsg.content) contains ";" then set MyName = string(item 2 of fullmsg.content)
  324. set MyFile = file("C:\FSOServer\DAT\NATIONS\" & string(MyName) & ".txt").read
  325. User.sendMessage("LoadNAlignment", MyFile, 0, FALSE, user.name)
  326.  
  327. "ViewAGuild":
  328. set MyName = string(fullmsg.content)
  329. set MyFile = file("C:\FSOServer\DAT\GUILDS\" & string(MyName) & ".txt").read
  330. User.sendMessage("ViewAGuild", MyFile, 0, FALSE, user.name)
  331.  
  332.  
  333. "GuildDell":
  334. set GuildToDel = string(fullmsg.content)
  335. set Guilds = file("C:\FSOServer\DAT\GUILDS\GuildList.txt").read
  336. set the itemdelimiter = ":"
  337. set NewList = ""
  338. repeat with x = 1 to 800
  339. if item x of Guilds <> "" then
  340. if item x of Guilds <> GuildToDel then set NewList = NewList & item x of Guilds & ":"
  341. end if
  342. end repeat
  343. file("C:\FSOServer\DAT\GUILDS\GuildList.txt").write(NewList)
  344. --------------------------------------------------
  345. "LoadChar":
  346. User.sendMessage("ClientVersion", "b9.9", 0, FALSE, user.name)
  347. set tDT = string(fullmsg.content)
  348. set CharFile = string(fullmsg.content)
  349.  
  350. the itemdelimiter = "~"
  351. lClientHash = item 1 of tDT
  352. delete item 1 of tDT
  353. the itemdelimiter = "|"
  354. set MyMA = item 2 of lClientHash
  355. if MyMA = VOID or MyMA = "" or MyMA = " " then set MyMA = "notready"
  356. set lClientHash = item 1 of lClientHash
  357. set MyMA = "*" & MyMA & "*"
  358. BannedMAs = file("C:\FSOServer\DAT\Settings\MABans.txt").read
  359. if BannedMAs contains MyMA then
  360. User.sendMessage("ClientVersion3", "b6.3", 0, FALSE, user.name)
  361. exit
  362. end if
  363.  
  364.  
  365. set the itemdelimiter = ":"
  366. set MyName = item 1 of tDT
  367. set PPW = item 2 of tDT
  368. set MyCode = item 3 of tDT
  369.  
  370. if MyName <> "Barrage" and MyName <> "Barrabel" and MyName <> "Daemondread" and MyName <> "Deatheven" and MyName <> "Codrum" and MyName <> "Murdoc" then
  371. lCorrectHash = file("C:\FSOServer\DAT\Settings\CorrectHash.txt").read
  372. if lClientHash <> lCorrectHash then
  373. User.sendMessage("ClientVersion3", "b6.3", 0, FALSE, user.name)
  374. exit
  375. end if
  376. end if
  377.  
  378.  
  379. set the itemdelimiter = ":"
  380. set MyName = item 1 of tDT
  381. set PPW = item 2 of tDT
  382. set MyCode = item 3 of tDT
  383.  
  384. ---- if char 4 of Mycode = "" then exit
  385. -- set ValidCodes = file("C:\FSOServer\DAT\SETTINGS\cd.txt").read
  386.  
  387. set HesOK = FALSE
  388. set HesOK = TRUE
  389.  
  390.  
  391. -- if HesOK = FALSE then
  392. -- User.sendMessage("DieScum", "byebye", 0, FALSE, user.name)
  393. -- exit
  394. --- end if
  395.  
  396.  
  397.  
  398. set MyFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & ".txt").read
  399. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  400. set MyTicketsFile = file("C:\FSOServer\DAT\EventTickets\" & string(MyName) & ".txt").read
  401. set MyNationRankFile = file("C:\FSOServer\DAT\NationRanks\" & string(MyName) & ".txt").read
  402. set MyCustomQuestsFile = file("C:\FSOServer\DAT\CustomQuests\" & string(MyName) & ".txt").read
  403. set MyPKCountFile = file("C:\FSOServer\DAT\PKCount\" & string(MyName) & ".txt").read
  404.  
  405. if MyTicketsFile = VOID or MyTicketsFile = "" then
  406. set StartingTickets = "0:0:0"
  407. file("C:\FSOServer\DAT\EventTickets\" & string(MyName) & ".txt").write(StartingTickets)
  408. set MyTicketsFile = file("C:\FSOServer\DAT\EventTickets\" & string(MyName) & ".txt").read
  409. end if
  410.  
  411. set olddelim = the itemdelimiter
  412. set the itemdelimiter = ":"
  413. if MyTicketsFile.item.count = 1 then
  414. set StartingTP = MyTicketsFile & ":0"
  415. file("C:\FSOServer\DAT\EventTickets\" & string(MyName) & ".txt").write(StartingTP)
  416. end if
  417. if MyTicketsFile.item.count = 2 then
  418. set StartingTP = MyTicketsFile & ":0"
  419. file("C:\FSOServer\DAT\EventTickets\" & string(MyName) & ".txt").write(StartingTP)
  420. end if
  421.  
  422.  
  423. if MyNationRankFile = VOID or MyNationRankFile = "" then
  424. set StartingRank = "0"
  425. file("C:\FSOServer\DAT\NationRanks\" & string(MyName) & ".txt").write(StartingRank)
  426. set MyNationRankFile = file("C:\FSOServer\DAT\NationRanks\" & string(MyName) & ".txt").read
  427. end if
  428.  
  429. if MyCustomQuestsFile = VOID or MyCustomQuestsFile = "" then
  430. set StartingQuests = "0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
  431. file("C:\FSOServer\DAT\CustomQuests\" & string(MyName) & ".txt").write(StartingQuests)
  432. set MyCustomQuestsFile = file("C:\FSOServer\DAT\CustomQuests\" & string(MyName) & ".txt").read
  433. end if
  434.  
  435. set olddelim = the itemdelimiter
  436. set the itemdelimiter = ":"
  437. if MyCustomQuestsFile.item.count < 60 then set MyCustomQuestsFile = MyCustomQuestsFile & "0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
  438. set the itemdelimiter = olddelim
  439.  
  440. if MyPKCountFile = VOID or MyPKCountFile = "" then
  441. set StartingPK = "0:0:0"
  442. file("C:\FSOServer\DAT\PKCount\" & string(MyName) & ".txt").write(StartingPK)
  443. set MyPKCountFile = file("C:\FSOServer\DAT\PKCount\" & string(MyName) & ".txt").read
  444. end if
  445.  
  446. if MyItemsFile contains ":" then
  447. else
  448. set MyItemsFile = "0|Apple-2:Dagger-1:::::::::::::|NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  449. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(MyItemsFile)
  450. end if
  451.  
  452. set MyItemsFile22 = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  453. set the itemdelimiter = "|"
  454. set MyTarget22 = item 3 of MyItemsFile22
  455. set MyTarget24 = item 2 of MyItemsFile22
  456. set the itemdelimiter = ":"
  457. set Slots22 = MyTarget22.item.count
  458. if Slots22 = 6 then
  459. set TheNewFile = MyItemsFile22 & ":NOTHING:NOTHING:NOTHING:NOTHING"
  460. file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").write(TheNewFile)
  461. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  462. end if
  463.  
  464. if Slots22 = 8 then
  465. set TheNewFile = MyItemsFile22 & ":NOTHING:NOTHING"
  466. file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").write(TheNewFile)
  467. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  468. end if
  469. set Slots24 = MyTarget24.item.count
  470. if Slots24 = 15 then
  471. set TheNewFilePart = MyTarget24 & ":::::"
  472. set the itemdelimiter = "|"
  473. put TheNewFilePart into item 2 of MyItemsFile22
  474. set TheNewFile = MyItemsFile22
  475. file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").write(TheNewFile)
  476. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  477. end if
  478.  
  479. if myFile contains ":" then
  480. if item 2 of string(MyFile) = PPW then
  481. set MyFile = string("!!!" & MyFile)
  482. User.sendMessage("Server Response", MyFile, 0, FALSE, user.name)
  483. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  484. set FactionPowers = file("C:\FSOServer\DAT\POLITICAL\factions.txt").read
  485. User.sendMessage("factnrtrn", FactionPowers, 0, FALSE, user.name)
  486. set PiratePowers = file("C:\FSOServer\DAT\POLITICAL\pirates.txt").read
  487. User.sendMessage("piratertrn", PiratePowers, 0, FALSE, user.name)
  488. set ElementalPowers = file("C:\FSOServer\DAT\POLITICAL\elemental.txt").read
  489. User.sendMessage("elementalrtrn", ElementalPowers, 0, FALSE, user.name)
  490. set HelpFile = file("C:\FSOServer\DAT\HELP\help.txt").read
  491. if HelpFile <> VOID then User.sendMessage("sqa", HelpFile, 0, FALSE, user.name)
  492.  
  493. user.sendMessage("LoadingTickets", MyTicketsFile, 0, FALSE, user.name)
  494. user.sendMessage("LoadingNationRank", MyNationRankFile, 0, FALSE, user.name)
  495. user.sendMessage("LoadingCustomQuests", MyCustomQuestsFile, 0, FALSE, user.name)
  496. user.sendMessage("LoadingPKs", MyPKCountFile, 0, FALSE, user.name)
  497.  
  498. set FilName = "C:\FSOSERVER\DAT\ASSASSINS\MODE.txt"
  499. set AssSystem = file(FilName).read
  500. if AssSystem contains "LIGHT" then User.sendMessage("ltass", "x", 0, FALSE, user.name)
  501. if AssSystem contains "GO" then User.sendMessage("nmass", "x", 0, FALSE, user.name)
  502.  
  503.  
  504. if GetRank(user.name) < 7 then
  505. else
  506. User.sendMessage("StaffFalse", "x", 0, FALSE, user.name)
  507. end if
  508. if GetRank(user.name) < 4 then User.sendMessage("ImTrue", "x", 0, FALSE, user.name)
  509. if GetRank(user.name) < 4 then then User.sendMessage("RTGTrue", "x", 0, FALSE, user.name)
  510. if GetRank(user.name) = 4 then User.sendMessage("MapTrue", "x", 0, FALSE, user.name)
  511. if GetRank(user.name) = 6 then User.sendMessage("ImOfficer", "x", 0, FALSE, user.name)
  512. if GetRank(user.name) = 5 then User.sendMessage("ImHeadOfficer", "x", 0, FALSE, user.name)
  513.  
  514. set FilName = "C:\FSOServer\DAT\Nations\Exousia.txt"
  515. set MyFile = file(FilName).read
  516.  
  517. set BelzDat = "=" & string(user.name) & "="
  518. if MyFile contains BelzDat then User.sendMessage("ImExousia", "x", 0, FALSE, user.name)
  519.  
  520. set FilName = "C:\FSOServer\DAT\Nations\Tamarang.txt"
  521. set MyFile = file(FilName).read
  522.  
  523. set BelzDat = "=" & string(user.name) & "="
  524. if MyFile contains BelzDat then User.sendMessage("ImTamarang", "x", 0, FALSE, user.name)
  525.  
  526. set FilName = "C:\FSOServer\DAT\Nations\Baalzamon.txt"
  527. set MyFile = file(FilName).read
  528.  
  529. set BelzDat = "=" & string(user.name) & "="
  530. if MyFile contains BelzDat then User.sendMessage("ImBaalzamon", "x", 0, FALSE, user.name)
  531.  
  532. set FxilName = "C:\FSOServer\DAT\SETTINGS\System.txt"
  533. set SysFill = file(FxilName).read
  534. if SysFill contains "Speed Hack Protection:OFF" then User.sendMessage("DontSHP", "x", 0, FALSE, user.name)
  535. set FilName = "C:\FSOServer\DAT\SETTINGS\Guest Access.txt"
  536. set MyFile = file(FilName).read
  537. if MyFile contains "OFF" then User.sendMessage("455934785938612364852348", "455934785938612364852348", 0, FALSE, user.name)
  538.  
  539. else
  540.  
  541. User.sendMessage("Server Response", "Invalid PW", 0, FALSE, user.name)
  542. end if
  543.  
  544. else
  545.  
  546. User.sendMessage("Server Response", "Nonexistant", 0, FALSE, user.name)
  547. end if
  548.  
  549. --------------------------------------------------
  550.  
  551. "SupaWarp":
  552. set the itemdelimiter = "*"
  553. set WarpUser = string(item 1 of fullmsg.content)
  554. set WarpDat = string(item 2 of fullmsg.content)
  555.  
  556. set WarpLogfile = "C:\FSOServer\DAT\Logs\Warps\WarpLog.txt"
  557. set WarpLogFile = file(WarpLogFile).read
  558. set WarpLogFile = WarpLogFile & RETURN & "[" & the short date && the short time & "]" & user.name & " warped " & WarpUser & " to " & WarpDat
  559. file("C:\FSOServer\DAT\Logs\Warps\WarpLog.txt").write(WarpLogFile)
  560.  
  561. if GetRank(User.name) < 7 or then
  562. if WarpDat contains " to " then set WarpDat = WarpShortcuts(WarpDat, user)
  563. if WarpDat = "NoFile" then exit
  564. movie.sendMessage(WarpUser, "Warp", WarpDat)
  565. end if
  566.  
  567.  
  568. "CheckAdminPower":
  569. set IllegalPower = 1
  570. set WhoDidIt = string(fullmsg.content)
  571. if WhoDidIt = "Server" then exit
  572. set WhoGotHit = string(user.name)
  573.  
  574. if GetRank(User.name) < 7 then
  575. set IllegalPower = 0
  576. end if
  577.  
  578. if IllegalPower = 1 then
  579. set MyFile = file("C:\FSOServer\DAT\CHAR\" & WhoDidIt & ".txt").read
  580. set MyFile = "BANNED!!!!!!!!!!!" & MyFile
  581. file("C:\FSOServer\DAT\CHAR\" & WhoDidIt & ".txt").write(MyFile)
  582. set WarpLogfile = "C:\FSOServer\DAT\Logs\IllegalPower\IllegalPower.txt"
  583. set WarpLogFile = file(WarpLogFile).read
  584. set WarpLogFile = WarpLogFile & RETURN & WhoDidIt & " banned for using powers on " & WhoGotHit
  585. file("C:\FSOServer\DAT\Logs\IllegalPower\IllegalPower.txt").write(WarpLogFile)
  586. movie.sendMessage("system.user.delete", "", WarpUser)
  587. end if
  588.  
  589.  
  590. "AwardSomeTickets":
  591. set the itemdelimiter = "*"
  592. set TicketUser = string(item 1 of fullmsg.content)
  593. set TicketAmount = string(item 2 of fullmsg.content)
  594. movie.sendMessage(TicketUser, "GetTicketsYo", TicketAmount)
  595. set MyName = user.name
  596. ItemFileLog = file("C:\FSOServer\DAT\Logs\ETAwards\" & MyName & ".txt").read --logging
  597. Addtolog = "[" & the short date && the short time & "]" && " awarded " & TicketAmount & " tickets to " & TicketUser
  598. Newlogfile = ItemFileLog & RETURN & Addtolog
  599. file("C:\FSOServer\DAT\Logs\ETAwards\" & MyName & ".txt").write(NewLogFile)
  600.  
  601. "AwardSomeTP":
  602. set the itemdelimiter = "*"
  603. set TicketUser = string(item 1 of fullmsg.content)
  604. set TicketAmount = string(item 2 of fullmsg.content)
  605. movie.sendMessage(TicketUser, "GetTPYo", TicketAmount)
  606. set MyName = user.name
  607. ItemFileLog = file("C:\FSOServer\DAT\Logs\TPAwards\" & MyName & ".txt").read --logging
  608. Addtolog = "[" & the short date && the short time & "]" && " awarded " & TicketAmount & " tournament points to " & TicketUser
  609. Newlogfile = ItemFileLog & RETURN & Addtolog
  610. file("C:\FSOServer\DAT\Logs\TPAwards\" & MyName & ".txt").write(NewLogFile)
  611.  
  612. --Gaurdia Chat Client
  613. "GGChatLogin":
  614. Name = string(user.name)
  615. the ItemDelimiter = "*"
  616. Name2 = Name.item[2]
  617. Password = String(fullmsg.content)
  618. CharFile = file("C:\FSOServer\DAT\Char\" & Name2 & ".txt").read
  619. the itemdelimiter = ":"
  620. if CharFile.item[2] = Password then
  621. movie.sendmessage(Name, "GGGo", "1")
  622. else
  623. movie.sendmessage(Name, "GGGo", "0")
  624. exit
  625. end if
  626.  
  627.  
  628. "GetPageSignShow":
  629. set SignUser = user.name
  630. set SignNumber = fullmsg.content
  631. SuperSignText = file("C:\FSOServer\DAT\SuperSigns\" & string(SignNumber) & ".txt").read
  632. if SuperSignText = VOID or SuperSignText = "" then set SuperSignText = "Nope"
  633. --user.sendMessage("ReceivedPageSign", SuperSignText, 0, FALSE, user.name)
  634. movie.sendMessage(SignUser, "ReceivedPageSign", SuperSignText)
  635.  
  636. "MakePageSignShow":
  637. set SignUser = user.name
  638. set the itemdelimiter = ":"
  639. set SignNumber = string(item 1 of fullmsg.content)
  640. set SignData = string(item 2 of fullmsg.content)
  641. file("C:\FSOServer\DAT\SuperSigns\" & string(SignNumber) & ".txt").write(SignData)
  642. movie.sendMessage(SignUser, "ReceivedPageSign", SignData)
  643.  
  644.  
  645. "NationPromoteUser":
  646. set TicketUser = string(fullmsg.content)
  647. set PromotionAmount = 1
  648. movie.sendMessage(TicketUser, "NationPromoteYo", PromotionAmount)
  649.  
  650.  
  651. "NationDemoteUser":
  652. set TicketUser = string(fullmsg.content)
  653. set PromotionAmount = 1
  654. movie.sendMessage(TicketUser, "NationDemoteYo", PromotionAmount)
  655.  
  656. "ChangeCTFToOn":
  657. file("C:\FSOServer\DAT\CTF\Status.txt").write("ON")
  658. file("C:\FSOServer\DAT\CTF\Score.txt").write("0:0")
  659. movie.sendmessage("@admins","guildcast", "*** " & user.name & " has turned on Capture the Flag!")
  660.  
  661. "ChangeCTFToOff":
  662. file("C:\FSOServer\DAT\CTF\Status.txt").write("OFF")
  663. movie.sendmessage("@admins","guildcast", "*** " & user.name & " has turned off Capture the Flag!")
  664.  
  665. "JoinCTF":
  666. TheCTFCheck = file("C:\FSOServer\DAT\CTF\Status.txt").read
  667. User.sendMessage("CheckCTFJoin", TheCTFCheck, 0, FALSE, user.name)
  668.  
  669.  
  670. "LeaveCTF":
  671. set TargetName = user.name
  672. OldEq = file("C:\FSOServer\DAT\CTF\SAVE\" & string(TargetName) & ".txt").read
  673. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(OldEq)
  674. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  675. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  676. set CTFWarp = "!!! !!! x11003y11000 9 8"
  677. user.sendMessage("Warp", CTFWarp, 0, FALSE, user.name)
  678. movie.sendmessage("@admins","sqa", "*** " & user.name & " has left Capture the Flag event.")
  679.  
  680. "CTFPrepare":
  681. set TargetName = user.name
  682. OldFile = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  683. file("C:\FSOServer\DAT\CTF\SAVE\" & string(TargetName) & ".txt").write(OldFile)
  684. LastColor = file("C:\FSOServer\DAT\CTF\LastColor.txt").read
  685. if LastColor = "BLUE" then
  686. Uniform = "0|:::::::::::::::::::|NOTHING:Red Team Uniform:Red Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  687. file("C:\FSOServer\DAT\CTF\LastColor.txt").write("RED")
  688. set CTFWarp = "!!! !!! x10000y10000 9 10"
  689. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Capture the Flag as Red.")
  690. else
  691. Uniform = "0|:::::::::::::::::::|NOTHING:Blue Team Uniform:Blue Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  692. file("C:\FSOServer\DAT\CTF\LastColor.txt").write("BLUE")
  693. set CTFwarp = "!!! !!! x10001y9997 9 3"
  694. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Capture the Flag as Blue.")
  695. end if
  696. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  697. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  698. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  699. user.sendMessage("Warp", CTFWarp, 0, FALSE, user.name)
  700.  
  701. "ChangeAssaultToOn":
  702. file("C:\FSOServer\DAT\Assault\Status.txt").write("ON")
  703. file("C:\FSOServer\DAT\Assault\Score.txt").write("0:0")
  704. movie.sendmessage("@admins","guildcast", "*** " & user.name & " has turned on Assault!")
  705.  
  706.  
  707. "ChangeAssaultToOff":
  708. file("C:\FSOServer\DAT\Assault\Status.txt").write("OFF")
  709. movie.sendmessage("@admins","guildcast", "*** " & user.name & " has turned off Assault!")
  710.  
  711. "ChangeAssaultMode":
  712. set NewMode = string(fullmsg.content)
  713. file("C:\FSOServer\DAT\Assault\Mode.txt").write(NewMode)
  714.  
  715. "AssaultPrepare":
  716. Status = file("C:\FSOServer\DAT\Assault\Status.txt").read
  717. if Status = "OFF" then
  718. User.sendMessage("sqa", "Assault is not running at this time.", 0, FALSE, user.name)
  719. exit
  720. end if
  721. set TargetName = user.name
  722. OldFile = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  723. file("C:\FSOServer\DAT\Assault\SAVE\" & string(TargetName) & "-i.txt").write(OldFile)
  724. OldFile2 = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "" & ".txt").read
  725. file("C:\FSOServer\DAT\Assault\SAVE\" & string(TargetName) & ".txt").write(OldFile2)
  726.  
  727. set the itemdelimiter = "/"
  728. set OrigHP = item 2 of OldFile2
  729. set OrigSkills = item 9 of OldFile2
  730. set OrigSpells = item 7 of OldFile2
  731. set OldFile3 = OrigHP & "/" & OrigSkills & "/" & OrigSpells
  732. file("C:\FSOServer\DAT\Assault\SAVE\" & string(TargetName) & "-o.txt").write(OldFile3)
  733.  
  734. LastTeam = file("C:\FSOServer\DAT\Assault\LastTeam.txt").read
  735. if LastTeam = "1" then
  736. set LastTeamClass = file("C:\FSOServer\DAT\Assault\LastUnholy.txt").read
  737. if integer(LastTeamClass) = 3 then
  738. file("C:\FSOServer\DAT\Assault\LastUnholy.txt").write("1")
  739. set Uniform = "0|:::::::::::::::::::|Murder Helm:Plate Armor:Broad Sword:Steel Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Arkassen Cape:Ring of Quickness"
  740. set PrepData = "2:1"
  741. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Arkassen as a Warrior.")
  742. end if
  743. if integer(LastTeamClass) = 1 then
  744. file("C:\FSOServer\DAT\Assault\LastUnholy.txt").write("2")
  745. set Uniform = "0|Long Sword-1:Blue Crystals-20::::::::::::::::::|Murder Helm:Chain Armor:Wooden Crossbow:Blue Arrows:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Arkassen Cape:Bowmaster's Ring"
  746. set PrepData = "2:2"
  747. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Arkassen as an Archer.")
  748. end if
  749. if integer(LastTeamClass) = 2 then
  750. file("C:\FSOServer\DAT\Assault\LastUnholy.txt").write("3")
  751. set Uniform = "0|Red Crystals-12:Blue Crystals-18:White Crystals-9:::::::::::::::::|Murder Helm:Red Necromancer's Robe:Lord's Staff:Ark Small Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Arkassen Cape:Mage's Ring"
  752. set PrepData = "2:3"
  753. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Arkassen as a Mage.")
  754. end if
  755. file("C:\FSOServer\DAT\Assault\LastTeam.txt").write("2")
  756. file("C:\FSOServer\DAT\DM\" & TargetName & ".txt").write("x11007y11000:9-8")
  757. else
  758. set LastTeamClass = file("C:\FSOServer\DAT\Assault\LastHoly.txt").read
  759. if integer(LastTeamClass) = 3 then
  760. file("C:\FSOServer\DAT\Assault\LastHoly.txt").write("1")
  761. set Uniform = "0|:::::::::::::::::::|War Helm:Plate Armor:Broad Sword:Steel Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Elisson Cape:Ring of Quickness"
  762. set PrepData = "1:1"
  763. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Elisson as a Warrior.")
  764. end if
  765. if integer(LastTeamClass) = 1 then
  766. file("C:\FSOServer\DAT\Assault\LastHoly.txt").write("2")
  767. set Uniform = "0|Long Sword-1:Blue Crystals-20::::::::::::::::::|War Helm:Chain Armor:Wooden Crossbow:Blue Arrows:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Elisson Cape:Bowmaster's Ring"
  768. set PrepData = "1:2"
  769. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Elisson as an Archer.")
  770. end if
  771. if integer(LastTeamClass) = 2 then
  772. file("C:\FSOServer\DAT\Assault\LastHoly.txt").write("3")
  773. set Uniform = "0|Red Crystals-12:Blue Crystals-18:White Crystals-9:::::::::::::::::|War Helm:Necromancer's Robe:Lord's Staff:Eli Small Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Elisson Cape:Mage's Ring"
  774. set PrepData = "1:3"
  775. movie.sendmessage("@admins","sqa", "*** " & user.name & " had joined Elisson as a Mage.")
  776. end if
  777. file("C:\FSOServer\DAT\Assault\LastTeam.txt").write("1")
  778. file("C:\FSOServer\DAT\DM\" & TargetName & ".txt").write("x10999y11000:9-8")
  779. end if
  780. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  781. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  782. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  783. User.sendMessage("AssaultPrepDataReturn", PrepData, 0, FALSE, user.name)
  784.  
  785. "AssaultRevert":
  786. set TargetName = user.name
  787. OldEq = file("C:\FSOServer\DAT\Assault\SAVE\" & string(TargetName) & "-i.txt").read
  788. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(OldEq)
  789. OrigEq = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i.txt").read
  790. User.sendMessage("inx", OrigEq, 0, FALSE, user.name)
  791. set CTFWarp = "!!! !!! x11003y11000 9 10"
  792. user.sendMessage("Warp", CTFWarp, 0, FALSE, user.name)
  793. -- movie.sendmessage(TargetName, "AlertMsg", "You are being reverted to your original character, you will now be disconnected! (You may be disconnected on your first login attempt)")
  794. -- movie.sendMessage("system.user.delete", "", TargetName)
  795. -- OldEq = file("C:\FSOServer\DAT\Assault\SAVE\" & string(TargetName) & "-i.txt").read
  796. -- file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(OldEq)
  797. -- OldStats = file("C:\FSOServer\DAT\Assault\SAVE\" & string(TargetName) & ".txt").read
  798. -- file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & ".txt").write(OldStats)
  799. TheOrigFile = file("C:\FSOServer\DAT\Assault\SAVE\" & string(TargetName) & "-o.txt").read
  800. User.sendMessage("AssaultRevertDataReturn", TheOrigFile, 0, FALSE, user.name)
  801. movie.sendmessage("@admins","sqa", "*** " & user.name & " has left the Assault event.")
  802.  
  803. "AssaultResupply":
  804. set SupplyData = string(fullmsg.content)
  805. set the itemdelimiter = ":"
  806. set Team = integer(item 1 of SupplyData)
  807. set Class = integer(item 2 of SupplyData)
  808. set TargetName = user.name
  809. if Team = 2 then
  810. if Class = 1 then
  811. set Uniform = "0|:::::::::::::::::::|Murder Helm:Plate Armor:Broad Sword:Steel Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Arkassen Cape:Ring of Quickness"
  812. end if
  813. if Class = 2 then
  814. set Uniform = "0|Long Sword-1:Blue Crystals-20::::::::::::::::::|Murder Helm:Chain Armor:Wooden Crossbow:Blue Arrows:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Arkassen Cape:Bowmaster's Ring"
  815. end if
  816. if Class = 3 then
  817. set Uniform = "0|Red Crystals-12:Blue Crystals-18:White Crystals-9:::::::::::::::::|Murder Helm:Red Necromancer's Robe:Lord's Staff:Ark Small Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Arkassen Cape:Mage's Ring"
  818. end if
  819. else
  820. if Class = 1 then
  821. set Uniform = "0|:::::::::::::::::::|War Helm:Plate Armor:Broad Sword:Steel Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Elisson Cape:Ring of Quickness"
  822. end if
  823. if Class = 2 then
  824. set Uniform = "0|Long Sword-1:Blue Crystals-20::::::::::::::::::|War Helm:Chain Armor:Wooden Crossbow:Blue Arrows:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Elisson Cape:Bowmaster's Ring"
  825. end if
  826. if Class = 3 then
  827. set Uniform = "0|Red Crystals-12:Blue Crystals-18:White Crystals-9:::::::::::::::::|War Helm:Necromancer's Robe:Lord's Staff:Eli Small Shield:NOTHING:NOTHING:Silver Thread Necklace:NOTHING:Elisson Cape:Mage's Ring"
  828. end if
  829. end if
  830. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i.txt").write(Uniform)
  831. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i.txt").read
  832. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  833.  
  834.  
  835. "IGotShotWithBlueBow":
  836. set CTFWarp = "!!! !!! x10000y10000 9 10"
  837. set TargetName = user.name
  838. Uniform = "0|:::::::::::::::::::|NOTHING:Red Team Uniform:Red Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  839. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  840. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  841. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  842. user.sendMessage("Warp", CTFWarp, 0, FALSE, user.name)
  843.  
  844. "IGotShotWithRedBow":
  845. set CTFWarp = "!!! !!! x10001y9997 9 3"
  846. set TargetName = user.name
  847. Uniform = "0|:::::::::::::::::::|NOTHING:Blue Team Uniform:Blue Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  848. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  849. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  850. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  851. user.sendMessage("Warp", CTFWarp, 0, FALSE, user.name)
  852.  
  853. "ICapturedRed":
  854. set TargetName = user.name
  855. Uniform = "0|:::::::::::::::::::|NOTHING:Blue Team Uniform:Blue Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  856. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  857. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  858. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  859. CurScore = file("C:\FSOServer\DAT\CTF\Score.txt").read
  860. set the itemdelimiter = ":"
  861. AddedUp = integer(item 2 of CurScore) + 1
  862. put AddedUp into item 2 of CurScore
  863. file("C:\FSOServer\DAT\CTF\Score.txt").write(CurScore)
  864. set MessageData = user.name & " has scored a point for the Blue team! The score is now Red:" & string(item 1 of CurScore) & " Blue:" & string(item 2 of CurScore)
  865. movie.sendmessage("@AllUsers","RPG",MessageData)
  866. OriginalMap = file("C:\FSOServer\DAT\CTF\RedMap.txt").read
  867. RefreshMap = file("C:\FSOServer\DAT\Items\x10000y10000i.txt").write(OriginalMap)
  868. movie.sendMessage( "@" & "x10000y10000", "RefreshMap", "x" )
  869.  
  870. "ICapturedBlue":
  871. set TargetName = user.name
  872. Uniform = "0|:::::::::::::::::::|NOTHING:Red Team Uniform:Red Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  873. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  874. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  875. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  876. CurScore = file("C:\FSOServer\DAT\CTF\Score.txt").read
  877. set the itemdelimiter = ":"
  878. AddedUp = integer(item 1 of CurScore) + 1
  879. put AddedUp into item 1 of CurScore
  880. file("C:\FSOServer\DAT\CTF\Score.txt").write(CurScore)
  881. set MessageData = user.name & " has scored a point for the Red team! The score is now Red:" & string(item 1 of CurScore) & " Blue:" & string(item 2 of CurScore)
  882. movie.sendmessage("@AllUsers","RPG",MessageData)
  883. OriginalMap = file("C:\FSOServer\DAT\CTF\BlueMap.txt").read
  884. file("C:\FSOServer\DAT\Items\x10001y9997i.txt").write(OriginalMap)
  885. movie.sendMessage( "@" & "x10001y9997", "RefreshMap", "x" )
  886.  
  887. "GotBlueFlag":
  888. set TargetName = user.name
  889. Uniform = "0|:::::::::::::::::::|NOTHING:Red Team Uniform:Red Bow:NOTHING:NOTHING:Blue Flag Wings:NOTHING:NOTHING:NOTHING:NOTHING"
  890. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  891. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  892. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  893. set GrabBlueFlag = user.name & " has picked up the Blue Flag."
  894. movie.sendmessage("@AllUsers","RPG",GrabBlueFlag)
  895.  
  896. "GotRedFlag":
  897. set TargetName = user.name
  898. Uniform = "0|:::::::::::::::::::|NOTHING:Blue Team Uniform:Blue Bow:NOTHING:NOTHING:Red Flag Wings:NOTHING:NOTHING:NOTHING:NOTHING"
  899. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  900. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  901. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  902. set GrabRedFlag = user.name & " has picked up the Red Flag."
  903. movie.sendmessage("@AllUsers","RPG",GrabRedFlag)
  904.  
  905. "DropBlueFlag":
  906. Uniform = "0|:::::::::::::::::::|NOTHING:Red Team Uniform:Red Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  907. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  908. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  909. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  910. -- So Flag loads correctly -- This Will lag just a little
  911. movie.sendMessage( "@" & "x10001y9997", "RefreshMap", "x" )
  912. movie.sendMessage( "@" & "x10001y9998", "RefreshMap", "x" )
  913. movie.sendMessage( "@" & "x10001y9999", "RefreshMap", "x" )
  914. movie.sendMessage( "@" & "x10000y9998", "RefreshMap", "x" )
  915. movie.sendMessage( "@" & "x10000y9999", "RefreshMap", "x" )
  916. movie.sendMessage( "@" & "x10000y10000", "RefreshMap", "x" )
  917. set DroppedBlueFlag = user.name & " has dropped the Blue Flag."
  918. movie.sendmessage("@AllUsers","RPG",DroppedBlueFlag)
  919.  
  920. "DropRedFlag":
  921. set TargetName = user.name
  922. Uniform = "0|:::::::::::::::::::|NOTHING:Blue Team Uniform:Blue Bow:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING:NOTHING"
  923. file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").write(Uniform)
  924. UniformSend = file("C:\FSOServer\DAT\CHAR\" & string(TargetName) & "-i" & ".txt").read
  925. User.sendMessage("inx", UniformSend, 0, FALSE, user.name)
  926. -- So Flag loads correctly -- This will lag just a little
  927. movie.sendMessage( "@" & "x10001y9997", "RefreshMap", "x" )
  928. movie.sendMessage( "@" & "x10001y9998", "RefreshMap", "x" )
  929. movie.sendMessage( "@" & "x10001y9999", "RefreshMap", "x" )
  930. movie.sendMessage( "@" & "x10000y9998", "RefreshMap", "x" )
  931. movie.sendMessage( "@" & "x10000y9999", "RefreshMap", "x" )
  932. movie.sendMessage( "@" & "x10000y10000", "RefreshMap", "x" )
  933. set DroppedRedFlag = user.name & " has dropped the Red Flag."
  934. movie.sendmessage("@AllUsers","RPG",DroppedRedFlag)
  935.  
  936. "ReturnedBlueFlag":
  937. set TargetName = user.name
  938. OriginalMap = file("C:\FSOServer\DAT\CTF\BlueMap.txt").read
  939. file("C:\FSOServer\DAT\Items\x10001y9997i.txt").write(OriginalMap)
  940. movie.sendMessage( "@" & "x10001y9997", "RefreshMap", "x" )
  941. set BlueFlagSpawned = "Blue Flag returns to Blue Base."
  942. movie.sendmessage("@AllUsers","RPG",BlueFlagSpawned)
  943.  
  944. "ReturnedRedFlag":
  945. set TargetName = user.name
  946. OriginalMap = file("C:\FSOServer\DAT\CTF\RedMap.txt").read
  947. file("C:\FSOServer\DAT\Items\x10000y10000i.txt").write(OriginalMap)
  948. movie.sendMessage( "@" & "x10000y10000", "RefreshMap", "x" )
  949. set RedFlagSpawned = "Red Flag returns to Red Base."
  950. movie.sendmessage("@AllUsers","RPG",RedFlagSpawned)
  951.  
  952. "KickTheDOOD":
  953. set FilName = "C:\FSOServer\DAT\SETTINGS\immortals.txt"
  954. set IMMMs = file(FilName).read
  955. set CheckName = "*" & string(user.name) & "*"
  956. set WarpUser = string(fullmsg.content)
  957.  
  958. if getrank(user.name) < 7 then
  959. movie.sendMessage(WarpUser, "2348823473278234327823482347", "x")
  960. movie.sendmessage("@admins", "guildcast", "*** " & user.name & " has kicked " & WarpUser & "!")
  961. end if
  962.  
  963. "MuteTheDOOD":
  964. set TheUser = string(user.name)
  965. muteList.addUser(TheUser)
  966.  
  967. "UnmuteTheDOOD":
  968. set TheUser = string(user.name)
  969. muteList.deleteUser(TheUser)
  970.  
  971.  
  972. "144dBdAdNdNdEdD2":
  973. set FilName = "C:\FSOServer\DAT\SETTINGS\immortals.txt"
  974. set IMMMs = file(FilName).read
  975. set CheckName = "*" & string(user.name) & "*"
  976. set WarpUser = string(fullmsg.content)
  977. set WeGotAHit = 0
  978.  
  979. if Getrank(user.name) < 4 then
  980. movie.sendMessage(WarpUser, "144dBdAdNdNdEdD", "x")
  981. movie.sendmessage("@admins", "guildcast", "*** " & user.name & " has dumb banned " & WarpUser & "!")
  982. set WeGotAHit = 1
  983. end if
  984.  
  985. if WeGotAHit = 0 then
  986. set WarpUser = string(user.name)
  987. movie.sendMessage(WarpUser, "144dBdAdNdNdEdD", "x")
  988. movie.sendmessage("@admins", "guildcast", "*** " & user.name & " tried to perform a dumb ban, and ended up dumb banning themself!")
  989. end if
  990.  
  991.  
  992.  
  993.  
  994.  
  995. "ViolentDestroy":
  996. set FilName = "C:\FSOServer\DAT\SETTINGS\immortals.txt"
  997. set IMMMs = file(FilName).read
  998. set CheckName = "*" & string(user.name) & "*"
  999. set WarpUser = string(fullmsg.content)
  1000.  
  1001. if GetRank < 7 then
  1002. movie.sendMessage("system.user.delete", "", WarpUser)
  1003. movie.sendmessage("@admins", "guildcast", "*** " & user.name & " has superkicked " & WarpUser & "!")
  1004. end if
  1005.  
  1006. "BanPlayer":
  1007. set UserToBan = string(fullmsg.content)
  1008.  
  1009. if GetRank < 4 then
  1010. movie.sendMessage(UsertoBan, "2348823473278234327823482347", "x")
  1011. set MyFile = file("C:\FSOServer\DAT\CHAR\" & string(UserToBan) & ".txt").read
  1012. set MyFile = "BANNED!!!!!!!!!!!" & MyFile
  1013. file("C:\FSOServer\DAT\CHAR\" & string(UserToBan) & ".txt").write(MyFile)
  1014. movie.sendMessage(UserToBan, "56329783238", "x")
  1015. movie.sendmessage("@admins", "guildcast", "*** " & user.name & " has banned " & UserToban & "!")
  1016. put user.name & " has banned " & UserToBan & "!"
  1017. end if
  1018.  
  1019. "cq1":
  1020. set FilName = string(user.name) & ".txt"
  1021. set xFilName = string(fullmsg.SenderID) & ".txt"
  1022. set HisName = string(fullmsg.SenderID)
  1023. set SrStr = "*" & user.name & "*"
  1024.  
  1025. if FilName <> xFilName then
  1026. set MyFile = file("C:\FSOServer\DAT\CHAR\" & string(HisName) & ".txt").read
  1027. set MyFile = "BANNED!!!!!!!!!!!" & MyFile
  1028. file("C:\FSOServer\DAT\CHAR\" & string(HisName) & ".txt").write(MyFile)
  1029. User.sendMessage("YouGotKicked", "The Mighty Server God", 0, FALSE, user.name)
  1030. exit
  1031. end if
  1032.  
  1033. set FilDT = string(fullmsg.content)
  1034. set the itemdelimiter = "."
  1035. if item 1 of FilDT <> string(user.name) then exit
  1036. set HisName = string(user.name)
  1037. set FilName = HisName & ".txt"
  1038. if HisName contains "NewChar" then exit
  1039. file("C:\FSOServer\DAT\CHAR\" & FilName).write(FilDt)
  1040.  
  1041.  
  1042. if random(4000) = 1 then QuestChest
  1043.  
  1044. "SaveGuild":
  1045. set FileDT = string(fullmsg.content)
  1046. set the itemdelimiter = "`"
  1047. set FilName = item 1 of FileDT
  1048. set FilDat = item 2 of FileDT
  1049. file("C:\FSOServer\DAT\GUILDS\" & FilName).write(FilDat)
  1050.  
  1051. --AlignmentTest
  1052. "SaveNAlignment":
  1053. set FileDT = string(fullmsg.content)
  1054. set the itemdelimiter = "`"
  1055. set FilName = item 1 of FileDT
  1056. set FilDat = item 2 of FileDT
  1057. file("C:\FSOServer\DAT\NATIONS\" & FilName).write(FilDat)
  1058.  
  1059. --------------------------------------------------
  1060. "SaveItemsRTG":
  1061.  
  1062. set FileDT = string(fullmsg.content)
  1063. set the itemdelimiter = "`"
  1064. set FilName = item 1 of FileDT
  1065. set FilDat = item 2 of FileDT
  1066.  
  1067. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(FilDat)
  1068. --------------------------------------------------
  1069.  
  1070. "ImStuckYo":
  1071. set MyFile = string(user.name) & ".txt"
  1072. set MyFile2 = file("C:\FSOServer\DAT\Stuck\" & MyFile).read()
  1073. if MyFile2 = the date then
  1074. User.sendMessage("StuckDenied", "x", 0, FALSE, user.name)
  1075. else
  1076. file("C:\FSOServer\DAT\Stuck\" & MyFile).write(the date)
  1077. User.sendMessage("StuckAccepted", "x", 0, FALSE, user.name)
  1078. end if
  1079.  
  1080.  
  1081. "HckItm":
  1082.  
  1083. set FileDT = string(fullmsg.content)
  1084. set the itemdelimiter = "`"
  1085. set FilName = item 1 of FileDT
  1086. set NewItem = item 2 of FileDT
  1087. set ItDt = item 2 of FileDT
  1088. set ItemList = file("C:\FSOServer\DAT\ITEMS\" & FilName).read
  1089.  
  1090. if ItemList contains NewItem then
  1091. set the itemdelimiter = "|"
  1092.  
  1093. repeat with itemIndexs = 1 to 20
  1094. if NewItem = item itemIndexs of Itemlist then put "" into item itemIndexs of ItemList
  1095. end repeat
  1096.  
  1097. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
  1098. else
  1099. end if
  1100.  
  1101. --------------------------------------------------
  1102. "remEQ":
  1103. set FileDT = string(fullmsg.content)
  1104. set the itemdelimiter = ":"
  1105. set ItemToRemove = item 1 of FileDT
  1106. set ItemType = item 2 of FileDT
  1107. if ItemToRemove = "NOTHING" then exit
  1108.  
  1109. set MyName = user.name
  1110. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1111. set the itemdelimiter = "|"
  1112. set MyEquipment = item 2 of MyItemsFile
  1113. set MyEquipped = item 3 of MyItemsFile
  1114. set the itemdelimiter = ":"
  1115.  
  1116. set ItsAGo = 0
  1117.  
  1118. repeat with xxx = 1 to 20
  1119. if item xxx of MyEquipment = "" then set ItsAGo = 1
  1120. end repeat
  1121.  
  1122. if MyEquipment contains ItemToRemove then set ItsAGo = 1
  1123.  
  1124. if ItsAGo < 1 then
  1125. User.sendMessage("flinv", MyItemsFile, 0, FALSE, user.name)
  1126. exit
  1127. end if
  1128.  
  1129. if ItemType = "Head" then set EquipSlot = 1
  1130. if ItemType = "Body" then set EquipSlot = 2
  1131. if ItemType = "LeftHand" then set EquipSlot = 3
  1132. if ItemType = "RightHand" then set EquipSlot = 4
  1133. if ItemType = "Feet" then set EquipSlot = 5
  1134. if ItemType = "Ring" then set EquipSlot = 6
  1135. if ItemType = "Neck" then set EquipSlot = 7
  1136. if ItemType = "Waist" then set EquipSlot = 8
  1137. if ItemType = "Back" then set EquipSlot = 9
  1138. if ItemType = "Ring2" then set EquipSlot = 10
  1139.  
  1140. if item EquipSlot of MyEquipped = ItemToRemove then
  1141. put "NOTHING" into item EquipSlot of MyEquipped
  1142. set the itemdelimiter = "|"
  1143. put MyEquipped into item 3 of MyItemsFile
  1144.  
  1145. set nItem = ItemtoRemove
  1146. set ItemNum = 1
  1147. InvAdd(MyName, MyItemsFile, nItem, ItemNum, user, fullmsg, group, movie)
  1148. exit
  1149. end if
  1150.  
  1151. User.sendMessage("sqa", "You've already unequipped this!.", 0, FALSE, user.name)
  1152.  
  1153. ----------------------
  1154. "SaveNewsPaper":
  1155. file("C:\FSOServer\DAT\NEWSPAPERS\" & string(user.name) & ".txt").write(string(fullmsg.content))
  1156.  
  1157. "ReadNewspaperGUI":
  1158. set NewsName = string(user.name) & ".txt"
  1159. set NPFile = file("C:\FSOServer\DAT\NEWSPAPERS\" & NewsName).read
  1160. User.sendMessage("NewspaperX", NPFile, 0, FALSE, user.name)
  1161.  
  1162. "ReadNewspaper":
  1163. set NewsName = string(fullmsg.content) & ".txt"
  1164. set NPFile = file("C:\FSOServer\DAT\NEWSPAPERS\" & NewsName).read
  1165. User.sendMessage("Newspaper", NPFile, 0, FALSE, user.name)
  1166. set the itemdelimiter = "`"
  1167. set Photo1 = item 1 of NPFile
  1168. set Photo2 = item 2 of NPFile
  1169. set Photo3 = item 3 of NPFile
  1170. set ThePainting = file("C:\FSOServer\DAT\ART\" & Photo1).readvalue()
  1171. User.sendMessage("Photo1Send", ThePainting, 0, FALSE, user.name)
  1172. set ThePainting = file("C:\FSOServer\DAT\ART\" & Photo2).readvalue()
  1173. User.sendMessage("Photo2Send", ThePainting, 0, FALSE, user.name)
  1174. set ThePainting = file("C:\FSOServer\DAT\ART\" & Photo3).readvalue()
  1175. User.sendMessage("Photo3Send", ThePainting, 0, FALSE, user.name)
  1176.  
  1177. "rhnd":
  1178. set FileDT = string(fullmsg.content)
  1179. set the itemdelimiter = ":"
  1180. set ItemToRemove = item 1 of FileDT
  1181. set ItemType = item 2 of FileDT
  1182.  
  1183. set MyName = user.name
  1184. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1185. set the itemdelimiter = "|"
  1186. set MyEquipped = item 3 of MyItemsFile
  1187. set the itemdelimiter = ":"
  1188.  
  1189. put "NOTHING" into item 4 of MyEquipped
  1190.  
  1191. set the itemdelimiter = "|"
  1192. put MyEquipped into item 3 of MyItemsFile
  1193. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(MyItemsFile)
  1194. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  1195.  
  1196. "rtrninv":
  1197. set MyName = user.name
  1198. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1199. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  1200.  
  1201. -------------- ###
  1202. "SavePainting":
  1203. set MyName = user.name
  1204. set FileNme = random(10000000)
  1205. set TheImage = fullmsg.content
  1206. file("C:\FSOServer\DAT\ART\" & string(FileNme) & ".txt").write(String(MyName))
  1207. file("C:\FSOServer\DAT\ART\" & FileNme).writevalue(TheImage)
  1208. User.sendMessage("OKPaint", "x", 0, FALSE, user.name)
  1209. set nItem = "Painting#" & FileNme
  1210. set ItemNum = 1
  1211. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1212. InvAdd(MyName, MyItemsFile, nItem, ItemNum, user, fullmsg, group, movie)
  1213.  
  1214. "SaveTheBigMap":
  1215. set MyName = user.name
  1216. set TheImage = fullmsg.content
  1217. file("C:\FSOServer\DAT\WORLD MAP\WMAP").writevalue(TheImage)
  1218. User.sendMessage("TheBigMapWasSaved", "x", 0, FALSE, user.name)
  1219.  
  1220. "GrabTheBigMap":
  1221. set TheBigMap = file("C:\FSOServer\DAT\WORLD MAP\WMAP").readvalue()
  1222. User.sendMessage("HeresTheBigMap", TheBigMap, 0, FALSE, user.name)
  1223.  
  1224. "ViewPainting":
  1225. set CodeNum = string(fullmsg.content)
  1226. set PaintingAuthor = file("C:\FSOServer\DAT\ART\" & CodeNum & ".txt").read
  1227. User.sendMessage("PaintingAuthor", PaintingAuthor, 0, FALSE, user.name)
  1228. set ThePainting = file("C:\FSOServer\DAT\ART\" & CodeNum).readvalue()
  1229. User.sendMessage("ViewPainting", ThePainting, 0, FALSE, user.name)
  1230. -------------- ###
  1231. "SavePhoto":
  1232. set MyName = user.name
  1233. set FileNme = random(10000000)
  1234. set TheImage = fullmsg.content
  1235. file("C:\FSOServer\DAT\ART\" & string(FileNme) & ".txt").write(String(MyName))
  1236. file("C:\FSOServer\DAT\ART\" & FileNme).writevalue(TheImage)
  1237. User.sendMessage("OKPaint", "x", 0, FALSE, user.name)
  1238. set nItem = "Photo#" & FileNme
  1239. set ItemNum = 1
  1240. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1241. InvAdd(MyName, MyItemsFile, nItem, ItemNum, user, fullmsg, group, movie)
  1242.  
  1243. "EqNfo":
  1244. set FileDT = string(fullmsg.content)
  1245. set the itemdelimiter = ":"
  1246. set ItemToEquip = item 1 of FileDT
  1247. set ItemIndex = integer(item 2 of FileDT)
  1248. set EquipType = item 3 of FileDT
  1249.  
  1250. set MyName = user.name
  1251. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1252. set the itemdelimiter = "|"
  1253. set MyEquipment = item 2 of MyItemsFile
  1254. set MyEquipped = item 3 of MyItemsFile
  1255. set the itemdelimiter = ":"
  1256.  
  1257. if item ItemIndex of MyEquipment contains ItemToEquip & "-" then
  1258. if EquipType = "Head" then set EquipSlot = 1
  1259. if EquipType = "Body" then set EquipSlot = 2
  1260. if EquipType = "LeftHand" then set EquipSlot = 3
  1261. if EquipType = "RightHand" then set EquipSlot = 4
  1262. if EquipType = "Feet" then set EquipSlot = 5
  1263. if EquipType = "Ring" then set EquipSlot = 6
  1264. if EquipType = "Neck" then set EquipSlot = 7
  1265. if EquipType = "Waist" then set EquipSlot = 8
  1266. if EquipType = "Back" then set EquipSlot = 9
  1267. if EquipType = "Ring2" then set EquipSlot = 10
  1268. if EquipSlot < 1 then exit
  1269. set ItemToSwitch = item EquipSlot of MyEquipped
  1270. put ItemToEquip into item EquipSlot of MyEquipped
  1271.  
  1272. if ItemToSwitch <> "NOTHING" then
  1273. put ItemToSwitch into item ItemIndex of MyEquipment
  1274. else
  1275. put "" into item ItemIndex of MyEquipment
  1276. end if
  1277.  
  1278. set the itemdelimiter = "|"
  1279. put MyEquipped into item 3 of MyItemsFile
  1280.  
  1281. if ItemToSwitch <> "NOTHING" then
  1282. set RemItem = ItemToSwitch
  1283. set AddItem = ItemToEquip
  1284. setItemNum = 1
  1285. set dattt = "You have to remove the current item you're wearing to equip this!"
  1286. User.sendMessage("sqa", dattt, 0, FALSE, user.name)
  1287. exit
  1288. end if
  1289.  
  1290. set nItem = ItemToEquip
  1291. set ItemNum = 1
  1292. InvDel(MyName, MyItemsFile, nItem, ItemNum, User, fullmsg, group, movie)
  1293. end if
  1294.  
  1295.  
  1296. --------------------------------------------------
  1297. --------------------------------------------------
  1298. "KeyUsage":
  1299. set FileDT = string(fullmsg.content)
  1300.  
  1301. set the itemdelimiter = ":"
  1302. set ItemName = item 1 of FileDT
  1303. set InvenNum = integer(item 2 of FileDT)
  1304. set KeyFile = file("C:\FSOServer\DAT\SETTINGS\Keys.txt").read
  1305. if KeyFile contains ItemName & ":Inf" then exit
  1306.  
  1307. set MyName = user.name
  1308. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1309. set the itemdelimiter = "|"
  1310. set MyEquipment = item 2 of MyItemsFile
  1311. set the itemdelimiter = ":"
  1312.  
  1313. set MyItemToDrop = item InvenNum of MyEquipment
  1314.  
  1315. if MyItemToDrop contains ItemName & "-" then
  1316. set nItem = ItemName
  1317. set ItemNum = 1
  1318. InvDel(MyName, MyItemsFile, nItem, ItemNum, User, fullmsg, group, movie)
  1319. end if
  1320.  
  1321.  
  1322. "RemItmInv":
  1323. set FileDT = string(fullmsg.content)
  1324.  
  1325. set the itemdelimiter = ":"
  1326. set ItemName = item 1 of FileDT
  1327. set InvenNum = integer(item 2 of FileDT)
  1328.  
  1329. set MyName = user.name
  1330. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1331. set the itemdelimiter = "|"
  1332. set MyEquipment = item 2 of MyItemsFile
  1333. set the itemdelimiter = ":"
  1334.  
  1335. set MyItemToDrop = item InvenNum of MyEquipment
  1336.  
  1337. if MyItemToDrop contains ItemName & "-" then
  1338. set nItem = ItemName
  1339. set ItemNum = 1
  1340. InvDel(MyName, MyItemsFile, nItem, ItemNum, User, fullmsg, group, movie)
  1341. end if
  1342.  
  1343.  
  1344. --------------------------------------------------
  1345. "DropCrystals":
  1346. set FileDT = string(fullmsg.content)
  1347.  
  1348. set the itemdelimiter = "`"
  1349. set FilName = item 1 of FileDT
  1350. set NewItem = item 2 of FileDT
  1351. set ItDt = item 2 of FileDT
  1352. set ItemList = file("C:\FSOServer\DAT\ITEMS\" & FilName).read
  1353. set the ItemDelimiter = "|"
  1354. if item 20 of ItemList = "" then set OneToPlace = 20
  1355. if item 19 of ItemList = "" then set OneToPlace = 19
  1356. if item 18 of ItemList = "" then set OneToPlace = 18
  1357. if item 17 of ItemList = "" then set OneToPlace = 17
  1358. if item 16 of ItemList = "" then set OneToPlace = 16
  1359. if item 15 of ItemList = "" then set OneToPlace = 15
  1360. if item 14 of ItemList = "" then set OneToPlace = 14
  1361. if item 13 of ItemList = "" then set OneToPlace = 13
  1362. if item 12 of ItemList = "" then set OneToPlace = 12
  1363. if item 11 of ItemList = "" then set OneToPlace = 11
  1364. if item 10 of ItemList = "" then set OneToPlace = 10
  1365. if item 9 of ItemList = "" then set OneToPlace = 9
  1366. if item 8 of ItemList = "" then set OneToPlace = 8
  1367. if item 7 of ItemList = "" then set OneToPlace = 7
  1368. if item 6 of ItemList = "" then set OneToPlace = 6
  1369. if item 5 of ItemList = "" then set OneToPlace = 5
  1370. if item 4 of ItemList = "" then set OneToPlace = 4
  1371. if item 3 of ItemList = "" then set OneToPlace = 3
  1372. if item 2 of ItemList = "" then set OneToPlace = 2
  1373. if item 1 of ItemList = "" then set OneToPlace = 1
  1374.  
  1375. set the itemdelimiter = ":"
  1376. set TheGoods = item 1 of ItDt & ":" & item 2 of ItDt
  1377. set the ItemDelimiter = "|"
  1378. put TheGoods into item OnetoPlace of ItemList
  1379.  
  1380. if ItemList contains "|" then
  1381.  
  1382. else
  1383. exit
  1384. end if
  1385.  
  1386. set MyName = user.name
  1387. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1388. set the itemdelimiter = "|"
  1389. set MyEquipment = item 2 of MyItemsFile
  1390. set the itemdelimiter = ":"
  1391. set CurItemDrop = item 1 of NewItem
  1392. set the itemdelimiter = " "
  1393. set CurItemDropx = item 2 of CurItemDrop & " " & item 3 of CurItemDrop
  1394. set nItem = CurItemDropx
  1395. set ItemNum = integer(item 1 of CurItemDrop)
  1396.  
  1397. set the itemdelimiter = ":"
  1398. set InvenNum = integer(item 3 of FileDT)
  1399. set MyItemToDrop = item InvenNum of MyEquipment
  1400.  
  1401. if MyItemToDrop contains nItem & "-" then
  1402. set the itemdelimiter = "-"
  1403. set CurrentAmount = integer(item 2 of MyItemToDrop)
  1404. if CurrentAmount < ItemNum then
  1405. set TextNfo = "You don't have enough to drop this amount!"
  1406. User.sendMessage("sqa", TextNfo, 0, FALSE, user.name)
  1407. exit
  1408. end if
  1409. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
  1410. InvDel(MyName, MyItemsFile, nItem, ItemNum, User, fullmsg, group, movie)
  1411.  
  1412. XtalLog = file("C:\FSOServer\DAT\DropLogs\XtalDrops\" & MyName & ".txt").read --logging
  1413. Addtolog = "[" & the short date && the short time & "]" && "Dropped " & currentamount && nItem & " on map " & filname
  1414. Newlogfile = XtalLog & RETURN & Addtolog
  1415. file("C:\FSOServer\DAT\DropLogs\XtalDrops\" & MyName & ".txt").write(NewLogFile)
  1416. end if
  1417. -------------------------------------------------- * ** * * * * * * * * ** * * * ** * *
  1418. "RmCr":
  1419. set FileDT = string(fullmsg.content)
  1420. set the itemdelimiter = ":"
  1421. set CrName = item 1 of FileDT
  1422. set Amount = integer(item 2 of FileDT)
  1423. set InvenNum = item 3 of FileDT
  1424. if InvenNum <> "x" then set InvenNum = integer(InvenNum )
  1425. if Amount < 1 then set Amount = 1
  1426.  
  1427. set MyName = user.name
  1428. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1429. set the itemdelimiter = "|"
  1430. set MyEquipment = item 2 of MyItemsFile
  1431. set the itemdelimiter = ":"
  1432.  
  1433. if InvenNum = "x" then
  1434. repeat with xx = 1 to 20
  1435. if item xx of MyEquipment contains CrName & "-" then set InvenNum = xx
  1436. end repeat
  1437. end if
  1438.  
  1439. set MyLine = item InvenNum of MyEquipment
  1440.  
  1441. if MyLine contains CrName & "-" then
  1442. set the itemdelimiter = "-"
  1443. set CurrentAmount = integer(item 2 of MyLine)
  1444.  
  1445. if CurrentAmount < Amount then
  1446. exit
  1447. end if
  1448.  
  1449. set nItem = CrName
  1450. set ItemNum = Amount
  1451. InvDel(MyName, MyItemsFile, nItem, ItemNum, User, fullmsg, group, movie)
  1452. end if
  1453. -------------------------------------------------- * * ** * * * ** * * * * * * * *
  1454.  
  1455. "AddToQueue":
  1456. Global MovementQueue
  1457. set DtToAdd = string(fullmsg.content)
  1458. set the itemdelimiter = ":"
  1459. set WhichMap = item 1 of DtToAdd
  1460. set the itemdelimiter = "`"
  1461.  
  1462. repeat with x = 1 to 7
  1463. if item x of MovementQueue contains WhichMap & ":" then
  1464. set theLine = item x of MovementQueue & DtToAdd & "/"
  1465. put theLine into item x of MovementQueue
  1466. exit
  1467. end if
  1468. end repeat
  1469.  
  1470. if MovementQueue = "" then
  1471. set MovementQueue = DtToAdd & "/"
  1472. exit
  1473. end if
  1474.  
  1475. set MovementQueue = MovementQueue & "`" & DtToAdd & "/"
  1476.  
  1477. "DropAnItemX":
  1478. set FileDT = string(fullmsg.content)
  1479.  
  1480. set the itemdelimiter = "`"
  1481. set FilName = item 1 of FileDT
  1482. set NewItem = item 2 of FileDT
  1483.  
  1484. set ItDt = item 2 of FileDT
  1485. set ItemList = file("C:\FSOServer\DAT\ITEMS\" & FilName).read
  1486. set the ItemDelimiter = "|"
  1487. if item 20 of ItemList = "" then set OneToPlace = 20
  1488. if item 19 of ItemList = "" then set OneToPlace = 19
  1489. if item 18 of ItemList = "" then set OneToPlace = 18
  1490. if item 17 of ItemList = "" then set OneToPlace = 17
  1491. if item 16 of ItemList = "" then set OneToPlace = 16
  1492. if item 15 of ItemList = "" then set OneToPlace = 15
  1493. if item 14 of ItemList = "" then set OneToPlace = 14
  1494. if item 13 of ItemList = "" then set OneToPlace = 13
  1495. if item 12 of ItemList = "" then set OneToPlace = 12
  1496. if item 11 of ItemList = "" then set OneToPlace = 11
  1497. if item 10 of ItemList = "" then set OneToPlace = 10
  1498. if item 9 of ItemList = "" then set OneToPlace = 9
  1499. if item 8 of ItemList = "" then set OneToPlace = 8
  1500. if item 7 of ItemList = "" then set OneToPlace = 7
  1501. if item 6 of ItemList = "" then set OneToPlace = 6
  1502. if item 5 of ItemList = "" then set OneToPlace = 5
  1503. if item 4 of ItemList = "" then set OneToPlace = 4
  1504. if item 3 of ItemList = "" then set OneToPlace = 3
  1505. if item 2 of ItemList = "" then set OneToPlace = 2
  1506. if item 1 of ItemList = "" then set OneToPlace = 1
  1507.  
  1508. set the itemdelimiter = ":"
  1509.  
  1510. if item 1 of ItDt = "Newspaper Kit" then
  1511. put string(user.name) & "'s Newspaper" into item 1 of ItDt
  1512. end if
  1513.  
  1514. set TheGoods = item 1 of ItDt & ":" & item 2 of ItDt
  1515. set the ItemDelimiter = "|"
  1516. put TheGoods into item OnetoPlace of ItemList
  1517.  
  1518. if ItemList contains "|" then
  1519. else
  1520. exit
  1521. end if
  1522.  
  1523. set MyName = user.name
  1524. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1525. set the itemdelimiter = "|"
  1526. set MyEquipment = item 2 of MyItemsFile
  1527. set the itemdelimiter = ":"
  1528. set CurItemDrop = item 1 of NewItem
  1529. set InvenNum = integer(item 3 of FileDT)
  1530. set MyItemToDrop = item InvenNum of MyEquipment
  1531.  
  1532. if MyItemToDrop contains CurItemDrop & "-" then
  1533. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
  1534. set nItem = CurItemDrop
  1535. set ItemNum = 1
  1536. InvDel(MyName, MyItemsFile, nItem, ItemNum, User, fullmsg, group, movie)
  1537.  
  1538. ItemLog = file("C:\FSOServer\DAT\DropLogs\ItemDrops\" & MyName & ".txt").read --logging
  1539. Addtolog = "[" & the short date && the short time & "]" && "dropped the item " & newitem & " on map " & filname
  1540. Newlogfile = ItemLog & RETURN & Addtolog
  1541. file("C:\FSOServer\DAT\DropLogs\ItemDrops\" & MyName & ".txt").write(newlogfile)
  1542. end if
  1543. --------------------------------------------------
  1544. "DropSomeGold":
  1545. set FileDT = string(fullmsg.content)
  1546.  
  1547. set the itemdelimiter = "`"
  1548. set FilName = item 1 of FileDT
  1549. set NewItem = item 2 of FileDT
  1550. set ItDt = item 2 of FileDT
  1551. set ItemList = file("C:\FSOServer\DAT\ITEMS\" & FilName).read
  1552. set the ItemDelimiter = "|"
  1553. if item 20 of ItemList = "" then set OneToPlace = 20
  1554. if item 19 of ItemList = "" then set OneToPlace = 19
  1555. if item 18 of ItemList = "" then set OneToPlace = 18
  1556. if item 17 of ItemList = "" then set OneToPlace = 17
  1557. if item 16 of ItemList = "" then set OneToPlace = 16
  1558. if item 15 of ItemList = "" then set OneToPlace = 15
  1559. if item 14 of ItemList = "" then set OneToPlace = 14
  1560. if item 13 of ItemList = "" then set OneToPlace = 13
  1561. if item 12 of ItemList = "" then set OneToPlace = 12
  1562. if item 11 of ItemList = "" then set OneToPlace = 11
  1563. if item 10 of ItemList = "" then set OneToPlace = 10
  1564. if item 9 of ItemList = "" then set OneToPlace = 9
  1565. if item 8 of ItemList = "" then set OneToPlace = 8
  1566. if item 7 of ItemList = "" then set OneToPlace = 7
  1567. if item 6 of ItemList = "" then set OneToPlace = 6
  1568. if item 5 of ItemList = "" then set OneToPlace = 5
  1569. if item 4 of ItemList = "" then set OneToPlace = 4
  1570. if item 3 of ItemList = "" then set OneToPlace = 3
  1571. if item 2 of ItemList = "" then set OneToPlace = 2
  1572. if item 1 of ItemList = "" then set OneToPlace = 1
  1573.  
  1574. set the itemdelimiter = ":"
  1575. set stuffin = item 1 of ItDt & ":" & item 2 of ItDt
  1576. set the ItemDelimiter = "|"
  1577. put stuffin into item OnetoPlace of ItemList
  1578.  
  1579. if ItemList contains "|" then
  1580. else
  1581. exit
  1582. end if
  1583.  
  1584. set MyName = user.name
  1585. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1586. set the itemdelimiter = "|"
  1587. set MyGold = integer(item 1 of MyItemsFile)
  1588. set the itemdelimiter = ":"
  1589. set CurItemDrop = item 1 of NewItem
  1590. set the itemdelimiter = " "
  1591. set GoldAmount = integer(item 1 of CuritemDrop)
  1592.  
  1593. if MyGold >= GoldAmount then
  1594. set MyGold = MyGold - GoldAmount
  1595. put "" into item InvenNum of MyEquipment
  1596. set the itemdelimiter = "|"
  1597. put MyGold into item 1 of MyItemsFile
  1598. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(MyItemsFile)
  1599. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
  1600. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  1601.  
  1602. GoldLog = file("C:\FSOServer\DAT\DropLogs\GoldDrops\" & MyName & ".txt").read --logging
  1603. Addtolog = "[" & the short date && the short time & "]" & "Dropped " & GoldAmount & " Gold" & " on map " & filname
  1604. Newlogfile = GoldLog & RETURN & Addtolog
  1605. file("C:\FSOServer\DAT\DropLogs\GoldDrops\" & MyName & ".txt").write(newlogfile)
  1606. end if
  1607. ----------------- * * *
  1608.  
  1609. "AddMeToCheaters":
  1610. AddMeToCheaters(me, movie, group, user, fullmsg)
  1611.  
  1612. "ViewCheaters":
  1613. ViewCheaters(me, movie, group, user, fullmsg)
  1614.  
  1615. "SecureTradeInProgress":
  1616. SecureTradeInProgress(me, movie, group, user, fullmsg)
  1617.  
  1618. "b94013":
  1619. DisxItm(me, movie, group, user, fullmsg)
  1620.  
  1621. "x91":
  1622. RunAdd(me, movie, group, user, fullmsg)
  1623.  
  1624. "bookrd":
  1625. ReadBook(me, movie, group, user, fullmsg)
  1626.  
  1627. "bjchk":
  1628. BlackJackGoldCheck(me, movie, group, user, fullmsg)
  1629.  
  1630. "snx38":
  1631. snx38(me, movie, group, user, fullmsg)
  1632.  
  1633. "GiveToPlayer":
  1634. GiveToPlayer(me, movie, group, user, fullmsg)
  1635.  
  1636. "GiveGoldToPlayer":
  1637. GiveGoldToPlayer(me, movie, group, user, fullmsg)
  1638.  
  1639. "QuestGive":
  1640. QuestGive(me, movie, group, user, fullmsg)
  1641.  
  1642. "RefNPC":
  1643. RefNPC(me, movie, group, user, fullmsg)
  1644.  
  1645. "GetSomeFaction":
  1646. User.sendMessage("factnrtrn", FactionPowers, 0, FALSE, user.name)
  1647.  
  1648. "GetSomePirates":
  1649. User.sendMessage("piratertrn", PiratePowers, 0, FALSE, user.name)
  1650.  
  1651. "GetSomeElementals":
  1652. User.sendMessage("elementalrtrn", ElementalPowers, 0, FALSE, user.name)
  1653.  
  1654. "SigilCapture":
  1655. SigilCapture(me, movie, group, user, fullmsg)
  1656.  
  1657. "SigilGrab":
  1658. SigilGrab(me, movie, group, user, fullmsg)
  1659.  
  1660. "ServerRecompile":
  1661. tlist = thread().list
  1662. repeat with t in tlist
  1663. t.forget()
  1664. end repeat
  1665. gDispatcher.loadScriptMap()
  1666. put "Reloading all scripts"
  1667.  
  1668.  
  1669. "GetHelp":
  1670. GetHelp(me, movie, group, user, fullmsg)
  1671.  
  1672. "DoorSwitch":
  1673. set FileDT = string(fullmsg.content)
  1674. set the itemdelimiter = "|"
  1675. set MapName = item 1 of FileDT
  1676. set OldDoor = item 2 of FileDT
  1677. set NewDoor = item 3 of FileDT
  1678.  
  1679. set MapFile = file("C:\FSOServer\DAT\ITEMS\" & MapName).read
  1680.  
  1681. repeat with x = 1 to 20
  1682. if item x of MapFile contains OldDoor then
  1683. set DoorFL = item x of MapFile
  1684. set the itemdelimiter = ":"
  1685. put NewDoor into item 1 of DoorFL
  1686. set the itemdelimiter = "|"
  1687. put DoorFL into item x of MapFile
  1688. end if
  1689. end repeat
  1690.  
  1691. file("C:\FSOServer\DAT\ITEMS\" & MapName).write(MapFile)
  1692. --User.sendMessage("DSwitchRefresh", "x", 0, FALSE, user.name)
  1693. movie.sendMessage("@" & MapName, "refreshmap", "x")
  1694.  
  1695.  
  1696. "DeathMapGo":
  1697. ----------------------------------------
  1698. -- Capture Death for coliseum event
  1699. ----------------------------------------
  1700. set CurrentFighters = file("C:\FSOServer\DAT\Coliseum\CurrentFighters.txt").read
  1701. if ColiseumFlag = 1 and CurrentFighters contains ":" & user.name & ":" then
  1702. ColiseumDeath(User.Name, movie)
  1703. exit
  1704. end if
  1705. ----------------------------------------
  1706. DeathMapGo(me, movie, group, user, fullmsg)
  1707.  
  1708. "SaveHouse":
  1709. SaveHouse(me, movie, group, user, fullmsg)
  1710.  
  1711. "SpCmd":
  1712. ShopCommand(me, movie, group, user, fullmsg)
  1713.  
  1714. "MpTlCng":
  1715. MapTileChange(me, movie, group, user, fullmsg)
  1716.  
  1717. "MpT2Cng":
  1718. BuildLand(me, movie, group, user, fullmsg)
  1719.  
  1720. "MpT3Cng":
  1721. BuyLand(me, movie, group, user, fullmsg)
  1722.  
  1723. "SayTreasure":
  1724. SayTreasure(me, movie, group, user, fullmsg)
  1725.  
  1726. "SayFaction":
  1727. SayFaction(me, movie, group, user, fullmsg)
  1728.  
  1729. "sayPirate":
  1730. SayPirate(me, movie, group, user, fullmsg)
  1731.  
  1732. "sayElemental":
  1733. SayElemental(me, movie, group, user, fullmsg)
  1734.  
  1735. "ElePlatDrop":
  1736. ElePlatDrop(me, movie, group, user, fullmsg)
  1737.  
  1738. "PrtlExt":
  1739. Portal(me, movie, group, user, fullmsg)
  1740.  
  1741. "SayQuest":
  1742. SayQuest(me, movie, group, user, fullmsg)
  1743.  
  1744. "SayNationOath":
  1745. SayNationOath(me, movie, group, user, fullmsg)
  1746.  
  1747. "AbandonNation":
  1748. AbandonNation(me, movie, group, user, fullmsg)
  1749.  
  1750. "HireLuccaMercenaries":
  1751. HireLMercs(me, movie, group, user, fullmsg)
  1752.  
  1753. "CheckLuccaProgress":
  1754. LuccaProgCheck(me, movie, group, user, fullmsg)
  1755.  
  1756. "Mark1Wealth":
  1757. Mark1Wealth(me, movie, group, user, fullmsg)
  1758.  
  1759. "Mark2Wealth":
  1760. Mark2Wealth(me, movie, group, user, fullmsg)
  1761.  
  1762. "treack":
  1763. TreasureCheck(me, movie, group, user, fullmsg)
  1764.  
  1765. "BlkJckExch":
  1766. BlackJackGameOver(me, movie, group, user, fullmsg)
  1767.  
  1768. "STARTASSGAME":
  1769. STARTASSGAME(me, movie, group, user, fullmsg)
  1770.  
  1771. "StartLightningAssGame":
  1772. StartLightningAssGame(me, movie, group, user, fullmsg)
  1773.  
  1774. "ENDASSGAME":
  1775. ENDASSGAME(me, movie, group, user, fullmsg)
  1776.  
  1777. "ASSGAMEADDSCORE":
  1778. AssGameAddScore(me, movie, group, user, fullmsg)
  1779.  
  1780. "ShowAssScores":
  1781. set FilName = "C:\FSOSERVER\DAT\SETTINGS\permassassinsscore.txt"
  1782. set HighScoreList = file(FilName).read
  1783. User.sendMessage("assscrlstx", HighScoreList, 0, FALSE, user.name)
  1784.  
  1785. set FilName = "C:\FSOSERVER\DAT\SETTINGS\assassinsscore.txt"
  1786. set HighScoreList = file(FilName).read
  1787. User.sendMessage("assscrlst", HighScoreList, 0, FALSE, user.name)
  1788.  
  1789. "Sccr":
  1790. set scre = integer(fullmsg.content)
  1791. set MyName = user.name
  1792. CheckHighScore(MyName, scre)
  1793.  
  1794. "ShowScores":
  1795. set FilName = "C:\FSOSERVER\DAT\SETTINGS\highscore.txt"
  1796. set HighScoreList = file(FilName).read
  1797. User.sendMessage("scrlst", HighScoreList, 0, FALSE, user.name)
  1798.  
  1799. "SltMcn":
  1800. set TheCost = integer(fullmsg.content)
  1801.  
  1802. set MyName = user.name
  1803. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  1804. set the itemdelimiter = "|"
  1805. set MyGold = integer(item 1 of MyItemsFile)
  1806. set the itemdelimiter = ":"
  1807.  
  1808. if MyGold >= TheCost then
  1809.  
  1810. User.sendMessage("goslt", TheCost, 0, FALSE, user.name)
  1811. else
  1812. User.sendMessage("noslt", "x", 0, FALSE, user.name)
  1813. end if
  1814. ----------------- * * *
  1815. "sltwn":
  1816. SlotDone(me, movie, group, user, fullMsg)
  1817.  
  1818. --------------------------------------------------
  1819. "DropAnItem":
  1820.  
  1821. set FileDT = string(fullmsg.content)
  1822. set ItsAGo = 1 --Easier
  1823. if FileDT contains "battleship" then set ItsAGo = 1
  1824. if FileDT contains "boat" then set ItsAGo = 1
  1825. if FileDT contains "Crystal" then set ItsAGo = 1
  1826. if FileDT contains "logs" then set ItsAGo = 1
  1827. if FileDT contains "exit" then set ItsAGo = 1
  1828. if FileDT contains "mailbox" then set ItsAGo = 1
  1829. if FileDT contains "trout" then set ItsAGo = 1
  1830. if FileDT contains "catfish" then set ItsAGo = 1
  1831. if FileDT contains "squid" then set ItsAGo = 1
  1832. if FileDT contains "swordfish" then set ItsAGo = 1
  1833. if FileDT contains "fish" then set ItsAGo = 1
  1834. if FileDT contains "Head" then set ItsAGo = 1
  1835. if FileDT contains "Street" then set ItsAGo = 1
  1836. if FileDT contains "Corn" then set ItsAGo = 1
  1837. if FileDT contains "Nectar" then set ItsAGo = 1
  1838. if FileDT contains "Watermelon" then set ItsAGo = 1
  1839. if FileDT contains "Flowers" then set ItsAGo = 1
  1840. if FileDT contains "Roses" then set ItsAGo = 1
  1841. if FileDT contains "Chunk" then set ItsAGo = 1
  1842. if FileDT contains "Airship" then set ItsAGo = 1
  1843. if FileDT contains "Horse" then set ItsAGo = 1
  1844. if FileDT contains "giant octopus" then set ItsAGo = 1
  1845. if FileDT contains "flag wings" then set ItsAGo = 1
  1846. if FileDT contains " berry" then set ItsAGo = 1
  1847. if FileDT contains "wolfsbane" then set ItsAGo = 1
  1848. if FileDT contains "lavender" then set ItsAGo = 1
  1849. if FileDT contains " herb" then set ItsAGo = 1
  1850.  
  1851. if ItsAGo <> 1 then exit
  1852.  
  1853. set the itemdelimiter = "`"
  1854. set FilName = item 1 of FileDT
  1855. set NewItem = item 2 of FileDT
  1856. set ItDt = item 2 of FileDT
  1857. set ItemList = file("C:\FSOServer\DAT\ITEMS\" & FilName).read
  1858. set the ItemDelimiter = "|"
  1859. if item 20 of ItemList = "" then set OneToPlace = 20
  1860. if item 19 of ItemList = "" then set OneToPlace = 19
  1861. if item 18 of ItemList = "" then set OneToPlace = 18
  1862. if item 17 of ItemList = "" then set OneToPlace = 17
  1863. if item 16 of ItemList = "" then set OneToPlace = 16
  1864. if item 15 of ItemList = "" then set OneToPlace = 15
  1865. if item 14 of ItemList = "" then set OneToPlace = 14
  1866. if item 13 of ItemList = "" then set OneToPlace = 13
  1867. if item 12 of ItemList = "" then set OneToPlace = 12
  1868. if item 11 of ItemList = "" then set OneToPlace = 11
  1869. if item 10 of ItemList = "" then set OneToPlace = 10
  1870. if item 9 of ItemList = "" then set OneToPlace = 9
  1871. if item 8 of ItemList = "" then set OneToPlace = 8
  1872. if item 7 of ItemList = "" then set OneToPlace = 7
  1873. if item 6 of ItemList = "" then set OneToPlace = 6
  1874. if item 5 of ItemList = "" then set OneToPlace = 5
  1875. if item 4 of ItemList = "" then set OneToPlace = 4
  1876. if item 3 of ItemList = "" then set OneToPlace = 3
  1877. if item 2 of ItemList = "" then set OneToPlace = 2
  1878. if item 1 of ItemList = "" then set OneToPlace = 1
  1879.  
  1880. set the itemdelimiter = ":"
  1881. set stuffin = item 1 of ItDt & ":" & item 2 of ItDt
  1882. set the ItemDelimiter = "|"
  1883. put stuffin into item OnetoPlace of ItemList
  1884.  
  1885. if ItemList contains "|" then
  1886. else
  1887. exit
  1888. end if
  1889.  
  1890. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
  1891.  
  1892. ItemLog = file("C:\FSOServer\DAT\DropLogs\ItemDrops\" & MyName & ".txt").read --logging
  1893. Addtolog = "[" & the short date && the short time & "]" && "dropped the item " & newitem & " on map " & filname
  1894. Newlogfile = ItemLog & RETURN & Addtolog
  1895. file("C:\FSOServer\DAT\DropLogs\ItemDrops\" & MyName & ".txt").write(newlogfile)
  1896.  
  1897. --------------------------------------------------
  1898. "AdminItemDrop":
  1899. set MyName = string(user.name)
  1900.  
  1901. if GetRank < 4 then
  1902. set FileDT = string(fullmsg.content)
  1903. set the itemdelimiter = "`"
  1904. set FilName = item 1 of FileDT
  1905. set NewItem = item 2 of FileDT
  1906. set ItDt = item 2 of FileDT
  1907. set ItemList = file("C:\FSOServer\DAT\ITEMS\" & FilName).read
  1908. set the ItemDelimiter = "|"
  1909. if item 20 of ItemList = "" then set OneToPlace = 20
  1910. if item 19 of ItemList = "" then set OneToPlace = 19
  1911. if item 18 of ItemList = "" then set OneToPlace = 18
  1912. if item 17 of ItemList = "" then set OneToPlace = 17
  1913. if item 16 of ItemList = "" then set OneToPlace = 16
  1914. if item 15 of ItemList = "" then set OneToPlace = 15
  1915. if item 14 of ItemList = "" then set OneToPlace = 14
  1916. if item 13 of ItemList = "" then set OneToPlace = 13
  1917. if item 12 of ItemList = "" then set OneToPlace = 12
  1918. if item 11 of ItemList = "" then set OneToPlace = 11
  1919. if item 10 of ItemList = "" then set OneToPlace = 10
  1920. if item 9 of ItemList = "" then set OneToPlace = 9
  1921. if item 8 of ItemList = "" then set OneToPlace = 8
  1922. if item 7 of ItemList = "" then set OneToPlace = 7
  1923. if item 6 of ItemList = "" then set OneToPlace = 6
  1924. if item 5 of ItemList = "" then set OneToPlace = 5
  1925. if item 4 of ItemList = "" then set OneToPlace = 4
  1926. if item 3 of ItemList = "" then set OneToPlace = 3
  1927. if item 2 of ItemList = "" then set OneToPlace = 2
  1928. if item 1 of ItemList = "" then set OneToPlace = 1
  1929. set the itemdelimiter = ":"
  1930. set stuffin = item 1 of ItDt & ":" & item 2 of ItDt
  1931. set the ItemDelimiter = "|"
  1932. put stuffin into item OnetoPlace of ItemList
  1933.  
  1934. if ItemList contains "|" then
  1935. else
  1936. exit
  1937. end if
  1938.  
  1939. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
  1940.  
  1941. ItemFileLog = file("C:\FSOServer\DAT\Logs\AdminItemDrops\" & MyName & ".txt").read --logging
  1942. Addtolog = "[" & the short date && the short time & "]" && " dropped " & stuffin & " on map " & FilName
  1943. Newlogfile = ItemFileLog & RETURN & Addtolog
  1944. file("C:\FSOServer\DAT\Logs\AdminItemDrops\" & MyName & ".txt").write(NewLogFile)
  1945. end if
  1946.  
  1947.  
  1948. ----------------------------------------------------------------------------------
  1949. "GrabItems":
  1950. GrabItems(me, movie, group, user, fullmsg)
  1951.  
  1952. "GrabItemsBoatSell":
  1953. set MyName = user.name
  1954. GrabItemsBoatSell(me, movie, group, user, fullmsg, MyName)
  1955.  
  1956. "GrabItemsBoatSink":
  1957. set MyName = user.name
  1958. GrabItemsBoatSink(me, movie, group, user, fullmsg, MyName)
  1959.  
  1960. --------------------------------------------------
  1961. "LoadMail":
  1962. set FilName = "C:\FSOServer\DAT\MAIL\" & fullmsg.content
  1963. if FilName contains "../" or FilName contains "..\" or FilName contains "/.." or FilName contains "\.." then exit
  1964. set MyFile = file(FilName).read
  1965. User.sendMessage("MailList", MyFile, 0, FALSE, user.name)
  1966.  
  1967. "SendMail":
  1968. set FileDT = string(fullmsg.content)
  1969. set the itemdelimiter = "`"
  1970. set FilName = item 1 of FileDT
  1971. set MyMessage = item 2 of FileDT
  1972. set CurMail = "C:\FSOServer\DAT\MAIL\" & FilName
  1973. set CurMail = file(CurMail).read
  1974. set CurMail = CurMail & MyMessage
  1975. if FilName contains "../" or FilName contains "..\" or FilName contains "/.." or FilName contains "\.." then exit
  1976. file("C:\FSOServer\DAT\MAIL\" & FilName).write(CurMail)
  1977.  
  1978. "SaveMailRTG":
  1979. set FileDT = string(fullmsg.content)
  1980. set the itemdelimiter = "`"
  1981. set FilName = item 1 of FileDT
  1982. set FilDat = item 2 of FileDT
  1983. if FilName contains "../" or FilName contains "..\" or FilName contains "/.." or FilName contains "\.." then exit
  1984. file("C:\FSOServer\DAT\MAIL\" & FilName).write(FilDat)
  1985.  
  1986. "SortIP":
  1987. MyIPP = fullmsg.content
  1988. set FilName = "C:\FSOServer\DAT\SETTINGS\Bans.txt"
  1989. set MyFile = file(FilName).read
  1990. if MyFile contains MyIPP then
  1991. User.sendMessage("927417351", "x", 0, FALSE, user.name)
  1992. User.sendMessage("ClientVersion3", "b6.3", 0, FALSE, user.name)
  1993. movie.sendMessage("system.user.delete", "", WarpUser)
  1994. end if
  1995.  
  1996. "AddBan":
  1997. set IPtoBan = string(fullmsg.content)
  1998. set FilName = "C:\FSOServer\DAT\SETTINGS\bans.txt"
  1999. set BannedIPs = file(FilName).read
  2000. set BannedIPs = BannedIPs & "*" & IPtoBan & "*"
  2001. file("C:\FSOServer\DAT\SETTINGS\bans.txt").write(BannedIPs)
  2002.  
  2003. "AddMABan":
  2004. set IPtoBan = string(fullmsg.content)
  2005. set FilName = "C:\FSOServer\DAT\SETTINGS\MABans.txt"
  2006. set BannedIPs = file(FilName).read
  2007. set BannedIPs = BannedIPs & "*" & IPtoBan & "*"
  2008. file("C:\FSOServer\DAT\SETTINGS\MABans.txt").write(BannedIPs)
  2009.  
  2010. "RemoveBan":
  2011. set IPtoRemove = string(fullmsg.content)
  2012. set FilName = "C:\FSOServer\DAT\SETTINGS\bans.txt"
  2013. set BannedIPs = file(FilName).read
  2014. set the itemdelimiter = "*"
  2015. repeat with x = 1 to 500
  2016. if item x of BannedIPs = IPtoRemove then put "" into item x of BannedIPs
  2017. end repeat
  2018. file("C:\FSOServer\DAT\SETTINGS\bans.txt").write(BannedIPs)
  2019.  
  2020. "LoadMap":
  2021.  
  2022. --------------------------------------------------
  2023. -- Safe your map !!! important for all scripts !!!
  2024. -- (This saves the mapname at every mapload)
  2025. --------------------------------------------------
  2026. set the itemdelimiter = "."
  2027. CurrentMap = item 1 of string(fullmsg.content)
  2028. --------------------------------------------------
  2029. -- Coliseum Trigger LoadMap
  2030. --------------------------------------------------
  2031. set CurrentFighters = file("C:\FSOServer\DAT\Coliseum\CurrentFighters.txt").read
  2032. if CurrentFighters contains ":" & user.name & ":" then
  2033. MapSentToFighters(me, movie, group, user, fullMsg)
  2034. exit
  2035. end if
  2036.  
  2037.  
  2038. set TheName = fullmsg.content
  2039. set FilName = "C:\FSOServer\DAT\MAPS\"
  2040. FilName = FilName & fullmsg.content
  2041. set MyFile = file(FilName).read
  2042. set FilxName = "C:\FSOServer\DAT\MOBS\"
  2043. FilxName = FilxName & fullmsg.content
  2044. set MyxFile = file(FilxName).read
  2045. set the itemdelimiter = "."
  2046. set Mapp = item 1 of TheName & "i.txt"
  2047. set FilName = "C:\FSOServer\DAT\ITEMS\"
  2048. FilName = FilName & Mapp
  2049. set ItemFile = file(FilName).read
  2050. set TheFiles = MyFile & "^" & ItemFile & "^" & MyxFile --& "^"
  2051. user.sendMessage("GetMap", TheFiles, 0, FALSE, fullmsg.senderID)--
  2052. SendNPCs (MyxFile, me, movie, group, user, fullMsg, TheFiles)
  2053.  
  2054. "ReloadSomeMobs":
  2055. set FilxName = "C:\FSOServer\DAT\MOBS\"
  2056. FilxName = FilxName & fullmsg.content
  2057. set MyxFile = file(FilxName).read
  2058. user.sendMessage("ReloadTheMobsFromVehicle", MyxFile, 0, FALSE, fullmsg.senderID)--
  2059. SendNPCs (MyxFile, me, movie, group, user, fullMsg, TheFiles)
  2060.  
  2061.  
  2062. "LoadItems":
  2063. set FilName = "C:\FSOServer\DAT\ITEMS\"
  2064. FilName = FilName & fullmsg.content
  2065. set MyFile = file(FilName).read
  2066. User.sendMessage("GetItems", MyFile, 0, FALSE, user.name)
  2067.  
  2068. "LoadItemsW":
  2069. set FilName = "C:\FSOServer\DAT\ITEMS\"
  2070. FilName = FilName & fullmsg.content
  2071. set MyFile = file(FilName).read
  2072. User.sendMessage("GetItemsW", MyFile, 0, FALSE, user.name)
  2073.  
  2074. "LoadBoard1RTG":
  2075. set FilName = "C:\FSOServer\DAT\BOARDS\"
  2076. FilName = FilName & fullmsg.content
  2077. set MyFile = file(FilName).read
  2078. User.sendMessage("GetBoards", MyFile, 0, FALSE, user.name)
  2079.  
  2080. "LoadMapX":
  2081. set FilName = "C:\FSOServer\DAT\MAPS\"
  2082. FilName = FilName & fullmsg.content
  2083. set MyFile = file(FilName).read
  2084. User.sendMessage("GetMapX", MyFile, 0, FALSE, user.name)
  2085.  
  2086. "LoadMobsX":
  2087. set FilName = "C:\FSOServer\DAT\MOBS\"
  2088. FilName = FilName & fullmsg.content
  2089. set MyFile = file(FilName).read
  2090. User.sendMessage("GetMobsX", MyFile, 0, FALSE, user.name)
  2091.  
  2092. "LoadItemsX":
  2093. set FilName = "C:\FSOServer\DAT\ITEMS\"
  2094. FilName = FilName & fullmsg.content
  2095. set MyFile = file(FilName).read
  2096. User.sendMessage("GetItemsX", MyFile, 0, FALSE, user.name)
  2097. --------------------------------------------------
  2098. "SaveMap":
  2099. set MyName = string(user.name)
  2100. set LogFile = file("C:\FSOServer\DAT\Logs\MapSaves\" & MyName & ".txt").read
  2101.  
  2102. set FileDT = string(fullmsg.content)
  2103. set the itemdelimiter = "`"
  2104. set FilName = item 1 of FileDT
  2105. set FilDat = item 2 of FileDT
  2106.  
  2107. if LogFile = VOID or LogFile = "" then
  2108. file("C:\FSOServer\DAT\Logs\MapSaves\" & MyName & ".txt").write(FilName)
  2109. else
  2110. file("C:\FSOServer\DAT\Logs\MapSaves\" & MyName & ".txt").write(LogFile & RETURN & FilName)
  2111. end if
  2112.  
  2113. file("C:\FSOServer\DAT\MAPS\" & FilName).write(FilDat)
  2114. User.sendMessage("MapIsCreated", "x", 0, FALSE, user.name)
  2115. --------------------------------------------------
  2116.  
  2117. "SveMb":
  2118. set FileDT = string(fullmsg.content)
  2119. set the itemdelimiter = "`"
  2120. set FilName = item 1 of FileDT
  2121. set FilDat = item 2 of FileDT
  2122. file("C:\FSOServer\DAT\MOBS\" & FilName).write(FilDat)
  2123.  
  2124.  
  2125. -------------------------------------------------- ***** VAULT!!!!!
  2126. "DropInVault":
  2127. set FileDT = string(fullmsg.content)
  2128. set MyName = user.name
  2129. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2130. set the itemdelimiter = "|"
  2131. set MyInv = item 2 of MyItemsFile
  2132.  
  2133. set the itemdelimiter = "`"
  2134. set VaultName = item 1 of FileDT
  2135. set ItemToAdd = item 2 of FileDT
  2136. set InvenNum = integer(item 3 of FileDT)
  2137. set the itemdelimiter = ":"
  2138.  
  2139. set VaultIsFull = FALSE
  2140.  
  2141. set FilName = "C:\FSOServer\DAT\VAULTS\" & VaultName
  2142. if VaultName contains "-DV" then set FilName = "C:\FSOServer\DAT\DeluxeVAULTS\" & VaultName
  2143. set VaultInfo = file(FilName).read
  2144. if VaultInfo = VOID then set VaultInfo = ""
  2145.  
  2146. set MaxAmnt = 15
  2147. if VaultName contains "Crate" then set MaxAmnt = 3
  2148. if VaultName contains "Vault" then set MaxAmnt = 15
  2149. if VaultName contains "Chest" then set MaxAmnt = 15
  2150. if VaultName contains "Cabinet" then set MaxAmnt = 10
  2151. if VaultName contains "Wind Cabinet" then set MaxAmnt = 20
  2152. if VaultName contains "Dark Cabinet" then set MaxAmnt = 40
  2153. if VaultName contains "Silver Thread Bag" then set MaxAmnt = 10
  2154. if VaultName contains "-DV" then set MaxAmnt = 50
  2155.  
  2156. if line MaxAmnt of VaultInfo <> "" then set VaultIsFull = TRUE
  2157.  
  2158. if VaultIsFull = TRUE then
  2159. User.sendMessage("sqa", "This is too full to store anything else!", 0, FALSE, user.name)
  2160. exit
  2161. end if
  2162.  
  2163. if VaultName contains "-DV" then
  2164. set FilName = "C:\FSOServer\DAT\DeluxeVaults.txt"
  2165. set MyFile = file(FilName).read
  2166.  
  2167. set BelzDat = "=" & string(user.name) & "="
  2168. if MyFile contains BelzDat then
  2169. else
  2170. User.sendMessage("sqa", "You do not have access to Deluxe Vaults!", 0, FALSE, user.name)
  2171. exit
  2172. end if
  2173. end if
  2174.  
  2175. if item InvenNum of MyInv contains ItemToAdd & "-" then
  2176. set ItsAGo = 1
  2177. end if
  2178.  
  2179. if ItsAGo <> 1 then exit
  2180.  
  2181. set nItem = ItemToAdd
  2182. set ItemNum = 1
  2183. InvDel(MyName, MyItemsFile, nItem, ItemNum, user, fullmsg, group, movie)
  2184.  
  2185. set VaultInfo = VaultInfo & ItemToAdd & RETURN
  2186. if VaultInfo contains "|" then exit
  2187. if VaultName contains "-DV" then
  2188. file("C:\FSOServer\DAT\DeluxeVAULTS\" & VaultName).write(VaultInfo)
  2189. else
  2190. file("C:\FSOServer\DAT\VAULTS\" & VaultName).write(VaultInfo)
  2191. end if
  2192.  
  2193. if VaultName contains "Cauldron" then
  2194. DidWeBooyaSomeWitchcraft(MyName, user, fullmsg, group, movie, VaultName, VaultInfo)
  2195. end if
  2196.  
  2197. "GetChest":
  2198. set FiletoGet = string(fullmsg.content)
  2199. set FilName = "C:\FSOServer\DAT\VAULTS\" & FiletoGet
  2200. set VaultInfo = file(FilName).read
  2201. User.sendMessage("VaultReturned", VaultInfo, 0, FALSE, user.name)
  2202.  
  2203. "GetDeluxeChest":
  2204. set FilName = "C:\FSOServer\DAT\DeluxeVaults.txt"
  2205. set MyFile = file(FilName).read
  2206.  
  2207. set BelzDat = "=" & string(user.name) & "="
  2208. if MyFile contains BelzDat then
  2209. else
  2210. User.sendMessage("sqa", "You do not have access to the Deluxe Vault!", 0, FALSE, user.name)
  2211. User.sendMessage("DVUnfreeze", "Don't Matter", 0, FALSE, user.name)
  2212. exit
  2213. end if
  2214. set FiletoGet = string(fullmsg.content)
  2215. set FilName = "C:\FSOServer\DAT\DeluxeVAULTS\" & FiletoGet
  2216. set VaultInfo = file(FilName).read
  2217. User.sendMessage("VaultReturned2", VaultInfo, 0, FALSE, user.name)
  2218.  
  2219. "GetBalance":
  2220. set FiletoGet = string(fullmsg.content)
  2221. set FilName = "C:\FSOServer\DAT\BANK\" & FiletoGet
  2222. set Bankk = file(FilName).read
  2223. if Bankk = "" then set Bankk = "0"
  2224. if Bankk = VOID then set Bankk = "0"
  2225. file("C:\FSOServer\DAT\BANK\" & FiletoGet).write(Bankk)
  2226. User.sendMessage("BalanceReturned", Bankk, 0, FALSE, user.name)
  2227.  
  2228. "Deposit":
  2229. set FileDT = string(fullmsg.content)
  2230.  
  2231. set MyName = user.name
  2232. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2233. set the itemdelimiter = "|"
  2234. set MyGold = integer(item 1 of MyItemsFile)
  2235.  
  2236. set the itemdelimiter = "`"
  2237. set BankName = item 1 of FileDT
  2238. set DepAmount = integer(item 2 of FileDT)
  2239. set FilName = "C:\FSOServer\DAT\BANK\" & BankName
  2240. set Bankk = file(FilName).read
  2241. set nBankk = integer(Bankk) + DepAmount
  2242. set MyGold = MyGold - DepAmount
  2243.  
  2244. if MyGold < 0 then
  2245. exit
  2246. end if
  2247.  
  2248. set the itemdelimiter = "|"
  2249. put MyGold into item 1 of MyItemsFile
  2250. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(MyItemsFile)
  2251.  
  2252. file("C:\FSOServer\DAT\BANK\" & BankName).write(String(nBankk))
  2253. User.sendMessage("DepositDone", nBankk, 0, FALSE, user.name)
  2254. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  2255.  
  2256. "Withdraw":
  2257. set FileDT = string(fullmsg.content)
  2258.  
  2259. set MyName = user.name
  2260. set OtherName = string(fullmsg.SenderID)
  2261. if OtherName <> MyName then exit
  2262.  
  2263. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2264. set the itemdelimiter = "|"
  2265. set MyGold = integer(item 1 of MyItemsFile)
  2266.  
  2267. set the itemdelimiter = "`"
  2268. set BankName = item 1 of FileDT
  2269. set DepAmount = integer(item 2 of FileDT)
  2270. set FilName = "C:\FSOServer\DAT\BANK\" & BankName
  2271. set Bankk = file(FilName).read
  2272. set nBankk = integer(Bankk) - DepAmount
  2273. set MyGold = MyGold + DepAmount
  2274.  
  2275. if nBankk < 0 then
  2276. exit
  2277. end if
  2278.  
  2279. set the itemdelimiter = "|"
  2280. put MyGold into item 1 of MyItemsFile
  2281. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(MyItemsFile)
  2282.  
  2283. file("C:\FSOServer\DAT\BANK\" & BankName).write(String(nBankk))
  2284. User.sendMessage("DepositDone", nBankk, 0, FALSE, user.name)
  2285. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  2286.  
  2287. "itremovv":
  2288. set ItemToAdd = string(fullmsg.content)
  2289. set CanIGoOK = FALSE
  2290. if ItemToAdd contains "Icy" then set CanIGoOK = TRUE
  2291. if ItemToAdd contains " arrows" then set CanIGoOK = TRUE
  2292. if ItemToAdd contains "Freezing" then set CanIGoOK = TRUE
  2293. if ItemToAdd contains "Fiery" then set CanIGoOK = TRUE
  2294. if ItemToAdd contains "defender " then set CanIGoOK = TRUE
  2295. if ItemToAdd contains "sizzling" then set CanIGoOK = TRUE
  2296. if ItemToAdd contains "Breezy" then set CanIGoOK = TRUE
  2297. if ItemToAdd contains "rocky" then set CanIGoOK = TRUE
  2298. if ItemToAdd contains "shade" then set CanIGoOK = TRUE
  2299. if ItemToAdd contains "glowing" then set CanIGoOK = TRUE
  2300. if ItemToAdd contains "vicious" then set CanIGoOK = TRUE
  2301. if ItemToAdd contains "Crate" then set CanIGoOK = TRUE
  2302. if ItemToAdd contains "Cabinet" then set CanIGoOK = TRUE
  2303. if ItemToAdd contains "Potion" then set CanIGoOK = TRUE
  2304. if ItemToAdd contains "Long Sword" then set CanIGoOK = TRUE
  2305. if ItemToAdd = "Apple" then set CanIGoOK = TRUE
  2306. if ItemToAdd = "Steel Scimitar" then set CanIGoOK = TRUE
  2307. if ItemToAdd = "Chain Helm" then set CanIGoOK = TRUE
  2308. if ItemToAdd = "Chain Armor" then set CanIGoOK = TRUE
  2309. if ItemToAdd = "Steel Shield" then set CanIGoOK = TRUE
  2310. if ItemToAdd = "Pie" then set CanIGoOK = TRUE
  2311. if ItemToAdd = "Corn" then set CanIGoOK = TRUE
  2312. if ItemToAdd = "Fish" then set CanIGoOK = TRUE
  2313. if ItemToAdd = "Ale" then set CanIGoOK = TRUE
  2314. if ItemToAdd = "Pig" then set CanIGoOK = TRUE
  2315. if ItemToAdd = "Chair" then set CanIGoOK = TRUE
  2316. if ItemToAdd = "Cow" then set CanIGoOK = TRUE
  2317. if ItemToAdd = "Table" then set CanIGoOK = TRUE
  2318. if ItemToAdd = "Stool" then set CanIGoOK = TRUE
  2319. if ItemToAdd = "Knife" then set CanIGoOK = TRUE
  2320. if ItemToAdd = "Dagger" then set CanIGoOK = TRUE
  2321. if ItemToAdd = "Small Shield" then set CanIGoOK = TRUE
  2322. if ItemToAdd = "Katana" then set CanIGoOK = TRUE
  2323. if ItemToAdd = "Short Sword" then set CanIGoOK = TRUE
  2324. if ItemToAdd = "Plate Boots" then set CanIGoOK = TRUE
  2325. if ItemToAdd = "Knight Shield" then set CanIGoOK = TRUE
  2326. if ItemToAdd = "Steel Shield" then set CanIGoOK = TRUE
  2327. if ItemToAdd = "Gauntlets" then set CanIGoOK = TRUE
  2328. if ItemToAdd = "Plate Helm" then set CanIGoOK = TRUE
  2329. if ItemToAdd = "Plate Armor" then set CanIGoOK = TRUE
  2330. if ItemToAdd contains " elixir" then set CanIGoOK = TRUE
  2331. if ItemToAdd contains "violence pill" then set CanIGoOK = TRUE
  2332. if ItemToAdd contains "iron bomb" then set CanIGoOK = TRUE
  2333. if ItemToAdd contains "steel bomb" then set CanIGoOK = TRUE
  2334. if ItemToAdd contains "star bomb" then set CanIGoOK = TRUE
  2335. if CanIGoOK = FALSE then exit
  2336. set FileDT = string(fullmsg.content)
  2337. set MyName = user.name
  2338. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2339. set the itemdelimiter = "|"
  2340. set MyInv = item 2 of MyItemsFile
  2341.  
  2342. if ItemToAdd contains " Crystals" then
  2343. set the itemdelimiter = " "
  2344. set ItemNum = integer(item 1 of ItemToAdd)
  2345. set ItemToAdd = item 2 of ItemToAdd & " " & item 3 of ItemToAdd
  2346. end if
  2347. if ItemToAdd contains " bomb" then
  2348. set the itemdelimiter = " "
  2349. if ItemToAdd.item.count = 3 then
  2350. set ItemNum = integer(item 1 of ItemToAdd)
  2351. set ItemToAdd = item 2 of ItemToAdd & " " & item 3 of ItemToAdd
  2352. end if
  2353. end if
  2354. if ItemToAdd contains "wooden arrows" or ItemToAdd contains "reinforced wooden arrows" or ItemToAdd contains "superior wooden arrows" or ItemToAdd contains "reinforced superior wooden arrows" then
  2355. set the itemdelimiter = " "
  2356. set ItemNum = integer(item 1 of ItemToAdd)
  2357. set ItemToAdd2 = ItemToAdd
  2358. delete item 1 of ItemToAdd2
  2359. if char 1 of ItemToAdd2 = " " then delete char 1 of ItemToAdd2
  2360. set ItemToAdd = ItemToAdd2
  2361. end if
  2362.  
  2363.  
  2364. set the itemdelimiter = ":"
  2365.  
  2366. repeat with xxx = 1 to 20
  2367. if item xxx of MyInv = "" then set ItsAGo = 1
  2368. end repeat
  2369.  
  2370. if MyInv contains ItemToAdd & "-" then set ItsAGo = 1
  2371.  
  2372. if ItsAGo = 0 then exit
  2373. if (ItemToAdd contains " bomb" or ItemToAdd contains "wooden arrows") and ItemNum > 1 then
  2374. else
  2375. set ItemNum = 1
  2376. end if
  2377.  
  2378. set nItem = ItemToAdd
  2379. InvAdd(MyName, MyItemsFile, nItem, ItemNum, user, fullmsg, group, movie)
  2380.  
  2381. "GetFromVault":
  2382. set FileDT = string(fullmsg.content)
  2383. set the itemdelimiter = "`"
  2384. set VaultName = item 1 of FileDT
  2385. set ItemToAdd = item 2 of FileDT
  2386. set FilName = "C:\FSOServer\DAT\VAULTS\" & VaultName
  2387. set VaultInfo = file(FilName).read
  2388.  
  2389. set the itemdelimiter = RETURN
  2390. set NewVault = ""
  2391.  
  2392. repeat with x = 1 to 200
  2393. if item x of VaultInfo <> "" then set NewVault = NewVault & item x of VaultInfo & RETURN
  2394. end repeat
  2395.  
  2396. repeat with x = 1 to 200
  2397. if line x of NewVault = ItemToAdd then
  2398. ----------------------
  2399. set FileDT = string(fullmsg.content)
  2400. set MyName = user.name
  2401. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2402. set the itemdelimiter = "|"
  2403. set MyInv = item 2 of MyItemsFile
  2404.  
  2405. if ItemToAdd contains " Crystals" then
  2406. set the itemdelimiter = " "
  2407. set ItemNum = integer(item 1 of ItemName)
  2408. set ItemToAdd = item 2 of ItemToAdd & " " & item 3 of ItemToAdd
  2409. end if
  2410.  
  2411. set the itemdelimiter = ":"
  2412.  
  2413. repeat with xxx = 1 to 20
  2414. if item xxx of MyInv = "" then set ItsAGo = 1
  2415. end repeat
  2416.  
  2417. if MyInv contains ItemToAdd & "-" then set ItsAGo = 1
  2418.  
  2419. if ItsAGo = 0 then exit
  2420. set ItemNum = 1
  2421.  
  2422. set nItem = ItemToAdd
  2423. InvAdd(MyName, MyItemsFile, nItem, ItemNum, user, fullmsg, group, movie)
  2424.  
  2425. ----------------------
  2426. delete line x of NewVault
  2427. set ItemExists = 1
  2428. exit repeat
  2429. end if
  2430. end repeat
  2431.  
  2432. if NewVault contains "|" then exit
  2433. file("C:\FSOServer\DAT\VAULTS\" & VaultName).write(NewVault)
  2434.  
  2435.  
  2436. "GetFromDeluxeVault":
  2437. set FileDT = string(fullmsg.content)
  2438. set the itemdelimiter = "`"
  2439. set VaultName = item 1 of FileDT
  2440. set ItemToAdd = item 2 of FileDT
  2441. set VaultName = user.name & "-DV.txt"
  2442. set FilName = "C:\FSOServer\DAT\DeluxeVaults\" & VaultName
  2443. set VaultInfo = file(FilName).read
  2444.  
  2445. set the itemdelimiter = RETURN
  2446. set NewVault = ""
  2447.  
  2448. repeat with x = 1 to 200
  2449. if item x of VaultInfo <> "" then set NewVault = NewVault & item x of VaultInfo & RETURN
  2450. end repeat
  2451.  
  2452. repeat with x = 1 to 200
  2453. if line x of NewVault = ItemToAdd then
  2454. ----------------------
  2455. set FileDT = string(fullmsg.content)
  2456. set MyName = user.name
  2457. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2458. set the itemdelimiter = "|"
  2459. set MyInv = item 2 of MyItemsFile
  2460.  
  2461. if ItemToAdd contains " Crystals" then
  2462. set the itemdelimiter = " "
  2463. set ItemNum = integer(item 1 of ItemName)
  2464. set ItemToAdd = item 2 of ItemToAdd & " " & item 3 of ItemToAdd
  2465. end if
  2466.  
  2467. set the itemdelimiter = ":"
  2468.  
  2469. repeat with xxx = 1 to 20
  2470. if item xxx of MyInv = "" then set ItsAGo = 1
  2471. end repeat
  2472.  
  2473. if MyInv contains ItemToAdd & "-" then set ItsAGo = 1
  2474.  
  2475. if ItsAGo = 0 then exit
  2476. set ItemNum = 1
  2477.  
  2478. set nItem = ItemToAdd
  2479. InvAdd(MyName, MyItemsFile, nItem, ItemNum, user, fullmsg, group, movie)
  2480.  
  2481. ----------------------
  2482. delete line x of NewVault
  2483. set ItemExists = 1
  2484. exit repeat
  2485. end if
  2486. end repeat
  2487.  
  2488. if NewVault contains "|" then exit
  2489. file("C:\FSOServer\DAT\DeluxeVAULTS\" & VaultName).write(NewVault)
  2490.  
  2491.  
  2492.  
  2493. "SaveBoard1":
  2494. set FileDT = string(fullmsg.content)
  2495. set the itemdelimiter = "`"
  2496. set FilName = item 1 of FileDT
  2497. set FilDat = item 2 of FileDT
  2498. file("C:\FSOServer\DAT\BOARDS\" & FilName).write(FilDat)
  2499.  
  2500. "LoadNews":
  2501. set FilName = "C:\FSOServer\DAT\SETTINGS\News.txt"
  2502. set MyFile = file(FilName).read
  2503. User.sendMessage("News", MyFile, 0, FALSE, user.name)
  2504. --News Additions--
  2505. set mycharacter = string(user.name)
  2506. if mycharacter contains "newchar" then exit
  2507. set mycharacterfile = file("c:/FSOServer/Dat/Char/" & mycharacter & ".txt").read
  2508. set the itemdelimiter = "/"
  2509. set FactionPart = item 5 of mycharacterfile
  2510. set the itemdelimiter = ":"
  2511. set FactType = item 1 of string(FactionPart)
  2512. set MyTime = item 2 of FactionPart / 1800
  2513. case FactType of
  2514. "0":
  2515. set FactType = "None"
  2516. "1":
  2517. set FactType = "Mage"
  2518. "2":
  2519. set FactType = "Warrior"
  2520. "3":
  2521. set FactType = "Adventurer"
  2522. end case
  2523. set thefactionmessage = "You are in the " & FactType & "'s faction with " & integer(MyTime) & " minute(s) remaining."
  2524. if FactType = "None" then set thefactionmessage = "You are not in a faction."
  2525. set mycharacterfile = file("c:/FSOServer/Dat/Char/" & mycharacter & ".txt").read
  2526. set the itemdelimiter = ":"
  2527. set Level = item 7 of string(mycharacterfile)
  2528. set EXP = item 12 of string(mycharacterfile)
  2529. set EXPNeeded = item 13 of string(mycharacterfile)
  2530. set theexpmessage = "Your level is " & QUOTE & Level & QUOTE & " and experience is: " & integer(EXP) & "/" & integer(EXPNeeded) & "."
  2531. set Mybank = file("C:/FSOServer/Dat/Bank/" & mycharacter & ".txt").read
  2532. if mybank = "" then set mybank = "0"
  2533. if mybank = void then set mybank = "0"
  2534. set thebankmessage = "The Bank says you have " & QUOTE & mybank & QUOTE & " gold."
  2535. user.sendmessage("baalzamoncast", theexpmessage & " " & thefactionmessage & " " & thebankmessage, 0, FALSE, user.name)
  2536.  
  2537. "LoadQuests":
  2538. set FilName = "C:\FSOServer\DAT\SETTINGS\CurQuest.txt"
  2539. set MyFile = file(FilName).read
  2540. User.sendMessage("Quests", MyFile, 0, FALSE, user.name)
  2541.  
  2542. "ViewChar":
  2543. set CharName = string(fullmsg.content)
  2544. set FilName = "C:\FSOServer\DAT\CHAR\" & CharName & ".txt"
  2545. set MyFile = file(FilName).read
  2546. User.sendMessage("ViewChar", MyFile, 0, FALSE, user.name)
  2547.  
  2548. "QuestComplete":
  2549. set FileDT = string(fullmsg.content)
  2550. file("C:\FSOServer\DAT\SETTINGS\CurQuest.txt").write(FileDT)
  2551.  
  2552. "SaveTheNPC":
  2553. set MyName = string(user.name)
  2554.  
  2555. if GetRank < 4 then
  2556. set FileDT = string(fullmsg.content)
  2557. set the itemdelimiter = "`"
  2558. set FilName = item 1 of FileDT
  2559. set FilDat = item 2 of FileDT
  2560. file("C:\FSOServer\DAT\NPC\" & FilName).write(FilDat)
  2561. User.sendMessage("NPCIsCreated", "x", 0, FALSE, user.name)
  2562.  
  2563. NPCFileLog = file("C:\FSOServer\DAT\Logs\NPCSaves\" & MyName & ".txt").read --logging
  2564. Addtolog = "[" & the short date && the short time & "]" && "editted " & FilName
  2565. Newlogfile = NPCFileLog & RETURN & Addtolog
  2566. file("C:\FSOServer\DAT\Logs\NPCSaves\" & MyName & ".txt").write(NewLogFile)
  2567. else
  2568. User.sendMessage("kick", "x", 0, FALSE, user.name)
  2569. end if
  2570.  
  2571. "LoadTheNPC":
  2572. set CharName = string(fullmsg.content)
  2573. set FilName = "C:\FSOServer\DAT\NPC\" & CharName & ".txt"
  2574. set MyFile = file(FilName).read
  2575. User.sendMessage("NPCLoaded", MyFile, 0, FALSE, user.name)
  2576.  
  2577.  
  2578. "LoadSystem":
  2579. set FilName = "C:\FSOServer\DAT\SETTINGS\System.txt"
  2580. set MyFile = file(FilName).read
  2581. User.sendMessage("LoadSystem", MyFile, 0, FALSE, user.name)
  2582.  
  2583. "LoadNPCSellList":
  2584. set CharName = string(fullmsg.content)
  2585. set FilName = "C:\FSOServer\DAT\NPC\" & CharName
  2586. set LList = file(FilName).read
  2587. set BuyItems = ""
  2588. set BuyItemPrices = ""
  2589.  
  2590. repeat with x = 1 to 60
  2591. if line x of LList contains "SEL|" then
  2592. set the itemdelimiter = "|"
  2593. set TheGoods = item 2 of line x of LList
  2594. set the itemdelimiter = ":"
  2595. set ItemName = item 1 of TheGoods
  2596. set ItemPrice = item 2 of TheGoods
  2597. set BuyItems = BuyItems & ItemName & RETURN
  2598. set BuyItemPrices = BuyItemPrices & ItemPrice & RETURN
  2599. end if
  2600. end repeat
  2601. set TheList = BuyItems & ":" & BuyItemPrices
  2602. User.sendMessage("NPCSellList", TheList, 0, FALSE, user.name)
  2603.  
  2604. "LoadNPCTicketList":
  2605. set CharName = string(fullmsg.content)
  2606. set FilName = "C:\FSOServer\DAT\NPC\" & CharName
  2607. set LList = file(FilName).read
  2608. set BuyItems = ""
  2609. set BuyItemPrices = ""
  2610.  
  2611. repeat with x = 1 to 30
  2612. if line x of LList contains "SEL|" then
  2613. set the itemdelimiter = "|"
  2614. set TheGoods = item 2 of line x of LList
  2615. set the itemdelimiter = ":"
  2616. set ItemName = item 1 of TheGoods
  2617. set ItemPrice = item 2 of TheGoods
  2618. set BuyItems = BuyItems & ItemName & RETURN
  2619. set BuyItemPrices = BuyItemPrices & ItemPrice & RETURN
  2620. end if
  2621. end repeat
  2622. set TheList = BuyItems & ":" & BuyItemPrices
  2623. User.sendMessage("NPCTicketList", TheList, 0, FALSE, user.name)
  2624.  
  2625. "LoadNPCTPList":
  2626. set CharName = string(fullmsg.content)
  2627. set FilName = "C:\FSOServer\DAT\NPC\" & CharName
  2628. set LList = file(FilName).read
  2629. set BuyItems = ""
  2630. set BuyItemPrices = ""
  2631.  
  2632. repeat with x = 1 to 30
  2633. if line x of LList contains "SEL|" then
  2634. set the itemdelimiter = "|"
  2635. set TheGoods = item 2 of line x of LList
  2636. set the itemdelimiter = ":"
  2637. set ItemName = item 1 of TheGoods
  2638. set ItemPrice = item 2 of TheGoods
  2639. set BuyItems = BuyItems & ItemName & RETURN
  2640. set BuyItemPrices = BuyItemPrices & ItemPrice & RETURN
  2641. end if
  2642. end repeat
  2643. set TheList = BuyItems & ":" & BuyItemPrices
  2644. User.sendMessage("NPCTPList", TheList, 0, FALSE, user.name)
  2645.  
  2646. "CompletedSiteVoting":
  2647. set MyName = string(user.name)
  2648. set VoteFile = file("C:\FSOServer\DAT\VoteSites\" & MyName & ".txt").read
  2649. if VoteFile = the short date then
  2650. User.sendMessage("sqa", "You have already received your site voting bonus for the day!", 0, FALSE, user.name)
  2651. else
  2652. User.sendMessage("sqa", "Thank you for voting for the game! Votes help us climb the advertisment sites, and can help get us more players!", 0, FALSE, user.name)
  2653. file("C:\FSOServer\DAT\VoteSites\" & MyName & ".txt").write(the short date)
  2654. User.sendMessage("GetTicketsYo", "3", 0, FALSE, user.name)
  2655. end if
  2656.  
  2657.  
  2658.  
  2659. ---------------------------------------------------------------------------------------------------
  2660. "LoadNPCBuyList":
  2661. set CharName = string(fullmsg.content)
  2662. set FilName = "C:\FSOServer\DAT\NPC\" & CharName
  2663. set LList = file(FilName).read
  2664. set BuyItems = ""
  2665. set BuyItemPrices = ""
  2666.  
  2667. repeat with x = 1 to 60
  2668. if line x of LList contains "BUY|" then
  2669. set the itemdelimiter = "|"
  2670. set TheGoods = item 2 of line x of LList
  2671. set the itemdelimiter = ":"
  2672. set ItemName = item 1 of TheGoods
  2673. set ItemPrice = item 2 of TheGoods
  2674. set BuyItems = BuyItems & ItemName & RETURN
  2675. set BuyItemPrices = BuyItemPrices & ItemPrice & RETURN
  2676. end if
  2677. end repeat
  2678. set TheList = BuyItems & ":" & BuyItemPrices
  2679. User.sendMessage("NPCBuyList", TheList, 0, FALSE, user.name)
  2680. ---------------------------------------------------------------------------------------------------
  2681. "ReduceGoldFromSpell":
  2682. set MyName = user.name
  2683. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2684. set the itemdelimiter = "|"
  2685. set myCharGold = integer(item 1 of MyitemsFile)
  2686. set MycharGold = MyCharGold - integer(fullmsg.content)
  2687. if MyCharGold < 0 then exit
  2688. if string(MyCharGold) contains "-" then exit
  2689. put MycharGold into item 1 of MyItemsFile
  2690. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(MyItemsFile)
  2691. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  2692.  
  2693.  
  2694. "GiveGoldToNPC":
  2695.  
  2696. set MyName = user.name
  2697. set MyItemsFile = file("C:\FSOServer\DAT\CHAR\" & string(MyName) & "-i.txt").read
  2698.  
  2699. set NPCDat = string(fullmsg.content)
  2700. set the itemdelimiter = ":"
  2701. set NPCName = item 1 of NPCDat
  2702. set NewGold = integer(item 2 of NPCDat)
  2703. set the itemdelimiter = "."
  2704. set FNPCxName = item 1 of NPCName
  2705. set NPCTalkDAt = FNPCxName & " says " & QUOTE & "Thanks for the gold!"
  2706. set the itemdelimiter = "|"
  2707. set myCharGold = integer(item 1 of MyitemsFile)
  2708. set MycharGold = MyCharGold - integer(NewGold)
  2709. if MyCharGold < 0 then exit
  2710. put MycharGold into item 1 of MyItemsFile
  2711. file("C:\FSOServer\DAT\CHAR\" & string(MyName & "-i") & ".txt").write(MyItemsFile)
  2712. User.sendMessage("inx", MyItemsFile, 0, FALSE, user.name)
  2713. User.sendMessage("sqa", NPCTalkDAt, 0, FALSE, user.name)
  2714.  
  2715. set FilName = "C:\FSOServer\DAT\NPC\" & NPCName
  2716. set LList = file(FilName).read
  2717.  
  2718. repeat with x = 1 to 60
  2719. if line x of LList contains "GLD|" then
  2720. set the itemdelimiter = "|"
  2721. set MyGold = integer(item 2 of line x of LList)
  2722. set GoldtoAdd = MyGold + NewGold
  2723. set GoldToAdd = "GLD|" & string(GoldToAdd)
  2724. put GoldToAdd into line x of LList
  2725. end if
  2726. end repeat
  2727.  
  2728. file("C:\FSOServer\DAT\NPC\" & NPCName).write(LList)
  2729.  
  2730. "BuyFromNPC":
  2731. NPCBuy(me, movie, group, user, fullmsg)
  2732.  
  2733. "BuyFromTicketNPC":
  2734. NPCTicketBuy(me, movie, group, user, fullmsg)
  2735.  
  2736. "BuyFromTPNPC":
  2737. NPCTPBuy(me, movie, group, user, fullmsg)
  2738.  
  2739.  
  2740. "SellToNPC":
  2741. NPCSell(me, movie, group, user, fullmsg)
  2742.  
  2743.  
  2744. "Mkilldrp":
  2745.  
  2746. set FileDT = string(fullmsg.content)
  2747. set the itemdelimiter = "`"
  2748. set FilName = item 1 of FileDT
  2749. set NPCname = item 2 of FileDT
  2750. set ItemDat = item 3 of FileDT
  2751. set WhoTheFuck = string(user.name)
  2752. set RingItem = item 4 of FileDt
  2753. set RingItem2 = item 5 of FileDt
  2754. set RingItem3 = item 6 of FileDt
  2755. set RingItem4 = item 7 of FileDt
  2756. set RingItem5 = item 8 of FileDt
  2757. --set RingItem6 = integer(item 9 of FileDt)
  2758.  
  2759. set RingEffect = 1
  2760. set RingBonus = 0
  2761. if RingItem = "Four Leaf Clover" then set RingBonus = RingBonus + 1 --Waist
  2762. if RingItem2 = "Boots of Fortune" then set RingBonus = RingBonus + 1 --Feet
  2763. --if RingItem3 = "Boots of Fortune" then set RingBonus = RingBonus + 1 --Gloves
  2764. if (RingItem4 = "Boots of Fortune" and WhoTheFuck = "Deadalus") then set RingBonus = RingBonus + 1 --Body
  2765. if RingItem5 = "Azazel's Ring" then set RingBonus = RingBonus + 1 --Ring
  2766. --if RingItem6 > 0 then set RingBonus = Ringbonus + 1
  2767. if RingBonus = 0 then set RingEffect = 1
  2768. if RingBonus = 1 then set RingEffect = .9
  2769. if RingBonus > 1 then set RingEffect = .8
  2770.  
  2771.  
  2772. set NPCFilName = "C:\FSOServer\DAT\NPC\" & NPCname
  2773. set NPCFile = file(NPCFilName).read
  2774. if NPCFile = VOID then exit
  2775.  
  2776. set CurInvLst = ""
  2777. set InvAmnt = 0
  2778.  
  2779. repeat with x = 1 to 80
  2780. if line x of NPCFile contains "INV|" then
  2781. set the itemdelimiter = "|"
  2782. set TheGoods = item 2 of line x of NPCFile
  2783. set CurInvLst = CurInvLst & TheGoods & RETURN
  2784. set InvAmnt = InvAmnt + 1
  2785. end if
  2786. end repeat
  2787.  
  2788. if InvAmnt = 0 then exit
  2789. set WhichOneLine = random(InvAmnt)
  2790.  
  2791. set CurItttm = line WhichOneLine of CurInvLst
  2792. set the itemdelimiter = ":"
  2793. set RndAmnt = integer((item 2 of CurItttm) * RingEffect)
  2794. set DoWeDrop = random(RndAmnt)
  2795. if DoWeDrop <> 1 then exit
  2796. set TheItemm = item 1 of CurItttm
  2797.  
  2798. set ItemList = file("C:\FSOServer\DAT\ITEMS\" & FilName).read
  2799. set the ItemDelimiter = "|"
  2800. set OneToPlace = 0
  2801. if item 8 of ItemList = "" then set OneToPlace = 8
  2802. if item 7 of ItemList = "" then set OneToPlace = 7
  2803. if item 6 of ItemList = "" then set OneToPlace = 6
  2804. if item 5 of ItemList = "" then set OneToPlace = 5
  2805. if item 4 of ItemList = "" then set OneToPlace = 4
  2806. if item 3 of ItemList = "" then set OneToPlace = 3
  2807. if item 2 of ItemList = "" then set OneToPlace = 2
  2808. if item 1 of ItemList = "" then set OneToPlace = 1
  2809. if OneToPlace = 0 then exit
  2810. set the itemdelimiter = ":"
  2811. set TheItemDrp = TheItemm & ":" & ItemDat
  2812. set the ItemDelimiter = "|"
  2813. put TheItemDrp into item OnetoPlace of ItemList
  2814.  
  2815. if ItemList contains "|" then
  2816. else
  2817. exit
  2818. end if
  2819.  
  2820. file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
  2821.  
  2822. User.sendMessage("drelxu", TheItemDrp, 0, FALSE, user.name)
  2823.  
  2824. end case
  2825.  
  2826. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement