Attacking/Gates Script/Alias for Naruto bot

By Max_Riokuoni on Jan 26, 2008

Alright, I'm currently making a Naruto bot, and I got in a little bit of confusion. Basically the problem with this script is that it will say that the person is preparing to attack, but after the timer is over, the script won't msg the channel that the person actually DID the attack. Nor will it decrease hp or increase exp.

There is also a second script having to do with Lee's Celestial Gates. I have the stat multipliers and the writeini form down, but when it comes to closing the gate, I have no idea how to write the script so that it'll remove the gates being opened, or remove the stat multipliers.

Also, keep in mind that I am an amateur scripter at best, and that I'll probably be posting a lot of snippets requesting help. Also, I'd appreciate it if I were to get help on my snippets ^^; Also, with the gates, if you do calculations with the stat multipliers, maybe you can suggest some values that are probably better and more balanced. (Heal gate is meant to recover hp)

EDIT: Suggested by mountaindew, the /wini and /rini are substitutes for $readini and /writeini. (Thanks for suggesting and pointing this out.)

EDIT # 2: I sorted out the punching remote, but something is still wrong with the alias. When I do the punch, the bot returns this "[14:01:03pm] -> Punches Hajime_Ryudo in the face doing 30 damage! (Gained 6 Exp)

  • Timer punchhajime_ryudo halted
  • Punches No such nick/channel
    -"

Okay, first, the attacking script/alias. (Will be using brackets to separate the two scripts I'll be posting, so don't think that I added those to the original coding.)

[Alias Punch {
  if ($rini($nick,Stats,Attacking) == no) { halt }
  set %base.damage 15
  set %Exp $Rand(3,6)
  set %punch $calc(%Taijutsu / %Defense)
  set %damage $calc(%base.damage * %punch)
  if (%Damage < 1) { set %Damage 1 }
  wini $2 Stats Health $calc($rini($2,Stats,Health) - %damage)
  wini $nick Stats Exp $calc($rini($nick,Stats,EXP) + %exp)
  wini $nick Stats Attacking No
  msg # $nick Punches $2 in the face doing $bytes(%damage,b) damage! (Gained %Exp Exp) 
  deadcheck $1 $2
}]

Next, the gates. (Long posting.)

