1. These plugins are out of date or are no longer supported by their developers. If you wish to update a plugin, you must create a new topic (in the event that you aren't the original developer) in the submissions forum. If you wrote it, you can PM an admin or report the post to move it back, as long as you include updated information with the request/report.

[1.12]Quest System

Discussion in 'Unsupported / Outdated Plugins' started by Ijwu, Jun 28, 2012.

  1. cuntnim Member

    Exception while trying to load: luanet.dll
    Could not load file or assembly '9728 bytes loaded from TerrariaServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    Stack trace:
    at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource)
    at System.Reflection.Assembly.Load(Byte[] rawAssembly)
    at Terraria.ProgramServer.Initialize(Main main)
  2. Ijwu TShock Plugin Developer

    If it does absolutely nothing then there's a problem with the quest. You might have a syntax error or you might've used a function wrong. That's up to you to fix.

    Edit: Or there's a problem with luanet and you should've provided the error message in the first post. (I had to refresh to get the error post.)

    Edit 2: Anyway, I can't even replicate the problem you're having, and I have no idea what the stack trace means. Try redownloading, and I'll try the files on github to see if they got corrupted. Result: No problem from there. I don't even know what's causing your problem.
  3. cuntnim Member

    mmm thanks for the help i think im doing some think rong so im going to look into it and redo the lua codes
  4. Gamesmann Member

    Did you happen to watch Twitchys video on how to set up a quest?
  5. cuntnim Member

    yep but i will go over it again just in case i did some wrong
  6. Gamesmann Member

    When I follow Twitchy's video example exactly how he shows it, I get this error:

    QTools: ERROR: invalid arguments to method call

    Not sure what it means, but it doesn't allow the person to call the quest.
  7. Ijwu TShock Plugin Developer

    That is an error in your scripting. To put it simply: you did it wrong.

    I'll help you troubleshoot, just PM me with your full script.

    Sorry about the late response, for some reason I stopped getting alerts.
  8. cuntnim Member

    hi Ijwu can i pm you with my script as well :)
  9. Ijwu TShock Plugin Developer

    That's fine.
  10. Gamesmann Member

    I figured it was something to do with my scripting. I'll send it to you. Thanks for looking at it.:)
  11. Pychnight Member

    hmm, again here are some old code examples.


    [Basic Hunting Quest]

    Code:
    Private("Hello, I want you to go clear the mines of them mindless zombies", Player, Color.Yellow);
    Sleep(3000);
    Private("The zombies can be found inside the mine to the left", Player, Color.Yellow);
    repeat until AtXY(4143, 436, Player, 6);
    for i = 0,12 do
    DeleteTile(4133, 438+i);
    end
    repeat until AtXY(4126, 453, Player, 6);
    Private("Grrr...", Player, Color.Yellow);
    for i = 1,10 do
    SpawnMob("Zombie", 4146, 472, i );
    Sleep(500);
    end
    Private("Zombies: Hungry for Flesh!", Player, Color.Yellow);
    Kill("Zombie", Player, 10);
    Private("There are no longer zombies in the mines, I should return to Guide's Office for the reward", Player, Color.Yellow);
    ClearKillList( Player);
    repeat until AtXY(4143, 436, Player, 6);
    for i = 0,12 do
    TileEdit(4133, 438+i, "wood");
    end
    repeat until AtXY(4158, 429, Player, 6);
    Private("Thank you, so much for completing this quest, Here is your reward of 250 Copper Coins as promised.", Player, Color.Yellow);
    Give("Copper Coin", Player, 100);
    Give("Copper Coin", Player, 100);
    Give("Copper Coin", Player, 50);
    Sleep(5000);
    Private("Now, I must be leaving, New Quests should be avaible..", Player, Color.Yellow);
    Private("Quest Complete", Player, Color.Yellow);
    return true;

    [Party Quest] (not adapted to the new functions yet, i will update this example once, i get my quests to show up in the quest list...)

    Code:
    Private("King Eel: My Army Shall destroy you all!", Player, Color.Yellow);
    Sleep(3000);
    Private("King Slime Invasion Started", Player, Color.Green);
    Sleep(1000);
    Private("There Coming from the Left Side!", Player, Color.Yellow);
    Sleep(2000);
    for i = 1,15 do
    SpawnMob("King Slime", 4098, 431, i );
    Sleep(12000);
    end
    Kill("King Slime", Player, 5);
    Private("There Coming From The Right Side!", Player, Color.Yellow);
    Sleep(2000);
    for i = 1,15 do
    SpawnMob("King Slime", 4230, 427, i );
    Sleep(12000);
    end
    Kill("King Slime", Player, 5);
    Private("There every where!", Player, Color.Yellow);
    Sleep(2000);
    for i = 1,20 do
    SpawnMob("King Slime", 4098, 431, i );
    SpawnMob("King Slime", 4230, 427, i );
    Sleep(21000);
    end
    Kill("King Slime", Player, 20);
    ClearKillList( Player);
    Private("King Slime Invasion Defeated!, Return to quest giver", Player, Color.Red);
    repeat until AtXY(4158, 429, Player, 6);
    Private("Thank you, so much for completing this quest, Here is your reward of 250 Copper Coins as promised.", Player, Color.Yellow);
    Give("Copper Coin", Player, 250);
    Sleep(5000);
    Private("Quest Complete", Player, Color.Yellow);
    return true;
    [CLEARING Corruption quest]

    Code:
    Private("I want you to go Clear 5% of the corruption to the left, here take some purification powder", Player, Color.Yellow);
    Give("Purification Powder", Player, 20);
    Sleep(5000);
    repeat until AtXY(4105, 431, Player, 6);
    Sleep(1000);
    if GetRegionTilePercentage("corrupt grass", "corruption") < 95 then
    Private("5% of the corruption removed", Player, Color.Red);
    end
    Sleep(5000);
    Private("Quest Complete", Player, Color.Red);
    return true;
    but the examples Might not work currently due to the bug fixs and function changes in Ijwu's Version.

    All we need is a function that allows us to spawn/use custom monsters and reward the player with shards :)
  12. Ijwu TShock Plugin Developer

    Yeah, speaking of stuff like that. I mean to look into cross-plugin functionality. I like InanZen's chat plugin and I'd like to see if I can get some quest menus rolling. (No guarantees)

    I've not looked into that economy system nor the custom monsters plugin. So, once I get a look at the sources and maybe assess how well I might be able to incorporate them I might take a whack at it.
  13. Pychnight Member

    Cross-Plugin Functionality is very interesting lots of code to look at to see exactly how it works.

    EPR has a built in command to gift players shards so, (/award playername amount) if you can find this section of the code it should be fairly easy to adapt but custom monster seems it will be slightly more complex.

    I'm currently trying to find out why the example scripts won't list in the "listquests" command, I have been checking for formatting changes. (i will recheck later)
  14. Ijwu TShock Plugin Developer

    Have you made a region and subsequently attached said quests to the region? (Back to basics, eh?)
  15. Pychnight Member

    there specified to one region and there listed in mysql database in that region and i have reloaded the scripts ingame they just won't show up at first i was thinking this was a formatting error in one of the scripts or a format change in one of the functions, i used but it looks fine to me.
  16. Ijwu TShock Plugin Developer

    As soon as I find some time I'll test it out and try to replicate the problem you're having.
  17. Ijwu TShock Plugin Developer

    Whilst testing my newer version I noticed that quests bind to regions successfully and show up just fine. So, it should work by next version.
  18. SpIit Member

    Currently I'm combining the custom monsters plugin with this quest plugin, but after the quest spawns the 20 wraiths (mob which replaced the bound mechanics), the quest does not recognize that the player has killed the NPCs. Even when I manually spawn 20 more wraiths (and kill them), the quest does not respond.

    Code:
    Private("Quest Initiated: Infiltrate Aconitum Castle", Player, Color.Green);
    Sleep(5500);
    Private("<Level 142> Aconitum Keeper: You do not belong in this castle. Leave at once.", Player, Color.DarkOrange);
    Sleep(1500);
    Private("Raid Initiated: Aconitum Castle Dining Hall", Player, Color.Green);
    Sleep(5000);
    Private("<Level 53> Aconitum Guard: Eliminate the intruder!", Player, Color.Orange);
    Sleep(2000);
    id = SpawnMob("Bound Mechanic", 4754, 599, 10);
    id = SpawnMob("Bound Mechanic", 4754, 599, 10);
    Kill("Wraith", Player, 20);
    Sleep(2000);
    Private("<Level 142> Aconitum Keeper: You do not seem to fear death.", Player, Color.DarkOrange);
    Sleep(5000);
    Private("Raid Complete: Aconitum Castle Dining Hall", Player, Color.Green);
    Private("Raid Unlock: Aconitum Castle Keeper (Castletop)", Player, Color.Green);
    I can't tell if there is something wrong with this.
  19. Ijwu TShock Plugin Developer

    Your script is fine. I literally just copy-pasted and tested it. It worked flawlessly.

    If your script just stops after killing 20 wraiths or never initiates the rest of it then go into your server log file and look for an error.

    It should look something like this:

    Code:
    2012-07-10 12:52:04 - QTools: ERROR: Microsoft.Scripting.SyntaxErrorException: unexpected token '='
      at Microsoft.Scripting.Hosting.ErrorListenerProxySink.Add(SourceUnit sourceUnit, String message, SourceSpan span, Int32 errorCode, Severity severity)
      at IronPython.Compiler.Parser.ReportSyntaxError(Int32 start, Int32 end, String message, Int32 errorCode)
      at IronPython.Compiler.Parser.ReportSyntaxError(Token t, IndexSpan span, Int32 errorCode, Boolean allowIncomplete)
      at IronPython.Compiler.Parser.EatNoEof(TokenKind kind)
      at IronPython.Compiler.Parser.ParseSuite()
      at IronPython.Compiler.Parser.ParseLoopSuite()
      at IronPython.Compiler.Parser.ParseWhileStmt()
      at IronPython.Compiler.Parser.ParseStmt()
      at IronPython.Compiler.Parser.ParseFileWorker(Boolean makeModule, Boolean returnValue)
      at IronPython.Compiler.Parser.ParseFile(Boolean makeModule, Boolean returnValue)
      at IronPython.Runtime.PythonContext.ParseAndBindAst(CompilerContext context)
      at IronPython.Runtime.PythonContext.CompilePythonCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink)
      at IronPython.Runtime.PythonContext.CompileSourceCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink)
      at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink)
      at Microsoft.Scripting.Hosting.ScriptSource.CompileInternal(CompilerOptions compilerOptions, ErrorListener errorListener)
      at Microsoft.Scripting.Hosting.ScriptSource.Compile()
      at QuestSystemLUA.QTools.RunQuest(Object RunQuestOb)
    
    Except.... It won't mention "IronPython" at all and it will be much shorter. Just be on the look out for "QTools: ERROR: " which signifies something I need to see.

    (And yes, I'm working on Python scripting integration.)
    SpIit and Nim like this.
  20. SpIit Member

    Like you said. After testing it a little more, I realized that the quest does not recognize killing a custom mob of any kind, regardless of what it's base ID is. Thanks for the help though, as I wasn't sure if I did it right.

Share This Page