Quest help
ok so here i have a quest it works without any issues however i want to make it so it will cast on players below level 10 if anyone above level 10 hails it wont work for them.... can someone please help.... thanks in advance
Code:
sub EVENT_SAY { |
You should post code in a code block so it is readable and doesn't have a bunch of smilies in it.
|
I added code blocks..but, he'll have to add indentions... I don't want to change to change the context of what he's trying to do.
|
You can do this rather simply by requesting a $ulevel check with an if. Like:
if ($text=~/heal/i) { if ($ulevel <= 10) { quest::selfcast(13); } } and at the beginning of sub EVENT_ITEM: sub EVENT_ITEM { if ($ulevel <= 10) { Note that will make the npc not accept any item unless the user is <= level 10. If you wanted them to take other items, you can add that if check in each platinum/item check. For example, here is your script with the additions. Code:
sub EVENT_SAY { |
tried that and didnt work ..... but what i wanna do is give free spells to people under say level 10.... so in all honesty that script would not work anyways
so i changed it to sub EVENT_SAY { my $buffs = quest::saylink("buffs"); if($text=~/Hail/i) { quest::say("Greetings $name. Would you like some [$buffs]?"); } if($text=~/buffs/i) { quest::selfcast(174); quest::selfcast(3692); quest::selfcast(2525); quest::selfcast(144); quest::selfcast(970); quest::selfcast(356); quest::selfcast(998); quest::selfcast(278); } } but if i add u level it becomes unusable |
Quest worked fine for me. I tried it, but maybe something is different. The perl wiki still references:
Quote:
Quote:
I just tried this, and it worked fine, with a level check, as well as an else telling them why it wouldn't work. Code:
sub EVENT_SAY { |
Thanks you a ton :)
|
All times are GMT -4. The time now is 04:57 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.