[on *:Text:`Close Gates:#: {
  if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
  if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
  if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
  if ($rini($nick,Gates,InitialGate) = Open) {
    remini $nick Gates InitialGate Open
    msg # 7,1 $+ $nick Closes the Celestial Gates!
  }
  on *:Text:`Initial Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,InitialGate) = Open) { notice $nick You already have the Initial Gate open! | halt }
    if (InitialGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) / 2)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) * 1.3)
      msg # 7,1 $+ $nick 7,1Releases the 9Initial 7Gate!
    }
  }
  on *:Text:`Heal Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,InitialGate) != Open) { notice $nick You do not have the Initial Gate open! | halt }
    if ($rini($nick,Gates,HealGate) = Open) { notice $nick You already have the Heal Gate open! | halt }
    if (HealGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Gates HealGate Open
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) * 1.5)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) / .4)
      msg # 7,1 $+ $nick Releases the 11Heal 7Gate!
    }
  }
  on *:Text:`Life Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,HealGate) != Open) { notice $nick You do not have the Heal Gate open! | halt }
    if ($rini($nick,Gates,LifeGate) = Open) { notice $nick You already have the Life Gate open! | halt }
    if (LifeGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Gates HealGate Open
      wini $nick Gates LifeGate Open
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) * .7)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) * 1.2)
      msg # 7,1 $+ $nick Releases the 11Life 7Gate!
    }
  }
  on *:Text:`Harm Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,LifeGate) != Open) { notice $nick You do not have the Life Gate open! | halt }
    if ($rini($nick,Gates,HarmGate) = Open) { notice $nick You already have the Harm Gate open! | halt }
    if (HarmGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Gates HealGate Open
      wini $nick Gates LifeGate Open
      wini $nick Gates HarmGate Open
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) * .7)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) / .7)
      msg # 7,1 $+ $nick Releases the 4Harm 7Gate!
    }
  }
  on *:Text:`Limit Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,HarmGate) != Open) { notice $nick You do not have the Harm Gate open! | halt }
    if ($rini($nick,Gates,LimitGate) = Open) { notice $nick You already have the Life Gate open! | halt }
    if (LimitGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Gates HealGate Open
      wini $nick Gates LifeGate Open
      wini $nick Gates HarmGate Open
      wini $nick Gates LimitGate Open 
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) * .6)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) * 1.2)
      msg # 7,1 $+ $nick Releases the 11Limit 7,1Gate!
    }
  }
  on *:Text:`View Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,LimitGate) != Open) { notice $nick You do not have the Limit Gate open! | halt }
    if ($rini($nick,Gates,ViewGate) = Open) { notice $nick You already have the View Gate open! | halt }
    if (ViewGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Gates HealGate Open
      wini $nick Gates LifeGate Open
      wini $nick Gates HarmGate Open
      wini $nick Gates LimitGate Open
      wini $nick Gates ViewGate Open
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) * .6)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) * 1.5)
      msg # 7,1 $+ $nick Releases the 10,1View 7,1Gate!
    }
  }
  on *:Text:`Wonder Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,ViewGate) != Open) { notice $nick You do not have the View Gate open! | halt }
    if ($rini($nick,Gates,WonderGate) = Open) { notice $nick You already have the Wonder Gate open! | halt }
    if (WonderGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Gates HealGate Open
      wini $nick Gates LifeGate Open
      wini $nick Gates HarmGate Open
      wini $nick Gates LimitGate Open
      wini $nick Gates ViewGate Open
      wini $nick Gates WonderGate Open
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) * .6)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) * 2)
      msg # 7,1 $+ $nick Releases the 0,1Wonder 7,1Gate!
    }
  }
  on *:Text:`Death Gate:#: {
    if ($rini($nick,Stats,Registered) != Yes) { notice $nick You are not registered! | halt }
    if ($rini($nick,Stats,Entered) != Yes) { notice $nick You are not entered! | halt }
    if ($rini($nick,Stats,Clan) != Lee) { notice $nick You are not in the Lee clan! | halt }
    if ($rini($nick,Gates,WonderGate) != Open) { notice $nick You do not have the Wonder Gate open! | halt }
    if ($rini($nick,Gates,DeathGate) = Open) { notice $nick You already have the Death Gate open! | halt }
    if (DeathGate isin $rini($nick,Moves,Doujutsu)) {
      wini $nick Gates InitialGate Open
      wini $nick Gates HealGate Open
      wini $nick Gates LifeGate Open
      wini $nick Gates HarmGate Open
      wini $nick Gates LimitGate Open
      wini $nick Gates ViewGate Open
      wini $nick Gates WonderGate Open
      wini $nick Gates DeathGate Open
      wini $nick Stats Health $calc($rini($Nick,Stats,Health) * .6)
      wini $nick Stats Taijutsu $calc($rini($nick,Stats,Taijutsu) * 2.5)
      msg # 4,1 $+ $nick Releases the 7Death 4,1Gate!
    }
  }]

Comments

Sign in to comment.
ozeskid   -  May 07, 2008

Max, if you ever fix/finish this script, let me know, i like the idea and i know a bunch of people willing to play it, or even help make a sequel script. also, hajime_ryudo?? i know a guy by that name lol, and on the Punch alias, you need to make sure you differenciate what $2 will equal, if you want it to equal a user or the channel itself.

 Respond  
Darkkeeper   -  Jan 31, 2008

jub, like your really good enough to be giving scripting advice? lmfao, please, get off hawkee

 Respond  
EL   -  Jan 26, 2008

^^^Scroll

 Respond  
jub369   -  Jan 26, 2008

i do and thank you for un shunine me

 Respond  
EL   -  Jan 26, 2008

He doesn\'t remember me shunin him I see....

 Respond  
napa182   -  Jan 26, 2008

LMFAO....

 Respond  
EL   -  Jan 26, 2008

jub369!@
End of Shun List
`-.-

 Respond  
jub369   -  Jan 26, 2008

el i\'m sorry for what i said earlyer

 Respond  
EL   -  Jan 26, 2008

Yeah my bad didn\'t even read the description.Either way if tested before posting this author should have noticed the error an fixed it correct?.Why post wit with out testing it first?

 Respond  
napa182   -  Jan 26, 2008

El they did say > Okay, first, the attacking script/alias. (Will be using brackets to separate the two scripts I\'ll be posting, so don\'t think that I added those to the original coding.)

 Respond  
EL   -  Jan 26, 2008

Correct napa182 there needs to be alias and umm not sure if anyone else noticed but theres a [ before the alias and on yur alias closing bracket } ]

So remove them.

[Alias Punch {
if ($rini($nick,Stats,Attacking) == no) { halt }
set %base.damage 15
set %Exp $Rand(3,6)
set %punch $calc(%Taijutsu / %Defense)
set %damage $calc(%base.damage * %punch)
if (%Damage < 1) { set %Damage 1 }
wini $2 Stats Health $calc($rini($2,Stats,Health) - %damage)
wini $nick Stats Exp $calc($rini($nick,Stats,EXP) + %exp)
wini $nick Stats Attacking No
msg # $nick Punches $2 in the face doing $bytes(%damage,b) damage! (Gained %Exp Exp)
deadcheck $1 $2
}]

Or you ll just get \"PUNCH Unknown command\" and you have it here as well-> [on *:Text:Close Gates:#: { and on your last bracket to.Take mountaindew\'s advice an check your brackets /help brackets.-.-

 Respond  
