Litro

Members
  • Content count

    365
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Litro

  1. just change the owner of the files to apache if you are using httpd chown -R apache:apache * make sure you are on the inside html folder
  2. [email protected] = getcharid(3); // save account id of player who talk to npc getpartymember(getcharid(1),0); getpartymember(getcharid(1),1); getpartymember(getcharid(1),2); for ( [email protected] = 0; [email protected] < $[email protected]; [email protected]++ ) { if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]] ) ) { // check if they are online and.. attachrid ([email protected][[email protected]]); // attach them to the script if (BloodQuest != 6) { // check your condition mes "I'm sorry but one or some of your party member is not allowed to participate in Blood Quest."; close; } } } attachrid([email protected]); // after all is done attach the npc back to player may this help you
  3. You need source code patch for getting those coordinat you want, here a link may help you https://rathena.org/board/topic/65099-using-getmapxy-to-monster/
  4. prontera,156,178,5 script ldfhsdfkljs 100,{ if ( getpetinfo(PET_CLASS) ) { mes "please return your pet into egg state to continue"; close; } getinventorylist; for ( [email protected] = 0; [email protected] < @inventorylist_count; [email protected]++ ) { if ( @inventorylist_card1[[email protected]] == -256 ) { query_sql "select intimate, class, level, equip, name from pet where pet_id = "+( [email protected] = @inventorylist_card2[[email protected]] + ( ( @inventorylist_card2[[email protected]] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[[email protected]] * ( 1 << 16 ) ), [email protected], [email protected], [email protected], [email protected], [email protected]$; if ( [email protected] > .pet_min_friendly ) { [email protected]$ = [email protected]$ +"^0000FF"+ [email protected]$ +" ^00CC00{"+ getmonsterinfo( [email protected], 0 ) +"} ^000000["+ [email protected] +"] ^FF0000"+( ( [email protected] )? "*equipped" : "" )+":"; [email protected]_id[[email protected]] = [email protected]; [email protected]_id[[email protected]] = @inventorylist_id[[email protected]]; [email protected]_name$[[email protected]] = [email protected]$; [email protected]_class[[email protected]] = [email protected]; [email protected]_level[[email protected]] = [email protected]; [email protected]_equipped[[email protected]] = [email protected]; [email protected]++; } } } if ( [email protected] ) { mes "your inventory doesn't have any pet egg that intimate enough"; close; } mes "select which pet that you want it to evolve"; next; [email protected] = select( [email protected]$ ) -1; mes "selected : "+ [email protected]_name$[[email protected]]; mes "level : "+ [email protected]_level[[email protected]]; mes "equipped : "+( ( [email protected]_equipped[[email protected]] )? "Yes" : "No" ); if ( getd( ".petr"+ [email protected]_class[[email protected]] ) ) { mes "require :-"; [email protected] = getarraysize( getd( ".petr"+ [email protected]_class[[email protected]] ) ); for ( [email protected] = 0; [email protected] < [email protected]; [email protected] += 2 ) mes getd( ".petr"+ [email protected]_class[[email protected]] +"["+( [email protected] +1 )+"]" )+"x "+ getitemname( getd( ".petr"+ [email protected]_class[[email protected]] +"["+ [email protected] +"]" ) ); } next; if ( !getd( ".pet"+ [email protected]_class[[email protected]] ) ) { mes "this pet cannot evolve any further"; close; } if ( [email protected]_level[[email protected]] < .min_level ) { mes "this pet doesn't meet the level requirement"; close; } if ( [email protected]_equipped[[email protected]] ) { mes "please unequip this pet accesory to continue"; close; } if ( getd( ".petr"+ [email protected]_class[[email protected]] ) ) { [email protected] = getarraysize( getd( ".petr"+ [email protected]_class[[email protected]] ) ); for ( [email protected] = 0; [email protected] < [email protected]; [email protected] += 2 ) { if ( countitem( getd( ".petr"+ [email protected]_class[[email protected]] +"["+ [email protected] +"]" ) ) < getd( ".petr"+ [email protected]_class[[email protected]] +"["+( [email protected] +1 )+"]" ) ) { mes "you need "+ getd( ".petr"+ [email protected]t_class[[email protected]] +"["+( [email protected] +1 )+"]" ) +"x "+ getitemname( getd( ".petr"+ [email protected]_class[[email protected]] +"["+ [email protected] +"]" ) ) +" to evolve this pet"; close; } } for ( [email protected] = 0; [email protected] < [email protected]; [email protected] += 2 ) delitem getd( ".petr"+ [email protected]_class[[email protected]] +"["+ [email protected] +"]" ), getd( ".petr"+ [email protected]_class[[email protected]] +"["+( [email protected] +1 )+"]" ); } delitem2 [email protected]_id[[email protected]], 1, 1, 0, 0, -256, ( [email protected]_id[[email protected]] % ( 1 << 16 ) - ( [email protected] = [email protected]_id[[email protected]] % ( 1 << 15 ) ) < ( 1 << 15 ) )? [email protected] : ( [email protected] - ( 1 << 15 ) ), [email protected]_id[[email protected]] >> 16, 0; makepet [email protected]_pet_id = getd( ".pet"+ [email protected]_class[[email protected]] +"["+ rand( getarraysize( getd( ".pet"+ [email protected]_class[[email protected]] ) ) ) +"]" ); mes "your "+ [email protected]_name$[[email protected]] +" has reborn into "+ getmonsterinfo( [email protected]_pet_id, 0 ); mes "please rename your pet ~"; close;OnInit: .min_level = 80; // minimum level 80 to change pet egg .pet_min_friendly = getbattleflag("pet_support_min_friendly");// setarray getd( ".petr"+ <require pet egg> ), <require itemID 1>, <require item require 1>, <require itemID 2>, <require item require 2>, ... setarray getd( ".petr"+ 1002 ), 501,1, 502,2, 503,10; setarray getd( ".petr"+ 1011 ), 512,5, 513,8, 514,20;// setarray getd( ".pet"+ <require pet egg> ), <random pet egg 1>, <random pet egg 2> .... setarray getd( ".pet"+ 1002 ), 1113, 1031; // poring pet(1002) can evolve into drops(1113) or poporing(1031) setarray getd( ".pet"+ 1011 ), 1042; // chonchon(1011) can evolve into steel chonchon(1042) // add more as needed end;} Can someone help me to put configurable chance in it and put chance of failing to evolve a pet like to get random pet egg 1 it will be 80%, and if fail it will make the reduce the intimate value of original pet ( before evolving it on npc ) to 0 it was Ms. @AnnieRuru script found on http://rathena.org/board/topic/76954-can-i-request-script-evolution-pet/
  5. its nice to be of help
  6. imho the script is not meet what you need, try this //========= Event Area======== prontera,167,169,3 script Event Area 2_BULLETIN_BOARD,{ warp "prontera",99,121; end; OnInit: OnTimer1000: delwaitingroom; waitingroom getmapusers("prontera")+" player"+( getmapusers("prontera") > 1 ? "s":"") +" in Event Area", 0; initnpctimer; end; } OnTouch is used if you want script trigered when someone appeared on area around the npc, and if you use the OnTimerXX: you need to init the timer, script above will re-check the amount of player on prontera every 1 second and you will be warped when you click the npc
  7. there is function for this https://github.com/HerculesWS/Hercules/blob/master/npc/other/Global_Functions.txt#L360" class="bbc_url" title="External link" rel="nofollow external">https://github.com/HerculesWS/Hercules/blob/master/npc/other/Global_Functions.txt#L360 //== Function F_MesColor =================================== // Function to colorize npc dialog without having to memorize the color code // Examples: // mes callfunc("F_MesColor", C_BLUE) +"This message is now in BLUE"; function script F_MesColor { return sprintf("^X", min(getarg(0), 0xFFFFFF)); }
  8. bindatcmd is custom patch on 3CeAM you must have it to run this script and you can't do direct variable on 3CeAM since it's not supported by the script engine here the requested script may it satisfy you - script asdfgadhjkl -1,{ end; OnInit: bindatcmd "shower",strnpcinfo(3)+"::OnShowerCommand",99,99; end; OnShowerCommand: set [email protected], atoi([email protected]_parameters$[0]); set [email protected], atoi([email protected]_parameters$[1]); if ( [email protected] ) { message strcharinfo(0), "@shower <Item ID> <amount>"; end; } if ( getiteminfo([email protected],2) == -1 ) { message strcharinfo(0), "Invalid Item ID"; message strcharinfo(0), "@shower <Item ID> <amount>"; end; } if([email protected] <= 0) { message strcharinfo(0), "Invalid Item Amount"; message strcharinfo(0), "@shower <Item ID> <amount>"; end; } query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1 ORDER BY `account_id` LIMIT 128", [email protected]_id); set [email protected]$, strcharinfo(3); while ( [email protected] < [email protected]_id ) { if(!attachrid([email protected]_id[[email protected]])) continue; if(strcharinfo(3) != [email protected]$ ) continue; if(checkvending()) continue; getitem [email protected],[email protected]; announce "Something has been drop from the sky!",bc_self,0xFFC0CB; set [email protected], [email protected] +1; sleep2 100; } end; }
  9. great thanks and it's okay take your time
  10. Hi dear @@Rytech are you have the plan to increase item db size ? i hope you will thx
  11. hi sir patch bindatcmd generating warning below Warning 1 warning C4028: formal parameter 6 different from declaration c:\documents and settings\admin\my documents\rewrite\src\map\script.c 2514 the function code [setd_sub] in script.c and script.h seem to have same name with each other script.c: void setd_sub(struct script_state *st, TBL_PC *sd, const char *varname, int elem, void *value, struct linkdb_node **ref) { set_reg(st, sd, reference_uid(add_str(varname),elem), varname, value, ref); } script.h void setd_sub(struct script_state *st, TBL_PC *sd, const char *varname, int elem, void *value, struct DBMap **ref); it just my assumption hope you will take a look on this and fix if it was to be fixed
  12. it missing faction.conf sir
  13. Embeding config into patcher isn't possible ? I have try it but the patcher always ask the config when opened...
  14. AFAIK it just take a longer time to fire up a server, since you requested IP Based record I can't think better method except creating new table on DB
  15. @@JoyRo, sorry previously i'm just write it and test it on script checker with out in game test, i have done wrong on index part and the time left function it should be alright now, tested by me but I didn't know if it meet your need prontera,155,160,5 script 60 seconds Reward 4_F_FAIRYKID4,{ [email protected]_name$ = "[Reward NPC]"; for ([email protected] = 0; [email protected] < getarraysize($ip_reward$); [email protected]+=2) { if ($ip_reward$[[email protected]] != getcharip()) continue; [email protected] = atoi($ip_reward$[[email protected]+1]) + .delay; if ([email protected] > gettimetick(2)) { mes [email protected]_name$; mes "This IP Addres has claimed the reward"; mes "You have to wait for "+callfunc("Time2Str", [email protected]); mes "To re-claim the reward for this IP Addres"; close; } [email protected] = [email protected]+1; break; } mes [email protected]_name$; mes "Hello "+strcharinfo(0)+",I"; mes "am here to give you a daily"; mes "Reward. Do you want to have it?"; next; switch (select("-Yes,sure!:-No,bye!:-Cancel")) { case 1: mes [email protected]_name$; for ([email protected] = 0; [email protected] < getarraysize(.reward); [email protected]+=2) getitem .reward[[email protected]], .reward[[email protected]+1]; mes "Okay have fun with it!"; if ([email protected]) $ip_reward$[[email protected]] = gettimetick(2); else { [email protected] = getarraysize($ip_reward$); $ip_reward$[[email protected]] = getcharip(); $ip_reward$[[email protected]+1] = gettimetick(2); } close; default: mes [email protected]_name$; mes "Okay goodbye!"; close; } OnInit: setarray .reward, 601, 1; // <item id>, <item amount>{, <item id>, <item amount>,...} .delay = 86400; // Delay time before reward can be re-claimed. time set in second, default 24 Hours = 86400 seconds end; }
  16. it used to save ip and time when the reward taken, mmh in short it was the simple way other than to make new table on db
  17. try this prontera,155,160,5 script 60 seconds Reward 4_F_FAIRYKID4,{ getcharip(); [email protected]_name$ = "[Reward NPC]"; for ([email protected] = 0; [email protected] < getarraysize($ip_reward$); [email protected]+=2) { if ($ip_reward$[[email protected]] != getcharip()) continue; [email protected] = atoi($ip_reward$[[email protected]+1]) + .delay; if ( [email protected] > gettimetick(2)) { mes [email protected]_name$; mes "Your IP addres have been claim the reward"; mes "You have to wait for "+callfunc("Time2Str", [email protected] - gettimetick(2)); close; } [email protected] = [email protected]; break; } mes [email protected]_name$; mes "Hello "+strcharinfo(0)+",I"; mes "am here to give you a daily"; mes "Reward. Do you want to have it?"; next; switch (select("-Yes,sure!:-No,bye!:-Cancel")) { case 1: mes [email protected]_name$; for ([email protected] = 0; [email protected] < getarraysize(.reward); [email protected]+=2) getitem .reward[[email protected]], .reward[[email protected]+1]; mes "Okay have fun with it!"; if ([email protected]) $ip_reward$[[email protected]+1] = gettimetick(2); else { [email protected] = getarraysize($ip_reward$); $ip_reward$[[email protected]] = getcharip(); $ip_reward$[[email protected]+1] = gettimetick(2); } close; default: mes [email protected]_name$; mes "Okay goodbye!"; close; } OnInit: setarray .reward, 601, 1; // <item id>, <item amount>{, <item id>, <item amount>,...} .delay = 86400; // Delay time before reward can be re-claimed. time set in second, default 24 Hours = 86400 seconds end; }
  18. it missing ';' like the script parser showed you on line 7 change [email protected]$ = "Loyal Reward:" into [email protected]$ = "Loyal Reward:"; from what i understand from your request is when player click the npc, the npc will show the list reward he can claim, after the reward claimed the menu will be hidden or removed if you want to add more case on it my be some thing like this gonryun,162,126,4 script Event Reward 4_F_OPERATION,{ if (.error) { mes "Script Configuration Error Please Fix it"; close; } while(1) { [email protected]$ = ""; for ([email protected] = 0; [email protected] < getarraysize(.reward_menu$); [email protected]) { if (getd(.reward_var$[[email protected]])) [email protected]$ += ":"; else { [email protected]$ += .reward_menu$[[email protected]]+":"; [email protected][member=check] = 1; } } if ([email protected][member=check]) { mes "There is no more reward you can redeem."; close2; emotion e_bzzz; end; } mes "Please select which reward you want to redeem"; next; [email protected] = select([email protected]$); switch([email protected]) { default: mes "Error On: "+.reward_menu$[([email protected])]+" did not have a case label"; close; case 1: getitem 607,1; break; case 2: getitem 607,1; break; } setd .reward_var$[([email protected])], 1; } OnInit: setarray .reward_menu$, "Loyal Reward", "LoL Reward"; setarray .reward_var$ , "#Loyal_Reward", "#LoL_Reward"; if (getarraysize(.reward_menu$) != getarraysize(.reward_var$)) .error = 1; end; }
  19. try this hope statisfies your need gonryun,162,126,4 script Event Reward 4_F_OPERATION,{ while(1) { if (!#Loyal_Reward && !#LoL_Reward) [email protected]$ = "Loyal Reward:LoL Reward"; else if (!#Loyal_Reward && #LoL_Reward) [email protected]$ = "Loyal Reward:" else if (#Loyal_Reward && !#LoL_Reward) [email protected]$ = ":LoL Reward"; else if (#Loyal_Reward && #LoL_Reward) { mes "There is no more reward you can redeem." close2; emotion e_bzzz; end; } mes "Please select which reward you want to redeem"; next; switch(select([email protected]$)) { case 1: getitem 607,1; #Loyal_Reward = 1; break; case 2: getitem 607,1; #LoL_Reward = 1; break; } } }
  20. Hello, Can some one help me ? i have modified my battle.c, skill,c and status,c it was heavily edited for it, but when i update it yesterday all my work in battle.c was crumbled, yes it was my stupidity by i still have the backup file, here i want to ask help for make it into plugin, i think it was good for private server, for more information i have gathered data from 3ceam http://3ceam.googlecode.com/svn/trunk/rewrite/conf/battle/skill.conf // Set this to the max base level that you would like skills to add extra bonus damage from. // [Pinky] // NOTE: Default level is 150, if you set this to a higher level then you will experience higher/overload damage from many 3rd class skills.// NOTE2: If you set this to a lower level then 100 all skills will suffer penalties higer than 100%, causing damages below the minimun damage.max_highlvl_nerf: 150// Set this to the max job level that you would like 3rd class skills to add extra bonus damage from. // [Pinky] // NOTE: Default 3rd class job_level is 50 (official servers), if you set this to a higher level depending on your server's 3rd classes max job level, then you might experience higher/overload damage/effects from 3rd class skills.// This setting only effects 3rd class skills that uses job level as a bonus multiplicator.// 0 = disabledmax_joblvl_nerf: 50 and this code i have used for my own, taken from 3ceam by @Rytech blvl_nerf = status->get_lv(src); if( sd && ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI)) && battle_config.max_blvl_nerf && blvl_nerf > battle_config.max_blvl_nerf ) blvl_nerf = battle_config.max_blvl_nerf; t_blvl_nerf = status->get_lv(target); if( sd && ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI)) && battle_config.max_blvl_nerf && t_blvl_nerf > battle_config.max_blvl_nerf ) t_blvl_nerf = battle_config.max_blvl_nerf; if( sd && ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI)) && battle_config.max_jlvl_nerf ) jlvl_nerf = min(sd->status.job_level,battle_config.max_jlvl_nerf); else if( sd ) jlvl_nerf = sd->status.job_level; Litro
  21. @@AnnieRuru mmh hi.. here what I came up* but it didn't work like what I want it, it seem I did wrong in part where you tell me to 'trick that function into thinking that player has lower level' or likely I didn't understand what you said above and after you see the thing i wrote by copy paste-ing other firstly I want to go with what you tell me hooking into 'battle->calc_weapon_attack' but i can't see the example from any of your plugin or even dastgir, so i go with 'battle->calc_skillratio' because it have some same line from your plugins and it have much more the level thing that I want to nerf in skillratio so... hoping you can tell me how to make it right i tested it with RK_SONICWAVE it should be ( 100 + ( 175 - 100 ) / 2 ) but the thing is it failed to do it job case RK_SONICWAVE: skillratio = (skill_lv + 5) * 100; skillratio = skillratio * (100 + (status->get_lv(src)-100) / 2) / 100; break; #include "common/hercules.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include "map/battle.h" #include "map/skill.h" #include "map/pc.h" #include "common/nullpo.h" #include "common/memmgr.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "levelnerf", SERVER_TYPE_MAP, "0.1", HPM_VERSION, }; int max_blvl_nerf = 175; struct player_data { int actual_level; }; int battle_calc_skillratio_pre (int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag) { struct map_session_data *sd; struct player_data *ssd; int s_level; nullpo_ret(src); sd = BL_CAST(BL_PC, src); s_level = sd->status.base_level; if( skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK && s_level > max_blvl_nerf ) { if ( !(ssd = getFromMSD(sd,0)) ) { CREATE( ssd, struct player_data, 1 ); ssd->actual_level = sd->status.base_level; addToMSD( sd, ssd, 0, true ); } sd->status.base_level = max_blvl_nerf; } return 0; } int battle_calc_skillratio_post (int retVal, int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag) { struct map_session_data *sd; struct player_data *ssd; nullpo_ret(src); sd = BL_CAST(BL_PC, src); ssd = getFromMSD( sd, 0 ); if ( ssd && ssd->actual_level ) sd->status.base_level = ssd->actual_level; return retVal; } // battle config: all below copied from afk plugins (dastgir plugin's) void max_blvl_nerf_adjust(const char *key, const char *val) { //In Seconds int value = config_switch(val); if (strcmpi(key, "max_blvl_nerf") == 0) { if (value < 0 || value > battle->bc->max_lv){ ShowDebug("Received Invalid Setting for max_blvl_nerf(%d), defaulting to 0\n",value); return; } max_blvl_nerf = value; } return; } int max_blvl_nerf_return(const char *key) { if (strcmpi(key, "max_blvl_nerf") == 0) return max_blvl_nerf; return 0; } HPExport void plugin_init (void) { addHookPre( "battle->calc_skillratio", battle_calc_skillratio_pre ); addHookPost( "battle->calc_skillratio", battle_calc_skillratio_post ); } HPExport void server_preinit (void) { addBattleConf("max_blvl_nerf", max_blvl_nerf_adjust, max_blvl_nerf_return); }