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.)
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!
}
}]
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.
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.
-.-
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
}
}
[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
}