mIRC Homepage

RPG healers pack

Posted By: SophisDecay

RPG healers pack - 11/12/14 10:17 PM

Ok, i've been racking my brain for weeks over this, and i just can't get it.
*what i'm trying to accomplish*
I want to make a list of herbs with separate values, Upon adding "herbs" Like !addherb Thistle 3, it says ok you added 3 thistles each = 5 HP,Calc 3*5=15, in essence converting the number into HP..Then on the command !heal <nick> <value>
It will heal the selected nick for how much specified, if there are no herbs/heals state, Error.

this is all i've managed to come up with

on *:TEXT:!viewparcel*:#:{
if ($nick == Susista) {
msg $chan
}
}

on *:TEXT:!addparcel*:#:{
if ($nick == Susista) {
set %Herb $2
set %herbval $3
msg $chan You've added $2 to your parcel!
}
}
on *:TEXT:!delparcel*:#:{
if ($nick == Susista) {
del %Herb $2
del %herbval 3
msg $chan You've removed $2 to your parcel!
}
}

on *:TEXT:!useparcel*:#:{
if ($user == Susista) || ($2 isin %parcel) || ($3 == $nick) {
var %herb $2
msg $chan 8,1~7Susista has healed $3 with $2 they have full health and thirst!
Do_heal %heal
}
}
alias Do_heal {
if (%health [ $+ [ $2 ] ] >= 100) {
.msg $chan 5,1[[ $+ %theme $+ $2 $+ 5]]15You already have full health & cannot be healed! 5]]
return
}

var %restore = $iif($calc( %herbval - %health [ $+ [ $2 ] ] ) < %heal, $v1, $v2)

if (%restore <= 0) {
msg $chan 5,1[[ $+ %theme $+ $nick $+ 5]]15 that does not exist.
return
}

dec %heal %restore
inc %health [ $+ [ $nick ] ] %restore

msg $nick 5,1[[ $+ %theme $+ $2 $+ 5]]15 You Have Just been healed by Susista and restored7 %restore 15health!!5]]

}



Its to be a Christmas gift from one of my almost life long friends, any help would be greatly appreciated!!

-Thank you so very much!-
Posted By: Belhifet

Re: RPG healers pack - 11/12/14 10:47 PM

Code:
on *:TEXT:!addherb*:#:{
  var %herbtypes potion,hi-potion,x-potion
  var %herbvalues 5,10,20
  if ($0 > 4) || ($4 !ison $chan) || ($3 !isnum) || ($findtok(%herbtypes,$2,0,32) == 0) { 
    .msg $chan $nick $+ , please use !addherb type number user
    return
  }
  var %x $findtok(%herbtypes,$2,32)
  var %y $gettok(%herbvalues,%x,32)
  .msg $chan ok you added $3 $2 to $4 $+ , each $3 is worth %y HP, $calc(%y * $2) total HP.
}



Something like that.? I dunno your request is a bit unclear to me. In my code a potion=5 hi-potion=10, x-potion=20.
Posted By: SophisDecay

Re: RPG healers pack - 12/12/14 01:04 AM

yes but i want only one person to be able to use it on a another player

also where would i put my %health [ $+ [ $nick ] ] ?


each One herb is worth 5 %health
this is how i'm trying to get it to work

!addherb moss 1
<bot> 1 Moss added, total poultice: %poultice (5)
so one moss would = 5
!addherb moss 3
<bot> 3 Moss added, total poultice: %poultice (15)
then
!useherb $nick 5
<bot> Sophisdecay healed $Nick for 5 hp

Does that make sense? I have only one healer in my group
but i want them to be able to heal anyone if they have the "herbs" made into %poultice




Posted By: Belhifet

Re: RPG healers pack - 12/12/14 02:04 PM

Code:
  var %herbtypes potion,hi-potion,x-potion
  var %herbvalues 5,10,20
  var %x $findtok(%herbtypes,$2,32)
  var %y $gettok(%herbvalues,%x,32) 

using something like this you can do what you asked for, make a list of herbs and associate a healing amount with them. If you want to only have 1 person be able to do it then just do the same thing you do everywhere else either if ($nick == Susista) { do something } or if ($nick != Susista) { return }.

As for your %health [ $+ [ $nick ] ], obviously you'd need to rewrite your Do_heal alias to work with w/e setup you pick for your herb list.
Posted By: SophisDecay

Re: RPG healers pack - 13/12/14 08:32 AM

Oh i see! oh thank you! you have been a great help!!!!
© 2019 mIRC Discussion Forums