Jump to content

Racaae

Members
  • Posts

    132
  • Joined

  • Last visited

  • Days Won

    13

Community Answers

  1. Racaae's post in Automatic Leave party was marked as the answer   
    Hi. Option 2:
    - script Automatic_Leave_Party HIDDEN_WARP_NPC,{ OnInit: //Put here Maintowns maps names setarray .maps$,"prontera","geffen","aldebaran"; for(.@i = 0; .@i < getarraysize(.maps$); .@i++) setmapflag .maps$[.@i], mf_loadevent; end; OnPCLoadMapEvent: if (inarray(.maps$, strcharinfo(3)) >= 0) party_delmember; end; }  
  2. Racaae's post in Private branch room script was marked as the answer   
    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  
  3. Racaae's post in Ajuda, Por favor! Erro com NPC ''Estilista Doram'' was marked as the answer   
    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; } } }  
  4. Racaae's post in reset quest (just any quest) was marked as the answer   
    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; } }  
  5. Racaae's post in R > Safe Refine NPC Script was marked as the answer   
    /npc/re/merchants/ticket_refiner.txt
  6. Racaae's post in timer for cheffenia event was marked as the answer   
    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  
  7. Racaae's post in how to add other languages ​​in the command @langtype was marked as the answer   
    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.
  8. Racaae's post in Requesting for Credit Agent modification was marked as the answer   
    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  
  9. Racaae's post in Help pls! NydhoggsNest was marked as the answer   
    Hello. https://pastebin.com/Cwrv0Mhd
  10. Racaae's post in Error : script error on npc/custom/new_train_ground.txt line 402 need '(' was marked as the answer   
    Hi. "cooking" is a script command. You can't use it as a variable name. Just rename the variable to something else.
  11. Racaae's post in Custom Points was marked as the answer   
    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;  
  12. Racaae's post in enchant weapon was marked as the answer   
    Hello
     
  13. Racaae's post in NPC summon another NPC was marked as the answer   
    The player chooses one of the items? Or the NPC chooses one? The player receives multiple items?
    geffen,151,48,5 script First Person 1_M_LIBRARYMASTER,{ //Put the IDs of the item below. setarray .@items, 909, 910, 911, 912, 913, 914, 915; if (isnpccloaked("Second Person") == 0) { npctalk "You can talk to him.", strnpcinfo(0), bc_self; end; } mes "[First Person]"; mes "Hi, do you have all the items with you?"; next; for (.@i=0;.@i< getarraysize(.@items);.@i++) { if (countitem(.@items[.@i]) < 1) { mes "[First Person]"; mes "You don't have <ITEM>" + getitemname(.@items[.@i]) + "<INFO>" + .@items[.@i] + "</INFO></ITEM>."; close; } } mes "[First Person]"; mes "You have everything. I will call him."; close2; cutin "war_y1", 2; cloakoffnpcself( "Second Person" ); npctalk "Hello.", "Second Person", bc_self; end; } geffen,155,49,3 script Second Person 4_M_FAIRYKID5,{ //Put the IDs of the item below. setarray .@items, 909, 910, 911, 912, 913, 914, 915; //Put here the item IDs of the selection the player can choose from setarray .@reward, 714, 607, 12103; disable_items; mes "[Second Person]"; mes "Hi, the first person told me you have the items."; if (getarraysize(.@reward) > 1) { mes "You can exchange them for one of these:"; for (.@i=0;.@i< getarraysize(.@reward);.@i++) mes "- <ITEM>" + getitemname(.@reward[.@i]) + "<INFO>" + .@reward[.@i] + "</INFO></ITEM>"; next; .@menu$ = ""; for (.@i=0;.@i< getarraysize(.@reward);.@i++) .@menu$ += "- " + getitemname(.@reward[.@i]) + ":"; .@s = select(.@menu$) - 1; mes "[Second Person]"; } mes "Are you sure you want"; mes "<ITEM>" + getitemname(.@reward[.@s]) + "<INFO>" + .@reward[.@s] + "</INFO></ITEM>?"; next; if (select("No", "Yes, let's do this") == 1) { mes "[Second Person]"; mes "I see."; close2; cutin "", 255; cloakonnpcself; end; } for (.@i=0;.@i< getarraysize(.@items);.@i++) { if (countitem(.@items[.@i]) < 1) { mes "[Second Person]"; mes "You don't have <ITEM>" + getitemname(.@items[.@i]) + "<INFO>" + .@items[.@i] + "</INFO></ITEM>."; close2; cutin "", 255; cloakonnpcself; end; } } if ((MaxWeight - Weight) < 1000 || checkweight("Knife",1) == 0) { mes "^0000FF- You cannot continue due to your heavy weight. -^000000"; close2; cutin "", 255; cloakonnpcself; end; } for (.@i=0;.@i < getarraysize(.@items);.@i++) delitem .@items[.@i], 1; getitem .@reward[.@s], 1; mes "[Second Person]"; mes "Done."; close2; cutin "", 255; cloakonnpcself; end; OnInit: cloakonnpc; end; }  
  14. Racaae's post in Npc that consume custom coins to generate items to players. was marked as the answer   
    Hi
    yuno,160,80,3 script 3D Printer 4_MACHINE_DEVICE,{ .@custom_coin_ID = 675451; .@custom_coin_qty = 3; if (countitem(.@custom_coin_ID) < .@custom_coin_qty) { npctalk "You need " + .@custom_coin_qty + " " + getitemname(.@custom_coin_ID) + " to generate a item.", strnpcinfo(0), bc_self; end; } npctalk "Type the ID of the item to generate.", strnpcinfo(0), bc_self; input .@item_id; if (getitemname(.@item_id) == "null") { npctalk "ID is invalid / item not found.", strnpcinfo(0), bc_self; end; } mes "[" + strnpcinfo(1) + "]"; mes "Confirm generation of"; mes "<ITEM>" + getitemname(.@item_id) + "<INFO>" + .@item_id + "</INFO></ITEM>?"; next; if (select("Cancel", "Confirm") == 1) close; mes "[" + strnpcinfo(1) + "]"; mes "Starting..."; close2; if (countitem(.@custom_coin_ID) < .@custom_coin_qty) { npctalk "You need " + .@custom_coin_qty + " " + getitemname(.@custom_coin_ID) + " to generate a item.", strnpcinfo(0), bc_self; end; } if (checkweight(.@item_id,1) == 0) { npctalk "Overweight detected. You cannot proceed.", strnpcinfo(0), bc_self; end; } delitem .@custom_coin_ID, .@custom_coin_qty; getitem .@item_id, 1; npctalk "Generated.", strnpcinfo(0), bc_self; specialeffect EF_OVERTHRUST; end; }  
  15. Racaae's post in Npc register guild and allow guild member access to map was marked as the answer   
    yuno,165,80,3 script Entrance Guard#guild 4_M_UNCLEKNIGHT,{ if (getgroupid() >= 90) callsub S_Control; mes "[" + strnpcinfo(1) + "]"; mes "I can take you to the area if you're in a registered guild."; next; switch(select("Enter area", "Finish conversation")) { case 1: if (!getcharid(2)) { mes "[" + strnpcinfo(1) + "]"; mes "You are not in a guild."; close; } if (inarray($registered_guilds, getcharid(2)) < 0) { mes "[" + strnpcinfo(1) + "]"; mes "Your guild did not register."; close; } mes "[" + strnpcinfo(1) + "]"; mes "You're with the ^895818" + strcharinfo(2) + "^000000, correct?"; mes "I will send you there."; close2; warp "que_qsch05",346,32; end; case 2: mes "[" + strnpcinfo(1) + "]"; mes F_Bye; close; } S_Control: if(select("Default NPC", "^0000FFGM Control^000000") == 1) return; switch(select("Register guild", "Remove all guilds", "Cancel")) { case 1: switch(select("Enter guild member name", "Enter guild name")) { case 1: input .@playername$; query_sql "SELECT `name`,`guild_id` FROM `char` WHERE `name` like '%"+.@playername$+"%'",.@p_name$,.@GID; query_sql "SELECT `name`,`guild_lv` FROM `guild` WHERE `guild_id` = "+.@GID,.@NAME$,.@GLVL; if (getarraysize(.@p_name$) > 1) { mes "[" + strnpcinfo(1) + "]"; mes "More than one player with this name was found."; mes "Type again. Be more specific, please!"; close; } if (.@p_name$ == "") { mes "[" + strnpcinfo(1) + "]"; mes "I didn't find anything. Check for typos. You don't need to input the whole name."; close; } if (!.@GID) { mes "[" + strnpcinfo(1) + "]"; mes "" + .@p_name$ + " does not have a guild."; close; } break; case 2: input .@guildname$; query_sql "SELECT `guild_id`,`name`,`guild_lv` FROM `guild` WHERE `name` like '%"+.@guildname$+"%'",.@GID,.@NAME$,.@GLVL; if (getarraysize(.@GID) > 1) { mes "[" + strnpcinfo(1) + "]"; mes "More than one guild with this name was found."; mes "Type again. Be more specific, please!"; close; } if (!.@GID) { mes "[" + strnpcinfo(1) + "]"; mes "I didn't find anything. Check for typos. You don't need to input the whole name."; close; } break; } getguildmember .@GID, 1; getguildmember .@GID, 2; .@QTM = $@guildmembercount; for(.@i=0; .@i < $@guildmembercount; .@i++) if (isloggedin($@guildmemberaid[.@i],$@guildmembercid[.@i])) .@online++; mes "[" + strnpcinfo(1) + "]"; if (.@p_name$ != "" && .@p_name$ != getguildmaster(.@GID)) mes "" + .@p_name$ + "'s guild"; mes "Name: ^0000FF" + .@NAME$ + "^000000 (Lv " + .@GLVL + ")"; mes "Master: " + getguildmaster(.@GID); mes "Members: "+.@QTM+" / Online: "+.@online; mes " "; if (inarray($registered_guilds, .@GID) >= 0) { mes "Guild registered already."; close; } mes "Are you sure you want to register this guild?"; next; if(select("No", "Yes, register guild") == 1) close; .@i = getarraysize($registered_guilds); setarray $registered_guilds[.@i], .@GID; mes "[" + strnpcinfo(1) + "]"; mes "Guild ^895818" + getguildname(.@GID) + "^000000 registered!"; mes "Guild members can now enter."; close; case 2: mes "[" + strnpcinfo(1) + "]"; mes "Are you sure you want to remove all registered guilds?"; mes "^FF0000THIS CANNOT BE UNDONE.^000000"; next; if(select("On second thought, no.", "I'm aware, go on.") == 1) close; deletearray $registered_guilds, getarraysize($registered_guilds); mes "[" + strnpcinfo(1) + "]"; mes "Done."; close; case 3: end; } }  
  16. Racaae's post in Raffle Event NPC was marked as the answer   
    Hello. Your script is looking good, great start.
    You can test this one, maybe you learn something, I tried doing what you requested.
    //Converts ratio to return actual number with decimals. //10000=100% 1000=10% 100=1% 10=0,1% 1=0,01% function script F_ConvertRatio { .@n = getarg(0); if (.@n%100 && .@n > 100 && .@n < 1000 && atoi(charat(""+.@n, 1)) == 0 || .@n < 10) .@n2$ = .@n/100 + (.@n%100?",0"+.@n%100:""); else if (.@n%100 && .@n > 9 && .@n < 1000 && atoi(charat(""+.@n, getstrlen(""+.@n)-1)) == 0) .@n2$ = .@n/100 + "," + (.@n%100)/10; else .@n2$ = .@n/100 + (.@n%100?","+.@n%100:""); return .@n2$; } prontera,113,246,5 script Rafa da Rifa 1_F_PUBGIRL,{ cutin "job_dancer_eir01", 0; mes "[" + strnpcinfo(1) + "]"; mes "Você quer participar da minha rifa?"; mes "Ai, que pergunta, né? É claro que quer!"; mes "Pelo generosíssimo valor de ^0000FF" + F_InsertComma($@raffle_cost) + "z^000000, você concorre a"; mes "" + $@raffle_prize_qty + " [<ITEM>" + getitemname($@raffle_prize_id) + "<INFO>" + $@raffle_prize_id + "</INFO></ITEM>]."; next; if (isnpccloaked()) goto S_Restarting; .@i = rand(20,40); mes "[" + strnpcinfo(1) + "]"; mes "Você precisa tirar o número ^FF0000" + .@i + "^000000 pra ganhar ^00FF00" + getitemname($@raffle_prize_id) + "^000000."; mes "Mas primeiro, preciso dos ^0000FF" + F_InsertComma($@raffle_cost) + "z^000000."; mes "O que me diz?"; next; if(select("Tá OK! Lá vamos nós...", "Não, obrigad" + (Sex?"o":"a") + ".") == 2) { mes "[" + strnpcinfo(1) + "]"; mes "Não tá confiante?"; close3; } if (Zeny < $@raffle_cost) { mes "[" + strnpcinfo(1) + "]"; mes "Você não tem o zeny para participar?"; close3; } if (checkweight(1301,1) == 0) { mes "[" + strnpcinfo(1) + "]"; mes "Você tá com uma mochila bem pesada em..."; mes "Como você vai receber o prêmio desse jeito?"; close3; } if (isnpccloaked()) goto S_Restarting; Zeny -= $@raffle_cost; mes "[" + strnpcinfo(1) + "]"; mes "O número do prêmio é ^FF0000" + .@i + "^000000."; if (rand(10000) > $@raffle_chance) { .@l = rand(.@i-19,.@i+19); showdigit .@l; mes "Você tirou o número ^0000FF" + .@l + "^000000."; mes "Não foi dessa vez. Mas e se você tentar de novo?"; mes "Aliás, aqui está o seu prêmio de consolação!"; getitem $@raffle_consol_id, rand($@raffle_consol_min,$@raffle_consol_max); close3; } showdigit .@i; mes "Você tirou o número ^0000FF" + .@i + "^000000."; mes "... Peraí, você ganhou? É isso mesmo, produção?"; mes "Hoje é o seu dia!"; getitem $@raffle_prize_id, $@raffle_prize_qty; announce "" + strnpcinfo(1) + " : Parabéns! " + strcharinfo(0) + " recebeu " + $@raffle_prize_qty + " " + itemlink($@raffle_prize_id) + " na Rifa!", bc_all; specialeffect2 EF_PROVIDENCE; donpcevent strnpcinfo(3)+"::OnStart"; close3; S_Restarting: mes "[" + strnpcinfo(1) + "]"; mes "Nossa, essa rifa acabou bem quando estávamos conversando."; mes "Você vai ter que tentar a sorte na nova rifa."; close3; OnInit: bindatcmd "rifa",strnpcinfo(3)+"::OnGM", 99, 99; setarray .rifas, //Cada linha é uma rifa diferente //<grand prize>,<grand prize amount>,<consolation prize>,<consolation min amount>,<consolation max amount>,<cost>,<win chance 1~10000>, 970 , 30 , 7136 , 1, 20, 40000 , 100, 12264, 5 , 7135 , 1, 20, 100000, 100, 12928, 5 , 678 , 1, 10, 100000, 200, 7938 , 100, 7939 , 1, 50, 100000, 100, 6962 , 1 , 7139 , 1, 20, 150000, 125, 7620 , 10 , 984 , 1, 15, 150000, 125, 7619 , 10 , 985 , 1, 15, 200000, 200, 12412, 1 , 6259 , 1, 40, 300000, 40, 23546, 1 , 1061 , 1, 400, 500000, 200, 6635 , 1 , 23044, 1, 10, 600000, 50; // 1200000 = 20 minutos OnTimer1200000: OnStart: stopnpctimer; cloakonnpc strnpcinfo(0); sleep 10000; .@r = rand(getarraysize(.rifas)/7) *7; $@raffle_prize_id = .rifas[.@r]; $@raffle_prize_qty = .rifas[.@r+1]; $@raffle_consol_id = .rifas[.@r+2]; $@raffle_consol_min = .rifas[.@r+3]; $@raffle_consol_max = .rifas[.@r+4]; $@raffle_cost = .rifas[.@r+5]; $@raffle_chance = .rifas[.@r+6]; announce "A Rafa gostaria de convidar a todos a participarem de sua Rifa, na biblioteca ao oeste de Prontera!", bc_all; cloakoffnpc strnpcinfo(0); initnpctimer; sleep 5000; announce "" + strnpcinfo(1) + " : O grande prêmio é " + ($@raffle_prize_qty>1?$@raffle_prize_qty+"x ":"") + itemlink($@raffle_prize_id) + "! E o prêmio de consolação é " + itemlink($@raffle_consol_id) + " " + $@raffle_consol_min + "~" + $@raffle_consol_max + "x!", bc_all; npctalk "Este aqui é um prêmio especial que aparece só de vez em quando, então se eu fosse você, eu participaria!"; end; OnGM: message strcharinfo(0), "Esses são comandos especiais que apenas você ADMs e GMs podem usar."; switch(select("Cancelar", "^0000FFVer rifa atual^000000", "^0000FFVer rifas^000000", "^0000FFIniciar nova rifa^000000")) { case 1: end; case 2: if (isnpccloaked()) { message strcharinfo(0), "RIFA EM PROCESSO DE REINICIAR"; end; } mes "^0000FFPrêmio:^000000"; mes "^0000FF[<ITEM>" + getitemname($@raffle_prize_id) + "<INFO>" + $@raffle_prize_id + "</INFO></ITEM>] " + $@raffle_prize_qty + "x^000000"; mes "^FF0000Consolação:^000000"; mes "^FF0000[<ITEM>" + getitemname($@raffle_consol_id) + "<INFO>" + $@raffle_consol_id + "</INFO></ITEM>] " + $@raffle_consol_min + "~" + $@raffle_consol_max +"x^000000"; mes "Preço: " + F_InsertComma($@raffle_cost) + "z"; mes "Chance do prêmio: " + F_ConvertRatio($@raffle_chance) + "%"; mes "Iniciada faz " + (getnpctimer(0)/1000) + " segundos."; close; case 3: .@size = getarraysize(.rifas)/7; for( .@i = 0; .@i < .@size; .@i++ ) { .@r = .@i * 7; mes "^0000FFRifa " + (.@i+1) + " - Prêmio:^000000"; mes "^0000FF[<ITEM>" + getitemname(.rifas[.@r]) + "<INFO>" + .rifas[.@r] + "</INFO></ITEM>] " + .rifas[.@r+1] + "x^000000"; mes "^FF0000Consolação:^000000"; mes "^FF0000[<ITEM>" + getitemname(.rifas[.@r+2]) + "<INFO>" + .rifas[.@r+2] + "</INFO></ITEM>] " + .rifas[.@r+3] + "~" + .rifas[.@r+4] +"x^000000"; mes "Preço: " + F_InsertComma(.rifas[.@r+5]) + "z"; mes "Chance do prêmio: " + F_ConvertRatio(.rifas[.@r+6]) + "%"; if (.@i < .@size-1) { if(select("Ver outra rifa","Fechar") == 1) clear; else break; } } close; case 4: donpcevent strnpcinfo(3)+"::OnStart"; end; } } prontera,115,246,3 script Rifa#raffle_board 2_BULLETIN_BOARD,{ mes "^0000FFGrande prêmio da Rifa:^000000"; mes "^0000FF[<ITEM>" + getitemname($@raffle_prize_id) + "<INFO>" + $@raffle_prize_id + "</INFO></ITEM>] " + $@raffle_prize_qty + "x^000000"; mes " "; mes "^FF0000Prêmio de Consolação:^000000"; mes "^FF0000[<ITEM>" + getitemname($@raffle_consol_id) + "<INFO>" + $@raffle_consol_id + "</INFO></ITEM>] " + $@raffle_consol_min + "~" + $@raffle_consol_max +"x^000000"; mes " "; mes "Preço: " + F_InsertComma($@raffle_cost) + "z"; close; } Using initnpctimer and stopnpctimer you can automate the raffle change. Example:
    OnInit: // set the first raffle when the server starts. initnpctimer; //start the timer end; OnTimer60000: //after 60 seconds this part will trigger //change the raffle array to new values. stopnpctimer; //erase the old timer initnpctimer; //start the timer again from 0 end;  
  17. Racaae's post in How to reduce Hp player if out of safe zone ? was marked as the answer   
    Hello.
    Use getareaunits to get everyone who is in the "safe zone". Then use getmapunits to get everyone on the map. Compare the two lists and attach the players who aren't on both arrays since this means they are out the area.
    //REDUCE HP PLAYER OUT OF ZONE prontera,1,1,1 script AutoReduceHP HIDDEN_NPC,{ end; OnTimer2000: .@percent = -30; .@SafeArea = getareaunits(BL_PC,"prontera",145,83,164,69,.@safe_aid); .@size = getmapunits(BL_PC,"prontera",.@aid); if (.@size > 0) { for (.@i = 0; .@i < .@size; .@i++) { if (inarray(.@safe_aid, .@aid[.@i]) < 0) { if (attachrid(.@aid[.@i])) { if (Hp <= MaxHp) { specialeffect2 107; percentheal .@percent, .@percent; if (Hp < 5) { warp "SavePoint",0,0; } } detachrid; } } } } initnpctimer; end; OnInit: initnpctimer; end; }  
  18. Racaae's post in monster drop % was marked as the answer   
    Hi. Change 100 to 10000, and 0.01 to 1. You can't use decimal numbers in scripting.
    - script Poring_Coin -1,{ OnNPCKillEvent: if ( rand( 10000 ) <= 1 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } end; } 10000 = 100 %
    1000 = 10 %
    100 = 1 %
    10 = 0.1 %
    1 = 0.01 %
  19. Racaae's post in Use Custom Command To Recall NPC Massage And check Item To Display Text was marked as the answer   
    - script StatusMessage#command HIDDEN_WARP_NPC,{ OnMenu: mes "=== " + strcharinfo(0) + " status ==="; switch(select("- Weapon Skill", "- Bow Skill", "- Cancel")) { case 1: if (countitem(40040)) { mes "Your ^0000FFWeapon Skill^000000 is Lvl 1."; } else { mes "^FF0000You don't have this Skill.^000000"; } break; case 2: if (countitem(40041)) { mes "Your ^0000FFBow Skill^000000 is Lvl 1."; } else { mes "^FF0000You don't have this Skill.^000000"; } break; case 3: close; } switch(select("- Check other skill:- Cancel")) { case 1: clear; goto OnMenu; case 2: close; } OnInit: .@command$ = "status"; //CHANGE HERE @COMMAND TO SEE MESSAGE bindatcmd .@command$,strnpcinfo(3)+"::OnMenu"; end; }  
  20. Racaae's post in list instead of range was marked as the answer   
    Hi
    set .@menu$, ""; for (.@i = 0; .@i < getarraysize(.orbs); .@i++) { .@qty = countitem(.orbs[.@i]); if (.@qty) .@menu$ += getitemname(.orbs[.@i])+" x"+.@qty+":"; else .@menu$ += ":"; } if(.@menu$=="") { mes .npc$; mes "Hmm, you don't seem to have any enchantment orbs."; close; } mes .npc$; mes "Please, select an enchantment from the menu."; next; select(.@menu$); set .@itm, .orbs[@menu-1]; OnInit: setarray .orbs, 4702,4712,4722,4732,4742,4752,4767,4834; end;  
  21. Racaae's post in Help - Memory of Thanatos card restriction was marked as the answer   
    Hi. Add in \db\import\item_db.yml
    - Id: 4399 AegisName: Thanatos_Card Script: | if (BaseJob != Job_Monk) { bonus bDefRatioAtkClass,Class_All; bonus bSPDrainValue,-1; bonus bDef,-30; bonus bFlee,-30; }  
  22. Racaae's post in changing NPC's gender code was marked as the answer   
    Hi, put this in your OnInit: label
    setunitdata(getnpcid(0), UNPC_CLASS, 1); setunitdata(getnpcid(0), UNPC_SEX, 1); //0=female 1=male  
  23. Racaae's post in drop mvp custom was marked as the answer   
    Hi, the script is working fine here.
    Try changing that line to:
    if ( killedrid != 31001 ) end;  
    - script satan -1,{ OnNPCKillEvent: if ( killedrid != 1002 ) end; if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 45018, 1, .@partymemberaid[ rand( .@c ) ]; announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } else { getitem 45018, 1; announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } end; }  
  24. Racaae's post in Credit limit was marked as the answer   
    Got it!
     
  25. Racaae's post in R>Morroc Rebuild epi 14.1 was marked as the answer   
    Hi
    map_morroc_rebuilding.gpf
×
×
  • Create New...