Jump to content

Zell

Members
  • Content Count

    390
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by Zell

  1. View File [Script Command] viewcondition This mod allows you to set some conditions to a player can see or interact with a NPC. Command: viewcondition( npc_name, int_variable_name, compare_method, value_1, { value_2 } ); Compara Methods Avaiable: EVC_LESS - If player variable is < value_1 EVC_EQUALS - if player variable is == value_1 EVC_MORE - if player variable is > value_1 EVC_BETWEEN - if player variable is >= value_1 and <= value_2 EVC_DIFFERENT - if player variable is != value_1 You can apply more than one condition to a npc, but if one condition fail, the npc will not be seeing by the player. Script Sample: new_1,55,111,5 Script Lupina#1 10078,{ mes "You can see and talk with me because your @teste variable is less than one!"; next; mes "Now, I will set @teste to 2 and you will no longe see me when goes outsight me or if use @refesh!"; close2; @teste = 2; end; OnInit: viewcondition( strnpcinfo(0), "@teste", EVC_LESS, 1 ); end; } Submitter Zell Submitted 04/28/2020 Category Source Modifications Video Content Author Zell  
  2. Version 1.0.0

    26 downloads

    This mod allows you to set some conditions to a player can see or interact with a NPC. Command: viewcondition( npc_name, int_variable_name, compare_method, value_1, { value_2 } ); Compara Methods Avaiable: EVC_LESS - If player variable is < value_1 EVC_EQUALS - if player variable is == value_1 EVC_MORE - if player variable is > value_1 EVC_BETWEEN - if player variable is >= value_1 and <= value_2 EVC_DIFFERENT - if player variable is != value_1 You can apply more than one condition to a npc, but if one condition fail, the npc will not be seeing by the player. Script Sample: new_1,55,111,5 Script Lupina#1 10078,{ mes "You can see and talk with me because your @teste variable is less than one!"; next; mes "Now, I will set @teste to 2 and you will no longe see me when goes outsight me or if use @refesh!"; close2; @teste = 2; end; OnInit: viewcondition( strnpcinfo(0), "@teste", EVC_LESS, 1 ); end; }

    Free

  3. Well, I'm in quarentine as everyone so a lot of free time to spend. Remade from scratch the Launcher https://streamable.com/fc0sn7
  4. This tricky with model + texture was amazing. Good work!
  5. It's not already time to implement a foreach? for( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) { dispbotom "Val is " + [email protected][[email protected]]; } We could use: foreach( [email protected] : [email protected] ) { dispbottom "Val is " + [email protected]; } I could try to implement this but the script parser it's a bit confuse to me and I think someone could implement this better than me
  6. Zell

    effect

    You can use hateffects to use any game effect and clean it
  7. View File [Script Command] getdconst & setdconst First of all, yes, I know that this break the "const" concept, but I really miss "static values" in script engine. Yes, I know that we can use $vars but it's a lot pretty using const logic. If you don't know what is a "const", open your db/const.txt file In the end of file, you can add something like this: X_VALUE%TAB%1005 And now, you can call X_VALUE in any script and the script will know that X_VALUE is not a player script, it's a """"global"""" variable, so you can call it with or without a player attached. And now we came to my commands. getdsconst allow you to get a constant dynamically like getd. For sample: [email protected] = getdconst( "X" + "_" + "VALUE" ); This would return 1005. And now with setdconst we can change those as well. setdconst( "X_VALUE", 2020 ); Remember, when you restar t your server, this constant will be 1005 again! Here another sample script: prontera,150,150,5 Script CommandsTest 90,{ [email protected]$[0] = "SWORDCLAN"; [email protected]$[1] = "ARCWANDCLAN"; [email protected]$[2] = "GOLDENMACECLAN"; for( ; [email protected] < getarraysize( [email protected]$ ); [email protected]++ ) mes "Contant Value of [" + [email protected]$[[email protected]] + "] is " + getdconst( [email protected]$[[email protected]] ); next; mes "I will now, change all const values to +1"; for( [email protected] = 0; [email protected] < getarraysize( [email protected]$ ); [email protected]++ ) setdconst( [email protected]$[[email protected]], getdconst( [email protected]$[[email protected]] ) + 1 ); close; } Submitter Zell Submitted 04/03/2020 Category Source Modifications Video Content Author Zell  
  8. OnPCStatCalcEvent should never exist
  9. View File [Script Command] npcisnear This commands verify if any NPC is near the distance of a player. Can be useful for some script restrictions. Script Sample: prontera,150,150,5 Script Curious Boy 90,{ [email protected]$ = "[Curious Boy]"; [email protected] = 5; mes [email protected]$; if(isnpcsnear(getcharid(0), [email protected])) mes "Sorry, I will only talk with you when no NPC is near you!"; else mes "Hi!"; close; } Submitter Zell Submitted 04/02/2020 Category Source Modifications Video Content Author Zell  
  10. Version 1.0.0

    22 downloads

    First of all, yes, I know that this break the "const" concept, but I really miss "static values" in script engine. Yes, I know that we can use $vars but it's a lot pretty using const logic. If you don't know what is a "const", open your db/const.txt file In the end of file, you can add something like this: X_VALUE%TAB%1005 And now, you can call X_VALUE in any script and the script will know that X_VALUE is not a player script, it's a """"global"""" variable, so you can call it with or without a player attached. And now we came to my commands. getdsconst allow you to get a constant dynamically like getd. For sample: [email protected] = getdconst( "X" + "_" + "VALUE" ); This would return 1005. And now with setdconst we can change those as well. setdconst( "X_VALUE", 2020 ); Remember, when you restar t your server, this constant will be 1005 again! Here another sample script: prontera,150,150,5 Script CommandsTest 90,{ [email protected]$[0] = "SWORDCLAN"; [email protected]$[1] = "ARCWANDCLAN"; [email protected]$[2] = "GOLDENMACECLAN"; for( ; [email protected] < getarraysize( [email protected]$ ); [email protected]++ ) mes "Contant Value of [" + [email protected]$[[email protected]] + "] is " + getdconst( [email protected]$[[email protected]] ); next; mes "I will now, change all const values to +1"; for( [email protected] = 0; [email protected] < getarraysize( [email protected]$ ); [email protected]++ ) setdconst( [email protected]$[[email protected]], getdconst( [email protected]$[[email protected]] ) + 1 ); close; }

    Free

  11. Version 1.0.0

    37 downloads

    This commands verify if any NPC is near the distance of a player. Can be useful for some script restrictions. Script Sample: prontera,150,150,5 Script Curious Boy 90,{ [email protected]$ = "[Curious Boy]"; [email protected] = 5; mes [email protected]$; if(isnpcsnear(getcharid(0), [email protected])) mes "Sorry, I will only talk with you when no NPC is near you!"; else mes "Hi!"; close; }

    Free

  12. I'm using the same script posted here, its working. You have to make the source edits wich I post, as you can see you are in "source modifications" section, no "Script Section", so you have to modify the source to script works. The script sample will work after you make the source modifies I put in txt file donwload
  13. Hey, I tested and is everything working. Prob you make the wrong changes. Undo and try again to applay the modifies.
  14. View File [Script Command] isselling - Discovery if a npc is selling a item by ID This commands verify if a npc is selling, returning 1 to yes and 0 to no. Its very useful to black market scripts for players who knows item id and don't want to lost time searching where items are sold. Obs: Didn't test the sample script, but you can have a idea in how to use. Sample Script: prontera,150,150,5 Script Who's Selling 90,{ [email protected]$ = "[Who is Selling]"; mes [email protected]$; // Its nice to put a delay in this script if you use a lot of stores in one map and in your .npc$ array // I'm using 5 seconds in this sample. if((gettimetick(2) - whosell_delay) < 5) { mes "You have to wait 5 seconds to use me again."; close; } mes "Tell me the item ID you want to know what npc's is selling it!"; input [email protected]; // You can test this sample with 607 ID whosell_delay = gettimetick(2); for( [email protected] = 1; [email protected] < getarraysize(.npcs$); [email protected]++) { [email protected] = isselling( getcharid(0), .npcs$[[email protected]], [email protected] ); if( [email protected] ) { next; mes "Ha, this item is " + getitemname( [email protected] ) + ", right?"; next; mes [email protected]$; mes "Who is selling it is " + .npcs$[[email protected]] + "!"; close2; showevent QTYPE_EVENT,QMARK_YELLOW,getcharid(0),.npcs$[[email protected]]; // Show in npc a ballon to player end; } } next; mes [email protected]$; mes "No npc selling it :)"; end; OnInit: setarray .npcs$[1],"Store 1","Store 2"; end; } prontera,151,150,5 shop Store 1 90,607:1000 prontera,152,150,5 shop Store 2 90,610:1000 Submitter Zell Submitted 03/31/2020 Category Source Modifications Video Content Author Zell  
  15. Version 1.0.0

    60 downloads

    This commands verify if a npc is selling, returning 1 to yes and 0 to no. Its very useful to black market scripts for players who knows item id and don't want to lost time searching where items are sold. Obs: Didn't test the sample script, but you can have a idea in how to use. Sample Script: prontera,150,150,5 Script Who's Selling 90,{ [email protected]$ = "[Who is Selling]"; mes [email protected]$; // Its nice to put a delay in this script if you use a lot of stores in one map and in your .npc$ array // I'm using 5 seconds in this sample. if((gettimetick(2) - whosell_delay) < 5) { mes "You have to wait 5 seconds to use me again."; close; } mes "Tell me the item ID you want to know what npc's is selling it!"; input [email protected]; // You can test this sample with 607 ID whosell_delay = gettimetick(2); for( [email protected] = 1; [email protected] < getarraysize(.npcs$); [email protected]++) { [email protected] = isselling( getcharid(0), .npcs$[[email protected]], [email protected] ); if( [email protected] ) { next; mes "Ha, this item is " + getitemname( [email protected] ) + ", right?"; next; mes [email protected]$; mes "Who is selling it is " + .npcs$[[email protected]] + "!"; close2; showevent QTYPE_EVENT,QMARK_YELLOW,getcharid(0),.npcs$[[email protected]]; // Show in npc a ballon to player end; } } next; mes [email protected]$; mes "No npc selling it :)"; end; OnInit: setarray .npcs$[1],"Store 1","Store 2"; end; } prontera,151,150,5 shop Store 1 90,607:1000 prontera,152,150,5 shop Store 2 90,610:1000

    Free

  16. Hello, as some know I am leaving the community to grow professionally. I recently closed freelancers with great monetary returns and learning that will help me open my business. It's been 11 years in this community and thanks to the Ragnarok emulators I became a programmer. So that's goodbye, but I don't leave without leaving a new era for those who continue. I'm leaving two of my projects in which I use fake hooks to create new screens, interactions, walk with WASD and other systems. The code is not very clean because I had no idea I was distributing it. I will not teach how to use (but for experiend user's I can support, just ask in this post your doubts), but I appreciate it if someday someone more experienced guides on how to hook. Emulator: https://bitbucket.org/lukasrmattos/ragnaghostz/src/master/ Launcher & Hook Logic https://bitbucket.org/lukasrmattos/rgzlauncher/src/master/ Sample of system in those projects: https://streamable.com/m8291
  17. A little video compilation with some of those system alive https://streamable.com/m8291
  18. Para mexer no banco de dados do servidor te recomendo fortemente a utilizar essa ferramenta: E esquece esse pessoal tóxico aí. Por mais que a sua pergunta seja fácil de encontrar no google, ninguém nasce sabendo (inclusive a como se usar o google, isso é uma arte) sua dúvida não é tão assombrosa assim. Quando eu comecei a mexer com isso se o pessoal fosse assim em 2009 talvez eu tivesse desistido. Vou te ajudar no raciocinio que você poderia ter tomado para achar o que você precisa. Você quer modificar algo que já existe, certo? Então qual a melhor alternativa? Saber como se cria para saber como se modifica. Então apenas buscando no google "rathena add new item". Na primeira página já tem as respostas para sua pergunta: https://github.com/rathena/rathena/wiki/Custom-Items https://rathena.org/board/topic/83136-adding-custom-items-renewal/ Dessa forma além de você não ter que lidar com certas pessoas e comentários, você ainda resolve rapidamente seu problema sem precisar esperar.
  19. Actually, this is removing instance maps when deleting. If you clone some maps and so delete. When you enter in some instances map are black.
  20. Updated with Mastery Video (+200 masteries) Masteries can completely OP a skill when reaching max level as in sample video
  21. After if (dupmapid < 0) { ShowError("duplicatecreate: Map not found. (%s)\n", mapa); script_pushint(st, 0); return 0; } Add: struct map_data *mapdata = map_getmapdata(dupmapid); int tries = 0; if(x <= 0 || y <= 0) { do { x = rnd()%(mapdata->xs-2)+1; y = rnd()%(mapdata->ys-2)+1; } while(map_getcell(dupmapid,x,y,CELL_CHKNOPASS) || (tries++) < 1000); } if (tries > 1000) { ShowError("duplicatecreate: Impossible to find a valid spot in (%s)\n", mapa); return SCRIPT_CMD_FAILURE; } Didn't test it but should work
  22. I have made a tool to make this. Send me your iteminfo and item db
  23. I think he wants something like this: if( SEX == SEX_MALE ) { setarray [email protected]_name$[1],"Emergency Heal Perm", "Aura Blade Cut", "Jupon Katana", "Jupitel Thunder", "Deadly Poison"," Earth Spike"; setarray [email protected]_style[1],24, 25, 26, 27, 28, 29; } [email protected] = select( implode( [email protected]_name$, ":" ) ); [email protected]; delitem 6707,1; setlook 1,[email protected]_style[[email protected]]; {/code]
  24. Added Dressroom Mod. Players can choose and not just see the styles from dressroom https://streamable.com/n1ncz
×
×
  • Create New...

Important Information

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