Jump to content

Technoken

Members
  • Posts

    505
  • Joined

  • Days Won

    8

Everything posted by Technoken

  1. In short hindi talaga makapag hit ng kahit ano. Anong gmlevel nung character na gamit mo? GM ba? Sa normal character na try mo na? Meron kabang custom source mods? Baka may nka apply na ganitong source sa server mo.
  2. Naka on po ba ang PVP? Try mo din mag /ns
  3. On what OS do you host your server? I usually experienced the long delay when using @reloadscript when hosted on a windows platform. Also try to check the usage of your ram, ssd, and cpu. And see if they're not on 100%.
  4. Also check if ports are opened. Try to contact your host and ask them to open port 3306. If they tell you that your ports are open, try to execute this command via root on your ro server vps. setsebool -P httpd_can_network_connect=1 If the above command doesn't work, try to execute this instead /usr/sbin/setsebool httpd_can_network_connect 1
  5. You might need to allow permission for the two database to communicate. Check the link I added to my post above. But I suggest to only allow your webhost IP. Not all IP.
  6. Does your server trunk hosted on the same VPS with the database? You can use 127.0.0.1 as the host name if they're on the same vps. And try to put your WAN ip in 'ServerAddress' instead of the hostname. Also try to check this if you're using 2 different host. You might need to allow permission for the other database to connect.
  7. Please give more details about your problem so we can easily help you. Stating only application.php doesn't give us any clue at all.
  8. Try this just expand the dialogue. prontera,156,176,5 script sdhsh2323f 100,{ mes "[Identifier]"; mes "Hello, would you like to identify all your unidentified items for 200 zeny each?"; next; getinventorylist; for( .@i=0; .@i<@inventorylist_count; .@i++ ) { if( @inventorylist_identify[.@i] ) continue; .@identify++; } if( !.@identify ) { mes "[Identifier]"; mes "You don't have any unidentified item in your inventory."; close; } mes "[Identifier]"; mes "Found "+.@identify+" unidentified item(s)"; mes "Cost: "+(.@identify*200)+"z"; next; if( select("Identify All:I'll think about it")&2)close; if( Zeny < .@identify*200 ) { mes "[Identifier]"; mes "I'm sorry you don't have enough Zeny"; close; } Zeny -= .@identify*200; atcommand "@identifyall"; mes "[Identifier]"; mes "All your items have been identified!"; close; }
  9. Make sure you commented those lines and and reload the npc or use @reloadscript.
  10. It already has an npc If you want it to only be accessible via npc when claiming rewards. Replace OnWhisperGlobal: OnLoginCmnd: OnPCLoginEvent: with //OnWhisperGlobal: //OnLoginCmnd: //OnPCLoginEvent:
  11. This part, you need to specifiy if its AddHunting or AddCollection. ("Bloody Branch Wisdom",99,255,12103,1,500000,10000,2000,604,150,7939,5,7203,5); ("Leveling Quest 150-200",150,200,32503,2,500000,300000,150000,1219,25); ("Leveling Quest 201-254",201,254,32503,2,750000,900000,300000,2085,20,2086,15); Shoud be AddCollection("Bloody Branch Wisdom",99,255,12103,1,500000,10000,2000,604,150,7939,5,7203,5); AddHunting("Leveling Quest 150-200",150,200,32503,2,500000,300000,150000,1219,25); AddHunting("Leveling Quest 201-254",201,254,32503,2,750000,900000,300000,2085,20,2086,15);
  12. Can you show the errors? What git hash are you also using? If updating won't break any of your previous scripts, you can just update your trunk so you can use the script I provided without any errors.
  13. What version are you using? rAthena has merged this tron's questboard. Check this one https://github.com/rathena/rathena/blob/master/npc/custom/quests/questboard.txt
  14. @Cyro this one #ROK_POINTS += ( 50 * .@pod ); is the same as set #ROK_POINTS, #ROK_POINTS + (50 * .@pod); The npc doesn't have dialogue though. It just automatically converts pods to rok points when you click it.
  15. Maybe you clicked the npc without Item ID 7179 in your inventory?
  16. Which plugin do you want to add to your src?
  17. Technoken

    OGH Hard

    You can make OGH to spawn hard monsters using setunitdata. If you can post the script here I might be able to help you
  18. Might be implemented once migration to C++ is implemented.
  19. Try - script tesqweqweast -1,{ OnInit: initnpctimer; end; OnTimer5000: stopnpctimer; deletearray .players; addrid(5,1,"guild_vs1"); .players[getarraysize(.players)] = getcharid(3); detachrid; while( .@i < getarraysize(.players) ){ if( attachrid( .players[.@i] ) ) if( HP && compare( strcharinfo(3),"guild_vs1" ) ) .@alive++; .@i++; } if( .@alive ){ initnpctimer; end; } deletearray .players; announce "Players are all the dead",0; mapwarp "guild_vs1","prontera",155,181; end; }
  20. I thought you would like to swap it? Do you want to make it like a costume item? You cannot use SC_START show both item sprite. I guess you wanted to make it like a costume item. Try this Blue_Valkyrie_Helm_S,Blue Valkyrie Helm S,4,100000,,,,5,,4,0xFFFFFFFF,63,2,1024,,0,1,3000,{},{},{}
  21. What is your goal on having two instances of athena-start? Multiple login server? Or 1 login server with multiple map and char server?
  22. Cyro already told you what to do. Just swap their view id's 20132,C_Aura_Vicious_Mind,Costume Aura Vicious Mind,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,3000,{},{},{} Blue_Valkyrie_Helm_S,Blue Valkyrie Helm S,4,100000,,,,5,,4,0xFFFFFFFF,63,2,256,,0,1,1267,{},{ sc_start SC_TIME_ACCESSORY,-1,0; },{ sc_end SC_TIME_ACCESSORY; }
  23. Try this Index: atcommand.c =================================================================== --- atcommand.c (revision 17454) +++ atcommand.c (working copy) @@ -1117,7 +1117,7 @@ ACMD_FUNC(item) { char item_name[100]; - int number = 0, item_id, flag = 0; + int number = 0, item_id, flag = 0, costume = 0; struct item item_tmp; struct item_data *item_data; int get_count, i; @@ -1142,7 +1142,27 @@ clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name. return -1; } - + + if( !strcmpi(command+1,"costumeitem") ) + { + if( !battle_config.reserved_costume_id ) + { + clif_displaymessage(fd, "Costume convertion is disable. Set a value for reserved_cosutme_id on your battle.conf file."); + return -1; + } + if( !(item_data->equip&EQP_HEAD_LOW) && + !(item_data->equip&EQP_HEAD_MID) && + !(item_data->equip&EQP_HEAD_TOP) && + !(item_data->equip&EQP_COSTUME_HEAD_LOW) && + !(item_data->equip&EQP_COSTUME_HEAD_MID) && + !(item_data->equip&EQP_COSTUME_HEAD_TOP) ) + { + clif_displaymessage(fd, "You cannot costume this item. Costume only work for headgears."); + return -1; + } + costume = 1; + } + item_id = item_data->nameid; get_count = number; //Check if it's stackable. @@ -1155,7 +1175,13 @@ memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; - + if( costume == 1 ) + { // Costume Item + item_tmp.card[0] = CARD0_CREATE; + item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0); + item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1); + } + if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif_additem(sd, 0, 0, flag); } @@ -9251,7 +9277,9 @@ ACMD_DEF(channel), ACMD_DEF(fontcolor), ACMD_DEF(langtype), - ACMD_DEF(reloadmsgconf) + ACMD_DEF(reloadmsgconf), + ACMD_DEF2("costumeitem", item) + }; AtCommandInfo* atcommand; int i; Index: battle.c =================================================================== --- battle.c (revision 17454) +++ battle.c (working copy) @@ -5939,6 +5939,7 @@ { "item_enabled_npc", &battle_config.item_enabled_npc, 1, 0, 1, }, { "item_flooritem_check", &battle_config.item_onfloor, 1, 0, 1, }, { "bowling_bash_area", &battle_config.bowling_bash_area, 0, 0, 20, }, + { "reserved_costume_id", &battle_config.reserved_costume_id, 999998, 0, INT_MAX, }, }; #ifndef STATS_OPT_OUT /** Index: battle.h =================================================================== --- battle.h (revision 17454) +++ battle.h (working copy) @@ -488,6 +488,10 @@ int item_enabled_npc; int item_onfloor; // Whether to drop an undroppable item on the map or destroy it if inventory is full. int bowling_bash_area; + + // Costume System + int reserved_costume_id; + } battle_config; void do_init_battle(void); Index: map.c =================================================================== --- map.c (revision 17454) +++ map.c (working copy) @@ -1537,7 +1537,13 @@ struct map_session_data* tsd; nullpo_retv(sd); - + + if( battle_config.reserved_costume_id && battle_config.reserved_costume_id == charid ) + { + clif_solved_charname(sd->fd, charid, "Costume"); + return; + } + tsd = map_charid2sd(charid); if( tsd ) { Index: pc.c =================================================================== --- pc.c (revision 17454) +++ pc.c (working copy) @@ -66,8 +66,7 @@ struct fame_list chemist_fame_list[MAX_FAME_LIST]; struct fame_list taekwon_fame_list[MAX_FAME_LIST]; -static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT,EQP_AMMO}; - +static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_AMMO,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT}; #define MOTD_LINE_SIZE 128 static char motd_text[MOTD_LINE_SIZE][CHAT_SIZE_MAX]; // Message of the day buffer [Valaris] @@ -586,7 +585,7 @@ int pc_equippoint(struct map_session_data *sd,int n) { - int ep = 0; + int ep = 0, char_id = 0; nullpo_ret(sd); @@ -604,6 +603,15 @@ (sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO))//Kagerou and Oboro can dual wield daggers. [Rytech] return EQP_ARMS; } + + if( battle_config.reserved_costume_id && + sd->status.inventory[n].card[0] == CARD0_CREATE && + (char_id = MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3])) == battle_config.reserved_costume_id ) + { // Costume Item - Converted + if( ep&EQP_HEAD_TOP ) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; } + if( ep&EQP_HEAD_LOW ) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; } + if( ep&EQP_HEAD_MID ) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; } + } return ep; } @@ -1910,8 +1918,8 @@ if( autobonus[i].bonus_script ) { int j; - ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos ); - if( j < EQI_MAX-1 ) + ARR_FIND( 0, EQI_MAX_BONUS, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos ); + if( j < EQI_MAX_BONUS ) script_run_autobonus(autobonus[i].bonus_script,sd->bl.id,sd->equip_index[j]); } continue; @@ -1941,8 +1949,8 @@ if( autobonus->other_script ) { int j; - ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos ); - if( j < EQI_MAX-1 ) + ARR_FIND( 0, EQI_MAX_BONUS, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos ); + if( j < EQI_MAX_BONUS ) script_run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]); } Index: pc.h =================================================================== --- pc.h (revision 17454) +++ pc.h (working copy) @@ -37,11 +37,12 @@ EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, + EQI_AMMO, + EQI_MAX_BONUS = 10, EQI_COSTUME_TOP, EQI_COSTUME_MID, EQI_COSTUME_LOW, EQI_COSTUME_GARMENT, - EQI_AMMO, EQI_MAX }; Index: script.c =================================================================== --- script.c (revision 17454) +++ script.c (working copy) @@ -17596,6 +17596,52 @@ return 0; } +/*========================================== + * Costume Items + *------------------------------------------*/ +BUILDIN_FUNC(costume) +{ + int i = -1, num, ep; + TBL_PC *sd; + + num = script_getnum(st,2); // Equip Slot + sd = script_rid2sd(st); + + if( sd == NULL ) + return 0; + if( num > 0 && num <= ARRAYLENGTH(equip) ) + i = pc_checkequip(sd, equip[num - 1]); + if( i < 0 ) + return 0; + + ep = sd->status.inventory[i].equip; + if( !(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) ) + return 0; + + log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]); + pc_unequipitem(sd,i,2); + clif_delitem(sd,i,1,3); + // -------------------------------------------------------------------- + sd->status.inventory[i].refine = 0; + sd->status.inventory[i].attribute = 0; + sd->status.inventory[i].card[0] = CARD0_CREATE; + sd->status.inventory[i].card[1] = 0; + sd->status.inventory[i].card[2] = GetWord(battle_config.reserved_costume_id, 0); + sd->status.inventory[i].card[3] = GetWord(battle_config.reserved_costume_id, 1); + + if( ep&EQP_HEAD_TOP ) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; } + if( ep&EQP_HEAD_LOW ) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; } + if( ep&EQP_HEAD_MID ) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; } + // -------------------------------------------------------------------- + log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]); + + clif_additem(sd,i,1,0); + pc_equipitem(sd,i,ep); + clif_misceffect(&sd->bl,3); + + return 0; +} + // declarations that were supposed to be exported from npc_chat.c #ifdef PCRE_SUPPORT BUILDIN_FUNC(defpattern); @@ -18060,5 +18106,9 @@ BUILDIN_DEF(checkquest, "i?"), BUILDIN_DEF(changequest, "ii"), BUILDIN_DEF(showevent, "ii"), + + // Costume System + BUILDIN_DEF(costume,"i"), + {NULL,NULL,NULL}, }; Index: status.c =================================================================== --- status.c (revision 17454) +++ status.c (working copy) @@ -2455,7 +2455,7 @@ pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true); // Parse equipment. - for(i=0;i<EQI_MAX-1;i++) { + for(i=0;i<EQI_MAX_BONUS;i++) { current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus] if(index < 0) continue; Index: battle.conf =================================================================== --- battle.conf (revision 17454) +++ battle.conf (working copy) @@ -141,3 +141,9 @@ // range. For example, Sonic Blow requires a 2 cell distance before autocasting is allowed. // This setting also affects autospellwhenhit. autospell_check_range: no + +// **************************************** +// Reserved Costume ID's +// **************************************** +// Reserved Char ID for costume converted items. +reserved_costume_id: 999998
  24. I'm still confused on what you actually wanted to do. Maybe give additional details on your example.
  25. 20132,C_Aura_Vicious_Mind,Costume Aura Vicious Mind,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1267,{},{ sc_start SC_TIME_ACCESSORY,-1,0; },{ sc_end SC_TIME_ACCESSORY; } You just need to copy paste the script.
×
×
  • Create New...