Jump to content

Emistry

Forum Moderator
  • Posts

    10015
  • Joined

  • Days Won

    396

Everything posted by Emistry

  1. https://rathena.org/board/topic/57218-valkyrie-assistant/#entry69687
  2. use @mapinfo command to check and ensure mapflags are correctly added to your maps. make sure the warp everywhere permission aren't given to the normal player group.
  3. custom skill effect? or something that work like functor mod? the LGP i think... that highlight cell area for skills
  4. try change mes "Proceed?"; if(select("Yes:No")==1) { set .@points,getPoints(getcharid(3)); if(.@points>=.@rpoints) { next; mes .npcname$; updatePoints(getcharid(3),.@rpoints); getitem .@ritemid,.@rquantity; mes "Here you go!. Thank you for voting. Don't forget to vote again. :D"; } else mes "Sorry, you do not have enough points for this item."; } into mes "Enter an Amount and proceed:"; input .@amount, 1; if(select("Yes:No")==1) { set .@points,getPoints(getcharid(3)); if(.@points>= (.@rpoints * .@amount)) { next; mes .npcname$; updatePoints(getcharid(3),(.@rpoints * .@amount)); getitem .@ritemid,(.@rquantity * .@amount); mes "Here you go!. Thank you for voting. Don't forget to vote again. :D"; } else mes "Sorry, you do not have enough "+(.@rpoints * .@amount)+" points for this item."; }
  5. .@card[2] = .@enchant; index 2 is 3rd card slot.
  6. 10061 is a Connection Refused error sent to you by the server. You could not make a connection because the target machine actively refused it. The most common cause is a misconfigured server, full server, or incorrect Port specified by the client.
  7. if ($DONATE_EXP_ZENY >= $DONATE_EXP_ZENY_AIM && $DONATE_EXP_ZENY_AIM > 0) { $DONATE_EXP_RATE = rand(.rate_range[0], .rate_range[1]); $DONATE_EXP_DURATION = gettimetick(2) + .duration; callsub(L_rate, $DONATE_EXP_RATE); // <------------ THIS LINE donpcevent strnpcinfo(3)+"::OnStart"; }
  8. may try this old tool http://rathena.sourceforge.net/tools/login_background/
  9. https://github.com/rathena/rathena/blob/master/src/map/pc.cpp#L6300-L6305
  10. *disablenpc "<NPC object name>"; *enablenpc "<NPC object name>"; These two commands will disable and enable, respectively, an NPC object specified by name. The disabled NPC will disappear from sight and will no longer be triggerable in the normal way. It is not clear whether it will still be accessible through 'donpcevent' and other triggering commands, but it probably will be. You can disable even warp NPCs if you know their object names, which is an easy way to make a map only accessible through walking half the time. Then you 'enablenpc' them back. You can also use these commands to create the illusion of an NPC switching between several locations, which is often better than actually moving the NPC - create one NPC object with a visible and a hidden part to their name, make a few copies, and then disable all except one. this will help you enable/disable your npc
  11. nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{ if (ins_nyd < 200) ins_nyd = 200; ....... ....... ....... ....... } may try add these 2 lines, it should help you escape most of the quests. or you can just remove all the related quest dialogs and validation.
  12. /* .___ ___. __ __ ___ | \/ | | | | |/ / | \ / | | | | ' / | |\/| | | | | < | | | | | | | . \ |__| |__| |__| |__|\__\ = Tarot Event v2016 = by Mik閕as = brAthena = User: http://forum.brathena.org/index.php/user/11630-mikeias/ */ prontera,128,329,4 script Evento do Destino 4_M_BARD,{ mes "[Evento do Destino]"; mes "Ol?"+strcharinfo(0); mes "Est?afim de testar sua sorte nas cartas? Fique atento quando anunciar o in韈io do evento."; next; switch(select("Participar do evento", ( getgroupid() >= $@lvminGM ? ( !$tarot_status ? "Ligar":"Desligar")+" Evento":"") , "Premia玢o", "N鉶 quero participar")){ case 1: // = Se evento n鉶 ativo if (!$tarot_status){ mes "[Evento do Destino]"; mes "Senhor"+(Sex? "":"a")+", no momento o evento n鉶 est?at韛o! N髎 avisaremos quando o evento come鏰r."; close; } // = Verifica se o nome do personagem j?est?no array for (set .@i,0; .@i < getarraysize($@tarot_participantes$); set .@i,.@i + 1) { if ( $@tarot_participantes$[.@i] == strcharinfo(0) ) { mes "[Evento do Destino]"; mes "Tenha calma "+strcharinfo(0)+"! N髎 ainda n鉶 estamos prontos para voc? aguarde um momento."; next; warp "force_1-1",100,100; close; } } mes "[Evento do Destino]"; mes "Tudo certo, anotei a sua participa玢o aqui! Em breve voc?ser?chamado para que o evento seja iniciado."; // = Adiciona o nome do personagem ao array set $@tarot_participantes$[getarraysize($@tarot_participantes$)], strcharinfo(0); //message strcharinfo(0), strnpcinfo(1)+" Meus parab閚s! Voc?se registrou com 陎ito para participar do evento."; announce strnpcinfo(1)+" <"+strcharinfo(0)+"> registrou-se para participar do evento!",bc_all; next; warp "force_1-1",100,100; close; case 2: if( agitcheck() || agitcheck2() ){ mes "[Evento do Destino]"; mes "Neste momento a Guerra do Emperium est?at韛a e n鉶 ?poss韛el dar in韈io ao evento!"; close; } mes "[Evento do Destino]"; mes "Ol? Game-Master! Voc?tem certeza que deseja "+( !$tarot_status ? "Ligar":"Desligar")+" o evento?"; if(select("N鉶:Tenho certeza") == 1) close; if ( !$tarot_status ){ donpcevent "Tarot Event::OnStart"; }else donpcevent "Tarot Event::OnStop"; close; end; case 3: mes "[Evento do Destino]"; mes "O participante que n鉶 for atingido pela carta 'Coma' receber?pontos de evento e recompensas aleat髍ias."; close; case 4: close; } OnInit: // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //set "[Evento do Destino]", "^800000"+strnpcinfo(1)+"^000000"; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - setarray $@mapeventtarot$, "poring_w01", 102, 71; // = Configura玢o do mapa do evento // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - set $@mintarot_participantes,2; // = N鷐ero m韓imo de participantes para iniciar o evento // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - set $@lvminGM, 60; // = Level m韓imo de GM para ligar/desligar o evento // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // = ATEN敲O: CADA ITEM TEM SUA QUANTIDADE // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - callfunc ("resetEventoTarot", $@tarot_participantes$, $@mapeventtarot$[0]); setarray .mapflag,0,1,7,8,13,22,33,34,12; for (set .@m,0; .@m < getarraysize(.mapflag); set .@m, .@m + 1){ setmapflag $@mapeventtarot$[0], .mapflag[.@m]; } end; } - script Tarot Event -1,{ // = In韈io autom醫ico OnClock0500: OnClock1700: // = In韈io manual OnStart: set $tarot_status,1; announce "[NPC] Evento do Destino: As inscri珲es para o evento est鉶 abertas! Voc阺 tem 5 minutos para participar. Digite @evt para participar.",bc_all; sleep 60000; announce "[NPC] Evento do Destino: As inscri珲es para o evento est鉶 abertas! Voc阺 tem 4 minutos para participar. Digite @evt para participar.",bc_all; sleep 60000; announce "[NPC] Evento do Destino: As inscri珲es para o evento est鉶 abertas! Voc阺 tem 3 minutos para participar. Digite @evt para participar.",bc_all; sleep 60000; announce "[NPC] Evento do Destino: As inscri珲es para o evento est鉶 abertas! Voc阺 tem 2 minutos para participar. Digite @evt para participar.",bc_all; sleep 60000; announce "[NPC] Evento do Destino: As inscri珲es para o evento est鉶 abertas! Voc阺 tem 1 minuto para participar. Digite @evt para participar.",bc_all; sleep 60000; if ( getarraysize($@tarot_participantes$) < $@mintarot_participantes ){ announce "As inscri珲es para o Evento do Destino n鉶 foram suficientes para iniciar.",bc_all; callfunc ("resetEventoTarot", $@tarot_participantes$, $@mapeventtarot$[0]); end; } announce "[NPC] Evento do Destino: As inscri珲es para o evento foram encerradas. Boa sorte a todos os participantes!",bc_all; set $tarot_status,0; for(set .@p, 0; .@p < getarraysize($@tarot_participantes$); set .@p, .@p + 1){ if ( isloggedin(getcharid(3, $@tarot_participantes$[.@p])) ){ warpchar $@mapeventtarot$[0], atoi($@mapeventtarot$[1]), atoi($@mapeventtarot$[2]), getcharid(0, $@tarot_participantes$[.@p]); }else{ deletearray $@tarot_participantes$[.@p], 1; } } sleep 8000; donpcevent "[GM]Tyr::OnSpeak"; end; OnReturn: while( getarraysize($@tarot_participantes$) > 1){ // = Enquanto o total de participantes for maior que 1 // sleep 1000; for(set .@p,0;.@p<getarraysize($@tarot_participantes$);set .@p,.@p+1){ sleep 1000; if(getmapusers("poring_w01") == 1){goto Vencer;} attachrid(getcharid(3,$@tarot_participantes$[.@p])); if( strcharinfo(3) == $@mapeventtarot$[0] ){ set .@CARDs,522+rand(1,14); specialeffect2 .@CARDs, strcharinfo(0); if( .@CARDs == 531 ){ deletearray $@tarot_participantes$[.@p], 1; percentheal -99,-99; sleep2 1500; warp "SavePoint",0,0; } } detachrid; } } sleep 2000; Vencer: if ( getarraysize($@tarot_participantes$)){ attachrid(getcharid(3, $@tarot_participantes$[0])); // = Atacha o account_id apartir do nome if ( strcharinfo(3) == $@mapeventtarot$[0] ){ announce "[NPC] Evento do Destino: O vencedor do evento ?o jogador '"+$@tarot_participantes$[0]+"' parab閚s!",bc_all; getitem 7227,1; set #evento,#evento+10; } detachrid; } callfunc ("resetEventoTarot", $@tarot_participantes$, $@mapeventtarot$[0]); end; // = Encerra o Evento OnStop: //announce "["+strnpcinfo(1)+"] Evento encerrado!",bc_all; callfunc ("resetEventoTarot", $@tarot_participantes$, $@mapeventtarot$[0]); end; } - script tarot_events -1,{ // = Se o participante que deslogou ou morreu estiver no mapa do evento, seu nome ser?retirado do array de tarot_participantes OnPCLogoutEvent: if ( strcharinfo(3) == $@mapeventtarot$[0] ){ for (set .@i,0; .@i < getarraysize($@tarot_participantes$); set .@i,.@i + 1) { if ( $@tarot_participantes$[.@i] == strcharinfo(0) ){ deletearray $@tarot_participantes$[.@i], 1; break; } } } end; } poring_w01,102,73,1 script [GM]Tyr 871,{ mes "[Organizadora de Eventos]"; mes "Jogadores na disputa..."; for (set .@i,0; .@i < getarraysize($@tarot_participantes$); set .@i,.@i + 1) { mes (.@i+1)+" - "+$@tarot_participantes$[.@i]; } close; end; OnSpeak: setarray .msgs$, "Usarei a habilidade 'Destino nas Cartas' em cada um de voc阺.", "As rodadas ser鉶 de acordo com a ordem de inscri玢o no evento.", "O vencedor ser?o 鷏timo a sobreviver!", "Boa sorte a todos os participantes!", "TAROOOW!"; for ( set .@i,0; .@i < getarraysize(.msgs$); set .@i, .@i+1 ){ npctalk .msgs$[.@i]; sleep 3000; } donpcevent "Tarot Event::OnReturn"; end; OnInit: setarray .x[0],94,105,99,110; setarray .y[0],68; npcspeed 195; initnpctimer; end; OnTimer1000: emotion rand(34,45); for(set .c,0;.c<getarraysize(.x); set .c,.c+1){ npcwalkto .x[.c],.y[0]; sleep 3500; } initnpctimer; end; } // = Reseta par鈓etros function script resetEventoTarot { // @param0 = array dos tarot_participantes // @param1 = map event deletearray getarg(0); set $tarot_status,0; mapwarp getarg(1), "prontera",156,183; return; } not all sleep2 could be changed into sleep, you need to identity which part of the script execution doesnt attach to players and which part does.
  13. in this scenario, it make no different, but if you are switching to quest_db then you had to rewrite the script and clientside quest info files.
  14. if (rand(1,100) > getd(".@P"+.@i+"[0]")) { for(set .@j,0; .@j<getarraysize(.@Default); set .@j,.@j+2) { getitem .@Default[.@j], .@Default[.@j+1]; if(!.@k[0]) setarray .@k[0], .@Default[.@j], .@Default[.@j+1]; } } else{ for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } } } change to if (rand(1,100) < getd(".@P"+.@i+"[0]")) { for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } } }
  15. getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
  16. 1. if you are checking for total of item count in current inventory getinventorylist; dispbottom "Your inventory has "+ @inventorylist_count +" items"; 2. if you are checking whether the player can hold the upcoming rewards if (checkweight(512, 100)) { getitem 512, 100; } else { dispbottom "You cant hold 100x Apple."; }
  17. *getequiprandomoption(<equipment index>,<index>,<type>{,<char id>}); Returns value of an attribute of a random option on an equipped item. See 'getequipid' for a full list of valid equipment slots. index parameter can be 0 to MAX_ITEM_RDM_OPT-1 (default 0-4). For valid attribute types, see `getrandomoptinfo` command reference. or *getinventorylist {<char_id>}; This command sets a bunch of arrays with a complete list of whatever the invoking character has in their inventory, including all the data needed to recreate these items perfectly if they are destroyed. Here's what you get: @inventorylist_option_id1[] - first array of random option IDs @inventorylist_option_value1[] - first array of random option values @inventorylist_option_parameter1[] - first array of random option parameters @inventorylist_option_id2[] - second array of random option IDs @inventorylist_option_value2[] - second array of random option values @inventorylist_option_parameter2[] - second array of random option parameters @inventorylist_option_id3[] - third array of random option IDs @inventorylist_option_value3[] - third array of random option values @inventorylist_option_parameter3[] - third array of random option parameters @inventorylist_option_id4[] - fourth array of random option IDs @inventorylist_option_value4[] - fourth array of random option values @inventorylist_option_parameter4[] - fourth array of random option parameters @inventorylist_option_id5[] - fifth array of random option IDs @inventorylist_option_value5[] - fifth array of random option values @inventorylist_option_parameter5[] - fifth array of random option parameters not available check for card id instead. *getequipcardid(<equipment slot>,<card slot>) Returns value from equipped item slot in the indicated slot (0, 1, 2, or 3). This function returns CARD ID, CARD0_FORGE, CARD0_CREATE, or CARD0_PET (for card 0, if the item is produced). It's useful for when you want to check whether an item contains cards or if it's signed. or getinventorylist
  18. default come with the Quest System, not showscript(...)
  19. SELECT .... FROM .... ORDER BY <column_name> update your SQL query to sort the ordering, or remove the ORDER BY ... DESC
  20. https://github.com/rathena/rathena/wiki/diff or ask the file author for assistance.
  21. sell it as a custom item box. add the item box into the quest shop add the script that give refined item into the item_db
  22. when your character are muted, it cant use command or chat. try replace the atcommand with these sc_start SC_MUTE, 10800000, 0; sc_end SC_MUTE; if you want a better approach, then use the setpcblock instead. *setpcblock <type>,<state>{,<account ID>}; *getpcblock {<account ID>}; 'setpcblock' command prevents/allows the player from doing the given <type> of action according to the <state> during the player session (note: @reloadscript removes all <type> except PCBLOCK_IMMUNE). The <type> values are bit-masks, multiples of <type> can be added to change the player action. The action is blocked when the <state> is true, while false allows the action again. 'getpcblock' command return the bit-mask value of the currently enabled block flags. Available <type>: PCBLOCK_MOVE Prevent the player from moving. PCBLOCK_ATTACK Prevent the player from attacking. PCBLOCK_SKILL Prevent the player from using skills/itemskills. PCBLOCK_USEITEM Prevent the player from using usable items. PCBLOCK_CHAT Prevent the player from sending global/guild/party/whisper messages. PCBLOCK_IMMUNE Prevent the player from being hit by monsters. PCBLOCK_SITSTAND Prevent the player from sitting/standing. PCBLOCK_COMMANDS Prevent the player from using atcommands/charcommands. PCBLOCK_NPCCLICK Prevent the player from clicking/touching any NPC/shop/warp. PCBLOCK_EMOTION Prevent the player from using emotions. PCBLOCK_NPC Simulate NPC interaction. Useful for NPC with no mes window. Sum of PCBLOCK_MOVE|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_NPCCLICK. PCBLOCK_ALL Sum of all the flags. Examples: // Make the attached player invulnerable to monster (same as @monsterignore) setpcblock PCBLOCK_IMMUNE, true; // Prevents the attached player from attacking and using skills setpcblock PCBLOCK_ATTACK|PCBLOCK_SKILL, true; // Re-enables attack, skills and item use setpcblock PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM, false; // getpcblock related checks if (getpcblock() & PCBLOCK_IMMUNE) mes "You are invulnerable!"; if (getpcblock() & (PCBLOCK_MOVE|PCBLOCK_SITSTAND)) mes "You can't walk or sit."; if ((getpcblock() & (PCBLOCK_ATTACK|PCBLOCK_SKILL)) == 0) mes "You can attack and use skills."; if (getpcblock() & PCBLOCK_CHAT) mes "You can't chat.";
  23. something like this ? prontera,155,181,5 script Sample 757,{ .@i = select(.menu$) - 1; .@size = getarraysize(getd(".array_"+.class[.@i])); copyarray .@array, getd(".array_"+.class[.@i]), .@size; for (.@i = 0; .@i < .@size; .@i++) { if (!countitem(.@array[.@i])) getitem .@array[.@i], 1; if (!isequipped(.@array[.@i])) equip .@array[.@i]; } mes "You have equipped your gear."; close; function func_EquipClassItem { .@class = getarg(0, 0); .@getargcount = getargcount(); for (.@i = 1; .@i <= .@getargcount; .@i++) .@array[.@i - 1] = getarg(.@i, 0); copyarray .array copyarray getd(".array_"+.@class), .@array, .@getargcount - 1; .menu$ = .menu$ + jobname(.@class) + ":"; .class[getarraysize(.class)] = .@class; return; } OnInit: // func_EquipClassItem(<class>, <item_list>,...,<item_list>); func_EquipClassItem(Job_Champion, 2289, 2202, 5377, 1517, 2104, 2404); end; }
  24. https://rathena.org/board/jobs_available/
  25. your packetver value aren't configured correctly according to your hexed client, or vice versa https://github.com/rathena/rathena/blob/master/src/config/packets.hpp#L16
×
×
  • Create New...