Posts by james1bow

    THIS PLUGIN IS JUST FOR FUN!!!! YOU CAN USE IT ON YOUR SERVER BUT I WOULD NOT!!!

    was bored so made a small gravity plugin.


    /gravity default sets your gravity

    /gravity VALUE value has to be a float (-5.0f) default gravity is -9.81f.

    /gravity all default sets all players on the server gravity to default

    /gravity all VALUE sets all players on the server gravity


    entering other commands that start with /gravity can/will cause an error!


    again just for fun i would only use on single player worlds!


    ps.

    if you dare enter /gravity 999.99f.

    Files

    • gravity.zip

      (2.01 kB, downloaded 114 times, last: )

    A mail plugin!


    to install:

    extract the zip file to your plugins folder!


    updates:

    1.1 fixed issue with data base not being created.


    to use:

    type /Mail Box to open the ui.

    type /Mail playerlist for a player list in chat.

    type /Mail help for help


    players can also email themselves (for saving coords and such)




    Youtube video here!



    future plans:

    ability to attach a single item to the mail.

    add a place-able mail box to check for letter/packages.

    new mail notification

    admin mail all function



    Files

    • WTGMailV1.1.zip

      (17.99 kB, downloaded 372 times, last: )

    is the Server.getAllAreas() not working? i beleive my code is correct but keep getting a null for start position.


    Java
    public void showareas(Player player){
    Area areas[] = Server.getAllAreas();
    for (Area area : areas) {
    Area newa = new Area(area.getStartPosition(),area.getEndPosition());
    Area3D toshow = new Area3D(newa);
    player.addGameObject(toshow);
    }
    }

    However, this is a big area (as many players areas are on his servers) and so far I've only been able to make 6 claims, which only cover one full house, part of another house and a farm plot. With the points going up each time (think its now 120 to the next claim) this is going to take a very long time.

    i believe yahgiggle mentioned adding a way for admins to give points in the future. for the time being the owner of the server can download db browser for sqlite. open the database in write mode(database.db in the plugin/worldname folder) and go to the points table and add points to the points column. then file/write changes. but, i cannot stress this enough backup the database first!

    if you meet other players, trade ... or post orders or receive them from npcs ...

    forgot to mention im also planning an auction house. there will be a selling/buying fee of some sort. there will also be a placable mail box for reciving packages from auction house and player to player deliveries/letters. player to player deliveries will have a mailing tax based on distance. the funds raised form the auction house and mail will be used as rewards for events as well as pay for materials for community builds. i think letters will be an equip able item that opens when you equip it. it can then be thrown away or stored in a chest(maybe a mail bag?)

    as im trying to work out mechanics of the professions for the rpg overhaul plugin.... ive figured out a way to make events cost stamina. so if you are a lumberjack chopping trees only cost say 5 stamina while for a miner it would cost 10. you will get so many points per lvl gained. said points can be assigned. so a lumber jack could upgrade the cost per tree chopped(lower stam cost) as well as upgrade total stamina. thoughts?

    As an example, let's take the plugins for the Rust game: in it, the plugins for teleporting home and teleporting to a saved point use different commands without a prefix. And the data about the author of the plugin is registered inside the plugin. Extra prefixes deprive of convenience when using the plugin.


    I do not think that the /sethome and /home commands will be used by other plugins that do not relate to teleport.

    using a prefix is the way to go. when a /command is used it triggers an onplayercommand method for all plugins. i ran into an issue where it was reading from the database from 2 of my plugins for every command entered. a simple fix was to add a prefix. so something like this:


    Java
    //plugin 1
    if (cmd[0].equalsIgnoreCase("/this")){
    get that database connection.
    } if (cmd[1].equalsIgnoreCase("database")){
    do something with this database
    }else{return;}
    }else{ return;}
    Java
    //plugin 2
    if (cmd[0].equalsIgnoreCase("/that")){
    get that database connection.
    } if (cmd[1].equalsIgnoreCase("database")){
            do something with that database
            }else{return;}
    }else{ return;}

    in my case it was just getting a database connection for both plugins. but if your doing something more complex you can cause errors in other plugins.

    with the above code it prevents any errors that may happening.

    also with the api being new there is alot of development going on, the odds of having multiple plugins using similar commands is quit high. in my case there will be a /sethome player position, /sethome area, and /sethome area npc so my prefix's will be /npc, /player, /Area fallowed by the sethome.

    how cool is that :love:

    you could learn certain crafts and if you meet other players, trade ... or post orders or receive them from npcs ... the possibilities are almost endless :):thumbup:

    yes. the possibilities are endless. one of many ideas so far!


    CLASS:

    fighter

    does more melee damage

    Stronger defenses

    higher max health



    archer

    does more ranged damage

    weaker defenses

    lower max health




    PROFESSIONS:

    lumber jack

    can plant trees starting lvl 1

    0.5 harvest amount per point assigned

    lower stamina drain

    2x xp for each log collected

    2x amount of board/sticks/lumber crafted



    hunter

    takes 2 x noise events to spook animals

    0.5 harvest amount per point assigned

    higher stamina drain

    2x xp for gutting animals



    miner

    faster mining speed

    lower stamina drain

    2x xp for each stone/ore mined

    2x amount of blocks crafted




    cook

    food timer -10 seconds per point assigned

    nutral stamina

    2x xp for each dish cooked



    farmer

    sub class crops

    can plant crops from lvl 1

    harvest amount + 1 per point assigned

    nutral stamina

    2x xp for each plant planted





    sub class animals

    can tame animals from lvl 1

    animal breed speed +1 per point assinged

    nutral stamina

    2x xp for each aninal gutted




    Builder

    sub class carpenter

    higher fall protection

    30 slot construction bag

    2x xp for each board placed

    2x amount of boards crafted




    sub class mason

    higher fall protection

    30 slot construction bag

    2x xp for each block placed

    2x amount of blocks crafted



    black smith

    lower smelting times

    1.5 x xp for each ore smelted

    1.5 x xp for each plate crafted

    i have started on some RPG type plugin elements. this is a work in progress and will be a long time before it is ready! feel free to give some input/requests!

    Tested it in single play...I like it a lot... :love:


    would it be possible for the menu to open as soon as you enter a portal?

    What would be optimal if this is a restricted menu that only offers the travel options ...

    for the owner of the portal possibly with a cancel button so that he can then edit the portal with "U" (the complete menu). :thinking:

    the menu auto open is possible but it would have to check vector position every time the player moves then compare this to the database. single player this would be fine, but if you had 20 ppl running around a server you would run into database locked issue as you can only have one connection at a time to an SQLite database. i will be redoing the plugin once the api gets an update.

    A small weather hud. displays current temp(not working, i guessing api limitation.), current weather and next weather.



    To Install:

    extract WTGWeatherHud to your plugins folder.


    Commands:

    /Weather help to display help

    /Weather Hide to hide the hud

    /Weather Show to show the hud


    Future plans:

    config file to set update time and hud position.


    To update:

    extract WTGWeatherHud to the existing plugin folder.


    Update 1.2:

    fixed bug (command's triggered sqlite connection for WTGTimeHud).




    A small plugin that adds a year, day ,month and time of the server. updates every 5 seconds.


    Install:

    extract the WTGTimeHud.zip to your plugins folder


    commands:

    /Time Help for help file

    /Time Show to show hud

    /Time Hide to hide hud


    Future plans:

    config file to set update time and hud position.



    To update:

    extract the file WTGTimeHud.jar to the existing plugin folder.


    Update V1.2

    changed hud position(was over chat).


    Update V1.3

    fixed bug (command's triggered sqlite connection for WTGWeatherHud).

    kinda the same issue here





    always returns a null.

    but i receive this in the console after i get the null error in console


    Code
    [19:56:40] UPDATE QUICKSLOT 2: corncob (604), tex: 0, stack: 4, status: 0, value: 0, durability: -1, modifier: Normal

    not sure if inventory methods are implemented or if there is another issue!