Jump to content

Ichigo

Members
  • Posts

    99
  • Joined

  • Last visited

Everything posted by Ichigo

  1. Me alegro que te guste. Actualizado a la versión 1.3 - Actualizadas comprobaciones de nivel, ya que había un pequeño fallo en la comprobación. - Se ha subido la diferencia de niveles para obtener la Pandora's Box y Pandora's Mallet de 20 a 50.
  2. Actualizado y testeado, a la versión 1.2. Nota: En la db, cuando más pequeño es la tax, menos posibilidad tiene de salir el item.
  3. The interface is already created and I guess that will come officially included in the data.grf or rdata.grf therefore should only be programmed the operation of the interface that is combined with a db. Hopefully it implemented, would be luxury. La interface ya esta creada oficialmente y supongo que vendra incluida en el data.grf o en el rdata.grf, por lo tanto solo debe ser programar el funcionamiento de dicha interface para que se combine con una db. Ojala lo implemente, estaria de lujo.
  4. Hola a todos. Este evento esta inspirado en el ultimo evento activo del RO2. Consiste en ir matando mobs, y estos pueden dropear ciertos items, un tesoro y un martillo, los martillos son necesarios para abrir los tesoros. + info item_db2 31349,Pandora's_Box,Pandora's Box,3,0,,0,,,,,,,,,,,,,{},{},{} 31350,Pandora's_Mallet,Pandora's Mallet,11,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_Pandora_Box",31350; },{},{} 31351,Pandora's_Key,Pandora's Key,11,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_Pandora_Box",31351; },{},{} idnum2itemdesctable.txt 31349# Item obtained is base on the items which is used to open the box. Can be opened by using Pandora's Mallet or Pandora's Keys. # 31350# A powerful hammer which can force open the treasure box. # 31351# Krafra Items Key to open Pandora Box. ^CC0000Cannot Destroy. Sharing among characters in one account is not possible. Usable to keep at Guild Storage.^000000 # idnum2itemdisplaynametable.txt 31349#Pandora's_Box# 31350#Pandora's_Mallet# 31351#Pandora's_Key# idnum2itemresnametable.txt 31349#º¸¹°»óÀÚ_# 31350#ºê¶óµð¿òµ¹¸ÁÄ¡# 31351#½Ã°èž¿­¼è# pandora_box.txt //============================================ // Pandora's Box // Creado por Ichigo // Versión 1.3 //============================================ // item_db2.txt // 31349,Pandora's_Box,Pandora's Box,3,0,,0,,,,,,,,,,,,,{},{},{} // 31350,Pandora's_Mallet,Pandora's Mallet,11,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_Pandora_Box",31350; },{},{} // 31351,Pandora's_Key,Pandora's Key,11,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_Pandora_Box",31351; },{},{} //============================================ // idnum2itemdesctable.txt // 31349# // Item obtained is base on the items which is used to open the box. // Can be opened by using Pandora's Mallet or Pandora's Keys. // # // 31350# // A powerful hammer which can force open the treasure box. // # // 31351# // Krafra Items // Key to open Pandora Box. // ^CC0000Cannot Destroy. // Sharing among characters in one account is not possible. // Usable to keep at Guild Storage.^000000 // # //============================================ // idnum2itemdisplaynametable.txt // 31349#Pandora's_Box# // 31350#Pandora's_Mallet# // 31351#Pandora's_Key# //============================================ // idnum2itemresnametable.txt // 31349#º¸¹°»óÀÚ_# // 31350#ºê¶óµð¿òµ¹¸ÁÄ¡# // 31351#½Ã°èž¿­¼è# //============================================ function script F_Pandora_Box { if(getarg(0) == 31350) { set .@i1, 100; set .@i2, 25; } else { set .@i1, 75; set .@i2, 0; } set .@i3, rand(.@i2,.@i1); set @nb, query_sql("SELECT item_id FROM `pandora_db` WHERE tax >= "+.@i3+" and tax <= "+.@i1+" ORDER BY rand() LIMIT 0 , 1;", @item_id); if(countitem(31349) < 1) { dispbottom "Necesitas 1 "+getitemname(31349); end; } delitem getarg(0), 1; delitem 31349, 1; getitem @item_id, 1; end; } - script pandora_box -1,{ end; OnNPCKillEvent: // Protección de mobs deviles if(BaseLevel < 20) end; if(strmobinfo(3,killedrid) < (BaseLevel - 50)) end; if(strmobinfo(3,killedrid) > (BaseLevel + 50)) end; if(rand(10000) <= 1000) getitem 31349, 1; // 10% de posibilidad if(rand(10000) <= 100) getitem 31350, 1; // 1% de posibilidad end; } //prontera,147,165,4 shop Kafra#prt_pandora 49,31350:50000 En la sql CREATE TABLE IF NOT EXISTS `pandora_db` ( `item_id` int(11) NOT NULL, `tax` int(11) NOT NULL, UNIQUE KEY `item_id` (`item_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `pandora_db` (`item_id`, `tax`) VALUES (512, 100), (521, 100), (529, 100), (601, 90), (602, 70), (603, 70), (604, 70), (605, 70), (606, 70), (607, 90), (608, 95), (610, 75), (616, 25), (656, 50), (657, 75), (662, 95), (670, 75), (969, 50), (988, 25), (989, 25), (1649, 2), (1658, 3), (2111, 20), (2115, 20), (2124, 28), (2125, 30), (2128, 1), (2129, 1), (2147, 30), (2148, 20), (2151, 1), (2153, 20), (2160, 1), (2341, 50), (2342, 25), (2375, 1), (2383, 1), (5390, 10), (5445, 30), (6320, 25), (7230, 25), (7444, 25), (7510, 25), (7875, 25), (8969, 29), (12028, 72), (12031, 77), (12103, 25), (12208, 28), (12210, 25), (12214, 35), (12248, 4), (12278, 26), (12281, 78), (12301, 3), (12302, 3), (12321, 76), (12354, 75), (12575, 49), (12617, 31), (14517, 50), (14518, 50), (14519, 50), (14520, 50), (14527, 70), (14545, 1), (15014, 1), (15023, 25), (15037, 1), (15044, 20), (15046, 28), (15053, 26), (15054, 1), (15056, 20), (16998, 2), (19507, 25); pandora_box.txt
  5. Si, es como menciona DanielArt.
  6. Si, era una forma de especificar por partes, o si se quiere modificar el precio de x parte en especial. xD
  7. Hola a todos. Les traigo un encantador de equipo, encanta cualquier tipo de equipo a cambio de cash. Solo tienen que cambiar la posición del NPC. Espero que les guste. Encantamiento.txt //===================================== // Script creado por Ichigo //===================================== Crystilia,52,91,5 script Freya#Encantamiento 465,{ set @name$, "[^0000FFFreya^000000]"; cutin "3rd_wl_queen01",2; mes @name$; mes "Soy la diosa Freya."; mes "Capaz de encantar cualquier parte de tu equipo."; M_Menu: next; menu "Head - ["+getequipname(1)+"]",PART1,"Body - ["+getequipname(2)+"]",PART2,"Left hand - ["+getequipname(3)+"]",PART3,"Right hand - ["+getequipname(4)+"]",PART4,"Robe - ["+getequipname(5)+"]",PART5,"Shoes - ["+getequipname(6)+"]",PART6,"Accessory 1 - ["+getequipname(7)+"]",PART7,"Accessory 2 - ["+getequipname(8)+"]",PART8,"Head 2 - ["+getequipname(9)+"]",PART9,"Head 3 - ["+getequipname(10)+"]",PART10; //Head Gear PART1: set .@part,1; set .@prize,50; if (getequipisequiped(1)) goto CHECK1; goto NoEncantar; //Armor PART2: set .@part,2; if (getequipisequiped(2)) goto CHECK1; goto NoEncantar; //Left Hand PART3: set .@part,3; if (getequipisequiped(3)) goto CHECK1; goto NoEncantar; //Right Hand PART4: set .@part,4; if (getequipisequiped(4)) goto CHECK1; goto NoEncantar; //Garment PART5: set .@part,5; if (getequipisequiped(5)) goto CHECK1; goto NoEncantar; //Foot Gear PART6: set .@part,6; if (getequipisequiped(6)) goto CHECK1; goto NoEncantar; //Accessory1 PART7: set .@part,7; if (getequipisequiped(7)) goto CHECK1; goto NoEncantar; //Accessory2 PART8: set .@part,8; if (getequipisequiped(8)) goto CHECK1; goto NoEncantar; PART9: set .@part,9; if (getequipisequiped(9)) goto CHECK1; goto NoEncantar; PART10: set .@part,10; goto NoEncantar; CHECK1: switch(.@part) { case 1: case 2: set .@prize,500; break; case 3: case 4: switch(getequipweaponlv(.@part)) { case 1: set .@prize,350; break; case 2: set .@prize,400; break; case 3: set .@prize,450; break; case 4: set .@prize,500; break; } break; case 5: case 6: case 7: case 8: case 9: case 10: set .@prize,500; break; } callsub S_Enchant,getequipid(.@part),.@part,.@prize; end; NoEncantar: mes @name$; mes "No tienes nada para encantar"; emotion 6; goto M_Menu; S_Enchant: if(countitem(getarg(0)) == 1) { set .@N_Slots, getitemslots(getarg(0)); set .@card0, getequipcardid(getarg(1),0); set .@card1, getequipcardid(getarg(1),1); set .@card2, getequipcardid(getarg(1),2); set .@card3, getequipcardid(getarg(1),3); mes @name$; mes "Cada vez que quieras encantarlo, cuesta "+getarg(2)+" Cash Points."; mes "¿Quieres encantarlo?"; next; switch(select("Hmm... Mejor más tarde.:Si, encantala.")) { case 1: close2; cutin "", 255; end; case 2: if(.@N_Slots == 4) { mes "No puedes encantarlo."; close2; cutin "", 255; end; } if((.@N_Slots == 3) && (.@card3 > 0)) { mes "No puedes encantarlo."; close2; cutin "", 255; end; } if((.@N_Slots == 2) && (.@card2 > 0)) { if(.@card3 > 0) { mes "No puedes encantarlo."; close2; cutin "", 255; end; } } if((.@N_Slots == 1) && (.@card1 > 0)) { if(.@card2 > 0) { if(.@card3 > 0) { mes "No puedes encantarlo."; close2; cutin "", 255; end; } } } if((.@N_Slots == 0) && (.@card0 > 0)) { if(.@card1 > 0) { if(.@card2 > 0) { if(.@card3 > 0) { mes "No puedes encantarlo."; close2; cutin "", 255; end; } } } } } if(#CASHPOINTS < getarg(2)) { mes @name$; mes "Lo siento, pero no tienes suficientes Cash Points."; close2; cutin "", 255; end; } mes @name$; mes "Vamos a encantarla ..."; progressbar "ffff00",7; close2; M_Selec: set .@i, rand(4700,4862); if((.@i == 4845) || (.@i == 4846) || (.@i == 4847)) goto M_Selec; switch(.@N_Slots) { case 0: if(.@card0 == 0) set .@card0, .@i; else if(.@card1 == 0) set .@card1, .@i; else if(.@card2 == 0) set .@card2, .@i; else if(.@card3 == 0) set .@card3, .@i; break; case 1: if(.@card1 == 0) set .@card1, .@i; else if(.@card2 == 0) set .@card2, .@i; else if(.@card3 == 0) set .@card3, .@i; break; case 2: if(.@card2 == 0) set .@card2, .@i; else if(.@card3 == 0) set .@card3, .@i; break; case 3: if(.@card3 == 0) set .@card3, .@i; break; } set #CASHPOINTS, #CASHPOINTS - getarg(2); set .@refinerycnt, getequiprefinerycnt(getarg(1)); // Refinamiento del equipo delitem getarg(0), 1; if(rand(10000) <= (2500+(readparam(bLuk)+readparam(SC_INCLUK))+(readparam(bDex)+readparam(SC_INCDEX)))) { getitem2 getarg(0), 1, 1, .@refinerycnt, 0, .@card0, .@card1, .@card2, .@card3; //specialeffect2 EF_REFINEOK; specialeffect EF_LORD; mes @name$; mes "Perfecto, todo ha salido bien."; close2; cutin "", 255; end; } else { //specialeffect2 EF_REFINEFAIL; specialeffect EF_SUI_EXPLOSION; mes @name$; mes "Lo siento, el proceso ha fallado."; close2; cutin "", 255; end; } } else if(countitem(getarg(0)) > 1) { mes @name$; mes "Hmm? Solo puedes tener un mismo tipo de objeto!"; mes "Por favor, vuelva con un solo equipo a encantar."; close2; cutin "", 255; end; } else { mes @name$; mes "Hmm? No hay nada que encantar!"; mes "Por favor, vuelva con un solo equipo a encantar."; close2; cutin "", 255; end; } end; }
  8. Aquí les traigo como añadir un poco de seguridad a los almacenes de guild. Primero en el src\map\atcommand.c Buscamos: ACMD_FUNC(guildstorage) { nullpo_retr(-1, sd); if (!sd->status.guild_id) { clif_displaymessage(fd, msg_txt(sd,252)); return -1; } if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading) return -1; if (sd->state.storage_flag == 1) { clif_displaymessage(fd, msg_txt(sd,250)); return -1; } if (sd->state.storage_flag == 2) { clif_displaymessage(fd, msg_txt(sd,251)); return -1; } storage_guild_storageopen(sd); clif_displaymessage(fd, msg_txt(sd,920)); // Guild storage opened. return 0; } Y añadimos debajo: /*========================================= * gstorage Security System *-----------------------------------------*/ ACMD_FUNC(gstoragesecurity) { nullpo_retr(-1,sd); if( sd->npc_id || sd->vender_id || sd->buyer_id || sd->state.trading || sd->state.storage_flag ) return -1; npc_event(sd,"GstorageSecurity::OnGuild",0); return 0; } Luego, en el mismo documento buscamos: ACMD_DEF(unloadnpcfile), ACMD_DEF(cart), ACMD_DEF(mount2), Y al final añadimos: ACMD_DEF2("gstorage",gstoragesecurity), Compilamos, sino no funciona. Y cargamos el siguiente script: gstorage_security.txt - script GstorageSecurity -1,{ end; OnGuild: if (!query_sql("show columns from `guild` like 'gstorage_mode'",@ignore,@ignore,@ignore,@ignore,@ignore,@ignore)) { mes "Hubo un error de base de datos críticos. Please informar de ello a un GM!"; close; } if (!getcharid(2)) { mes "[Guild S.]"; mes "Lo sentimos, usted debe estar en un clan para utilizar esta función!"; close; } mes "[Guild S.]"; mes "¿Qué te gustaría hacer?"; next; switch(select("Usar guild Storage (500 zeny)","Ver configuración","Atras")) { case 1: goto L_UseGStorage; case 2: query_sql "select gstorage_mode,gstorage_pos,gstorage_password from `guild` where `guild_id` = "+getcharid(2),@mode,@pos,@password$; if (strcharinfo(0) == getguildmaster(getcharid(2))) { next; mes "[Guild S.]"; mes "Guild Storage modo de acceso está configurado para "+@mode[0]; mes "0= sin restricción de acceso"; mes "1= requisito Posición"; mes "2= protegidos por contraseña"; switch(select("Cambiar el modo","Establecer posición minima permitida","Establecer Contraseña","Atras")) { case 1: mes "Entre en el modo #"; input @temp; if (@temp < 0) set @temp, 0; if (@temp > 2) set @temp, 2; query_sql "update `guild` set gstorage_mode = "+@temp+" where guild_id = "+getcharid(2),@ignore; mes "Modo ajustado a "+@temp; next; goto OnGuild; case 2: mes "Introduzca la posición mínima"; input @temp; if (@temp < 1) set @temp, 1; if (@temp > 50) set @temp, 50; query_sql "update `guild` set gstorage_pos = "+@temp+" where guild_id = "+getcharid(2),@ignore; mes "Posición mínima establecida a "+@temp; next; goto OnGuild; case 3: mes "Introduzca la contraseña, introduzca un espacio para cancelar"; input @temp$; set @temp$, escape_sql(@temp$); if (@temp$ == " ") { next; goto OnGuild; } query_sql "update `guild` set gstorage_password = '"+escape_sql(@temp$)+"' where guild_id = "+getcharid(2),@ignore; mes "Contraseña establece a "+@temp$; next; goto OnGuild; case 4: next; goto OnGuild; } } else { query_sql "select gstorage_mode from `guild` where guild_id = "+getcharid(2),@mode; mes "[Guild S.]"; switch(@mode) { case 0: mes "Guild storage is not currently restricted."; break; case 1: mes "Guild storage is currently restricted by position."; break; case 2: mes "Guild storage is currently restricted via password."; break; } next; goto OnGuild; } case 3: close; } close; L_UseGStorage: if (strcharinfo(0) == getguildmaster(getcharid(2))) goto L_UseGStorageSkip; query_sql "select gstorage_mode,gstorage_pos,gstorage_password from `guild` where guild_id = "+getcharid(2),@mode,@pos,@password$; if (@mode[0] == 1) { query_sql "select position from `guild_member` where guild_id = "+getcharid(2)+" and char_id = "+getcharid(0),@current_pos; if (@current_pos[0] > (@pos[0] - 1)) { mes "[Guild S.]"; mes "Sorry, but you are not authorized to use guild storage."; close; } } if (@mode[0] == 2) { mes "[Guild S.]"; mes "The guild leader has instated password protected guild storage, please enter the password now."; input @pw$; if (@pw$ != @password$[0]) { next; mes "[Guild S.]"; mes "Sorry, that password is incorrect."; close; } } L_UseGStorageSkip: if(zeny < 500) { mes "[Guild S.]"; mes "Necesitas 500 zeny."; close; } close2; if(basicskillcheck() && getskilllv(1) < 6) goto L_nobasicskill; if(guildopenstorage() == 1) goto L_gmateusing; dispbottom "Guild Storage is now open."; set zeny, zeny - 500; end; L_nobasicskill: mes "[Kafra]"; mes "You need to have Basic Skill level of 6 to open Guild storage"; close; L_gmateusing: mes "[Kafra]"; mes "One of your Guildmates is currently using the guild storage"; mes "Please try again later"; close; } Espero que les sirva.
  9. Como indica la consola, falta una etiqueta. Añade el OnCheck, quedaría así: / WoE Setter 3 Plug-in // Player - Guild Recruit Advertiser // By: [GM]Xeon // Version: 1.0.1 - script WoES3Pl_RGuildRecruit -1,{ end; OnCheck: set .@i, 0; while (.@i < $@woe_gr_enlisted) { if ($@woe_gr_expiration[.@i]<=gettimetick(2)) { deletearray $@woe_gr_name$[.@i], 1; deletearray $@woe_gr_id[.@i], 1; deletearray $@woe_gr_expiration[.@i], 1; deletearray $@woe_gr_id[.@i], 1; set $@woe_gr_enlisted, $@woe_gr_enlisted-1; } else { set .@i, .@i+1; } } sleep 60000-(gettime(1)*1000); goto OnCheck; OnLoadPlugins: //The following section adds the plug-in to the main NPC set $@woes3_pl_playermenu$[getarraysize($@woes3_pl_playermenu$)], "Guild Recruitment"; set $@woes3_pl_player$[getarraysize($@woes3_pl_player$)], "GuildRecruit"; set $@woe_gr_feeperhr, 10000; //THE FEE PER HOUR FOR ENLISTMENT!! set $@woe_gr_maxhrs, 24; //THE MAXIMUM NUMBER OF HOURS GUIDL MAStERS CAN REGISTER FOR!! donpcevent "WoES3_Plugin_RGuildRecruit::OnCheck"; end; } function script WoES3Pl_GuildRecruit { end; OnCheck: if (getcharid(2)) { if (strcharinfo(0) != getguildmaster(getcharid(2))) { mes "[Guild Recruitement]"; mes "You are already a member of a guild; what are you coming to guild recruitement for?"; return; } else { goto L_Master; } } L_User: if (!$@woe_gr_enlisted) { mes "[Guild Recruitement]"; mes "There are currently no guilds registered to the recruitement bulletin..."; return; } set @temp$, ""; for (set @i, 0; @i<$@woe_gr_enlisted; set @i, @i+1) { set @temp$, @temp$+":"+$@woe_gr_name$[@i]; } menu @temp$,-,"Back",L_Return; set .@menu, @menu; query_sql("select char_id,account_id from `char` where `name` = '"+getguildmaster($@woe_gr_id[.@menu-2])+"'", @id, @aid); mes "Guild master message: "+$@woe_gr_mes$[.@menu-2]; mes "Are you sure you wish to request to join this guild?"; if (select("Yes:No")==2) { next; goto L_User; } query_sql("insert into `mail` (send_name,send_id,dest_name,dest_id,title,message,time) values ('"+escape_sql(strcharinfo(0))+"','"+getcharid(0)+"','"+getguildmaster($@woe_gr_id[.@menu-2])+"','"+@id+"','Guild Recruitment Request','The player "+escape_sql(strcharinfo(0))+" (BLV: "+BaseLevel+", JLV: "+JobLevel+") has requested to join your guild through the guild recruitement bulletin.','"+gettimetick(2)+"')"); set .@reattach, getcharid(3); set .@name$, strcharinfo(0); if (attachrid(@id)) { dispbottom "A guild recruitment request has been sent from "+.@name$+", check your inbox for more information."; } attachrid(.@reattach); mes "A recruitement request has been sent to "+getguildmaster($@woe_gr_id[.@menu-2])+" for approval."; next; goto L_User; L_Master: set @listed, 0; for (set @i, 0; @i < getarraysize($@woe_gr_enlisted); set @i, @i+1) { if ($@woe_gr_id[@i]==getcharid(2)) set @listed, @i+1; } if (@listed) { set @time, $@woe_gr_expiration[@listed-1]-gettimetick(2); set @hrs, 0; set @mins, 0; while (@time >= 3600) { set @hrs, @hrs+1; set @time, @time-3600; } while (@time >= 60) { set @mins, @mins+1; set @time, @time-60; } mes "[Guild Recruitement]"; mes "Your guild is still listed for "+@hrs+" hours, "+@mins+" minutes and "+@time+" seconds!"; mes "When a player wants to join your guild off the bulletin, you will receive a mail message."; return; } else { mes "[Guild Recruitement]"; mes "Would you like to register your guild to the recruitment bulletin? Note there is a fee of "+$@woe_gr_feeperhr+" per hour you register."; if(select("Yes:No")==1) { mes "Enter the number of hours to register for. There is currently a maximum of "+$@woe_gr_maxhrs+"!"; input @n; if (@n > $@woe_gr_maxhrs) { mes "Uhh, I just said there's a MAXIMUM of "+$@woe_gr_maxhrs+" hours..."; next; goto L_Master; } if (@n == 0) { mes "Since you said 0 hours, I assume you don't want to register your guild right now. Come back whenever you want to!"; return; } mes "Enter a message to display to people looking for a guild..."; input @mes$; if (Zeny >= $@woe_gr_feeperhr*@n) { if ($@woe_gr_enlisted>=32) { mes "Sorry, the maximum number of registered guilds has been reached. Please come back and try again later!"; return; } set Zeny, Zeny-($@woe_gr_feeperhr*@n); set $@woe_gr_name$[$@woe_gr_enlisted], getguildname(getcharid(2)); set $@woe_gr_mes$[$@woe_gr_enlisted], @mes$; set $@woe_gr_id[$@woe_gr_enlisted], getcharid(2); set $@woe_gr_expiration[$@woe_gr_enlisted], gettimetick(2)+(3600*@n+gettime(1)); set $@woe_gr_enlisted, $@woe_gr_enlisted+1; mes "Congratulations! You have just registered your guild to the recruitement bulletin. You should receive mail from members who are interested in joining!"; return; } else { mes "You don't appear to have enough zeny..."; next; goto L_Master; } } else { mes "Come back whenever you feel like registering!"; return; } } L_Return: return; }
  10. Hola a todos. Este es mi primer aporte en rAthena. Consiste en un item que juega como una lotería individual de objetos. La idea esta tomada del juego Eden Eternal. En el rar adjunto, aparte del script, hay un archivo (crystal_altar.psd), en el cual pueden modificar-lo para añadir las imágenes de los items que quieren sortear. Espero que les guste. crystal altar.rar
×
×
  • Create New...