Broke a few quests
So this is my first attempt at coding anything in a couple years and it appears I have lost my touch a bit lol. Have broke 3 quests apparently, not working at all.
First one is a quest thats not getting any responses to anything said at all. 2nd and 3rd are in my global_player and dont appear to be working. Not quite sure what ive done wrong in these, ive tested and modified multiple times and just cant quite figure it out, any help would be great! Code:
sub EVENT_SAY { Code:
sub EVENT_LEVEL_UP { Code:
sub EVENT_DEATH { |
1st:
You have an else in the middle of a bunch of elsif's Code:
else { Possibly too many braces Code:
if (defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 1) && ($ulevel <= 60) { { Code:
if (defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 4) && ($ulevel <= 69) { { |
Used your suggestions, 2nd and 3rd still not functioning. 1st is working to line 21. After responding accept he replies with his response, but nothing else happens.
rewrote code: Code:
sub EVENT_SAY { |
Also doesnt appear to be setting globals when following text. When hailed I only get the response from the first line
|
Make sure your NPC has qglobals turned on.
~didn't read the code, so I'm no help there~ |
Quote:
|
Have tried using
quest::setlevel quest::setlvl $client->setlevel $client->setlvl And tried same for the AA part. Neither one nor the globals sets seem to be functioning. The zone part works fine, text works fine, aside from the global checks upon hailing. Getting 0 syntax errors and have read the code multiple times, I'm currently at a loss as to why it's not working properly |
Quote:
Your new post has an extra bracket at the bottom. I haven't run these, only checking syntax... so maybe it's the functions you are calling. Do they exist in the proper folder (plugins) etc? Is Whisper working? Do the saylinks work? |
Where was the missing parenthesis? Whisper and say links work fine and zone working fine. Just the globals,lvl and AA parts dont work, will check the extra bracket and see if that changes anything
|
Quote:
Code:
if ((defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 1) && ($ulevel <= 60)) { The red parens... around the entire condition statement. You can't have one set of parens (the qglobals) a comparator (&&) and another set of parens (the level check) without having them both inside parens. |
Rather than
quest::setlvl(51); quest::setaa(50); Try quest::level(51); $client->AddAAPoints(50); |
So the quest and client thing suggested by Nukerella fixed that part of the quest, thank you! Globals im unsure if are actually working as I only get the first Hail line everytime i hail the npc. Added the Missing Parenthesis in 2nd and 3rd script, still not seeming to do anything upon leveling or dieing. Will continue testing.
|
Works all the way up to where he sets level and AA, after that you get the "Awakened" message as if globals didnt set. And if by some chance you do get him to say "ready" text he will just repeat it everytime you click ready, not sure why it stopped porting. As far as the "ready" text it seems you can only get him to fire that text if you click a saylink you previously clicked, no clue whats going on here lol. Thank you all for being patient, i didnt realize ive lost my touch to such a degree, used to crank out easy quests like this all the time lol.
Code:
sub EVENT_SAY { |
Rewrote first code completely and now works fine
Code:
sub EVENT_SAY { 2nd and 3rd are still not working for some reason. here is current code for them. These 2 are in my Global_Player.pl for refrence. 2nd Code:
sub EVENT_LEVEL_UP { Code:
sub EVENT_DEATH { |
Those last two were just missing brackets. A good "Code Beautifier" plugin will help there.
Also, just wanted to mention that quest::setglobal is (String, String, Int, String) even though the parser seems to be ok with having it (String, Int, Int, String). Emu is moving towards LUA, so might want to consider moving as well. Code:
sub EVENT_LEVEL_UP { |
All times are GMT -4. The time now is 10:42 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.