Jump to content

Derceto

Members
  • Posts

    43
  • Joined

  • Last visited

Posts posted by Derceto

  1. *getmapxy("<variable for map name>",<variable for x>,<variable for y>,<type>{,"<search string>"})

    This function will locate a character object, NPC object or pet's coordinates

    and place their coordinates into the variables specified when calling it. It

    will return 0 if the search was successful, and -1 if the parameters given were

    not variables or the search was not successful.

    Type is the type of object to search for:

    0 - Character object

    1 - NPC object

    2 - Pet object

    3 - Monster object.

    While 3 is meant to look for a monster object, no searching will be done if you

    specify type 3, and the function will always return -1.

    The search string is optional. If it is not specified, the location of the

    invoking character will always be returned for types 0 and 2, the location of

    the NPC running this function for type 1.

    If you compare player location to npc location before code in OnNPCKillEvent, you'll have your desired event.

  2. So here's my half-a-year-old script I decided to finally release to public, it wasn't ever used anyway - mission boards, like many others, with a half-assed documentation and crapload of functions you never would use (and/or understand).

    But you're free to have a look.

    missions v02.txt

    Now for those brave warriors who would dare to check it - a little helping guide to what the hell it is.

    Missions are:

    • Globally set
    • Can be hardcoded in source.
    • Can be added by GM-s of appropriate level in runtime (up to 128 missions)

    Missions have:

    • Name
    • Description
    • Base exp reward
    • Job exp reward
    • Required item (one or none)
    • Required mob (one or none)
    • Required item count
    • Required mob count
    • Reward item (one or none)
    • Reward item quantity
    • Minimal level
    • Maximal level
    • "Enabled" flag

    Players have:

    • Up to 128 slots for filling their missions (global setup in script)
    • Lots of time

    Additional features:

    • Weight check
    • Lots of possible NPC implementations: by level (3 types!), by "what-you-can-get", split between number of npcs and so on. See example chickens in Louyang lol~
    • Self-announce reminder on killing mobs
    • Cute interface with auto-generated menus o/
    • Documented script o/ God it's awful.
    • More stupid interface o/ enjoy
    • Inferiority to other boards like AnnieRuru's one with only one possible requirement/reward and no settings like days or class restrictions, but heck - stupid interface pays off o/

    p.s. feedback still appreciated

    Possible TODO, if someone/I am motivated enough:

    • Expand reward/requirements list
    • Add Class restriction
    • Add time restriction
    • Add repeatability settings

    • Upvote 1
  3. showinfo() is an extension (remake) of printf().

    syntax: showinfo(formatString, ...)

    Normally you would write

    ShowInfo("useatcmd: somevariable = %d n", somevariable);
    

    for integers. For floating point you use "%f" instead of "%d", for strings "%s".

    But if you're asking it this far, I suppose you won't know what to do after that anyway. Wait for someone less lazy than me come by.

    • Upvote 1
  4. it will only spawn

    
    if ($@ran == 8) set .MVPID,"1511";
    if ($@ran == 7) set .MVPID,"1647";
    if ($@ran == 6) set .MVPID,"1785";
    if ($@ran == 5) set .MVPID,"1630";
    if ($@ran == 4) set .MVPID,"1039";
    if ($@ran == 3) set .MVPID,"1874";
    if ($@ran == 2) set .MVPID,"1272";
    if ($@ran == 1) set .MVPID,"1719";
    

    these, even when you fix ".MVPID" to ".MVPID$".

    reason - you're checking $@ran (rand(1,8))after assigning $@ran2(rand (1,30))

    P.S. why not .@rand anyway?

  5. @ts might be the excessive branching nowadays.

    Previously when you google "make my server ragnarok" whatnot you would get a few, but detailed and direct guides with links to updating resources (ea, games-service svn). Now that all this stuff is happening around with renewal/3ceam/ra/ea/clients it's gotten harder to find a good guide (not to mention that even before that starting a server, even not a public one, could be challenging).

    IMHO.

  6. prontera,160,160,5 script Skill points quest 800,{
    set .@n$,"[skill Points Exchanger]";
    mes .@n$;
    mes "Hi, I can exchange 3 Yellow Gemstones and 20 Sticky Mucus to 1 skill point!";
    next;
    if (countitem(715) < 3 || countitem(938) < 20) {
    mes .@n$;
    mes "But you don't have'm!";
    close;
    }
    mes .@n$;
    mes "Do you want to exchange them?"
    next;
    if (select("Yes:No") == 2) {
    mes .@n$;
    mes "Okay then.";
    close;
    }
    else {
    delitem 715,3;
    delitem 938,20;
    set SkillPoint, SkillPoint + 1;
    mes .@n$;
    mes "All's done!";
    }
    close;
    }

    P.S. when you want it, you say "please", not "I want it"

  7. Well, it is "nullpo_h" or "nullpo_c" and where did you add the text ? At the end of all ?

    atcommand.c, in functions ATCMD_FUNC("something"), below "nullpo_retr()" line.

    And on "pc.h" do you enter litteraly "client_tick" or the number ?

    [because seriously, with the link, it is not so easy to understand...]

    "client_tick" should already be there (literally. it's a variable declaration).

    The only line you have to add is the line with "+" before it (others should already be there; find them, then add the one line.)

  8. Probably has something to do with attached player when checking and "useatcmd"-ing, probably null reference in useatcmd. Put some console debug writers in that function and see what you get.

    My guess is that it doesn't check whether <charname> is actually a character.

  9. i think that happens when you have 0 deaths because if you have zero death it will lead to a undefined result example: 14 kills / 0 deaths = undefined. I think if you have 0 deaths you should have a 14.0 ratio. My guess is to make +1 to deaths so it would be 14 kills / 0+1 deaths = 14.0 ratio

    [don't worry], it prevents that 0 gets calculated.(be happy~)

    If you don't want this debugmes change this:

    if(!getarg(1)) { debugmes "Error in KDR function, getarg(1) invalid value"; return 0; } // [Lighta]

    into this:

    if(!getarg(1)) return 0; // [Lighta]

    if(!getarg(1)) { return getarg(0); }

    It's the naming that was wrong here, "Error" is a too disturbing thing to write in debug. Should have been "Info:" or something, If there's any need for it at all, that is.

  10. So can it be afk-abused with 2 crusader-classes poking each other with Shrink on.

    Anything can be abused in some way, but that doesn't mean you shouldn't implement anything. Just make sure the abuses aren't fatal.

×
×
  • Create New...