mIRC Home    About    Download    Register    News    Help

Print Thread
#248695 19/10/14 03:03 AM
Joined: Sep 2014
Posts: 24
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 24
Im trying to get a backpack set up for one player
they are a healer, so I wanted them to be able to add herbs and herb healing values, and use them on other players.

!AddHerbs
!ViewParcel
!UseHerb

on *:TEXT:!viewparcel*:#:{
if ($nick == Chisu) {
msg $chan You've have %parcel in your parcel!
}
}

on *:TEXT:!addherbs*:#:{
if ($nick == Chisu) {
set %quantity $2
write item.txt $3
set %parcel %quantity %item
msg $chan You've added $2 $3 to your parcel!
}
}
on *:TEXT:!delherbs*:#:{
if ($nick == Chisu) {
del %parcel $2
msg $chan You've removed $2 to your parcel!
}
}

on *:TEXT:!useherbs*:#:{
if ($user == Chisu) || ($2 isin %quantity) || ($3 isin item.txt) || {

var %recover = $iif($calc( 100 - %health [ $+ [ $nick ] ] ) < %quantity, $v1, $v2)

if (%recover <= 0) {
msg $chan 8,1ยค7 There is none of that item!
return
}

dec %quantity %recover
inc %health [ $+ [ $nick ] ] %recover
msg $chan 8,1~7 $nick has healed $nick with $2 they have %Recover health
}
}


-Chan: #WolvenSpirit -Server: Irc.Sorcery.Net
Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Ok..could you provide information about what the problem you are encountering is?

Joined: Sep 2014
Posts: 24
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 24
It will set the %Vars but the !useHerbs commands isn't working Like it will reduce some things and not others and i don't know whats going on with it
but i want it to !Useherb <Herb+Herbvalue> <TargetPlayer>


-Chan: #WolvenSpirit -Server: Irc.Sorcery.Net

Link Copied to Clipboard