Jump to content

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. .@origin = getcharid(3); // save account id of player who talk to npc getpartymember(getcharid(1),0); getpartymember(getcharid(1),1); getpartymember(getcharid(1),2); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // check if they are online and.. attachrid ($@partymemberaid[.@i]); // 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(.@origin); // 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. Litro

    Show Mapusers

    its nice to be of help
  5. Litro

    Show Mapusers

    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
  6. 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)); }
  7. 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 .@showeritemid, atoi(.@atcmd_parameters$[0]); set .@showeritamount, atoi(.@atcmd_parameters$[1]); if ( !.@showeritemid ) { message strcharinfo(0), "@shower <Item ID> <amount>"; end; } if ( getiteminfo(.@showeritemid,2) == -1 ) { message strcharinfo(0), "Invalid Item ID"; message strcharinfo(0), "@shower <Item ID> <amount>"; end; } if(.@showeritamount <= 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", .@account_id); set .@showermap$, strcharinfo(3); while ( .@count < .@account_id ) { if(!attachrid(.@account_id[.@count])) continue; if(strcharinfo(3) != .@showermap$ ) continue; if(checkvending()) continue; getitem .@showeritemid,.@showeritamount; announce "Something has been drop from the sky!",bc_self,0xFFC0CB; set .@count, .@count +1; sleep2 100; } end; }
  8. great thanks and it's okay take your time
  9. Hi dear @@Rytech are you have the plan to increase item db size ? i hope you will thx
  10. 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
  11. it missing faction.conf sir
  12. Embeding config into patcher isn't possible ? I have try it but the patcher always ask the config when opened...
  13. 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
  14. @@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,{ .@npc_name$ = "[Reward NPC]"; for (.@i = 0; .@i < getarraysize($ip_reward$); .@i+=2) { if ($ip_reward$[.@i] != getcharip()) continue; .@delays = atoi($ip_reward$[.@i+1]) + .delay; if (.@delays > gettimetick(2)) { mes .@npc_name$; mes "This IP Addres has claimed the reward"; mes "You have to wait for "+callfunc("Time2Str", .@delays); mes "To re-claim the reward for this IP Addres"; close; } .@index = .@i+1; break; } mes .@npc_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 .@npc_name$; for (.@j = 0; .@j < getarraysize(.reward); .@j+=2) getitem .reward[.@j], .reward[.@j+1]; mes "Okay have fun with it!"; if (.@index) $ip_reward$[.@index] = gettimetick(2); else { .@index = getarraysize($ip_reward$); $ip_reward$[.@index] = getcharip(); $ip_reward$[.@index+1] = gettimetick(2); } close; default: mes .@npc_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; }
  15. 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
  16. try this prontera,155,160,5 script 60 seconds Reward 4_F_FAIRYKID4,{ getcharip(); .@npc_name$ = "[Reward NPC]"; for (.@i = 0; .@i < getarraysize($ip_reward$); .@i+=2) { if ($ip_reward$[.@i] != getcharip()) continue; .@delays = atoi($ip_reward$[.@i+1]) + .delay; if ( .@delays > gettimetick(2)) { mes .@npc_name$; mes "Your IP addres have been claim the reward"; mes "You have to wait for "+callfunc("Time2Str", .@delays - gettimetick(2)); close; } .@index = .@i; break; } mes .@npc_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 .@npc_name$; for (.@j = 0; .@j < getarraysize(.reward); .@j+=2) getitem .reward[.@j], .reward[.@j+1]; mes "Okay have fun with it!"; if (.@index) $ip_reward$[.@index+1] = gettimetick(2); else { .@index = getarraysize($ip_reward$); $ip_reward$[.@index] = getcharip(); $ip_reward$[.@index+1] = gettimetick(2); } close; default: mes .@npc_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; }
  17. it missing ';' like the script parser showed you on line 7 change .@menu$ = "Loyal Reward:" into .@menu$ = "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) { .@menu$ = ""; for (.@i = 0; .@i < getarraysize(.reward_menu$); ++.@i) { if (getd(.reward_var$[.@i])) .@menu$ += ":"; else { .@menu$ += .reward_menu$[.@i]+":"; .@[member=check] = 1; } } if (!.@[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; .@select = select(.@menu$); switch(.@select) { default: mes "Error On: "+.reward_menu$[(.@select-1)]+" did not have a case label"; close; case 1: getitem 607,1; break; case 2: getitem 607,1; break; } setd .reward_var$[(.@select-1)], 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; }
  18. try this hope statisfies your need gonryun,162,126,4 script Event Reward 4_F_OPERATION,{ while(1) { if (!#Loyal_Reward && !#LoL_Reward) .@menu$ = "Loyal Reward:LoL Reward"; else if (!#Loyal_Reward && #LoL_Reward) .@menu$ = "Loyal Reward:" else if (#Loyal_Reward && !#LoL_Reward) .@menu$ = ":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(.@menu$)) { case 1: getitem 607,1; #Loyal_Reward = 1; break; case 2: getitem 607,1; #LoL_Reward = 1; break; } } }
  19. @@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); }
  20. which client date did you use ? from here you can get the answer you needed i think
  21. uh oh i didn't understand how to make it, shame on me
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.