November 23, 2024, 08:18:02 am

Author Topic: SawAway v1.3  (Read 8397 times)

0 Members and 2 Guests are viewing this topic.

Offline Saw

  • Bone County Fire Department
  • Sr. Member
  • *
  • Posts: 367
  • Reputation: 9
  • Bone County Fire Department
    • View Profile
SawAway v1.3
« on: March 22, 2013, 03:13:16 pm »
I have decided to make an update on my Away script. I know I have given a few people v1.0 v1.1 and v1.2, but this has changed a bunch from new commands. and a few others! :P The only problem right now is the commands list. It spams right now. I plan on fixing that issue in the future, I wasnt to sure how I wanted them to be mapped out. right now the script is also pretty long. Once I learn a few things, I would imagine it will be a lot shorter. But for now I hope you guys like it (for now anyways :P ) And here is the script and the commands.


Code: [Select]
   
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; @   SawAway v1.3 @ ;;;
;;; @ Created by Saw @ ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;

menu channel {
  SawAway v1.3
  .Install Script:/AwayNick | /WorkNick | /SchoolNick | /SleepNick | /FoodNick | /BackNick | /Password
  .Change
  ..Away Nick:/AwayNick
  ..School Nick:/SchoolNick
  ..Work Nick:/WorkNick
  ..Sleep Nick:/SleepNick
  ..Food Nick:/FoodNick
  ..Original Nick:/BackNick
  ..Password:/Password
  .-
  .Away
  ..Away:/set %areason $$?="Away Reason:" | away | set %away yes
  ..Back:/back
  .School
  ..School:/school | set %school yes
  ..Home:/home
  .Work
  ..Work:/work | set %work yes
  ..Done:/doneworking
  .Sleep
  ..Sleep:/sleep | set %sleep yes
  ..Awake:/awake
  .Food
  ..Food:/food | set %food yes
  ..Back:/done
}

on *:LOAD: {
  echo -a 2-
  echo -a  7SawAway v1.3 is now loaded!
  echo -a  7For help type 10/sawhelp
  echo -a  7For a list of commands type /sawcommands
  echo -a 2-
}

