Jump to content

jaBote

Community Contributors
  • Content Count

    2037
  • Joined

  • Last visited

  • Days Won

    43

Posts posted by jaBote


  1. Yo siempre lo hice con una solución poco estilosa, con un script que OnPCLoginEvent lance el atcommand en tu PJ y ya está (estoy desde mi teléfono móvil y no puedo desarrollarlo, aunque el script es de menos de 10 lineas si no activas más cosas con el login).

     

    Aun así, el cliente tiene su propio showexp entre los mensajes de cliente, aunque es poco autoexplicativo porque no te da qué % de tu nivel has subido.


  2. Not currently and I doubt it could be easily implemented. All mobs on a map server exist only in RAM and are destroyed when the server is closed. I guess it's not a good idea to try saving tens of thousands of mobs every time the server closes.

     

    For the server, main difference for spawning whether a player or a monster is that the player gets loaded from permanent memory (SQL engine) and the mobs are spawned by scripts.


  3. Hi @JABOTE, could you tell me how to use getvariableofnpc()?

     

    doc/script_commands.txt

     

    *getvariableofnpc(<variable>,"<npc name>")

    Returns a reference to a NPC variable (. prefix) from the target NPC.

    This can only be used to get . variables.

    Examples:

    //This will return the value of .var, note that this can't be used, since

    //the value isn't caught.

    getvariableofnpc(.var,"TargetNPC");

    //This will set the .v variable to the value of the TargetNPC's .var

    //variable.

    .v = getvariableofnpc(.var,"TargetNPC");

    //This will set the .var variable of TargetNPC to 1.

    set getvariableofnpc(.var,"TargetNPC"), 1;

    Note: even though function objects can have .variables, getvariableofnpc

    will not work on them.

     

    You just need to use it like the first example (get the value of other NPC .vars).


  4. It's not possible unless the new card item is added on the item DB. In case it is, the code should be like this (change YOUR_CARD_ID to your actual card ID or you'll experience an error ingame:

     

    prontera,150,150,4	script	Fused Cards seller	60,{	mes "Wanna get a fused card?";	mes "For that, I need:";	mes "1x Red Potion";    // Item ID: 501	mes "1x Blue Potion";   // Item ID: 505	mes "1x Yellow Potion"; // Item ID: 503	mes "1x White Potion";  // Item ID: 504	next;	if (select("Yes:No")==2){ // No		mes "Get out of here!";		close;	}	if (countitem(501) && countitem(503) && countitem(504) && countitem(505)){		delitem 501,1;		delitem 503,1;		delitem 504,1;		delitem 505,1;		getitem YOUR_CARD_ID,1;		mes "There you go!";	}	else {		mes "You're missing items!";	}	close;}

  5. You're using a variable local to other NPC, which means that on the information NPC you just are trying to access a variable that is nonexistent on your NPC, thus 0.

     

    Use getvariableofnpc() script command and you could properly access the other NPC's variable.

     

    P.S.: moving to script support.


  6. Something like this?

     

    -	script	cutin_announce	-1,{OnPCLoginEvent:	switch(rand(1,3)){ // You can add more cutins editing second parameter of rand() and adding a new case on the switch		case 1:			cutin "cutin_1", 3;		break;		case 2:			cutin "cutin_2", 3;		break;		case 3:			cutin "cutin_3", 3;		break;	}	sleep2 5000; // Wait 5 seconds with the cutin open	cutin "",255;	end;}

     

    P.S.: Remember that cutins are .bmp files, placed in datatexture유저인터페이스illust


  7. I guess you're trying to import a conf file, which includes links to NPC files, as a NPC file itself.

     

    Check what file is trying to load 'npc/06Mapflag/106Fichieracharger.conf' as an NPC (npc: route/to/npc.ext) and try to import that conf instead (import: route/to/conf/file.ext).


  8. Never done anything like this, but if you feel like experimenting try the cursors example here: http://www.databasejournal.com/features/mysql/mysql-cursors-and-loops.html

     

    Of course, experiment as much as you want in a backup or a test DB :D. The query you want to use for each cursor repetition is like this:

     

    INSERT INTO `char_reg_num_db` (`char_id`, `key`, `index`, `value`) VALUES (EVERY_CHAR_ID_GOES_HERE, 'limit_var', '0', '1');

     

    Or you could get even smarter and do something like this (totally untested) code:

    -- Copy structure of char_reg_num_db into a temporary tableCREATE TABLE IF NOT EXISTS `temp_table` (  `char_id` int(11) unsigned DEFAULT '0',  `key` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '',  `index` int(11) unsigned DEFAULT '0',  `value` int(11) DEFAULT '0',  PRIMARY KEY (`char_id`,`key`,`index`),  KEY `char_id` (`char_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;-- Add all existing char_ids into our tableINSERT INTO `temp_table` (`char_id`) SELECT `char_id` FROM `char`;-- Add the data we want to add for every user (row in the table)UPDATE `temp_table` SET `key` = 'limit_var', `index` = '0', `value` = '1' WHERE 1;-- Insert the temporary data into our char_reg_num_db tableINSERT INTO `char_reg_num_db` SELECT * FROM `temp_table`;-- Drop our temporary tableDROP TABLE `temp_table`;

     

     And that's it. Hope it works. You should restart the server or make all your users relog for this to take effect.


  9. Couldn't you add some more information? Have you made any custom changes on the source code or are loading a plugin? What do you do to make this happen?

     

    Sadly, we don't have any sort of magical lever to solve these problems, especially if there's a big lack of information out there.


  10. Las quests deberían funcionar tal cual sin ningún tipo de problema, aunque el convertidor de las DBs de rAthena a Hercules está demasiado desactualizado y no sé si será muy seguro aplicarlo. En un principio soy yo quien lo mantiene aunque no tengo tiempo de momento para actualizarlo.

     

    Un saludo.


  11. The job change to High Novice should be made on the script before issuing the resetlvl(1) script command if you want to make your players rebirth.

     

    So, the sequence for getting someone to transcend is like this:

     

    jobchange Job_Novice_High;resetlvl(1);

    resetlvl(1) will automatically give the 100 stat points, First Aid and Trick Dead skills if the new job is High Novice.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.