Jump to content

MikZ

Members
  • Content Count

    433
  • Joined

  • Last visited

1 Follower

About MikZ

  • Rank
    Advanced Member

Recent Profile Visitors

2517 profile views
  1. MikZ

    WOE reward time

    up please. thank you!
  2. good day! Is this bug all pets disappeared after feeding. thank you!
  3. MikZ

    WOE reward time

    Good day! May I request please. whats the equivalent of addrid to hercules and how to add to this script. thank you! function script getcharid2 { [email protected] = query_sql("select char_id, party_id, guild_id, account_id, clan_id from `char` where name = '"+getarg(1)+"'",[email protected],[email protected],[email protected],[email protected],[email protected]); if([email protected] < 0) return 0; if(getarg(0)==0) return [email protected]; else if(getarg(0)==1) return [email protected]; else if(getarg(0)==2) return [email protected]; else if(getarg(0)==3) return [email protected]; else if(getarg(0)==4) return [email protected]; return 0; } - script woerewards -1,{ function AddPlayer { //player name , npc name for ([email protected] = 0 ; [email protected] < getvariableofnpc(.player_amount,getarg(1)) ; [email protected] += 3) if (getvariableofnpc(.players$[[email protected]],getarg(1)) == getarg(0)) return; setarray getvariableofnpc(.players$[getvariableofnpc(.player_amount,getarg(1))],getarg(1)) , getarg(0) , strcharinfo(3) , "0"; set getvariableofnpc(.player_amount,getarg(1)) , getvariableofnpc(.player_amount,getarg(1)) + 3; return; } OnInit: setarray .maps$ ,"schg_cas03", "prtg_cas01"; //maps where the system is active .points_per_minute = 1; //number of points earned for each minute you spend in the castle for ([email protected] = 0 ; [email protected] < getarraysize(.maps$) ; [email protected]++) if (!getmapflag(.maps$[[email protected]],mf_loadevent)) setmapflag .maps$[[email protected]],mf_loadevent; .s_idle_time = 180; // time before player is considered idle (in seconds) .rewardId = 909; // ID of the reward item .announce = 0; // Announce kills (0 = no announcement, 1 = map announcement, 2 = global announcement) .color_defenders$ = "0xffff00"; // Announcement color when a defending player kills an attacking player .color_attackers$ = "0x99ccff"; // Announcement color when an attacking player kills a member of the castle's owner .kill_reward = 1; // Amount of points earned for every kill, set to 0 to disable it setarray .class_modifier[0],4063,3,4076,2; // Modifier for certain classes [Id, Modifier, Id, Modifier....] if(agitcheck() || agitcheck2()) initnpctimer; end; OnAgitStart: [email protected]$ = "DELETE from `char_reg_num` WHERE `key` = 'woepoints' OR `key` = 'woedeaths' OR `key` = 'woekills' OR `key` = 'woedamage' OR `key` = 'woeempbreak'"; query_sql([email protected]$); addrid(0); woepoints = 0; detachrid(); initnpctimer; end; OnPCLoadMapEvent: if(!agitcheck() || !getcharid(2)) end; for ([email protected] = 0 ; [email protected] < getarraysize(.maps$) ; [email protected]++) { if (.maps$[[email protected]] == strcharinfo(3)) { if(!woepoints) { dispbottom "You've entered a WoE castle map, you will gain rewards for each minute you spend in this castle."; } AddPlayer(strcharinfo(0),strnpcinfo(0)); } } end; OnTimer10000: //will check every ten seconds if player is still on the map freeloop (1); for ([email protected] = 0 ; [email protected] < .player_amount ; [email protected] += 3) { if (!attachrid(getcharid2(3,.players$[[email protected]]))) { deletearray .players$[[email protected]],3 ; .player_amount -= 3; } else if(strcharinfo(3) != .players$[[email protected]+1]) { deletearray .players$[[email protected]],3 ; .player_amount -= 3; } } for ([email protected] = 0 ; [email protected] < .player_amount ; [email protected] += 3) { if(checkidle() < .s_idle_time) { // no points for idle players setarray .players$[[email protected]+2] , ""+(atoi(.players$[[email protected]+2]) + 1)+""; if (atoi(.players$[[email protected]+2]) >= 6) { if(attachrid(getcharid2(3,.players$[[email protected]]))) { woepoints += .points_per_minute; dispbottom "You've spent one minute in WoE and gained a WoE point." dispbottom "Total points earned: "+woepoints; setarray .players$[[email protected]+2] , "0"; } } } } initnpctimer; freeloop(0); end; OnPCKillEvent: if(!agitcheck() || !getcharid(2) || !.kill_reward) end; if(inarray(.maps$,strcharinfo(3)) == -1) end; dispbottom "You've recieved "+.kill_reward+" Points for killing "+rid2name(killedrid); woepoints += .kill_reward; [email protected]$ = getcharid(2) == getcastledata(strcharinfo(3),CD_GUILD_ID) ? .color_defenders$ : .color_attackers$; if(.announce == 1) announce "[WoE]: "+strcharinfo(0)+" Has Killed "+rid2name(killedrid),bc_all,[email protected]$; if(.announce == 2) mapannounce strcharinfo(3),"[WoE]: "+strcharinfo(0)+" Has Killed "+rid2name(killedrid),bc_map,[email protected]$; end; OnPCDieEvent: if(!agitcheck() || !getcharid(2)) end; if(inarray(.maps$,strcharinfo(3)) == -1) end; dispbottom "You've been killed by "+rid2name(killerrid); end; OnPCLogoutEvent: if(!agitcheck() && !agitcheck2()) woepoints = 0; end; OnAgitEnd: stopnpctimer; //participation rewards. [email protected]$ = "SELECT `char_id`, `value` FROM `char_reg_num` WHERE `key` = 'woepoints'"; query_sql([email protected]$,[email protected], [email protected]); for([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) { [email protected] = inarray(.class_modifier, Class) > -1 ? .class_modifier[inarray(.class_modifier, Class)+1] : 1; [email protected] = [email protected][[email protected]]; [email protected]$ = "[WoE Rewards]"; [email protected]$ = "Rewards"; [email protected]$ = "You've recieved a reward for participating in war of emperium.\nTotal Participation Time:"; setarray [email protected][0],.coinid; setarray [email protected][0], [email protected][[email protected]] * [email protected]; mail [email protected],[email protected]$,[email protected]$,[email protected]$,[email protected],[email protected],[email protected]; } end; }
  4. @AnnieRuru @4144 Is it possible to include the announcements. map announce and global announce?
  5. Good day! How can I do this? Every time a guild broke the emperium during woe, all guild members will receive prize on spot. thank you!
  6. MikZ

    DB Error

    Hello, Can someone help me tell what is this error about?
  7. any updated hercules compatibility? thank you!
  8. Good day! May I request someone to make this compatible with hercules?. thank you! /*========================================== * *------------------------------------------*/ ACMD_FUNC(monster) { char name[NAME_LENGTH]; char monster[NAME_LENGTH]; char eventname[EVENT_NAME_LENGTH] = ""; int mob_id; int number = 0; int count; int i, range; short mx, my; unsigned int size; nullpo_retr(-1, sd); memset(name, '\0', sizeof(name)); memset(monster, '\0', sizeof(monster)); memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message) { clif_displaymessage(fd, msg_txt(sd,80)); // Give the display name or monster name/id please. return -1; } if (sscanf(message, "\"%23[^\"]\" %23s %11d", name, monster, &number) > 1 || sscanf(message, "%23s \"%23[^\"]\" %11d", monster, name, &number) > 1) { //All data can be left as it is. } else if ((count=sscanf(message, "%23s %11d %23s", monster, &number, name)) > 1) { //Here, it is possible name was not given and we are using monster for it. if (count < 3) //Blank mob's name. name[0] = '\0'; } else if (sscanf(message, "%23s %23s %11d", name, monster, &number) > 1) { //All data can be left as it is. } else if (sscanf(message, "%23s", monster) > 0) { //As before, name may be already filled. name[0] = '\0'; } else { clif_displaymessage(fd, msg_txt(sd,80)); // Give a display name and monster name/id please. return -1; } if ((mob_id = mobdb_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number) mob_id = mobdb_checkid(atoi(monster)); if (mob_id == 0) { clif_displaymessage(fd, msg_txt(sd,40)); // Invalid monster ID or name. return -1; } if (mob_id == MOBID_EMPERIUM) { clif_displaymessage(fd, msg_txt(sd,83)); // Monster 'Emperium' cannot be spawned. return -1; } if (number <= 0) number = 1; if( !name[0] ) strcpy(name, "--ja--"); // If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive if (battle_config.atc_spawn_quantity_limit && number > battle_config.atc_spawn_quantity_limit) number = battle_config.atc_spawn_quantity_limit; parent_cmd = atcommand_alias_db.checkAlias(command+1); if (strcmp(parent_cmd, "monstersmall") == 0) size = SZ_MEDIUM; // This is just gorgeous [mkbu95] else if (strcmp(parent_cmd, "monsterbig") == 0) size = SZ_BIG; else size = SZ_SMALL; if (battle_config.etc_log) ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, sd->bl.x, sd->bl.y); count = 0; range = (int)sqrt((float)number) +2; // calculation of an odd number (+ 4 area around) for (i = 0; i < number; i++) { int k; map_search_freecell(&sd->bl, 0, &mx, &my, range, range, 0); k = mob_once_spawn(sd, sd->bl.m, mx, my, name, mob_id, 1, eventname, size, AI_NONE); if(k) { //mapreg_setreg(reference_uid(add_str("[email protected]"), i),k); //retain created mobid in array uncomment if needed count ++; } } if (count != 0) if (number == count){ if(pc_get_group_level(sd)==99){ // Checks if the GM level is below 99 Announcement is made [Vengeance] clif_displaymessage(fd, msg_txt(sd,39)); // All monster summoned! } else { sprintf(atcmd_output, "%s summoned %d %s in %s,%d,%d", sd->status.name,number, monster, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y); //sprintf(atcmd_output, msg_txt(sd,240), count); // %d monster(s) summoned! // <-- ORIG CODE //clif_displaymessage(fd, atcmd_output); intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, 0); clif_displaymessage(fd, msg_txt(sd,39)); // All monster summoned! } } else { sprintf(atcmd_output, "%s summoned %d %s in %s,%d,%d", sd->status.name,number, monster, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y); intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, 0); sprintf(atcmd_output, msg_txt(sd,240), count); // %d monster(s) summoned! //clif_displaymessage(fd, atcmd_output); } else { clif_displaymessage(fd, msg_txt(sd,40)); // Invalid monster ID or name. return -1; } return 0; }
  9. Sad, hope you can at least give me script. thank you!
  10. Good day! May I request a script example @flooritem with only 20x limit usage gm command per day? thank you!
  11. @4144 what do you mean not same version of plugin and hercules? I did git clone https://github.com/HerculesWS/Hercules.git ~/Hercules then get the lates version of plugin from Dastgir github. Does this mean the lates git of EBG is not compatible with the latest version of git?
  12. Weird. Already did this only 2 plugins. Im using debian 10 - does this matter? Still got the same error.
  13. Im using February 08 2021. Maybe I did something wrong. i'll double check. Well I tested using git clone https://github.com/HerculesWS/Hercules.git ~/Hercules as new GIT FILE. got the same error.
×
×
  • Create New...

Important Information

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