1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

KScript - Server Scripting for KAG Classic

Discussion in 'Community Dev Corner' started by master4523, Mar 26, 2013.

Mods: Downburst, Mazey
  1. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Doesn´t work. :huh?: :QQ:
     
  2. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    Did you check if war is effectively set to true?
    Do a console.log(war)
     
  3. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Yes, I tested if war is true.
    </br>--- merged: Apr 11, 2013 12:30 PM ---</br>
    It doesn´t even work like that:
    PHP:
    ks.events.on('playerKilled', function(victimattackertype) {
        if (
    attacker == null) return; // Stops the script
      //  if (war == false) {
            
    if (typeof(attacker.data.rk) === 'undefined') {
                    
    attacker.data.rk 0;
            }
            
    attacker.freeze(10 1000);
            
    ks.server.message(attacker.getName() + ' has been frozen for Randomkilling (RKing).' '( ' attacker.data.rk ' / 8) before getting kicked');
            
    attacker.data.rk ++;
            if(
    attacker.data.rk 7) {attacker.kick();
            }
      
    //  }
    });
     
  4. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    It looks correct to me. What does it say? Is it crashing?
    Try to debug it by using console.log so you can check if everything is being executed.

    Edit: Now I remember why it doesn't work. You have to use setKillfeed, at the beginning of your main script
     
  5. Anyways.
    var name = player.name;
    var name = player.getName();
    Both gives you same results. master4523 made .getName() function to protect people from accidentally changing players name with their code, which would be absolutely "breaking" error to do.
     
  6. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Ah thanks! Now it works perfectly!

    But I´ve got another question :p.

    Is this going to be updated or will you leave it in its current state?
    Because I allready saw some bugs/glitches and thinks that are acting weird.
     
  7. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    It will get updated soon (no ETA)
    Feel free to send me a PM if you've found bugs
     
  8. Master, do you guys have plans to put it somewhere like GitHub? You could do issue tracking there that would give people a place to report bugs. They also have wiki and download ability as well.
     
  9. Git would probably work.

    I am wondering how many people have actually installed KScript on their servers and how many people actually are trying / have tried to create mods for it.
     
    Froghead48 likes this.
  10. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    I have installed it on all my servers, I've made a killstreaks mod, based off Masters script and I am working on a few other things. Once completed, I'll post them here, feel free to include: Australian CTF Server, Australian RTDM Server and BC FlatMaps as a server that has kscript installed. Rave CTF server (not hosted by me, but by soulrealm) is also running your Kscript.

    I also want to thank you for creating such a powerful/easy to use script tool and for releasing it to the public :) :heart:
     
  11. Zer0Striker

    Zer0Striker Shipwright

    Messages:
    139
    Could someone make a video on how to install this using virtual box with debian on windows?
     
  12. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Zero, download and install VirtualBox - It's free and can be found here: http://download.virtualbox.org/virtualbox/4.2.10/VirtualBox-4.2.10-84105-Win.exe

    You will also need an iso file, or Image file for Debian. There are 2 versions, one which is a minimalistic install (will install the SUPER BASICS) so if you know nothing about linux and DONT want to jump into the deep end, don't download THIS version: http://www.debian.org/distrib/netinst

    If you want a Desktop version, so you have GUI: http://www.debian.org/CD/live/ Use the torrent and download CD one (all CD's after CD one are for additional packages IIRC) - remember to select the correct architecture type, to match your CPU for example AMD64 for 64 bit processor and i386 for 32 bit Processor.

    Once you have installed VirtualBox (it should be next, next, next E Z P Z install) and have downloaded the image of your choice, you can follow these instructions (not written by me)

    - This tutorial has pictures on how to do it: http://www.wired.com/geekdad/2012/02/debian-linux-on-oracle-virtualbox/?pid=1007

    Kaizokuroofs basic guide - without pictures and from memory XD

    1) Launch Virtual Box
    2) Click "new" at the top left corner
    3) Follow the prompts!

    From step 3 you basically need to point it to iso file and install it like you would a normal operating system, there are plenty of guides out there, check out the Ubuntu or Debian Wiki for great assistance/guides or jump on the IRC, the Ubuntu/Debian guys are usually pretty friendly (unlike the Gentoo mastah race)

    installation guide for Debian 6 Squeeze: http://www.debian.org/releases/stable/installmanual (it has all versions for you)

    Once you've downloaded and configured debian to your liking, you'll need to install KAG, thankfully it's super e z - if you installed a 64 bit OS, you'll need to do ONE additional step, which is installing the 32 bit libs. Excellent KAG guide found here: https://wiki.kag2d.com/wiki/Server#Linux_Install

    The rest is as simple as downloading Kscript - Unzipping it into your ROOT folder for KAG, for example, with mysetup I have a folder under the root filesystem, and from there I separate my servers: /KAG/ctf or /KAG/rtdm or /KAG/gather

    So if I'm installing to ctf, I would unzip the kscript to /KAG/ctf and then follow the actual instructional guide provided by the Kscript team ;3

    hope this helps, maybe if I get time I'll write you a proper guide :)
     
  13. miniu

    miniu Haxor

    Messages:
    765
    1.How to make if 5/10 players sayed : blabla it is doing something that i want.
    2.How to make if player did something (some times , meaby 3 in 1 minute ) it is doing something with him.
     
  14. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Do you mean a vote?


    Did what?

    You need to give us more informations what you actually want to do. Some Ideas how you thought it could work would be nice, too.
    (This isn´t a thread were people make the whole mods for you)
     
  15. jammer312

    jammer312 Bison Rider Tester

    Messages:
    46
    miniu, you don't need to post this, PM me or master4523 for any help.

    I have more difficult question. Is there any getTeam() methods? I seen something like this at KScript files
     
  16. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    I am working on a few mods, but they don´t run permanently on a server, because I can not run them in background. (nohup is crashing it for me)
     
  17. If someone from Oceania could help me script...
     
  18. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,914
    Or just post your question and I try to answer you
    You can't do the team stuff, I remember master saying something on irc you can't check which team someone is.
     
  19. My questions aren't questions but requests, because I am a terrible scripter. If you're okay with that, I can spam you in a conversation with requests :3
     
  20. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,914
    I can try, tell me.
     
Mods: Downburst, Mazey