1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

[v1.10] ServerEPRSystem

Discussion in 'Unsupported / Outdated Plugins' started by vharonftw, Sep 11, 2011.

  1. WTF IM DUMB

    WTF IM DUMB Level 1

    Joined:
    Sep 26, 2011
    Messages:
    9
  2. Deathmax

    Deathmax Inactive TShock Developer
    TShock Mod

    Joined:
    Jul 23, 2011
    Messages:
    48
    If you are getting file is encrypted or is not a database, then there is a version mismatch.

    Try following Olink's advice instead and use a PDO.
    PHP:
    <?php
      
    try
      {
        
    //open the database
        
    $db = new PDO('sqlite:tshock.sqlite');

        
    //dump the Users table
        
    $result $db->query('SELECT * FROM Users');
        foreach(
    $result as $row)
        {
          
    var_dump($row);
        }
        
    // close the database connection
        
    $db NULL;
      }
      catch(
    PDOException $e)
      {
        print 
    'Exception : '.$e->getMessage();
      }
    ?>
    Result :
    PHP:
    array(10) {
      [
    "ID"]=>
      
    string(1"1"
      
    [0]=>
      
    string(1"1"
      
    ["Username"]=>
      
    string(0""
      
    [1]=>
      
    string(0""
      
    ["Password"]=>
      
    string(21"non-existant password"
      
    [2]=>
      
    string(21"non-existant password"
      
    ["Usergroup"]=>
      
    string(10"superadmin"
      
    [3]=>
      
    string(10"superadmin"
      
    ["IP"]=>
      
    string(13"192.168.1.102"
      
    [4]=>
      
    string(13"192.168.1.102"
    }
    array(
    10) {
      [
    "ID"]=>
      
    string(1"2"
      
    [0]=>
      
    string(1"2"
      
    ["Username"]=>
      
    string(8"deathmax"
      
    [1]=>
      
    string(8"deathmax"
      
    ["Password"]=>
      
    string(128"HASH-HERE"
      
    [2]=>
      
    string(128"HASH-HERE"
      
    ["Usergroup"]=>
      
    string(10"superadmin"
      
    [3]=>
      
    string(10"superadmin"
      
    ["IP"]=>
      
    string(0""
      
    [4]=>
      
    string(0""
    }
    array(
    10) {
      [
    "ID"]=>
      
    string(1"3"
      
    [0]=>
      
    string(1"3"
      
    ["Username"]=>
      
    string(5"death"
      
    [1]=>
      
    string(5"death"
      
    ["Password"]=>
      
    string(128"HASH-HERE"
      
    [2]=>
      
    string(128"HASH-HERE"
      
    ["Usergroup"]=>
      
    string(7"default"
      
    [3]=>
      
    string(7"default"
      
    ["IP"]=>
      
    string(0""
      
    [4]=>
      
    string(0""
    }
     
  3. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    For commands with costs you have to add the permission of that command to their group before they can use it... i.e. if you want a player to use warp he has to have the permission "warp" if you want him to warp for free he has to have both "warp" and "freewarp"

    also here's my current TO DO LIST for v 1.2 (tell me if I missed anything and/or if you want anything added to it)
    • C3 Reward System
    • Config file for main EPR plugin
    • /servershop pricelist [shop name] --- /servershop shoppricelist [shop name]
    • compute for Defense and Critical hits ( will fix the point award system bug : awarding more than once or none at all for killing a monster)
    • "shard tick" for logged in time
    • config for rank (will allow you to specify rank names and order)
    • config for command costs (will allow you to specify which commands will have costs)
    • i know i misspelled "setmultiplyer" so imma change it to /cpoints setmultiplier
    • add command : /checkdeathtoll (truncate to checkdt??)
    • add command : /check multiplier
    you can contact me here at this thread or PM me via the forum's PM feature or use the IRC channel I registered (details at the first page)

    [Update]
    Things that i crossed out have been done :p i'll update the status once in a while :p
     
  4. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    I might tweak this a bit... cuz i dun like the fact that people can just login and leave their characters online while afk and gain points... maybe i can make it so that every set number of time they'd get a prompt and they can type a command to get points...
     
  5. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    very true... and theres no "idle timeout" either
     
  6. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    yep yep... now my main problem is reducing CPU usage :p hehe though its not that noticeable it's also not that efficient (referring to my initial code draft) will try to think of a less "brute-force"-y way to implement this :p
     
  7. AquaDraco

    AquaDraco Level 1

    Joined:
    Sep 22, 2011
    Messages:
    18
    Yummy. Can't wait for the updates. For some reason, I find waiting for your updates more exciting than waiting for version 1.1 XD
    I won't put any pressure on your plans, therefore I'll keep my mouth- excuse me- fingers shut about what I'm hoping will be added next.

    What exactly is the reward system btw? P.S. surprises are cool too. :p
     
  8. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    Thanks xD but maybe that's cuz 1.1 doesnt come out till november (or december at the latest) hehe

    its not really a surprise (if you read the previous messages in this thread).. its a PvP reward system much like the current monster drop system for EPR it'll allow you to gain points for killing players (certain restricitions will be placed to make it balanced)
     
  9. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    Woot! finally got C3Rewards crossed out :p hehe
    I will also add these tidbits to the next update:
    • will change how the ServerShopCatalogue is generated (i.e. I re-balanced the prices (your prices won't be affected if you already have the table set up so if you want to take a peep just delete the old table from your db and generate it again) just an FYI i used the actual prices for the items i.e 1 point = 1 copper coin..)
    • will include a re-priced ServerShopCatalogue.csv in the download.. its pre-sorted into different shops and some grief items have been made "out of stock"
    im sooooo close ^___^ v 1.2 here i come ^___^
     
  10. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    great work vharon keep it up. ok so i am getting an exception thrown randomly:

    I seem to be getting random crashes since the upgrade. this is from the event log:
    Application: TerrariaServer.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.ArgumentOutOfRangeException
    Stack:
    at System.ThrowHelper.ThrowArgumentOutOfRangeException()
    at ServerPointSystem.TempAccount.UpdateAccountInDB()
    at ServerPointSystem.ServerPointSystem.OnSaveWorld(Boolean, System.ComponentModel.HandledEventArgs)
    at Hooks.WorldHooks+SaveWorldD.Invoke(Boolean, System.ComponentModel.HandledEventArgs)
    at Hooks.WorldHooks.OnSaveWorld(Boolean)
    at Terraria.WorldGen.saveWorld(Boolean)
    at Terraria.WorldGen.saveAndPlayCallBack(System.Object)
    at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()


    Fault bucket 2380046126, type 5
    Event Name: CLR20r3
    Response: Not available
    Cab Id: 0

    Problem signature:
    P1: terrariaserver.exe
    P2: 0.0.0.0
    P3: 4e7e58f1
    P4: mscorlib
    P5: 4.0.0.0
    P6: 4dd23522
    P7: 222
    P8: 18
    P9: System.ArgumentOutOfRange
    P10:

    Attached files:
    C:\Users\IglooAtHome\AppData\Local\Temp\WER1B0B.tmp.WERInternalMetadata.xml

    These files may be available here:
    C:\Users\IglooAtHome\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_terrariaserver.e_19ba904786f047f84ce6728f6dcbe531f432795_35c427b3

    Analysis symbol:
    Rechecking for solution: 0
    Report Id: ce1c5a71-eb03-11e0-8694-842b2b9a2ecc
    Report Status: 0

    Let me know what other info i can provide. thanks.
     
  11. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    :O never gotten that error b4... hmm... i'll see what i can do.. it should be ok in the next update..
     
  12. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    yea its strange. happens randomly and has occurred in both the latest version and prior version.
     
  13. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    strange... my server is up 24/7 and i 've never had that error..

    on a side note: done with the config file for the rank system :p it is now fully customizable ^______^
     
  14. alerek

    alerek Level 6

    Joined:
    Jul 25, 2011
    Messages:
    125
    Wooooot!!!! Highly anticipating this. Designing v14 of my map for the past few days, mainly with EPRS in mind. Being able to drop that along with some PvP rewards would just be fantastic~~~
     
  15. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    wonderful!

    i run: chest control, sign control, more admin commands, chat blocker, housing protection. Do you run the same addons? just trying to see if there is a culprit causing the error.
     
  16. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    i run almost all the released plugins available exce[t for TerraIRC cuz i use IRCBridge... well its clear that its happening when the map is saving... anything specific that happened during those times that you think is causing this?

    on a side note V 1.3 is out :D (i skipped the TimeRewards plugin and the config for command costs though.. will include it in the next update)
    I updated the links but the readme and the main post have yet to be updated so keep ur shorts on :p

    you can download it if you want a quick peek ^___^ hehe
     
  17. Olink

    Olink Admin note: Actually a really nice person now

    Joined:
    Jul 21, 2011
    Messages:
    1,397
    SQLEditor.ReadColumn("ServerPointAccounts","amount", where)[0]

    you assume it contains a [0]....could be your problem
     
  18. vharonftw

    vharonftw Testing until the end

    Joined:
    Aug 19, 2011
    Messages:
    326
    it shouldn't be a problem since "ServerPointAccounts" should contain the names of all the players who logged in, and i made sure that it only goes in that loop if a player had indeed logged in so it should always contain a [0].. shoudln't it? I'll add a check just to be sure though thanks Olink ^__^

    my guess is that the list gets modified while its being used in the loop :/

    err... i can't reproduce the error no matter how hard i try... i even use /save every 5 minutes... ~_~

    @darkos do you have people with multiple accounts or do you have a forced register and login implemented at ur server?

    @anyone else who has this bug please share a log or 2 or anything that might help @[email protected]
     
  19. Twitchy

    Twitchy Plugin Manager and TShock Dev

    Joined:
    Jul 22, 2011
    Messages:
    281
    Don't assuse there is info in the list. Use .Count first... Then take info from the list
     
  20. Olink

    Olink Admin note: Actually a really nice person now

    Joined:
    Jul 21, 2011
    Messages:
    1,397
    That would likely be a different error, but possible...I guess.

    This is specifically saying you have an index out of bounds...the only thing that uses an index i can see is that line.