Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/26/24 in all areas

  1. A couple things to learn here: OnInit applies when the script is loaded, while OnInstanceInit applies when the instance is created. So in your case, you want to use OnInstanceInit. "demon_lair" is the base map, but that's not the map inside your instance. You want to use instance_mapname("demon_lair"); Likewise, when you're setting up the event label, it is attempting to call it on the base NPC, not the instanced NPC. So you want to use instance_npcname(strnpcinfo(0)) + "::OnKilledAzhura" "set" is a very much outdated command, use "=" instead. "$AzhuraSpawned" is a global, permanent, variable. It is kept when your server restarts and it is also shared between instances. You want to use 'variable instead. So your script would look something like this (and using menu is weird): demon_lair,99,101,1 script Demon Tomb 565,{ mes "[Tomb]"; mes "This is the resting place of a great demon named Azhura."; next; mes "[Tomb]"; mes "You can summon him through Nightmarish Ornament and Evil Energy."; next; mes "[Tomb]"; mes "Put the Nightmarish Ornament and Evil Energy."; next; switch(select("Yes.:No.")) { case 1: if ('AzhuraSpawned) { mes "The Great Demon Azhura is already here!"; close; } if (countitem(41001) < 2) { mes "You don't have the required items!"; close; } delitem 41001, 2; mapannounce .Map$, "Prepare for the unleashed evil!!", bc_map; 'AzhuraSpawned = 1; monster .Map$, 99, 106, "Great Demon Azhura", 1973, 1, instance_npcname(strnpcinfo(0)) + "::OnKilledAzhura"; close; case 2: mes "[Tomb]"; mes "Come back when you have decided."; close; } end; OnKilledAzhura: 'AzhuraSpawned = 0; end; OnInstanceInit: .Map$ = instance_mapname("demon_lair"); end; }
    1 point
  2. Hola //===== rAthena Script ======================================= //= https://rathena.org/board/topic/142082-pedido-npc-refinador-agregar-bonus/ //============================================================ prontera,170,181,4 script Refinador 4_4JOB_MAURA,{ .@max = 10; //max refino disable_items; cutin "4job_maura_01.PNG",2; mes "[Refinador]"; mes "Hola. Puedo refinar tus equipos ^0000FFsin que se rompan^000000, que ^0000FFno cobre nada^000000 y te deje ^0000FFelegir a qué nivel sube (+1 ~ +" + .@max + ")^000000!"; mes "Por favor elige el equipo."; setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower"; setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for ( .@i = 1; .@i <= 10; ++.@i ) .@menu$ += .@position$[.@i] + " [" + (getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : .@position$[.@i] + "- Nada") + "]:"; .@part = .@indices[ select(.@menu$) ]; clear; if (!getequipisequiped(.@part)) { mes "[Refinador]"; mes "Tienes que equipar el equipo que quieres refinar."; close3; } if (!getequipisenableref(.@part)) { emotion ET_OTL; mes "[Refinador]"; mes "Oh lo siento."; mes "Este artículo es imposible de refinar."; close3; } .@refineitemid = getequipid(.@part); // save id of the item .@refinerycnt = getequiprefinerycnt(.@part); //save refinery count setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3); mes "[Refinador]"; mes "A qué nivel quieres refinar tu " + .@position$[@menu] + "?"; input .@r; clear; if (.@r < 1) { mes "[Refinador]"; mes "Sólo puedo refinar de +1 a +" + .@max + "."; close3; } if (.@r > .@max) { mes "[Refinador]"; mes "Solo puedo refinar desde hasta +" + .@max + "."; if (select("Refinar a +" + .@max + ".", "No importa.") == 2) close3; .@r = .@max; } if (getequiprefinerycnt(.@part) == .@r) { emotion ET_PROFUSELY_SWEAT; mes "[Refinador]"; mes "^8B4513Este artículo ya está refinado al nivel que deseas...^000000"; close3; } // anti-hack if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3])) { next; emotion ET_FRET; mes "[Refinador]"; mes "Espera un segundo..."; mes "¡¿Crees que soy estúpido?!"; mes "¡Cambiaste el objeto mientras yo no miraba! ¡Fuera de aquí!"; close3; } if (getequiprefinerycnt(.@part) > .@r) downrefitem .@part, getequiprefinerycnt(.@part) - .@r; else successrefitem .@part, .@r - getequiprefinerycnt(.@part); emotion ET_DELIGHT; specialeffect EF_SUI_EXPLOSION; mes "[Refinador]"; mes "Muy bien, aquí está ~"; close3; } Puedes usar el sistema de Random Options.
    1 point
  3. Try this demon_lair,99,101,1 script #Demon_Tomb 565,{ mes "[Tomb]"; mes "This is the resting place of a great demon named Azhura."; next; mes "You can summon him through Nightmarish Ornament and Evil Energy."; next; mes "Put the Nightmarish Ornament and Evil Energy."; menu "Yes", L_yes, "No", L_no; L_no: mes "[Tomb]"; mes "Come back when you have decided."; close; L_yes: if (AzhuraSpawned) { mes "The Great Demon Azhura is already here!"; close; } if (countitem(41001) < 2) { mes "You don't have the required items!"; close; } delitem 41001, 2; mapannounce .Map$, "Prepare for the unleashed evil!!", bc_map; set AzhuraSpawned, 1; monster .Map$, 99, 106, "Great Demon Azhura", 1973, 1, strnpcinfo(0) + "::OnKilledAzhura"; close; OnKilledAzhura: set AzhuraSpawned, 0; end; OnInit: .Map$ = "demon_lair"; set AzhuraSpawned, 0; end; }
    1 point
  4. It won't influence the individual rates. What he provides is more or less just a poll. I think there is no direct way to overwrite rates directly for an individual player. But what you could do is set the rates of your server to default and use status changes to give each player an exp and drop bonus according to his choice to basically get the effect of different rates. - script RateSelect -1,{ OnSetRate: OnPCLoginEvent: switch(individual_rate) { case 1: .@exp_rate_bonus = .low_rate_exp_bonus; .@drop_rate_bonus = .low_rate_drop_bonus; break; case 2: .@exp_rate_bonus = .mid_rate_exp_bonus; .@drop_rate_bonus = .mid_rate_drop_bonus; break; case 3: .@exp_rate_bonus = .high_rate_exp_bonus; .@drop_rate_bonus = .high_rate_drop_bonus; break; default: mes "Select your preferred server rate for this character."; mes "BE CAREFUL: YOU CAN'T CHANGE IT AFTERWARD!" individual_rate = select("Low Rate:Mid Rate:High Rate"); close2; goto OnSetRate; } sc_start SC_EXPBOOST, INFINITE_TICK, .@exp_rate_bonus, 10000, SCSTART_NOICON; sc_start SC_ITEMBOOST, INFINITE_TICK, .@drop_rate_bonus, 10000, SCSTART_NOICON; end; OnInit: .low_rate_exp_bonus = 100; .mid_rate_exp_bonus = 19900; .high_rate_exp_bonus = 199900; .low_rate_drop_bonus = 100; .mid_rate_drop_bonus = 19900; .high_rate_drop_bonus = 199900; }
    1 point
  5. Version 1.0.1

    318 downloads

    i recoded older rAthena Serv Monitor by DarkIrata in newer WPF -> Added Multithreading Server Start -> Added 1Click-Restart Server Button -> Added the WebServ -> Errorlogs are working and saving without crashes -> New design the open-src code -> https://github.com/AoShinRO/rAthena-ServMonitor-ByAoShinHo
    Free
    1 point
×
×
  • Create New...