Racaae
Members-
Posts
128 -
Joined
-
Last visited
-
Days Won
13
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Racaae
-
Editar Jobs/JobMaster/Condiciones Rebirth
Racaae replied to aleph075's topic in Spanish Scripting Soporte
Hola, creo que rAthena tiene más soporte y actualizaciones. 1- Abre \npc\re\scripts_jobs.conf. Encuentra y comenta estas líneas: // - 3-1 npc: npc/re/jobs/3-1/archbishop.txt npc: npc/re/jobs/3-1/mechanic.txt npc: npc/re/jobs/3-1/ranger.txt npc: npc/re/jobs/3-1/rune_knight.txt npc: npc/re/jobs/3-1/warlock.txt npc: npc/re/jobs/3-1/guillotine_cross.txt // - 3-2 npc: npc/re/jobs/3-2/genetic.txt npc: npc/re/jobs/3-2/minstrel.txt npc: npc/re/jobs/3-2/royal_guard.txt npc: npc/re/jobs/3-2/shadow_chaser.txt npc: npc/re/jobs/3-2/sorcerer.txt npc: npc/re/jobs/3-2/sura.txt npc: npc/re/jobs/3-2/wanderer.txt 2- NPC actualizado: prontera,153,193,6 script Job Master 123,{ function Get_Job_Equip; // Checks if the Player has the required level. // closes if not, returns if yes function Require_Level { if (BaseLevel < getarg(0) || JobLevel < getarg(1)) { .@blvl = getarg(0) - BaseLevel; .@jlvl = getarg(1) - JobLevel; mes "Level requirement:"; mes ((getarg(0)>1)? "^bb0000"+getarg(0)+"^000000 (^bb0000Base^000000) / ":"")+"^00bb00"+ getarg(1)+"^000000 (^00bb00Job^000000)"; mes "You need " + ((.@blvl > 0) ? "^bb0000"+.@blvl+"^000000 more base levels " + ((.@jlvl > 0) ? "and " : "") : "") + ((.@jlvl > 0) ? "^00bb00"+.@jlvl+"^000000 more job levels " : "") + "to continue."; close; } return; } // Checks if the given eac is a baby class function Is_Baby { return ((getarg(0, eaclass())&EAJL_BABY)>0); } // Checks if the player can change to third class. // Note: This does not include the level checks. function Can_Change_Third { // To change to third class you either need to be: // * Second Class // * Transcendent Second Class // * Baby Second Class if( !.ThirdClass ) return false; // Third job change disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_THIRD ) return false; // Already Third Class if( roclass(eaclass()|EAJL_THIRD) < 0 ) return false; // Job has no third Class if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE ) return false; // Exp. Super Novice equals 3rd Cls, but has it's own case if( Is_Baby() && (!.BabyClass || !.BabyThird) ) return false; // No Baby (Third) change allowed return true; } function Can_Rebirth { // To rebirth, you need to be: // * Second Class if( !.RebirthClass ) return false; // Rebirth disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&(EAJL_UPPER|EAJL_THIRD) ) return false; // Already Rebirthed/ Third Class if( roclass(eaclass()|EAJL_UPPER) < 0 ) return false; // Job has no transcended class if( Is_Baby() && !.BabyClass ) return false; // No Baby changes allowed return true; } // Checks if the given eac is a first class function Is_First_Cls { return (getarg(0) <= EAJ_TAEKWON); } function Check_Riding { // Note: Why we should always check for Riding: // Mounts are considered as another class, which // would make this NPC bigger just to handle with // those special cases. if (checkfalcon() || checkcart() || checkriding() || ismounting()) { mes "Please remove your " + ((checkfalcon()) ? "falcon" : "") + ((checkcart()) ? "cart" : "") + ((checkriding()) ? "Peco" : "") + ((ismounting()) ? "mount" : "") + " before proceeding."; close; } return; } function Check_SkillPoints { if (.SkillPointCheck && SkillPoint) { mes "Please use all your skill points before proceeding."; close; } return; } // addJobOptions is essentially the same like // setarray .@array[getarraysize(.@array)],opt1,opt2,...; // It's just easier to read, since we're using it very often function Job_Options { .@argcount = getargcount(); .@arr_size = getarraysize(getarg(0)); for( .@i = 1; .@i < .@argcount; .@i++) { setarray getelementofarray(getarg(0), .@arr_size++),getarg(.@i); } } // Begin of the NPC mes .NPCName$; Check_Riding(); Check_SkillPoints(); // initialisation .@eac = eaclass(); .@third_possible = Can_Change_Third(); .@rebirth_possible = Can_Rebirth(); .@first_eac = .@eac&EAJ_BASEMASK; .@second_eac = .@eac&EAJ_UPPERMASK; // Note: These are already set in pc.cpp // BaseClass = roclass(.@eac&EAJ_BASEMASK) which is the players First Class // BaseJob = roclass(.@eac&EAJ_UPPERMASK) which is the players Second Class //dispbottom "Debug: eac ("+.@eac+"), third ("+.@third_possible+"), rebirth("+.@rebirth_possible+"), BaseClass ("+BaseClass+"), BaseJob ("+BaseJob+")"; // From here on the jobmaster checks the current class // and fills the the array `.@job_opt` with possible // job options for the player. if( .@rebirth_possible ) { if (.JumpRebirth) { // SALTAR AL TRASCENDENTE Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options(.@job_opt, Class + Job_Novice_High); } else { // Rebirth option (displayed on the top of the menu) Require_Level(.Req_Rebirth[0], .Req_Rebirth[1]); Job_Options(.@job_opt, Job_Novice_High); } } if( .@third_possible ) { // Third Job change (displayed below rebirth) Require_Level(.Req_Third[0], .Req_Third[1]); Job_Options(.@job_opt, roclass(.@eac|EAJL_THIRD)); } if (.SecondExpanded && (.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE && // is Super Novice !(eaclass()&EAJL_THIRD) ) { // not already Expanded SN // (Baby) Super Novice to Expanded (Baby) Super Novice if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_SNOVI[0], .Req_Exp_SNOVI[1]); Job_Options(.@job_opt,roclass(.@eac|EAJL_THIRD)); // Expanded SN is "third" cls } } if (.SecondExpanded && ((.@eac&(~EAJL_BABY)) == EAJ_NINJA || // is (Baby) Ninja (.@eac&(~EAJL_BABY)) == EAJ_GUNSLINGER)) { // is (Baby) Gunslinger // (Baby) Ninja to (Baby) Kagerou / Oboro // (Baby) Gunslinger to (Baby) Rebellion if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_NJ_GS[0], .Req_Exp_NJ_GS[1]); // Kagerou, Oboro, Rebellion are considered as a 2-1 class Job_Options(.@job_opt, roclass(.@eac|EAJL_2_1)); } } // Player is Job_Novice, Job_Novice_High or Job_Baby if (.@first_eac == EAJ_NOVICE && .@second_eac != EAJ_SUPER_NOVICE) { // MAPID_NOVICE, MAPID_SUPER_NOVICE, MAPID_NOVICE_HIGH, MAPID_BABY Require_Level(.Req_First[0], .Req_First[1]); switch(Class) { case Job_Novice: // First job change Job_Options(.@job_opt,Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief, Job_Super_Novice, Job_Taekwon, Job_Gunslinger, Job_Ninja); if( .BabyNovice ) Job_Options(.@job_opt, Job_Baby); break; case Job_Novice_High: // Job change after rebirth if( .LastJob && lastJob ) Job_Options(.@job_opt, roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); else Job_Options(.@job_opt, Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High); break; case Job_Baby: if( !.BabyClass ) break; // First job change as a baby Job_Options(.@job_opt, Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer,Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief); if( .BabyExpanded ) Job_Options(.@job_opt, Job_Super_Baby, Job_Baby_Taekwon, Job_Baby_Gunslinger, Job_Baby_Ninja); if( .BabySummoner ) Job_Options(.@job_opt, Job_Baby_Summoner); break; default: mes "An error has occurred."; close; } } else if( Is_First_Cls(.@eac) || // First Class Is_First_Cls(.@eac&(~EAJL_UPPER)) || // Trans. First Cls (.BabyClass && Is_First_Cls(.@eac&(~EAJL_BABY))) ) { // Baby First Cls // Player is First Class (not Novice) // most jobs should have two options here (2-1 and 2-2) .@class1 = roclass(.@eac|EAJL_2_1); // 2-1 .@class2 = roclass(.@eac|EAJL_2_2); // 2-2 // dispbottom "Debug: Classes: class1 ("+.@class1+"), class2 ("+.@class2+")"; if(.LastJob && lastJob && (.@eac&EAJL_UPPER)) { // Player is rebirth Cls and linear class changes are enforced Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options(.@job_opt, lastJob + Job_Novice_High); } else { // Class is not enforced, player can decide. if( .@class1 > 0 ) { // 2-1 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options(.@job_opt, .@class1); } if( .@class2 > 0 ) { // 2-2 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options(.@job_opt, .@class2); } } } // Displaying the Job Menu defined by .@job_opt. // .@job_opt should not be changed below this line. function Job_Menu; Job_Menu(.@job_opt); close; // Displays the job menu function Job_Menu { // getarg(0) is the .@job_opt array holding all available job changes. function Confirm_Change; while(true) { .@opt_cnt = getarraysize(getarg(0)); if( .@opt_cnt <= 0 ) { mes "No more jobs are available."; close; } .@selected = 0; // Just a single job class given, no select needed if (.@opt_cnt > 1) { // Multiple job classes given. Select one and save it to .@class // After that confirm .@class mes "Select a job."; .@menu$ = ""; for (.@i = 0; .@i < .@opt_cnt; .@i++) { if( getelementofarray(getarg(0), .@i) == Job_Novice_High) .@jobname$ = "^0055FFRebirth^000000"; else .@jobname$ = jobname(getelementofarray(getarg(0), .@i)); .@menu$ = .@menu$ + " ~ " + .@jobname$ + ":"; } .@menu$ = .@menu$+" ~ ^777777Cancel^000000"; .@selected = select(.@menu$) - 1; if( .@selected < 0 || .@selected >= .@opt_cnt ) close; next; mes .NPCName$; } .@class = getelementofarray(getarg(0), .@selected); if ((.@class == Job_Super_Novice || .@class == Job_Super_Baby) && BaseLevel < .SNovice) { // Special Level Requirement because Super Novice and // Super Baby can both be selected in one of the first class // changes. That's why the Level Requirement is after and not before // the selection. mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@class) + "."; return; } // Confirm the Class Confirm_Change(.@class, .@opt_cnt > 1); next; mes .NPCName$; } return; } // Executes the actual jobchange and closes. function Job_Change { .@previous_class = Class; .@to_cls = getarg(0); next; mes .NPCName$; mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!"; if (.@to_cls == Job_Novice_High && .LastJob) lastJob = Class; // Saves the lastJob for rebirth jobchange .@to_cls; if (.@to_cls == Job_Novice_High) resetlvl(1); else if (.@to_cls == Job_Baby) { resetstatus; resetskill; set SkillPoint,0; } specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC; if (.@previous_class != Class) { if (.Platinum) callfunc "F_GetPlatinumSkills"; if (.GetJobEquip) Get_Job_Equip(); } close; // Always closes after the change } function Confirm_Change { // Player confirms he want to change into .@class .@class = getarg(0, -1); .@back = getarg(1, false); if( .@class < 0 || eaclass(.@class) == -1 ) { mes "Unknown Class Error."; close; } mes "Do you want to change into ^0055FF"+jobname(.@class)+"^000000 class?"; .@job_option$ = " ~ Change into ^0055FF"+jobname(.@class)+"^000000 class"; if( .@class == Job_Novice_High) .@job_option$ = " ~ ^0055FFRebirth^000000"; if (select(.@job_option$+": ~ ^777777" + ((.@back) ?"Go back" : "Cancel") + "^000000") == 1) { Job_Change(.@class); } if (!.@back) close; // "Cancel" pressed return; } // Function which gives a job related item to the player // the items are the rewards from the original job change quests function Get_Job_Equip { // Note: The item is dropping, when the player can't hold it. // But that's better than not giving the item at all. .@eac = eaclass(); if( .@eac&EAJL_THIRD ) { // Third Class Items getitem 2795,1; // Green Apple Ring for every 3rd Class switch(BaseJob) { // BaseJob of Third Cls // For Normal Third, Baby Third and Transcended Third Cls case Job_Knight: getitem 5746,1; break; // Rune Circlet [1] case Job_Wizard: getitem 5753,1; break; // Magic Stone Hat [1] case Job_Hunter: getitem 5748,1; break; // Sniper Goggle [1] case Job_Priest: getitem 5747,1; break; // Mitra [1] case Job_Blacksmith: getitem 5749,1; break; // Driver Band [1] case Job_Assassin: getitem 5755,1; break; // Silent Executor [1] case Job_Crusader: getitem 5757,1; break; // Dip Schmidt Helm [1] case Job_Sage: getitem 5756,1; break; // Wind Whisper [1] case Job_Bard: getitem 5751,1; break; // Maestro Song's Hat [1] case Job_Dancer: getitem 5758,1; break; // Dying Swan [1] case Job_Monk: getitem 5754,1; break; // Blazing Soul [1] case Job_Alchemist: getitem 5752,1; break; // Midas Whisper[1] case Job_Rogue: getitem 5750,1; // Shadow Handicraft [1] getitem 6121,1; // Makeover Brush getitem 6122,1; break; // Paint Brush } } else if (.@eac&EAJL_2) { // Second Class (And not Third Class) switch(BaseJob) { // Second Class case Job_Knight: getitem 1163,1; break; // Claymore [0] case Job_Priest: getitem 1522,1; break; // Stunner [0] case Job_Wizard: getitem 1617,1; break; // Survivor's Rod [0] case Job_Blacksmith: getitem 1360,1; break; // Two-Handed-Axe [1] case Job_Hunter: getitem 1718,1; break; // Hunter Bow [0] case Job_Assassin: getitem 1254,1; break; // Jamadhar [0] case Job_Crusader: getitem 1410,1; break; // Lance [0] case Job_Monk: getitem 1807,1; break; // Fist [0] case Job_Sage: getitem 1550,1; break; // Book [3] case Job_Rogue: getitem 1222,1; break; // Damascus [1] case Job_Alchemist: getitem 1126,1; break; // Saber [2] case Job_Bard: getitem 1907,1; break; // Guitar [0] case Job_Dancer: getitem 1960,1; break; // Whip [1] case Job_Super_Novice: getitem 1208,1; break; // Main Gauche [4] case Job_Star_Gladiator: getitem 1550,1; break; // Book [3] case Job_Soul_Linker: getitem 1617,1; break; // Survivor's Rod [0] } } else { // Neither Second or Third Cls // => First Cls or not covered by the switch switch(BaseClass) { // First Class case Job_Swordman: getitem 1108,1; break; // Blade [4] case Job_Mage: getitem 1602,1; break; // Rod [4] case Job_Archer: getitem 1705,1; break; // Composite Bow [4] case Job_Acolyte: getitem 1505,1; break; // Mace [4] case Job_Merchant: getitem 1302,1; break; // Axe [4] case Job_Thief: getitem 1208,1; break; // Main Gauche [4] case Job_Gunslinger: getitem 13101,1; break; // Six Shooter [2] case Job_Ninja: getitem 13010,1; break; // Asura [2] } } return; } OnInit: // Initialisation, do not edit these .NPCName$ = "[Job Master]"; // Settings .ThirdClass = false; // Enable third classes? .RebirthClass = true; // Enable rebirth classes? .SecondExpanded = true; // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? .BabyNovice = true; // Enable Baby novice classes? Disable it if you like player must have parent to get job baby. .BabyClass = true; // Enable Baby classes? .BabyThird = false; // Enable Baby third classes? .BabyExpanded = true; // Enable Baby Expanded classes: Ex. Baby Ninja, Baby Taekwon, etc. .BabySummoner = true; // Enable Baby Summoner? .LastJob = true; // Enforce linear class changes? .SkillPointCheck = true; // Force player to use up all skill points? .Platinum = true; // Get platinum skills automatically? .GetJobEquip = false; // Get job equipment (mostly weapons) on job change? .JumpRebirth = true; // SALTAR AL TRASCENDENTE // Level Requirements setarray .Req_First[0],1,10; // Minimum base level, job level to turn into 1st class setarray .Req_Second[0],1,40; // Minimum base level, job level to turn into 2nd class setarray .Req_Rebirth[0],99,50; // Minimum base level, job level to rebirth setarray .Req_Third[0],99,50; // Minimum base level, job level to change to third class setarray .Req_Exp_NJ_GS[0],99,70; // Minimum base level, job level to turn into Expanded Ninja and Gunslinger setarray .Req_Exp_SNOVI[0],99,99; // Minimum base level, job level to turn into Expanded Super Novice .SNovice = 45; // Minimum base level to turn into Super Novice // Setting adjustments by PACKETVER if( PACKETVER < 20161207 ) { if( .BabyExpanded ) debugmes "jobmaster: BabyExpanded is disabled due to outdated PACKETVER."; if( .BabySummoner ) debugmes "jobmaster: BabySummoner is disabled due to outdated PACKETVER."; .BabyExpanded = false; .BabySummoner = false; } end; } 3- Sí. -
Hi. Try this one if you do not want to use instance system, modified from AnnieRuru' Private MVP & Branch Room in \npc\custom\etc\mvp_room.txt //===== rAthena Script ======================================= //= Private MVP & Branch Room //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Allows players to rent an MVP room for personal use, //= or for a party or guild. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //============================================================ prontera,148,174,5 script DB Room Manager 4_F_RUSGREEN,{ mes "[^EFCC00 DB Room Manager ^000000]"; mes "How are thing with you?", " "; mes "I offer two types of DB Room. Choose what best suits your need."; switch(select("Public DB Room", "Private DB Room", "Buy Branches", "Cancel")) { case 1: .@room = select( "Enter Room 1 ["+ getmapusers("06guild_01") +"]", "Enter Room 2 ["+ getmapusers("06guild_02") +"]", "Enter Room 3 ["+ getmapusers("06guild_03") +"]", "Enter Room 4 ["+ getmapusers("06guild_04") +"]"); warp "06guild_0"+ .@room, 0,0; end; case 2: clear; mes "[^EFCC00 DB Room Manager ^000000]"; if ( getvariableofnpc( .rentcost, "DB Room Helper" ) ) mes "The cost to rent a room for "+ getvariableofnpc( .timeout, "DB Room Helper" ) +" minutes is "+ callfunc("F_InsertComma", getvariableofnpc( .rentcost, "DB Room Helper" ) ) +"z."; else mes "You can only use the room for only "+ getvariableofnpc( .timeout, "DB Room Helper" ) +" minutes."; mes " "; .@menu$ = ""; for ( .@i = 5; .@i <= 8; .@i++ ) { if ( getvariableofnpc( .renttime[.@i], "DB Room Helper" ) ) { //mes "Room #"+ .@i +" = "+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000"; .@menu$ += "Enter Room " + .@i + " ["+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000]:"; } else .@menu$ += "Rent Room " + .@i + ":"; } next; .@room = select(.@menu$)+4; if ( getvariableofnpc( .renttime[.@room], "DB Room Helper" ) ) { if ( .inuseid[.@room] == getcharid( .type[.@room] ) ) { warp "06guild_0"+ .@room, 0,0; close; } else { mes "[^EFCC00 DB Room Manager ^000000]"; mes "This room is reserved for "; mes .color$[ .type[.@room] ] + .whoinuse$[.@room] +"^000000."; mes "Please select another."; close; } } mes "[^EFCC00 DB Room Manager ^000000]"; mes "Reserve this room for..."; next; .@type = select( "For my party members", "For my guild members", "For personal account use" ); if ( !getcharid(.@type) ) { mes "[^EFCC00 DB Room Manager ^000000]"; mes "You do not own a "+( ( .@type == 1 )? "Party" : "Guild" )+"."; close; } else if ( Zeny < getvariableofnpc( .rentcost, "DB Room Helper" ) ) { mes "You don't have enough zeny to rent a room."; close; } else if ( getvariableofnpc( .renttime[.@room], "DB Room Helper" ) ) { mes "[^EFCC00 DB Room Manager ^000000]"; mes "I'm sorry, somebody else has already registered this room faster than you."; close; } for ( .@i = 1; .@i <= 8; .@i++ ) { if ( ( getvariableofnpc( .renttime[.@i], "DB Room Helper" ) ) && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) { mes "[^EFCC00 DB Room Manager ^000000]"; mes "You already rented Room#"+ .@i +". Use that room instead."; close; } } set .type[.@room], .@type; set .inuseid[.@room], getcharid(.@type); set .whoinuse$[.@room], strcharinfo( ( .@type == 3 )? 0 : .@type ); Zeny -= getvariableofnpc( .rentcost, "DB Room Helper" ); warp "06guild_0"+ .@room, 0,0; killmonsterall "06guild_0"+ .@room; donpcevent "Private DB Room Helper#"+ .@room +"::OnEnterMap"; close; case 3: close2; callshop "DB_Room#branch", 1; end; case 4: close; } OnInit: .color$[1] = "^EE8800"; // party color .color$[2] = "^70CC11"; // guild color .color$[3] = "^0000FF"; // account color end; } - script DB Room Helper -1,{ if (.renttime[ atoi( strnpcinfo(2) ) ]) npctalk "Time left: " + callfunc( "Time2Str", .renttime[ atoi( strnpcinfo(2) ) ] + .timeout * 60 ),strnpcinfo(0),bc_self; switch ( select(.menu$ + "Leave this room:" + (compare(strnpcinfo(1),"Private")?"Give up this room":"") ) ) { case 1: if ( mobcount( "this","" ) ) { npctalk "I cannot offer heal service when there are monsters around.",strnpcinfo(0),bc_self; end; } sc_end SC_STONE; sc_end SC_SLOWDOWN; sc_end SC_FREEZE; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLEEDING; sc_end SC_DECREASEAGI; sc_end SC_POISON; sc_end SC_HALLUCINATION; sc_end SC_STRIPWEAPON; sc_end SC_STRIPARMOR; sc_end SC_STRIPHELM; sc_end SC_STRIPSHIELD; sc_end SC_CHANGEUNDEAD; sc_end SC_ORCISH; sc_end SC_BERSERK; sc_end SC_SKE; sc_end SC_SWOO; sc_end SC_SKA; percentheal 100,100; specialeffect2 EF_HEAL; npctalk "You are completely healed.",strnpcinfo(0),bc_self; end; case 2: npctalk "Are you sure you want to leave this room?",strnpcinfo(0),bc_self; if ( select( "No, stay here","Yes, leave now") == 2 ) warp .respawnmap$, .respawnx, .respawny; end; case 3: if ( getmapusers( strcharinfo(3) ) > 1 ) { npctalk "There are still some players in this room. Make sure you are the last member in this room to use this option.",strnpcinfo(0),bc_self; end; } mes "[DB Room Helper]"; mes "Are you sure you want to give up this room?"; if ( .rentcost ) mes "You will need to pay again to enter this room."; next; if ( select( "Yes", "No" ) == 2 ) close; awake strnpcinfo(0); end; } close; OnEnterMap: .@id = atoi( strnpcinfo(2) ); .renttime[.@id] = gettimetick(2); sleep .timeout * 60000; mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny; .renttime[.@id] = 0; killmonsterall strnpcinfo(4); end; OnInit: if ( !getstrlen( strnpcinfo(2) ) ) { // Config --------------------------------------------------------------------------------------- // Room rental time, in minutes. // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! .timeout = 60; .rentcost = 100000; // Zeny cost for renting a room (0 = free) // Options setting inside the room .@menu[1] = 1; // Turn Heal option On/Off // Respawn point when players leave the room set .respawnmap$, "prontera"; set .respawnx, 150; set .respawny, 174; // Config Ends ------------------------------------------------------------------------ if ( !.timeout ) set .timeout, 60; .menu$ = ( .@menu[1] ? "Heal" : "" ) +":" ; } else { mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map; mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny; } end; } - shop DB_Room#branch -1,604:100000,12103:10000000 06guild_01,49,49,4 duplicate(DB Room Helper) DB Room Helper#1 4_F_RUSGREEN 06guild_02,49,49,4 duplicate(DB Room Helper) DB Room Helper#2 4_F_RUSGREEN 06guild_03,49,49,4 duplicate(DB Room Helper) DB Room Helper#3 4_F_RUSGREEN 06guild_04,49,49,4 duplicate(DB Room Helper) DB Room Helper#4 4_F_RUSGREEN 06guild_05,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#5 4_F_RUSGREEN 06guild_06,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#6 4_F_RUSGREEN 06guild_07,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#7 4_F_RUSGREEN 06guild_08,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#8 4_F_RUSGREEN 06guild_01 mapflag nowarpto 06guild_02 mapflag nowarpto 06guild_03 mapflag nowarpto 06guild_04 mapflag nowarpto 06guild_05 mapflag nowarpto 06guild_06 mapflag nowarpto 06guild_07 mapflag nowarpto 06guild_08 mapflag nowarpto 06guild_01 mapflag nomemo 06guild_02 mapflag nomemo 06guild_03 mapflag nomemo 06guild_04 mapflag nomemo 06guild_05 mapflag nomemo 06guild_06 mapflag nomemo 06guild_07 mapflag nomemo 06guild_08 mapflag nomemo 06guild_01 mapflag noteleport 06guild_02 mapflag noteleport 06guild_03 mapflag noteleport 06guild_04 mapflag noteleport 06guild_05 mapflag noteleport 06guild_06 mapflag noteleport 06guild_07 mapflag noteleport 06guild_08 mapflag noteleport 06guild_01 mapflag nosave SavePoint 06guild_02 mapflag nosave SavePoint 06guild_03 mapflag nosave SavePoint 06guild_04 mapflag nosave SavePoint 06guild_05 mapflag nosave SavePoint 06guild_06 mapflag nosave SavePoint 06guild_07 mapflag nosave SavePoint 06guild_08 mapflag nosave SavePoint 06guild_01 mapflag nopenalty 06guild_02 mapflag nopenalty 06guild_03 mapflag nopenalty 06guild_04 mapflag nopenalty 06guild_05 mapflag nopenalty 06guild_06 mapflag nopenalty 06guild_07 mapflag nopenalty 06guild_08 mapflag nopenalty
-
Ajuda, Por favor! Erro com NPC ''Estilista Doram''
Racaae replied to Eragonat's question in Suporte ao Desenvolvimento
Oi, a causa do erro é que o NPC não terminava a conversa para jogadores não-Doram. prontera,170,180,1 script Estilista Doram 122,{ //================================================ mes "[^0000FF Estilista Doram ^000000]"; mes "Oi, bebê!"; if (BaseClass != Job_Summoner) { mes "Infelizmente eu atendo apenas gatinhos."; close; } mes "Eu posso deixar você fabulos" + (Sex?"o":"a") + "!"; mes "O que deseja?"; setarray .@Styles[1], 35, 10, 11; setarray .@Look[1], LOOK_CLOTHES_COLOR, LOOK_HAIR, LOOK_HAIR_COLOR; .@s = select("^FF0000 ^000000 Cor da Roupa:^FF0000 ^000000 Estilo do Pelo:^FF0000 ^000000 Cor do Pelo"); .@Revert = getlook(.@Look[.@s]); .@Style = .@Revert; while(1) { setlook .@Look[.@s], .@Style; message strcharinfo(0),"Este é o estlio #"+.@Style+"."; set .@menu$, " ~ Próximo (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Anterior (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Pular para...: ~ Voltar ao original (^0055FF"+.@Revert+"^000000)"; switch(select(.@menu$)) { case 1: set .@Style, ((.@Style != .@Styles[.@s]) ? .@Style+1 : 1); break; case 2: set .@Style, ((.@Style != 1) ? .@Style-1 : .@Styles[.@s]); break; case 3: message strcharinfo(0),"Escolha um estilo entre 0 e "+.@Styles[.@s]+"."; input .@Style,0,.@Styles[.@s]; if (!.@Style) set .@Style, rand(1,.@Styles[.@s]); break; case 4: set .@Style, .@Revert; setlook .@Look[.@s], .@Revert; break; } } } -
Hi. Most quests use variables to track player progression. So changing said variables to 0 is the same as resetting it's questline. Just ANY quest, you would need to find each and every variable used in the scripts. Example: Terra Gloria NPCs are in \npc\re\quests\quests_16_2.txt, inside the file you can see the variable used in the main quest is terra_gloria_main. Make the NPC set terra_gloria_main to 0 to reset the whole questline. prontera,150,150,3 script Quest Resetter 99,{ mes "Which questline do you want to reset?"; next; switch(select("Rachel", "Terra Gloria")) { case 1: mes "Are you sure you want to reset Rachel quests?"; if(select("No", "Yes") == 1) close; rachel_quest = 0; mes "Done!"; close; case 2: mes "Are you sure you want to reset Terra Gloria quests?"; if(select("No", "Yes") == 1) close; terra_gloria_main = 0; mes "Done!"; close; } }
-
Hello. Open file \src\map\status.cpp and find: if ((skill = pc_checkskill(sd, ALL_INCCARRY)) > 0) sd->max_weight += 2000 * skill; Change 2000 to 20000. Save and compile your server.
-
No, I did only these 2 cities as a example on how to update/add the recent boards.
-
Updated: iRO 2024 OngoingQuestInfoList.lub Also Rachel and Veins board NPCs: rachel,87,73,0 script Bounty Board 80-100#rac1 2_BULLETIN_BOARD,{ callfunc "F_Bounty_Board", 80, 100, 20, 2, 1030, 63516, 697125, 697125, // ANACONDAQ 1782, 63517, 697125, 697125, // ROWEEN 1776, 63518, 697125, 697125; // SIROMA end; OnInit: questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 80 && BaseLevel <= 100"); end; } rachel,89,73,0 script Bounty Board 100-120#rac2 2_BULLETIN_BOARD,{ callfunc "F_Bounty_Board", 100, 120, 20, 2, 1106, 63519, 270000, 202500, // DESERT_WOLF 1781, 63520, 202500, 151950, // DROSERA 1629, 63521, 285000, 213750, // HILL_WIND 1777, 63522, 408600, 396600, // ICE_TITAN 1775, 63523, 408600, 396600; // SNOWIER end; OnInit: questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 100 && BaseLevel <= 120"); end; } rachel,91,73,0 script Bounty Board 120-140#rac3 2_BULLETIN_BOARD,{ callfunc "F_Bounty_Board", 120, 140, 20, 2, 1769, 63524, 589950, 442350, // AGAV 1770, 63525, 553500, 415200, // ECHIO 1773, 63526, 563700, 422700, // HODREMLIN 1772, 63527, 518400, 388800, // ISILLA 1774, 63528, 601200, 450900, // SEEKER 1771, 63529, 486000, 364500; // VANBERK end; OnInit: questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 120 && BaseLevel <= 140"); end; } veins,226,154,0 script Bounty Board 80-100#vei1 2_BULLETIN_BOARD,{ callfunc "F_Bounty_Board", 80, 100, 20, 2, 1784, 63530, 380400, 285450; // STAPO end; OnInit: questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 80 && BaseLevel <= 100"); end; } veins,224,154,0 script Bounty Board 100-120#vei2 2_BULLETIN_BOARD,{ callfunc "F_Bounty_Board", 100, 120, 20, 2, 1781, 63531, 270000, 202500, // DROSERA 1783, 63532, 265350, 199050, // GALION 1836, 63533, 380400, 285450, // MAGMARING 1780, 63534, 291600, 218700; // MUSCIPULAR end; OnInit: questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 100 && BaseLevel <= 120"); end; } veins,222,154,0 script Bounty Board 120-140#vei3 2_BULLETIN_BOARD,{ callfunc "F_Bounty_Board", 120, 140, 20, 2, 1833, 63535, 839700, 1156200, // KASA 1838, 63536, 553500, 565200, // KNOCKER 1831, 63539, 887700, 1070700, // SALAMANDER 1870, 63537, 837000, 627600, // NECROMANCER 1865, 63538, 527100, 462900, // RAGGED_ZOMBIE 1864, 63540, 590700, 405300; // ZOMBIE_SLAUGHTER end; OnInit: questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 120 && BaseLevel <= 140"); end; } And \db\import\quest_db.yml # iRO Bounty Board Rachel and Veins - Id: 63516 Title: Bounty Board Hunt Targets: - Mob: ANACONDAQ Count: 150 - Id: 63517 Title: Bounty Board Hunt Targets: - Mob: ROWEEN Count: 150 - Id: 63518 Title: Bounty Board Hunt Targets: - Mob: SIROMA Count: 150 - Id: 63519 Title: Bounty Board Hunt Targets: - Mob: DESERT_WOLF Count: 150 - Id: 63520 Title: Bounty Board Hunt Targets: - Mob: DROSERA Count: 150 - Id: 63521 Title: Bounty Board Hunt Targets: - Mob: HILL_WIND Count: 150 - Id: 63522 Title: Bounty Board Hunt Targets: - Mob: ICE_TITAN Count: 150 - Id: 63523 Title: Bounty Board Hunt Targets: - Mob: SNOWIER Count: 150 - Id: 63524 Title: Bounty Board Hunt Targets: - Mob: AGAV Count: 150 - Id: 63525 Title: Bounty Board Hunt Targets: - Mob: ECHIO Count: 150 - Id: 63526 Title: Bounty Board Hunt Targets: - Mob: HODREMLIN Count: 150 - Id: 63527 Title: Bounty Board Hunt Targets: - Mob: ISILLA Count: 150 - Id: 63528 Title: Bounty Board Hunt Targets: - Mob: SEEKER Count: 150 - Id: 63529 Title: Bounty Board Hunt Targets: - Mob: VANBERK Count: 150 - Id: 63530 Title: Bounty Board Hunt Targets: - Mob: STAPO Count: 150 - Id: 63531 Title: Bounty Board Hunt Targets: - Mob: DROSERA Count: 150 - Id: 63532 Title: Bounty Board Hunt Targets: - Mob: GALION Count: 150 - Id: 63533 Title: Bounty Board Hunt Targets: - Mob: MAGMARING Count: 150 - Id: 63534 Title: Bounty Board Hunt Targets: - Mob: MUSCIPULAR Count: 150 - Id: 63535 Title: Bounty Board Hunt Targets: - Mob: KASA Count: 150 - Id: 63536 Title: Bounty Board Hunt Targets: - Mob: KNOCKER Count: 150 - Id: 63537 Title: Bounty Board Hunt Targets: - Mob: NECROMANCER Count: 150 - Id: 63538 Title: Bounty Board Hunt Targets: - Mob: RAGGED_ZOMBIE Count: 150 - Id: 63539 Title: Bounty Board Hunt Targets: - Mob: SALAMANDER Count: 150 - Id: 63540 Title: Bounty Board Hunt Targets: - Mob: ZOMBIE_SLAUGHTER Count: 150
-
/npc/re/merchants/ticket_refiner.txt
-
Hi. You can use addtimer command. Example: - script cheffenia_time HIDDEN_WARP_NPC,{ OnPCLoadMapEvent: if (compare(strcharinfo(3),"bossnia")) { // MINUTOS QUE PODE FICAR DENTRO DA CHEFFENIA .@tempo = 60; deltimer strnpcinfo(0)+"::OnTimeEnd"; deltimer strnpcinfo(0)+"::OnCountdown"; sleep2 1; if (.@tempo < 2) addtimer 60000, strnpcinfo(0)+"::OnTimeEnd"; else addtimer (.@tempo-1)*60000, strnpcinfo(0)+"::OnCountdown"; } end; OnCountdown: if (compare(strcharinfo(3),"bossnia")) { announce "[Cheffênia] Seu tempo acabará em 1 minuto.", bc_self,0xFFF618,FW_NORMAL,30;; addtimer (60000), strnpcinfo(0)+"::OnTimeEnd"; } end; OnTimeEnd: if (compare(strcharinfo(3),"bossnia")) { announce "[Cheffênia] Seu tempo acabou.", bc_self,0xFFF618,FW_NORMAL,30;; sleep2 500; warp "SavePoint", 0, 0; } end; } bossnia_01 mapflag loadevent bossnia_02 mapflag loadevent bossnia_03 mapflag loadevent bossnia_04 mapflag loadevent
-
how to add other languages in the command @langtype
Racaae replied to sony0108's question in Client-side Support
Hi, open this file: /src/common/msg_conf.hpp and find this part: enum lang_types { LANG_RUS = 0x01, LANG_SPN = 0x02, LANG_GRM = 0x04, LANG_CHN = 0x08, LANG_MAL = 0x10, LANG_IDN = 0x20, LANG_FRN = 0x40, LANG_POR = 0x80, LANG_THA = 0x100, LANG_MAX }; #ifndef LANG_ENABLE // Multilanguage System. // Define which languages to enable (bitmask). // 0xFFF will enable all, while 0x000 will enable English only. #define LANG_ENABLE 0x000 Change 0x000 in the last line to the desired bitmask value (sum of numbers of the languages you want to use). Save and then compile your server. Examples: Enable Russian and Spanish (0x01 + 0x02 = 0x03) #define LANG_ENABLE 0x03 Enable German and Chinese (0x04 + 0x08 = 0x12) #define LANG_ENABLE 0x12 Enable Spanish and French and Portuguese (0x02 + 0x40 + 0x80 = 0x122) #define LANG_ENABLE 0x122 EDIT: Do note that @langtype have no effect on client-side text. It's only for server messages. -
Hi, the server can't find function getNPCID. You can find this function inside file LangManagement.txt in the botkiller folder. The file must load before the others, example: npc: npc/custom/botkiller/LangManagement.txt npc: npc/custom/botkiller/lang/BK6_ES.txt npc: npc/custom/botkiller/lang/BK6_EN.txt
-
Hello. https://pastebin.com/Cwrv0Mhd
-
Good evening yuno,157,83,3 script Portal Gatekeeper 4_M_PAY_SOLDIER,{ .@password$ = "luizinhomt"; //password .@portal$ = "Hidden Port0l#l"; //portal npc name npctalk "What is the password?", strnpcinfo(0), bc_self; input .@input$; unittalk getcharid(3), strcharinfo(0) + " : " + .@input$, bc_self; sleep2 500; if (!compare(.@input$,.@password$)) { npctalk "This is not the password.", strnpcinfo(0), bc_self; emotion ET_THINK, getnpcid(0); end; } npctalk "I will open a portal to another location.", strnpcinfo(0), bc_self; cloakoffnpcself .@portal$; specialeffect EF_BIG_PORTAL,SELF,.@portal$; end; } yuno,153,85,0 warp(CLOAKED) Hidden Port0l#l 1,1,yuno,0,0
-
Hi. please put scripts inside a code box next time, the indentation is all lost otherwise. //==== DarkRO Scripts ==================================== //= Credit Exchanger //===== By: ================================================== //= //===== Current Version: ===================================== //= 1.4 //===== Description: ========================================= //= Allow to Convert Zeny into a Ticket. //===== Changelog: =========================================== //= Not yet tested for bugs //= 1.0 Implementation //= 1.1 Re-script (added quest) //= 1.2 Automated zeny-to-credit exchange and vice-versa //= 1.3 Added @security checking. //= 1.4 Added Black Credit Exchange feature //============================================================ - script Credit Agent -1,{ set @header$,"[^FF8000 Credit Agent ^000000]"; .@credit_id = 40000; //Credit Item ID if (checksecurity()) { message strcharinfo(0), "You can't do this action, Protected by @security."; end; } if(#CREDITPASSPORT > gettimetick(2)) { disable_items; setpcblock(PCBLOCK_COMMANDS, true, getcharid(3)); getinventorylist(); mes @header$; mes "Hello, I can see that you still have your Intergalactical Passport."; mes " "; mes "What can I do for you?"; mes " "; mes "^FF0000Your current credit: " + F_InsertComma(countitem(.@credit_id)); next; switch(prompt("I want to change Zeny to Credit:I want to change Credit to Zeny.:Nothing, just passing by.")){ case 255: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; case 1: if (@inventorylist_count == MAX_INVENTORY && !countitem(.@credit_id)) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "You need to clear your inventory first."; close(); } mes @header$; mes "The exchange rate is fixed and its ^00008810,000,000^000000 Zeny = 1 ^FF0000Credit^000000."; mes " "; mes "How will you exchange your Zeny?"; next; .@i = prompt("Decide on how many Credits I need.:Exchange all my Zeny:Cancel"); if (.@i == 3) goto L_Cancel; else if (.@i == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } else if (.@i == 1) { mes @header$; mes "How much Credits do you need?"; mes " "; mes "^FF0000(Enter '0' to cancel the transaction)^000000"; next; input @ZTC; if (@ZTC <= 0) goto L_Cancel; else if (@ZTC > MAX_ZENY / 10000000) { L_Exceed: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Sorry, but you have"; mes "exceeded from the limit."; close(); } else if (@ZTC > Zeny / 10000000) { L_LessZeny: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "You don't have enough zeny."; close(); } else { L_ConvertZTC: if (!checkweight(.@credit_id,@ZTC)) { mes @header$; mes "Sorry. You can't hold this amount of credit."; mes "Such amount would exceed your weight limit."; for(; @ZTC; @ZTC--) if (checkweight(.@credit_id,@ZTC)) break; if (@ZTC) { mes "You can only hold up to " + @ZTC + "."; mes "Would this amount do?"; next; if (select("Ok, " + @ZTC + " is acceptable", "No, just cancel") == 2) callsub L_Cancel; } else { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); close; } } mes @header$; mes "You will be receiving ^FF0000"+@ZTC+" Credit"+(@ZTC != 1 ? "s":"")+"^000000."; mes " "; mes "Proceed?"; next; .@menu = prompt("I changed my mind:Proceed!"); if (.@menu == 1) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); close(); break; } if (.@menu == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); Zeny -= @ZTC * 10000000; getitem .@credit_id, @ZTC; mes @header$; mes "Here you go!"; mes "Thank you for using our service."; close(); } } else { @ZTC = Zeny / 10000000; if (@ZTC == 0) goto L_LessZeny; else goto L_ConvertZTC; } break; case 2: goto L_ConvertCTZ_Main; break; default: L_Cancel: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Please do come back, Have a nice day!."; close; break; } end; } if(#CRED_Q == 1) { disable_items; setpcblock(PCBLOCK_COMMANDS, true, getcharid(3)); mes @header$; mes "Welcome back!, "+strcharinfo(0)+"."; mes "Do you have what I asked for?"; next; switch(prompt("Yes, here it is!:What do I need again?:I want to change Credit to Zeny.:Not yet.")){ case 255: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; case 1: if(Zeny < 100000000){ setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "I think you are missing something this is the list that i needed:"; mes "^FF0000100,000,000 Zeny^000000."; close; } next; mes @header$; mes "Congratulations, Enjoy your Intergalactical Passport."; mes " "; mes "You may now use Zeny to ^FF0000Credit^000000 services in a matter of time."; setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); Zeny -= 100000000; #CREDITPASSPORT = 1728000+ gettimetick(2); #CRED_Q = 0; close; break; case 2: mes @header$; mes "You will have to bring me the following:"; mes "^FF0000100,000,000 Zeny^000000."; next; setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "I suggest you look for Simon in Prontera. He is known as gumbling master that could provide you tickets."; mes " "; mes "I'll be waiting for you!"; close; break; case 3: goto L_ConvertCTZ_Main; break; case 4: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Okay, Hurry up!"; close; break; } } mes @header$; mes "Hello, It looks like you don't have an Intergalactical Passport yet."; mes " "; mes "Would you like to have one?"; next; switch(prompt("Yes, I'd like to have one.:Intergalactical Passport? What is that?:I want to change Credit to Zeny.:No thanks!")){ case 1: mes @header$; mes "Very well. You will have to bring me the following:"; mes "^FF0000100,000,000 Zeny^000000."; next; mes @header$; mes "I suggest you look for Simon in Prontera. He is known as gumbling master that could provide you tickets."; mes " "; mes "I'll be waiting for you!"; #CRED_Q = 1; close; break; case 2: mes @header$; mes "An Intergalactical Passport is required to use the Intergalactical currency: ^FF0000Credit^000000."; mes " "; mes "The value of ^FF0000Credit^000000 is equivalent to ^00008810,000,000^000000 Zeny."; next; mes @header$; mes "Once you have this passport, You can exchange Zeny to ^FF0000Credit^000000 with any Credits Agents in major towns."; next; mes @header$; mes "^FF0000NOTE^000000: That the passport is not required when exchanging ^FF0000Credit^000000 to Zeny."; next; mes @header$; mes "That contract will last for 20 days. After that time, You will have to renew your passport."; close; break; case 3: disable_items; setpcblock(PCBLOCK_COMMANDS, true, getcharid(3)); L_ConvertCTZ_Main: mes @header$; mes "The exchange rate is fixed and its 1 ^FF0000Credit^000000 = ^00008810,000,000^000000 Zeny."; mes " "; mes "How will you exchange your ^FF0000Credits^000000?"; next; .@i = prompt("Decide how many Credits to exchange.:Exchange all my Credits:Cancel"); if (.@i == 3) goto L_Cancel; else if (.@i == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } else if (.@i == 1) { mes @header$; mes "How many ^FF0000Credits^000000 do you want to exchange?"; mes " "; mes "^FF0000(Enter '0' to cancel transaction)^000000"; next; input @CTZ; if (@CTZ <= 0) goto L_Cancel; else if (@CTZ > countitem(.@credit_id)) { L_LessCredit: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "You don't have enough Credits."; close(); } else { @CTZ_ = Zeny%10000000; if (@CTZ_ > 0) @CTZ_ = ((MAX_ZENY/10000000) - (Zeny/10000000)) - 1; else @CTZ_ = (MAX_ZENY/10000000) - (Zeny/10000000); if (@CTZ > (MAX_ZENY/10000000) || @CTZ_ < @CTZ ) goto L_Exceed; if (@CTZ > countitem(.@credit_id)) goto L_LessCredit; L_ConvertCTZ: mes @header$; mes "You will be exchanging your ^FF0000"+@CTZ+" Credit"+(@CTZ != 1 ? "s":"")+"^000000."; mes " "; mes "Proceed?"; next; .@menu = prompt("I changed my mind:Proceed!"); if (.@menu == 1) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); close(); break; } if (.@menu == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } delitem .@credit_id, @CTZ; Zeny += 10000000 * @CTZ; message(strcharinfo(0), "You have received "+F_InsertComma(10000000 * @CTZ)+" Z."); setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Here you go!"; mes "Thank you for using our service."; close(); } close(); } else { @CTZ = countitem(.@credit_id); .@ZenyCap = (MAX_ZENY - Zeny) / 10000000; if (@CTZ == 0) goto L_LessCredit; if (@CTZ >= .@ZenyCap) @CTZ = .@ZenyCap; if (@CTZ == 0) goto L_Exceed; goto L_ConvertCTZ; } break; case 4: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Please do come back, Have a nice day!."; close; break; } } // Duplicates //prontera,132,215,5 duplicate(Credit Agent) Credit Agent#prt 4_M_KHBOY market,99,53,6 duplicate(Credit Agent) Credit Agent#mall 4_M_KHBOY
-
Need to make this CashPoint Manager NPC work
Racaae replied to Heartfelt's question in Script Requests
Hi, I changed all acc_reg_num_db to acc_reg_num. This is the correct table name for rAthena. // --- //= Cash Point Manager v1.0 [Rokimoki] // * Add Cash Points // * Delete Cash Points // * Watch Cash Points // * Notify the player if an admin has added/deleted some cash to you. // * If the player is online it will tell which GM did. // * If the player is NOT online will show a notification when logged in but will not tell the GM who did it. // * Logs system. Must be 'log_npc: true' in conf/map/logs.con file. // -> If somebody put wrong password in whisp system. // -> If add/delete cash points. // --- //= This works if you are online or not, if online don't use SQL if offline use SQL. // --- //= v2.0 [Rokimoki] // * Recycled this old script and adapted to Hercules database // * Transtaled to English // --- - script donations -1,{ OnWhisperGlobal: .@p$ = "yourpassword"; //Leave empty ("") to disable staff password if (getgmlevel() < 90) { // If you are not admin just tell you how many cash you have. dispbottom "Your have: [" + #CASHPOINTS + "] CashPoints."; end; } // End if if (.@p$ != "" && strcmp(@whispervar0$,.@p$) != 0) { // Password system, change 'yourpassword' for any password you want message strcharinfo(0), "CashPoint Manager : Input the correct password."; logmes "User: " +strcharinfo(0) +" with account_id: " +getcharid(3) +" typed a wrong password, he wrote: " +@whispervar0$; // Just for watch if bruteforcing or something end; } // End if deletearray .@username$[0], 128; // Debug deletearray .@accid[0], 128; message strcharinfo(0), "CashPoint Manager : Welcome Staff member " + strcharinfo(0) + "!"; switch (select("Add Cash Points:Delete Cash Points:Watch Cash Points:End")) { case 1: // Add cash points callfunc("CashPoints",1); break; case 2: // Delete cash points callfunc("CashPoints",2); break; case 3: // Watch cash points callfunc("CashPoints",3); break; case 4: // Close } // End switch end; OnPCLoginEvent: // Offline notifications if (#CASHPOINTS < lastCash) dispbottom "Some administrator deleted some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; else if (#CASHPOINTS > lastCash) dispbottom "Some administrator added some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; set lastCash, #CASHPOINTS; end; OnInit: bindatcmd strnpcinfo(1),strnpcinfo(3)+"::OnWhisperGlobal"; end; } // End Script function script CashPoints { if (select("Select by character name:Select by login username") == 1) { mes "Input character name: "; next; input .@charName$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" +escape_sql(.@charName$) +"'", .@accid[0]; } else { mes "Input login username: "; next; input .@loginName$; query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '" +escape_sql(.@loginName$) +"'", .@accid[0]; } // End if if (!.@accid[0]) { mes "Invalid information, error occurred: account or character not found."; close; } // End if if (getarg(0) == 3) { // Watch Cash Points if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player in this script attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save Cash Points amount detachrid; attachrid(.@id); mes .@npcName$; mes "This player has: [^FF0000" +.@cash +"^000000] Cash Points."; } else { // If offline query_sql "SELECT `value` FROM `acc_reg_num` WHERE `key` = '#CASHPOINTS' AND `account_id` = " +.@accid[0], .@value[0]; // Save Cash Points amount if (!.@value[0]) mes "He has [^FF00000^000000] Cash Points."; // 0 cash else mes "He has [^FF0000" +.@value[0] +"^000000] Cash Points."; // if he has cash } // End if close; } // End if mes .@npcName$; mes "Input Cash Point amount, range: 1~100"; // Change here too if you want to show proper information next; input .@amount, -1000, 1000; // Debug if (.@amount < 1 || .@amount > 100) { // Define in this if the amount you want to limit (just the right part) mes .@npcName$; mes "Invalid amount, input in the proper range told."; close; } // End if if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save current cash if (getarg(0) == 1) { // Add cash set #CASHPOINTS, #CASHPOINTS + .@amount; // Add cash dispbottom "This admin: [" + .@gm$ +"] added: " +.@amount +" cash points, current balance: [" +#CASHPOINTS + "]"; // Online notification } else if (getarg(0) == 2) { // Delete cash if (.@cash <= 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } else if (.@cash - .@amount < 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" +.@cash +"^000000] cash points."; close; } // End if set #CASHPOINTS, #CASHPOINTS - .@amount; // Delete cash dispbottom "This admin [" + .@gm$ +"] deleted: " +.@amount +" cash points, current balance: " +#CASHPOINTS; // Online notification set .@action, 1; // Cash deleted flag } // End if detachrid; attachrid(.@id); } else { // If offline query_sql "SELECT `key` FROM `acc_reg_num` WHERE `account_id` = " + .@accid[0], .@username$[0]; // check current cash if (.@username$[0] != "#CASHPOINTS") { // If empty, never had Cash Points if (getarg(0) == 1) { // add cash query_sql "INSERT INTO `acc_reg_num`(`account_id`, `key`, `index`, `value`) VALUES ('" + .@accid[0] + "','#CASHPOINTS','0','" + .@amount + "')"; // create the data } else { // delete cash mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } // End if } else { // Player had or has Cash Points if (getarg(0) == 1) { // add cash query_sql "UPDATE `acc_reg_num` SET `value` = `value` + '" +.@amount +"' WHERE `key` = '#CASHPOINTS' and `account_id` = '" +.@accid[0] +"'"; // update cash } else { // delete cash query_sql "SELECT `value` FROM `acc_reg_num` WHERE `key` = '#CASHPOINTS' and `account_id` = " +.@accid[0], .@value[0]; // check current cash mes .@npcName$; if (.@value[0] <= 0) { mes "You can not delete cash points, this player has no cash points."; close; } else if (.@value[0] - .@amount < 0) { mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" + .@value[0] + "^000000] cash points."; close; } // End if query_sql "UPDATE `acc_reg_num` SET `value` = `value` - '" + .@amount + "' WHERE `key` = '#CASHPOINTS' and `account_id` = '" + .@accid[0] + "'"; set .@action, 1; // Cash deleted flag } // End if } // End if } // End if // Saving logs if (!.@action) logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " added " + .@amount +" Cash Points to: " + .@accid[0]; else logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " removed " + .@amount +" Cash Points to: " + .@accid[0]; mes "Cash Points successfully sent, when the players log in will receive a notification, thanks for using this service."; return; } // End function -
Hello //============================================================ //= Last Standing (try your luck guessing O or X) by Racaae //============================================================ //= https://rathena.org/board/topic/141331-r-mini-game-last-man-standing/ //============================================================ prontera,147,150,0 script Evento Last Standing PORTAL,{ emotion F_Rand(ET_O,ET_X), getnpcid(0); mes "[" + strnpcinfo(1) + "]"; if ($@laststanding == 1) { mes "Quer participar do evento?"; if (select("Sim", "Não") == 2) { clear; if (checkweight(1119,3) == 0) { mes "- Você tem muitos itens."; mes "Organize seu inventário e tente novamente. -"; close; } mes "[" + strnpcinfo(1) + "]"; mes "Até mais."; close; } warp "quiz_02",249,385; end; } mes "O evento começa sempre aos 45 minutos de cada hora."; mes "Por exemplo, 10:45 12:45 18:45"; if (getgroupid() >= 99) mes " ", "^0000ffDigite @LastStanding para acessar o menu GM^000000"; close; OnMinute45: if ($@laststanding != 0) end; OnOpen: cloakonnpc "O#luckyevent"; cloakonnpc "X#luckyevent"; cloakonnpc "O#luckyevent2"; cloakonnpc "X#luckyevent2"; waitingroom "Venha Participar!", 0; announce "Last Standing : O portal para o evento se abriu em Prontera!! 5 minutos até que ele se feche!",0; $@laststanding = 1; sleep 120000; if ($@laststanding != 1) end; announce "Last Standing : O portal para o evento fechará em 3 minutos!",0; sleep 60000; if ($@laststanding != 1) end; announce "Last Standing : O portal para o evento fechará em 1 minuto!",0; sleep 60000; if ($@laststanding != 1) end; announce "Last Standing : O portal para o evento se fechou!",0; donpcevent strnpcinfo(0) + "::OnStart"; end; OnStart: $@laststanding = 2; delwaitingroom; sleep 3000; areaannounce "quiz_02",220,330,280,395,"Bem vindos ao evento Last Standing. O ou X será escolhido aleatoriamente.",bc_blue; sleep 4000; areaannounce "quiz_02",220,330,280,395,"Tudo que você precisa fazer é ir até a área que você acha que foi escolhida.",bc_blue; sleep 4000; areaannounce "quiz_02",220,330,280,395,"Exemplo, se eu escolher X, todos os aventureiros que estiverem em O perdem.",bc_blue; sleep 4000; areaannounce "quiz_02",220,330,280,395,"Faremos isso de novo e de novo até termos 1 aventureiro sobrevivente.",bc_blue; sleep 4000; areaannounce "quiz_02",220,330,280,395,"Antes que eu esqueça, você deve entrar em uma das áreas! Qualquer um do lado de fora será automaticamente desclassificado!",bc_blue; sleep 4000; areaannounce "quiz_02",220,330,280,395,"É isso... Agora vamos começar!",bc_blue; sleep 4000; .@num = getareaunits(BL_PC,"quiz_02",220,330,280,395,$@ls_players$[0]); if (.@num == 0) { $@laststanding = 0; end; } goto L_start; L_start: if ($@laststanding != 2) end; cloakoffnpc "O#luckyevent"; cloakoffnpc "X#luckyevent"; cloakoffnpc "O#luckyevent2"; cloakoffnpc "X#luckyevent2"; areaannounce "quiz_02",220,330,280,395,"Por favor, vá até uma das áreas desejadas Vai! Vai! Vai!",bc_blue; sleep 10000; if ($@laststanding != 2) end; areaannounce "quiz_02",220,330,280,395,"5",bc_blue; sleep 1500; if ($@laststanding != 2) end; areaannounce "quiz_02",220,330,280,395,"4",bc_blue; sleep 1500; if ($@laststanding != 2) end; areaannounce "quiz_02",220,330,280,395,"3",bc_blue; sleep 1500; if ($@laststanding != 2) end; areaannounce "quiz_02",220,330,280,395,"2",bc_blue; sleep 1500; if ($@laststanding != 2) end; areaannounce "quiz_02",220,330,280,395,"1",bc_blue; sleep 1000; if ($@laststanding != 2) end; cloakonnpc "O#luckyevent"; cloakonnpc "X#luckyevent"; cloakonnpc "O#luckyevent2"; cloakonnpc "X#luckyevent2"; sleep 500; .@w = rand(2); areaannounce "quiz_02",220,330,280,395,"E o escolhido foi " + (.@w?"X":"O") + "!",bc_blue; .@num_e = getareaunits(BL_PC,"quiz_02",220,330,280,395,.@emote[0]); for (.@i = 0; .@i < .@num_e; .@i++) emotion (.@w?ET_X:ET_O), .@emote[.@i]; sleep 1500; if ($@laststanding != 2) end; deletearray $@ls_players, getarraysize($@ls_players); if (.@w) { // X choosen areawarp "quiz_02",220,330,248,358,"quiz_02",241,364,258,375; .@num = getareaunits(BL_PC,"quiz_02",250,330,275,358,$@ls_players[0]); } else { // O choosen areawarp "quiz_02",250,330,275,358,"quiz_02",241,364,258,375; .@num = getareaunits(BL_PC,"quiz_02",220,330,248,358,$@ls_players[0]); } if (.@num == 0) { announce "Last Standing : Ninguém venceu o evento.",bc_all; sleep 3000; donpcevent strnpcinfo(0) + "::OnEnd"; } if (.@num == 1) { donpcevent strnpcinfo(0) + "::OnWinner"; end; } areaannounce "quiz_02",220,330,280,395,.@num + " aventureiros acertaram! Preparem-se para outra rodada.",bc_blue; sleep 4000; callsub L_start; OnWinner: announce "Last Standing : " + convertpcinfo($@ls_players[0],CPC_NAME) + " ganhou o evento!",bc_all; getitem 607,10,$@ls_players[0]; // prêmio do vencedor specialeffect2 EF_MVP, AREA, convertpcinfo($@ls_players[0],CPC_NAME); sleep 3000; if ($@laststanding != 2) end; areaannounce "quiz_02",220,330,280,395,"Obrigado por psrticipar! Você será teleportado em 10 segundos.",bc_blue; sleep 10000; if ($@laststanding != 2) end; donpcevent strnpcinfo(0) + "::OnEnd"; end; OnEnd: if ($@laststanding == 1) announce "Last Standing : O evento foi cancelado.",0; delwaitingroom; $@laststanding = 0; areawarp "quiz_02",220,330,280,395,"prontera",150,150; end; OnInit: bindatcmd "laststanding",strnpcinfo(3)+"::OnAtcommand",99,99; $@laststanding = 0; end; OnAtcommand: message strcharinfo(0), "Controle GM do evento Last Standing"; switch(select("Cancelar", "^0000FFComeçar evento^000000", "^0000FFTerminar evento^000000", "Ir para o mapa")) { case 1: end; case 2: if ($@laststanding == 0) { donpcevent strnpcinfo(0) + "::OnOpen"; message strcharinfo(0), "Ação confirmada!"; end; } if ($@laststanding == 1) { mes "O portal do evento já está aberto para jogadores irem entrando."; mes "Quer fechar o portal e iniciar o evento agora?"; if (select("Manter portal aberto", "^0000FFFechar portal e iniciar^000000") == 1) close; if ($@laststanding == 1) { donpcevent strnpcinfo(0) + "::OnStart"; message strcharinfo(0), "Ação confirmada!"; } close; } message strcharinfo(0), "Evento já está em andamento"; end; case 3: if ($@laststanding != 0) { donpcevent strnpcinfo(0) + "::OnEnd"; message strcharinfo(0), "Ação confirmada!"; end; } message strcharinfo(0), "Evento não foi iniciado."; end; case 4: warp "quiz_02",249,385; end; } end; } quiz_02,255,384,3 script SAÍDA#laststanding PORTAL,{ npctalk "Quer sair do evento?", strnpcinfo(0), bc_self; if (select("Ficar aqui", "^FF0000Sair do evento^000000") == 2) warp "prontera",150,150; end; } quiz_02,237,365,0 script O#luckyevent 1_SHADOW_NPC,14,7,{ if ($@ls_players[0] && inarray($@ls_players, getcharid(3)) == -1) npctalk "Você não está mais participando.", strnpcinfo(0), bc_self; else warp "quiz_02",237,345; end; OnTouch: npctalk "Clique aqui se escolhe O", strnpcinfo(0), bc_self; emotion ET_O, getnpcid(0); end; } quiz_02,262,365,0 script X#luckyevent 1_SHADOW_NPC,14,7,{ if ($@ls_players[0] && inarray($@ls_players, getcharid(3)) == -1) npctalk "Você não está mais participando.", strnpcinfo(0), bc_self; else warp "quiz_02",262,345; end; OnTouch: npctalk "Clique aqui se escolhe X", strnpcinfo(0), bc_self; emotion ET_X, getnpcid(0); end; } quiz_02,237,357,0 warp O#luckyevent2 1,1,quiz_02,250,366 quiz_02,262,357,0 warp X#luckyevent2 1,1,quiz_02,249,366 quiz_02 mapflag nowarp quiz_02 mapflag nowarpto quiz_02 mapflag noskill quiz_02 mapflag noteleport quiz_02 mapflag nomemo quiz_02 mapflag nosave SavePoint quiz_02 mapflag noicewall quiz_02 mapflag noloot
-
Error : script error on npc/custom/new_train_ground.txt line 402 need '('
Racaae replied to Dolphin86's question in Scripting Support
Hi. "cooking" is a script command. You can't use it as a variable name. Just rename the variable to something else. -
[Error] : script:op_2: invalid data for operator C_NE (Cashpoint on kill script)
Racaae replied to Necrosx's question in Scripting Support
Hello. Using getunitdata inside a if statement is causing the error. Don't know why. Try: - script cashpoints -1,{ OnInit: setarray .champions$,"Elusive","Furious","Ringleader","Solid","Swift"; end; OnNPCKillEvent: .@exists = getunitdata(killedgid, .@data); if ( .@exists != -1 ){ .@mode = .@data[UMOB_MODE]; if(.@mode & MD_MVP){ if ( getmonsterinfo( killedrid, MOB_LV ) < 71 ) #CASHPOINTS += rand( 5, 10 ); else #CASHPOINTS += rand( 10, 15 ); //MVP } else if(.@mode & MD_STATUSIMMUNE){ if ( getmonsterinfo( killedrid, MOB_LV ) < 71 ) #CASHPOINTS += rand( 3, 8 ); else #CASHPOINTS += rand( 8, 13 ); //miniboss }else { for(.@i = 0; .@i < getarraysize(.champions$); .@i++){ if(compare(.@mobname$,.champions$[.@i])){ if ( getmonsterinfo( killedrid, MOB_LV ) < 71 ) #CASHPOINTS += rand( 1, 3 ); else #CASHPOINTS += rand( 3, 6 ); //cashpoints break; } } //Champion tests } } end; } -
//===== rAthena Script ======================================= //= Reset NPC //===== Description: ========================================= //= Resets skills, stats, or both. //===== Additional Comments: ================================= //= 1.0 First Version //= 1.1 Optimized for the greater good. [Kisuka] //= 1.2 Cleaning [Euphy] //= 1.3 All statuses removed upon skill reset. [Euphy] //= 1.4 Compressed Script, Added limit use option [Stolao] //= Changed set -> setarray, Improved text with F_InsertPlural //= 1.5 Added sc_end_class to reset related status changes [sader1992] //============================================================ // https://rathena.org/board/topic/141328-requesting-for-custom-reset-girl/ //============================================================ prontera,150,193,4 script Custom Reset Girl 124,{ // 1st, 2nd, 3rd, Limit setarray .@Reset, 0, 3000000, 5000000, 0; mes "[Reset Girl]"; if(.@Reset[3] && reset_limit > .@Reset[3]) { mes "Sorry you can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life."; close; } mes "I am the Reset Girl."; mes "Please select the service you want:"; if (.@Reset[3]) mes "You may only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+", so use "+((.@Reset[3]>1)?"them":"it")+" wisely."; mes " "; mes "1st reset: " + (.@Reset[0]?F_InsertComma(.@Reset[0])+"z":"free"); mes "2nd reset: " + F_InsertComma(.@Reset[1]) +"z"; mes "3rd onwards: " + F_InsertComma(.@Reset[2]) +"z"; next; set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel")); if(.@i > 3) close; .@z = .@Reset[(reset_limit>2?2:reset_limit)]; mes "[Reset Girl]"; if (Zeny < .@z) { mes "Sorry, you don't have enough Zeny."; close; } if(.@Reset[3]){ mes "You can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life, are you sure?"; if(select("Let me think:That's fine") == 1) close; } Zeny -= .@z; if(.@i&1){ sc_end_class; ResetSkill; } if(.@i&2) ResetStatus; mes "There you go!"; reset_limit++; close; }
-
Hi //===== rAthena Script ======================================= //= Reset NPC //===== Description: ========================================= //= Resets skills, stats, or both. //===== Additional Comments: ================================= //= 1.0 First Version //= 1.1 Optimized for the greater good. [Kisuka] //= 1.2 Cleaning [Euphy] //= 1.3 All statuses removed upon skill reset. [Euphy] //= 1.4 Compressed Script, Added limit use option [Stolao] //= Changed set -> setarray, Improved text with F_InsertPlural //= 1.5 Added sc_end_class to reset related status changes [sader1992] //============================================================ prontera,150,193,4 script Custom Reset Girl 124,{ // Skills, Stats, Both, Limit setarray .@Reset, 1000000, 1000000, 1000000, 0; mes "[Reset Girl]"; if(.@Reset[3] && reset_limit > .@Reset[3]) { mes "Sorry you can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life."; close; } mes "I am the Reset Girl."; mes "Each time you reset the price of the next reset will increase by " + F_InsertComma(.@Reset[2]) + "z."; if (reset_limit) { .@Reset[0] *= reset_limit; .@Reset[1] *= reset_limit; .@Reset[2] *= reset_limit; mes "Reset Stats: "+ callfunc("F_InsertComma",.@Reset[1]) +"z"; mes "Reset Skills: "+ callfunc("F_InsertComma",.@Reset[0]) +"z"; mes "Reset Both: "+ callfunc("F_InsertComma",.@Reset[2]) +"z"; } else mes "Since it's your 1st time, the reset is free!"; if (.@Reset[3]) mes "You may only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+", so use "+((.@Reset[3]>1)?"them":"it")+" wisely."; mes "Please select the service you want:"; next; set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel")); if(.@i > 3) close; if (!reset_limit) .@Reset[.@i-1] = 0; mes "[Reset Girl]"; if (Zeny < .@Reset[.@i-1]) { mes "Sorry, you don't have enough Zeny."; close; } if(.@Reset[3]){ mes "You can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life, are you sure?"; if(select("Let me think:That's fine") == 1) close; } set Zeny, Zeny-.@Reset[.@i-1]; if(.@i&1){ sc_end_class; ResetSkill; } if(.@i&2) ResetStatus; mes "There you go!"; reset_limit++; close; }
-
EXAMPLE Open a text editor program and paste the whole card seller script. Click the save option, save it in your server folder /npc/ and name it carloscardseller.txt Now on npc/scripts_custom, add a empty new line at the end of the file and add: If you are using rAthena: npc: npc/carloscardseller.txt Just like this, if you are using Hercules: // Custom "npc/custom/support_me.txt", "npc/carloscardseller.txt", All NPCs in the server comes from txt files. Each line is a different file. So you're adding your file with your NPC so the server knows where it is, simple.
-
Hi. From rAthena wiki: New scripts must be saved as a text file first. The file may be located anywhere in the rAthena directory, but is in the npc folder by default. So create a .txt file and paste the script in it. For an NPC to be loaded, it needs to be added to a .conf file. This is typically npc/scripts_custom.conf. Add a line, and enter your NPC file in the following format: npc: npc/path/to/your_card_seller_script.txt After adding the script, it must be loaded before the script contents take effect in game. There are a few ways to do this. The map server can be rebooted. This is generally the safest route though not the most convenient for active servers. The GM command @reloadscript maybe used in game, though this may cause monster spawn bugs.
-
Hi. Update your rAthena or find all lines with enablenpc(); / disablenpc(); and add strnpcinfo(0) between the round brackets. Example: enablenpc(); disablenpc(); To: enablenpc(strnpcinfo(0)); disablenpc(strnpcinfo(0));
-
Hi. Yeah, giving custom points to things like Blacksmith' weapon forging, or Alchemist's potion creation is not possible with default scripting. But if it's "crafting" using NPCs, its simple using variables. "custom_points" is not the same as "@custom_points". @variables are lost when the player logout. Just remove the @ and the points will stay. More here: (from \doc\script_commands.txt) mes "Click me to gain points"; next; switch(select("- Get Points:- Cancel")){ case 1: mes "(script get points) +1 custom points"; // Increase the value by 1. Basically gives 1 point to the player custom_points += 1; close; case 2: mes "Cancel"; close; } More Examples: mes "You got 3 points"; custom_points += 3; mes "You made the potion You got 1 point"; custom_points++; mes "You crafted the armor. You got 98346 points"; custom_points += 98346; mes "You did my task. You got 100 temporary points."; mes "You will lose them when you logout"; mes "They are unrelated to others points."; @custom_points += 100; mes "You crafted all the armors."; mes "You got 50 account points. Every character you have can spend them."; mes "They are unrelated to others points."; #custom_points += 50; Spending means losing, so just decrease the variable. Examples: mes "Ok. I will give you the Emperium for 5 points"; custom_points -= 5; getitem "EMPELIUM", 1; mes "Ok. I will give you the 15 Apples for 1 point"; custom_points--; getitem "APPLE", 15; mes "Ok. I will give you the this special buff effect. You spent 8151 points for it."; custom_points -= 8151; sc_start SC_GLORIA,300000,5; mes "OK. You spent 100 points to unlock +10 DMG weapons chance."; weapon_points -= 100; unlocked_10_dmg = true;