Jump to content

sader1992

Content Moderator
  • Posts

    1691
  • Joined

  • Last visited

  • Days Won

    77

Everything posted by sader1992

  1. there is already a config for that in the script i think , as long as you don't have a Shield in the EQI_HAND_R or two hand Shield you should not get the problem you are getting if you configure the script right
  2. than you can replace all the codes with getinventorylist; for(.@i = 0;.@i<@inventorylist_count;.@i++){ if(@inventorylist_equip[.@i] == .@part){ .@ndx = .@i; break; } } if( (@inventorylist_card1[.@ndx] && getiteminfo(@inventorylist_card1[.@ndx],2) != 6) || (@inventorylist_card2[.@ndx] && getiteminfo(@inventorylist_card2[.@ndx],2) != 6) || (@inventorylist_card3[.@ndx] && getiteminfo(@inventorylist_card3[.@ndx],2) != 6) || (@inventorylist_card4[.@ndx] && getiteminfo(@inventorylist_card4[.@ndx],2) != 6) ){ mes "enchantment detected!"; end; }
  3. you use the random options system ? this command is for the random options system you should have it if you if you use the system there is no other way to get item with random options
  4. replace the if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){ (don't forget the "}") with for(.@i = 0;.@i<@inventorylist_count;.@i++){ if(@inventorylist_equip[.@i] == .@part){ .@ndx = .@i; break; } }
  5. i didn't test it , i am sure i have some syntax not right xD test it first prt_in,28,73,4 script Velha Sábia 78,{ set .vip_needed, 5; //Nível necessário de VIP para acessar os recursos especias do NPC if (getgroupid() < .vip_needed) { mes "^00B2EE[Velha Sábia]^000000"; mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?"; next; switch(select("^3CB371[»]^000000 Continuar:^FFA500[»]^000000 Informaçoes:^ff0000[»]^000000 Desistir")) { case 1: mes "^00B2EE[Velha Sábia]^000000"; mes "Tudo bem. Qual ítem quer que eu examine para voce?"; next; setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual"; set .@menu$,""; for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) { if( getequipisequiped(.@i) ) set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + ":"; } set .@part,select(.@menu$); mes "^00B2EE[Velha Sábia]^000000"; if(!getequipisequiped(.@part)) { mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim."; close; } set .@cardcount,getequipcardcnt(.@part); if(!.@cardcount) { mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!"; close; } if ( !checkweight(1202,(.@cardcount+1)) ) { mes "^3355FFAguarde um momento!"; mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário."; close; } mes "Esse ítem tem " + .@cardcount + " cartas equipadas."; mes "Para melhorar minha magia, sao necessários " + (200000+(.@cardcount * 25000)) + " zeny,"; mes "um ^0000FFFragmento Estelar^000000, e uma ^0000FFGema Amarela^000000."; next; mes "^00B2EE[Velha Sábia]^000000"; if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2) { mes "Muito bem, agradeço por utilizar os meus serviços!"; close; } if((Zeny < (200000+(.@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1)) { next; mes "Voce nao tem tudo que é necessário para a minha mágica, garot"+(sex > 0 ? "o" : "a")+". Volte quando conseguí-los."; close; } next; mes "^00B2EE[Velha Sábia]^000000"; mes "Muito vem, vamos começar!."; getinventorylist; if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){ if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){ .@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx]; }else{//card slot 1 is not a card so there is no cards in this item. mes "you don't have cards in this item"; end; } if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){ .@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx]; }else .@cards[2] = @inventorylist_card2[.@ndx]; if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){ .@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx]; }else .@cards[3] = @inventorylist_card3[.@ndx]; if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){ .@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx]; }else .@cards[4] = @inventorylist_card4[.@ndx]; //card detected so we get the requirment first before we go on. set Zeny,Zeny - (200000+(.@cardcount * 25000)); delitem 1000,1; delitem 715,1; delequip .@part;//delete the equipment //building the random options setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx]; setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx]; setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx]; //get new equipment getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx], .@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters; for(.@i=0;.@i<getarraysize(.@gets);.@i++){ if(.@gets[.@i]){ getitem .@gets[.@i],1; } } next; mes "^00B2EE[Velha Sábia]^000000"; mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens."; close; } end; case 2: next; mes "^00B2EE[Velha Sábia]^000000"; mes "Eu preciso de 200000 zeny, mais 25000 zeny para cada carta removida de seus ítens. E adicionalmente, preciso de um Fragmento Estelar e uma Gema Amarela para trabalhar com a minha mágica."; close; case 3: next; mes "^00B2EE[Velha Sábia]^000000"; mes "Muito bem, volte quando precisar dos meus serviços."; close; } } else { mes "^00B2EE[Velha Sábia]^000000"; mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?"; next; switch(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir")) { case 1: mes "^00B2EE[Velha Sábia]^000000"; mes "Tudo bem. Qual ítem quer que eu examine para voce?"; next; setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual"; set .@menu$,""; for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) { if( getequipisequiped(.@i) ) set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + ":"; } set .@part,select(.@menu$); mes "^00B2EE[Velha Sábia]^000000"; if(!getequipisequiped(.@part)) { mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim."; close; } set .@cardcount,getequipcardcnt(.@part); if(!.@cardcount) { mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!"; close; } if ( !checkweight(1202,(.@cardcount+1)) ) { mes "^3355FFAguarde um momento!"; mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário."; close; } mes "Esse ítem tem " + .@cardcount + " cartas equipadas."; next; mes "^00B2EE[Velha Sábia]^000000"; if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2) { mes "Muito bem, agradeço por utilizar os meus serviços!"; close; } next; mes "^00B2EE[Velha Sábia]^000000"; mes "Muito vem, vamos começar!."; getinventorylist; if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){ if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){ .@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx]; }else{//card slot 1 is not a card so there is no cards in this item. mes "you don't have cards in this item"; end; } if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){ .@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx]; }else .@cards[2] = @inventorylist_card2[.@ndx]; if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){ .@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx]; }else .@cards[3] = @inventorylist_card3[.@ndx]; if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){ .@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx]; }else .@cards[4] = @inventorylist_card4[.@ndx]; delequip .@part;//delete the equipment //building the random options setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx]; setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx]; setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx]; //get new equipment getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx], .@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters; for(.@i=0;.@i<getarraysize(.@gets);.@i++){ if(.@gets[.@i]){ getitem .@gets[.@i],1; } } next; mes "^00B2EE[Velha Sábia]^000000"; mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens."; close; } end; case 2: mes "^00B2EE[Velha Sábia]^000000"; mes "Muito bem, volte quando precisar dos meus serviços."; close; } } } prontera,133,201,5 duplicate(Velha Sábia) Velha Sábia#2 78 just so you know this the edit getinventorylist; if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){ if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){ .@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx]; }else{//card slot 1 is not a card so there is no cards in this item. mes "you don't have cards in this item"; end; } if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){ .@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx]; }else .@cards[2] = @inventorylist_card2[.@ndx]; if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){ .@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx]; }else .@cards[3] = @inventorylist_card3[.@ndx]; if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){ .@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx]; }else .@cards[4] = @inventorylist_card4[.@ndx]; //card detected so we get the requirment first before we go on. set Zeny,Zeny - (200000+(.@cardcount * 25000)); delitem 1000,1; delitem 715,1; delequip .@part;//delete the equipment //building the random options setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx]; setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx]; setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx]; //get new equipment getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx], .@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters; for(.@i=0;.@i<getarraysize(.@gets);.@i++){ if(.@gets[.@i] != 0){ getitem .@gets[.@i],1; } } end; } so basically we get the inventory list , search for the item , check for it's card slots , if it's type 6 than it's a card , we remove it if it's else , we leave it that we delete the equipment and getitem3 the new equipment to the player , and we give him the cards we removed this just given me an idea for rathena command ?
  6. that depend on what you want to do do you want that people can't put enchantment on the card slot if exist or you want the players to not be able to remove the enchantment but still can put it in empty card slot ? you can do both to not allow the enchantment to be in an empty card slot , you get the slot number of the enchantment npc and check if it's a card slot or it's no slot to not allow to remove the enchantment you need to edit the card removal to check if the item the player want to remove is a card or not (item type 6)
  7. https://github.com/rathena/rathena/wiki/Custom-Items https://github.com/rathena/rathena/blob/master/doc/item_db.txt
  8. https://github.com/rathena/rathena/blob/7ad1b32d7d44fd1c5d927228528cc607f61da001/doc/script_commands.txt#L9773 --------------------------------------- *getpartymember <party id>{,<type>{,<array_variable>}}; This command will find all members of a specified party and returns their names (or character id or account id depending on the value of "type") into an array of temporary global variables. There's actually quite a few commands like this which will fill a special variable with data upon execution and not do anything else. Upon executing this, $@partymembername$[] is a global temporary string array which contains all the names of these party members (only set when type is 0 or not specified) $@partymembercid[] is a global temporary number array which contains the character id of these party members. (only set when type is 1) $@partymemberaid[] is a global temporary number array which contains the account id of these party members. (only set when type is 2) $@partymembercount is the number of party members that were found. The party members will (apparently) be found regardless of whether they are online or offline. Note that the names come in no particular order. Be sure to use $@partymembercount to go through this array, and not 'getarraysize', because it is not cleared between runs of 'getpartymember'. If someone with 7 party members invokes this script, the array would have 7 elements. But if another person calls up the NPC, and he has a party of 5, the server will not clear the array for you, overwriting the values instead. So in addition to returning the 5 member names, the 6th and 7th elements from the last call remain, and you will get 5+2 members, of which the last 2 don't belong to the new guy's party. $@partymembercount will always contain the correct number, (5) unlike 'getarraysize()' which will return 7 in this case. If 'array_variable' is set, the result will be stored to that variable instead using global variable. Example 1: list party member names // get the party member names getpartymember getcharid(1),0; // It's a good idea to copy the global temporary $@partymember***** // variables to your own scope variables because if you have pauses in this // script (sleep, sleep2, next, close2, input, menu, select, or prompt), // another player could click this NPC, trigger 'getpartymember', and // overwrite the $@partymember***** variables. .@count = $@partymembercount; copyarray .@name$[0], $@partymembername$[0], $@partymembercount; // list the party member names for (.@i = 0; .@i < .@count; .@i++) mes (.@i +1) + ". ^0000FF" + .@name$[.@i] + "^000000"; close; Example 2: check party count (with a 'next' pause), before warping to event .register_num = 5; // How many party members are required? // get the charID and accountID of character's party members getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; if ( $@partymembercount != .register_num ) { mes "Please form a party of " + .register_num + " to continue"; close; } // loop through both and use 'isloggedin' to count online party members for ( .@i = 0; .@i < $@partymembercount; .@i++ ) if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) .@count_online++; // We search accountID & charID because a single party can have multiple // characters from the same account. Without searching through the charID, // if a player has 2 characters from the same account inside the party but // only 1 char online, it would count their online char twice. if ( .@count_online != .register_num ) { mes "All your party members must be online to continue"; close; } // copy the array to prevent players cheating the system copyarray .@partymembercid, $@partymembercid, .register_num; mes "Are you ready ?"; next; // careful here select("Yes"); // When a script hits a next, menu, sleep or input that pauses the script, // players can invite or /leave and make changes in their party. To prevent // this, we call getpartymember again and compare with the original values. getpartymember getcharid(1), 1; if ( $@partymembercount != .register_num ) { mes "You've made changes to your party !"; close; } for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( .@partymembercid[.@i] != $@partymembercid[.@i] ) { mes "You've made changes to your party !"; close; } } // Finally, it's safe to start the event! warpparty "event_map", 0,0, getcharid(1); ---------------------------------------
  9. you mean that you can't drag the icon to the hotkey bar ?
  10. you should get the homunculus S information from the renewal database (db/re/)
  11. you should follow the Pull Request , as it's not rAthena official update yet if you have any problem with the Pull Request it self , you are welcome to give your feedback on rAthena's Github
  12. https://github.com/rathena/rathena/blob/120ffc122bf8b0d36ba2a9b6f7ad62ac75e2513e/doc/script_commands.txt#L8930 --------------------------------------- *instance_mapname("<map name>"{,<instance id>}) Returns the unique name of the instanced map. If no instance ID is specified, the instance the script is attached to is used. If that fails, the command returns an empty string instead. ---------------------------------------
  13. it use v2 for the invisible , i don't know
  14. https://github.com/rathena/rathena/blob/master/db/re/refine_db.yml Bonus : x
  15. i would agree that it would be good to leave it secret , but for me i am always here , checking everything most of the server owners wont really know about it , and they will have the bug for long time without known about it at all , it would be too late to fix it in their server so i see the point of the announcement, even if it's not good for me personally till i fix it in the servers that i work for it's still good for the overall community
  16. try item script: {},{ char_variable++; },{ char_variable--; } and npc script: - script something -1,{ OnPCStatCalcEvent: if(isequipped(<itemid>)){ skill <"skill name">,char_variable; } end; } this might work without npc { skill <"skill name">,char_variable; },{ char_variable++; },{ char_variable--; }
  17. https://github.com/rathena/rathena/blob/7f772c32d3be201861946bb64720c231828465ac/doc/script_commands.txt#L6456 --------------------------------------- *hideonnpc "<NPC object name>"; *hideoffnpc "<NPC object name>"; These commands will make the NPC object specified display as hidden/visible, even though not actually disabled per se. Hidden as in thief Hide skill, but unfortunately, not detectable by Ruwach or Sight. As they are now, these commands are pointless, it is suggested to use 'disablenpc'/'enablenpc', because these two commands actually unload the NPC sprite location and other accompanying data from memory when it is not used. However, you can use these for some quest ideas (such as cloaking NPCs talking while hidden then revealing.... you can wonder around =P ---------------------------------------
  18. what do you mean by nothing happen ? did you check the exp number before and after death ? at max level there is exp still , so it's not like as soon as they die will loss a level
  19. in the iteminfo.lua put -- in the start of this line AddItemIdentifiedDesc(ItemID, functions.add_arena_url(ItemID)) to be like this --AddItemIdentifiedDesc(ItemID, functions.add_arena_url(ItemID))
  20. did you try to search the forum before you request a new script ? there is a lot in the forum btw
  21. the default storage is ID: 0 so you can add as many as you want above 0 and it wont effect the default stoage you can't disallow from adding to the storage if it's open , unless you src edit it
×
×
  • Create New...