Noob Perl user
Here are some small simple events I have made while being in my Accounting class...any help/suggestions would be appreciated.
Sub EVENT_SAY { if ($text=~/Hail/i){quest::say(“Hello, welcome to my world!”);} } sub EVENT_SAY { if ($text=~ /Hail/i){quest::say("Why hello there mister!");} } sub EVENT_SAY { if ($text=~/Hail/i){quest::say("When someone is slain…they will return to where their soul has been bound. I can [bind your soul] if you would like.”);} if ($text=~/bind my soul/i) { quest::say(“Binding your soul sir.”); quest::castspell($userid,2049); } } sub EVENT_SAY { if ($text=~/Hail/i){quest::say(“Hello, you look like you could use a [Big Soul Devour]. Would you like one?”);} if ($text=~/Big Soul Devour/i) { quest::say(“Alright give me a minute and I’ll craft ya a knew one!”); quest::summonitem(11001);} } sub EVENT_SAY { if ($text=~/Hail/i){quest::say(“Hello there! I am Tunare…mother of the Elves. You look very hot, would you like my forces to [summon a rainstorm]?”);} if ($text=~/summon a rainstorm/i) { quest::rain(1); quest::say(“There ya go! Cool down a bit.”);} } |
try to space out your code
like Code:
sub EVENT_SAY |
Alright thanks
But so far I'm doing this right?
|
Yes, what x-scythe said, definitely take it into consideration. As a long time programmer in many languages I know how important it is to space out your code and, as dumb as it sounds, USE COMMENTS. As soon as you make a large quest file...then say you dont look at it for about a month. You then return to edit the file and uh-oh its jumbled and you cant figure out what stuff does! But the syntax of all of your code seems to be correct.
|
All times are GMT -4. The time now is 01:07 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.