Jump to content

Moriarty

Members
  • Posts

    135
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Moriarty

  1. Add this:

     

    announce "There are "+getmapusers("quiz_01")+" players on the map",8;

     

    after the OnPcLogoutEvent ( before the if ).

    Log double account and see what number appears on the announce after loggin out.

    If it's 1, then it's weird.

     

    As an alternative you can create a timer, that checks every 1 minute if there is only one player in the map, then you don't have to use OnLougoutEvent. ( Event start would initnpctimer, and OnTimer60000: would reset the timer if the event is still going on ).
     

  2. Anywhere within all the other defs.

    And being TXT or SQL doesn't matter, every time you change something on your source code, you need to recompile again.

     

    Recompile is the action of creating the executables ( login-server.exe, map-server.exe, char-server.exe ), if you don't recompile, you will run the exe with the outdated code.

    • Upvote 1
  3. I was thinking about this, and found this is will be neat job.

    Just imagine the flow, first all files loaded with mobs. in @relaodscript all scripts are unloaded (by npc_unload, regardless the files and their contents), then so?

    Linking all mobs to NPC file names on load?

    Make exception for the part of NPC that have to be unloaded or not?

    If the NPC has boss, the boss will be skipped on next load file?

    Actually, how to link Mob & NPC. On NPC unloaded, it's freed from memory, we can't stick the NPC id to monster.

     

    And there are more something that will give me more pains when I just think about it, but idk for others. /heh

    Well, in my server, I just made reloadscript skip all files within mobs directory, if you want to do it just with MvPs, I guess you would separate all MvP spawns in a single file.

    And.. well, actually I transformed all my mob spawns into a database table, it was a pain not being able to dynamically create natural spawns :v

    But nevermind, as I said before, you can close this topic haha, thanks.

  4. I have a big retangular npc sprite, and I wish to calculate the area it occupies.

    Horizontal and Vertical calculation is easy.

    Is know it's X area, Y area, position and direction.

    I need now to calculate diagonal area, to get all the cells the npc occupies, not sure about the math behind it.
    Remembering that npc position 1 and 5 != 3 and 7

     

    Thanks

  5.  
    *attachrid(<account ID>)
    *detachrid;
     
    These commands allow the manipulation of the script's currently attached player.
    While 'attachrid' allows attaching of a different player by using its account id
    for the parameter RID, 'detachrid' makes the following commands run as if the
    script was never invoked by a player. 
     
    The command returns 0 if the player cannot be attached (if the account is offline
    or does not exist), and 1 upon success.

     

    Maybe because you are using the wrong argument?

    And, addrid is somewhat confusing for me, in your place I would do a query_sql where char `last_map` = x, using SQL function RANDOM to randomize the result.

  6. U will not be hacked if u learn to protect your web sites against sql inyection, too many webs and Ragnarok CP are bulnerables to that U_U

    Yeah, because no major company ever got hacked.

    And the last part of your sentence is exactly why there should be better encryption, AND IT SHOULD BE ENABLED BY DEFAULT.

  7. Isn't it past time to implement a new encryption type like SHA-256?

     

    MD5 is easily breakable, so there is really no reason someone would bother save encrypted passwords, and that's just a loss.. to players, as newbies admins frequently get hacked :P

×
×
  • Create New...