View Single Post
  #3  
Old 10-15-2011, 03:08 PM
LordAdakos
Sarnak
 
Join Date: Dec 2007
Posts: 60
Default hmm

so do i need to put quantifiers on the level checks, such as:
Code:
if  ((plugin::check_handin(\%itemcount, xxxx => 1)) && ($ulevel>=8) && ($ulevel<16))
to check max level for the hand in?

what if i wanted someone to be able to hand in the current level gem or a lower level gem ?
Should I:
Code:
 
if plugin handin item = xxxx && level is > 55
do something for lvl 55+
elseif
if plugin handin item = xxxx && level is > 50
do something for lvl 50+
elseif
if plugin handin item = xxxx && level is > 55
do something for lvl 55+
elseif
if plugin handin item = xxxx && level is > 40
do something for lvl 40+
elseif
return the stuff
would that work?


Also, it shouldnt stop after the first check becuase " the item = 10022 "AND the "level is greater than 8", right? it has to BOTH be true with an AND statement. The level may be >8 but the item isnt true, so that would invalidate the AND statement.


Replacing the IF's with ELSEIF's makes the NPC eat the items in all cases.
Reply With Quote