alias away {
  if (%away == yes) { /echo -a You're already away. Use /back | halt }
  set %areason2 $1-
  if (%awaydate != $date) { dec %awaycount $calc(%awaycount - 0) }
  set %away yes
  nick %AwayNick
  inc %awaycount
  writeini -n away.ini away away $ctime
  msg $chan 3[4AWAY3] 13I am now away. 9Leave me a PM if you need me. 10Reason:7 %areason %areason2
  msg #ECNR !say I am now away! Reason: %areason %areason2
}

alias back {
  if (%away == $null) { echo -a You're not set as away. Use /away | halt }
  nick %BackNick
  set %awaydate $date
  msg $chan 3[4BACK3] 6I am now back. 12Lets play a game! 10Reason for being away:7 %areason %areason2 |11 Away time:9 $duration($calc($ctime - $readini(away.ini,away,away)))
  msg #ECNR !say I am now back! Reason for being away: %areason %areason2 0| Time: $duration($calc($ctime - $readini(away.ini,away,away)))
  msg $active 10I have been away7 %awaycount 10times today 9( $+ $date $+ )10!
  unset %away
  unset %areason | unset %areason2 | ns id %Password
}

alias sleep {
  if (%sleep == yes) { /echo -a You're already sleeping. Use /awake | halt }
  set %sleep yes
  nick %SleepNick
  writeini -n sleep.ini sleep  sleep $ctime
  msg $chan [SLEEP] I am now sleeping. Send me a PM, I'll respond when I wake up.

}

alias awake {
  if (%sleep == $null) { echo -a You're not sleeping. Use /sleep | halt }
  nick %BackNick
  msg $chan [AWAKE] I am now awake. I'm ready to play a game!: Sleep amount: $duration($calc($ctime - $readini(sleep.ini,sleep,sleep)))
  unset %sleep | ns id %Password

}

alias food {
  if (%food == yes) { /echo -a You're already eating. Use /done | halt }
  set %food yes
  nick %FoodNick
  writeini -n food.ini food food $ctime
  msg $chan [FOOD] I am now eating %foodr. PM me if you need me and I will talk to you when I'm done.
}

alias done {
  if (%food == $null) { echo -a You're not eating. Use /food | halt }
  nick %BackNick
  msg $chan [BACK] I am now done eating. Lets play a game!: Eating time: $duration($calc($ctime - $readini(food.ini,food,food)))
  unset %food
  ns id %Password
}

alias school {
  if (%school == yes) { /echo -a You're already at school. Use /home | halt }
  set %school yes
  nick %SchoolNick
  writeini -n school.ini school school $ctime
  msg $chan [SCHOOL] I am now at school. If you need me PM me and I'll answer when I get home.
}

alias home {
  if (%school == $null) { echo -a You're not at school. Use /school | halt }
  nick %BackNick
  msg $chan [BACK] I am now done with school. Lets play a game!: School Time: $duration($calc($ctime - $readini(school.ini,school,school)))
  unset %school
  ns id %Password
}

alias work {
  if (%work == yes) { /echo -a You're already working. Use /doneworking | halt }
  set %work yes
  nick %WorkNick
  writeini -n work.ini work work $ctime
  msg $chan [WORK] I am now at work. PM me if you need me and I will get back to you when im done working.
}

alias doneworking {
  if (%work == $null) { echo -a You're not working. Use /work | halt }
  nick %BackNick
  msg $chan [BACK] I am now done working. Lets play a game!: Working Time: $duration($calc($ctime - $readini(work.ini,work,work)))
  unset %work
  ns id %Password
}

Alias sawhelp {
  echo -a 2-
  echo -a To setup the SawAway script; right-click and press "Install Script", follow the instructions!
  echo -a If you find a bug, something you do not like, or have a suggestion, PM(query) Saw!
  echo -a Thank you for using SawAway v1.3
  echo -a 2-
}

Alias sawcommands {
  echo -a -----------------------
  echo -a  SawAway v1.3 Commands
  echo -a -----------------------
  echo -a Away:
  echo -a ----------------
  echo -a /away <reason>
  echo -a /back
  echo -a -----------------------
  echo -a Sleep:
  echo -a ----------------
  echo -a /sleep
  echo -a /awake
  echo -a -----------------------
  echo -a Food:
  echo -a ----------------
  echo -a /food
  echo -a /done
  echo -a -----------------------
  echo -a Work:
  echo -a ----------------
  echo -a /work
  echo -a /doneworking
  echo -a -----------------------
  echo -a School:
  echo -a ----------------
  echo -a /school
  echo -a /home
  echo -a -----------------------
}

Alias FoodNick {
  set %FoodNick $$?="What nick do you wish to be while you eat? Example: Saw[FOOD]" | echo -a Food nick has been set to10 %FoodNick $+ .
}
Alias SleepNick {
  set %SleepNick $$?="What nick do you wish to be while you sleep? Example: Saw[SLEEP]" | echo -a Sleep nick has been set to10 %SleepNick $+ .
}
Alias AwayNick {
  set %AwayNick $$?="What nick do you wish to be while away? Example: Saw[AWAY]" | echo -a Away nick has been set to10 %AwayNick $+ .
}
Alias BackNick {
  set %BackNick $$?="What is your original nickname for when you get back? Example: Saw" | echo -a Back nick has been set to10 %BackNick $+ .
}
Alias WorkNick {
  set %WorkNick $$?="What do you wish your nick to be while you're working? Example: Saw[WORKING]" | echo -a Working nick has been set to10 %WorkNick $+ .
}
Alias SchoolNick {
  set %SchoolNick $$?="What do you wish your nick to be when at school?? Example: Saw[SCHOOL]" | echo -a School nick has been set to10 %SchoolNick $+ .
}
Alias Password {
  set %Password $$?="What is your NickServ password? Example: Password (NOTE: Not Saw's password)" | echo -a Password has been set.
}


Here is a list of commands!

Code: [Select]
/away
/back
/school
/home
/work
/doneworking
/food
/done
/sleep
/awake
/sawcommands
/sawhelp

Let me know what you guys think, and please don't flame xD If you have any ideas please let me know :D Enjoy!

EDIT: Also if you have any questions, feel free to ask via IRC, thank you :)

« Last Edit: March 22, 2013, 07:16:51 pm by Saw »

Offline Avail

  • Full Member
  • ***
  • Posts: 131
  • Reputation: 2
  • Loyalty - Respect
    • View Profile
Re: SawAway v1.3
« Reply #1 on: July 13, 2013, 10:00:38 pm »
Nice script, just saw it.

I'll definitely use it!