mIRC Homepage
Posted By: SophisDecay [Help]Healers script for IRC RPG - 25/01/15 04:59 AM
I would like for this to
/writeini Herb.ini Herbs, select herb, numerical value
Like, have a If $2 = Moss Moss = a value of 3, set in the "herbs section
[herbs]
Moss=3

Then on the commands !Heal $nick Moss

It will use the moss from the INI and erase it
giving the selected character the 3 toward their hitpoints!!

Any help would be great, this has been giving me the WORST time i even tried to learn hash tables for this, but alas i have more experience with INI and %Vars

This is all i've managed to work out & its still broken

on *:TEXT:!heal*:#:{
set %3 $3
if (%health [ $+ [ $2 ] ] <= 99) && ($3 isin $read(herbs.ini,r,%3)) {
var %section herbs
var %item $4
remini $readini(herbs.ini,%section,%item) %3
set %health [ $+ [ $2 ] ] 100
msg $chan 5,1|7 $nick 5|14 has healed $2 with $3 they have full health! $3 has been used up!
return
}
if (%health [ $+ [ $2 ] ] >= 100) {
msg # 5,1|7T14hey already have full health!
return
}
}

on *:TEXT:!addherbs*:#:{ writeini herbs.ini Herbs $2 $3
inc %herbs 1
/notice $nick Added. $read(herbs.in,herbs,$2,$3)
}

on *:TEXT:!Herbs*:#:{
DO_LookupHerbs
}
alias -l DO_lookUpHerbs {
var %section herbs
var %item $2
var %herbs = $readini(herbs.ini,%section,%item)
Return %Herbs
}
© mIRC Discussion Forums