napa182   -  Jan 26, 2008

well it would help if you posted the whole script =/

 Respond  
Max_Riokuoni   -  Jan 26, 2008
DeadCheck {
  if ($2 == rpgbot) { goto end }
  if ($2 == chanbot) { goto end }
  if ($rini($2,Stats,Health) <= 0) {
    if ($rini($2,Stats,Entered) != yes) { halt }
    timerattack $+ $2 off
    set %money $rand(30,40)
    set %money2 $rand(5,10)
    set %exp $rini($2,Stats,Level)
    set %Exp $calc(%exp * 4)
    set %exp2 $round($calc(%exp2 * 0.10),0)
    wini $1 $1 Money $calc($rini($1,Stats,Money) + %Money)
    wini $2 $2 Money $calc($rini($2,Stats,Money) + %Money2)
    wini $1 $1 exp $calc($rini($1,Stats,exp) + %exp)
    wini $2 $2 exp $calc($rini($2,Stats,exp) + %exp2)
    wini $1 $1 wins $calc($rini($1,Stats,Wins) + 1)
    wini $2 $2 wins $calc($rini($1,Stats,Losses) + 1)
    wini $2 $2 Entered no
    wini $2 $2 Attacking no
    set %batlist $remtok($batlist,$2,1,32)
    msg # $1 has defeated $2 $+ ! $1 gains %money yen and %exp exp! $2 gained %money2 yen and %exp2 exp!
    :end 
  }
}
 Respond  
napa182   -  Jan 26, 2008

um where is the deadcheck alias ?

 Respond  
jub369   -  Jan 26, 2008

well was i right on the rest

 Respond  
napa182   -  Jan 26, 2008

um if punch is an alias you need to put alias in front of punch ie.

alias Punch {
 Respond  
jub369   -  Jan 26, 2008

[Alias Punch {
if ($rini($nick,Stats,Attacking) == no) { halt }
set %base.damage 15
set %Exp $Rand(3,6)
set %punch $calc(%Taijutsu / %Defense)
set %damage $calc(%base.damage * %punch)
if (%Damage < 1) { set %Damage 1 }
wini $2 Stats Health $calc($rini($2,Stats,Health) - %damage)
wini $nick Stats Exp $calc($rini($nick,Stats,EXP) + %exp)
wini $nick Stats Attacking No
msg # $nick Punches $2 in the face doing $bytes(%damage,b) damage! (Gained %Exp Exp)
deadcheck $1 $2
}]

its sopose to be

Punch {
  if ($rini($nick,Stats,Attacking) == no) { halt }
  set %base.damage 15
  set %Exp $Rand(3,6)
  set %punch $calc(%Taijutsu / %Defense)
  set %damage $calc(%base.damage * %punch)
  if (%Damage < 1) { set %Damage 1 }
  wini $2 Stats Health $calc($rini($2,Stats,Health) - %damage)
  wini $nick Stats Exp $calc($rini($nick,Stats,EXP) + %exp)
  wini $nick Stats Attacking No
  msg $chan $nick Punches $2 in the face doing $bytes(%damage,b) damage! (Gained %Exp Exp) 
  deadcheck $1 $2
}
 Respond  
jub369   -  Jan 26, 2008

your welcome max since i told you to do that to do this

 Respond  
jub369   -  Jan 26, 2008

i know lol just wanted to make shure and sorry for calling you a idiot

 Respond  
guest598594   -  Jan 26, 2008

i never said you didn\'t

 Respond  
jub369   -  Jan 26, 2008

yep like he saud see moutian dew i do know some scripting

 Respond  
guest598594   -  Jan 26, 2008

that and the one at the end...and for the on text\'s you need another } at the end of each one

also, you need to put \"alias\" before punch (if its even an alias) or make it an on text or something

 Respond  
jub369   -  Jan 26, 2008

put down all of it that helps but put it down here and in the fourm

 Respond  
Max_Riokuoni   -  Jan 26, 2008

jub369: To quote myself: \"(Will be using brackets to separate the two scripts I\'ll be posting, so don\'t think that I added those to the original coding.)\"

 Respond  
jub369   -  Jan 26, 2008

on this
[on :Text:`Punch:#: { take off the [ before on

 Respond  
guest598594   -  Jan 26, 2008

well i dont really like rpg\'s so i dont have much to offer

 Respond  
Max_Riokuoni   -  Jan 26, 2008

Actually, I did get most of the coding for that script from Romeo o.o

 Respond  
jub369   -  Jan 26, 2008

mabey mabey not

 Respond  
Romeo   -  Jan 26, 2008

hey this coding is mine :D

 Respond  
jub369   -  Jan 26, 2008

max go here and learn from that thats a naruto alisies

http://www.hawkee.com/snippet/2559/

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.