mIRC Home    About    Download    Register    News    Help

Print Thread
#104017 28/11/04 05:35 PM
Joined: Oct 2004
Posts: 31
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2004
Posts: 31
This is the first part of help script for an online game
can anyone find any errors
they type !bearhelp and nothing happens

on 1*:text:!bearhelp * :#: {
if ($2 = $null) {
/notice $nick Current topics are formulas, and strategies
}
elseif ($2 == formulas && $3 == $null) {
/notice $nick Current formulas are attack, defence, and gold
}
elseif ($2 == formulas && $3 == attack) {
/notice $nick Formula for SA = ((T*5P)+(U*4P)+(Ut*5)+(Uu*4))*((1+0.33F)*R)
/notice $nick T = # of armed and trained soldiers, U = # of armed untrained soldiers, P = power of weapons
/notice $nick Ut = # of unarmed trained soldiers, Uu = # of unarmed untrained soldiers, F = Siege level 0-13, R = Race bonus
}
elseif ($2 == formulas && $3 == defence) {
/notice $nick Formula for DA = ((T*5P)+(U*4P)+(Ut*5)+(Uu*4))*((1+0.25F)*R)
/notice $nick T = # of armed and trained soldiers, U = # of armed untrained soldiers, P = power of weapons
/notice $nick Ut = # of unarmed trained soldiers, Uu = # of unarmed untrained soldiers, F = Fortification level 0-17, R = Race bonus
}
else {
/notice $nick Sorry, I dont understand you
}

}

#104018 28/11/04 09:20 PM
Joined: Jun 2004
Posts: 87
B
Babel fish
Offline
Babel fish
B
Joined: Jun 2004
Posts: 87
try this
Code:
on 1*:text:!bearhelp :#: {
  if ($2 = $null) {
    /notice $nick Current topics are formulas, and strategies
  } 
  elseif ($2 == formulas) && ($3 == $null) {
    /notice $nick Current formulas are attack, defence, and gold
  }
  elseif ($2 == formulas) && ($3 == attack) {
    /notice $nick Formula for SA = ((T*5P)+(U*4P)+(Ut*5)+       (Uu*4))*((1+0.33F)*R)
    /notice $nick T = # of armed and trained soldiers, U = # of   armed untrained soldiers, P = power of weapons
    /notice $nick Ut = # of unarmed trained soldiers, Uu = # of unarmed untrained soldiers, F = Siege level 0-13, R = Race bonus
     }
  elseif ($2 == formulas && $3 == defence) {
    /notice $nick Formula for DA = ((T*5P)+(U*4P)+(Ut*5)+(Uu*4))*((1+0.25F)*R)
    /notice $nick T = # of armed and trained soldiers, U = # of armed untrained soldiers, P = power of weapons
    /notice $nick Ut = # of unarmed trained soldiers, Uu = # of unarmed untrained soldiers, F = Fortification level 0-17, R = Race bonus
    }
  else {
    /notice $nick Sorry, I dont understand you
  }
} 


Link Copied to Clipboard