Jump to content

dungpt8782

Members
  • Content Count

    63
  • Joined

  • Last visited

About dungpt8782

  • Rank
    Advanced Member
  • Birthday 07/08/1982

Profile Information

  • Gender
    Not Telling
  • Emulator
    Hercules

Recent Profile Visitors

2596 profile views
  1. I think this script check status when wear this item only I tested with this item weared before enchant poison, it dont have effect when i use enchant poison
  2. I want to make the item with this effect: If Enchant Poison level 10 damage increased 50% when under Enchant Poison status can you help me to make item script like this? i'm using if (getskilllv(AS_ENCHANTPOISON) == 10 && getstatus(SC_ENCHANTPOISON) ) { bonus2 bAddRace,RC_All,50; } but it will inscrease all element damage after enchant poison.
  3. I'm using server source since 12/2015. Now i want to update my server to lastest hercules. If u can, pls inbox me your price!! THank u.
  4. [ Error ] : timer_add_interval: invalid interval (tick=531104218 006448AC[party_send_xy_timer] id=0 data=0 diff_tick=0) [ Error ] : timer_add_interval: invalid interval (tick=531118882 0063F66D[bg_send_xy_timer] id=0 data=0 diff_tick=0) i just updated lastest Hercules (my old source from 2015). i updated SQL. But still have this error, when login ingame, my char can't move, HP, SP =0 Pls help me how to fix this error!
  5. // duplicatenpc("NpcName", "DuplicateName", "DupHiddenName", "map", x, y, dir{, sprite{, xs, ys}}); BUILDIN(duplicatenpc) { const char *npc_name = script_getstr(st, 2); const char *dup_name = script_getstr(st, 3); const char *dup_hidden_name = script_getstr(st, 4); const char *tmap = script_getstr(st, 5); int tx = script_getnum(st, 6); int ty = script_getnum(st, 7); int tdir = script_getnum(st, 8); int tclass_, txs = -1, tys = -1, sourceid, type, tmapid, i; struct npc_data *nd_source, *nd_target; char targetname[24] = ""; if(script_hasdata(st, 10)) txs = (script_getnum(st, 10) < -1) ? -1 : script_getnum(st, 10); if(script_hasdata(st, 11)) tys = (script_getnum(st, 11) < -1) ? -1 : script_getnum(st, 10); if(txs == -1 && tys != -1) txs = 0; if(txs != - 1 && tys == -1) tys = 0; if(strlen(dup_name) + strlen(dup_hidden_name) > NAME_LENGTH) { ShowError("duplicatenpc: Name#HiddenName is to long (max %d chars). (%s)\n",NAME_LENGTH, npc_name); script_pushint(st, 0); return 0; } nd_source = npc->name2id(npc_name); if(script_hasdata(st, 9)) tclass_ = (script_getnum(st, 9) < -1) ? -1 : script_getnum(st, 9); else tclass_ = nd_source->class_; if( nd_source == NULL) { ShowError("duplicatenpc: original npc not found for duplicate. (%s)\n", npc_name); script_pushint(st, 0); return 0; } sourceid = nd_source->bl.id; type = nd_source->subtype; tmapid = map->mapname2mapid(tmap); if(tmapid < 0) { ShowError("duplicatenpc: target map not found. (%s)\n", tmap); script_pushint(st, 0); return 0; } // nd_target = npc->create_npc(tmapid, tx, ty); strcat(targetname, dup_name); strncat(targetname, "#", 1); strncat(targetname, dup_hidden_name, strlen(dup_hidden_name)); safestrncpy(nd_target->name, targetname , sizeof(nd_target->name)); safestrncpy(nd_target->exname, targetname, sizeof(nd_target->exname)); nd_target->class_ = tclass_; nd_target->speed = 200; nd_target->src_id = sourceid; nd_target->bl.type = BL_NPC; nd_target->subtype = (enum npc_subtype)type; switch(type) { case SCRIPT: nd_target->u.scr.xs = txs; nd_target->u.scr.ys = tys; nd_target->u.scr.script = nd_source->u.scr.script; nd_target->u.scr.label_list = nd_source->u.scr.label_list; nd_target->u.scr.label_list_num = nd_source->u.scr.label_list_num; nd_target->u.scr.shop = nd_source->u.scr.shop; nd_target->u.scr.trader = nd_source->u.scr.trader; break; case SHOP: case CASHSHOP: nd_target->u.shop.shop_item = nd_source->u.shop.shop_item; nd_target->u.shop.count = nd_source->u.shop.count; break; case WARP: if( !battle->bc->warp_point_debug ) nd_target->class_ = WARP_CLASS; else nd_target->class_ = WARP_DEBUG_CLASS; nd_target->u.warp.xs = txs; nd_target->u.warp.ys = tys; nd_target->u.warp.mapindex = nd_source->u.warp.mapindex; nd_target->u.warp.x = nd_source->u.warp.x; nd_target->u.warp.y = nd_source->u.warp.y; break; } map->addnpc(tmapid, nd_target); //status->change_init(&nd_target->bl); //unit->dataset(&nd_target->bl); nd_target->ud = &npc->base_ud; nd_target->dir = tdir; npc->setcells(nd_target); map->addblock(&nd_target->bl); if(tclass_ >= 0) { status->set_viewdata(&nd_target->bl, nd_target->class_); if( map->list[tmapid].users ) clif->spawn(&nd_target->bl); } strdb_put(npc->name_db, nd_target->exname, nd_target); if(type == SCRIPT) { for (i = 0; i < nd_target->u.scr.label_list_num; i++) { if (npc->event_export(nd_target, i)) { ShowWarning("duplicatenpc: duplicate event %s::%s.\n", nd_target->exname, nd_target->u.scr.label_list[i].name); } npc->timerevent_export(nd_target, i); } nd_target->u.scr.timerid = INVALID_TIMER; } script_pushint(st, 1); return true; }
  6. Hi, i want to make random WOE_se or WOE_fe in my server. Something like : radom(1,2), if 1 -> open WOE_fe; if 2 -> open WOE_se. THank you so much!!!!
  7. //===== Hercules Script ====================================== //= @callmonster <monster_id> //= For: VNRO //===== By: ================================================== //= ndh - script callmonster -1,{ OnInit: bindatcmd "callmonster", strnpcinfo(0) + "::OnCallMonster"; .callmonsterDuration = 60; // phut end; OnCallMonster: if(Hp == 0) { dispbottom "Can't Call if died."; end; } if(callmonsterhaveMonster > 0) { dispbottom "Only call 1 per times."; end; } // Proccess argument .@argument$ = ""; for (.@i = 0; .@i < .@atcmd_numparameters; ++.@i) { .@argument$ += (.@i > 0 ? " " : "") + .@atcmd_parameters$[.@i]; } .@monsterId = atoi(.@argument$); // Find card ID .@cardId = -1; if(getmobdrops(.@monsterId)) { .@count = $@MobDrop_count; copyarray .@item[0],$@MobDrop_item[0],.@count; for (.@i = 0; .@i < .@count; ++.@i) { //item type 6 la card, getiteminfo(id,2) -> get item type if(getiteminfo(.@item[.@i],2) == 6) .@cardId = .@item[.@i]; } if(.@cardId == -1) { dispbottom "Not available in db"; end; } } else { dispbottom "Can't find monster"; end; } // Find card ID in inventory if(countitem(.@cardId) > 0) { delitem .@cardId, 1; atcommand "@summon " + .@monsterId + " " + .callmonsterDuration; callmonsterhaveMonster = 1; addtimer (.callmonsterDuration * 60 * 1000), strnpcinfo(3)+"::OnMonsterGone"; dispbottom "Called monster in 60 mins!"; } else { dispbottom "Can't call monster, pls check " + getitemname(.@cardId) + " in your inventory, Need 1 card to call"; end; } end; OnMonsterGone: callmonsterhaveMonster = 0; end; OnPCDieEvent: callmonsterhaveMonster = 0; end; OnPCLogoutEvent: callmonsterhaveMonster = 0; end; OnWhisperGlobal: set getd(@whispervar0$), atoi(@whispervar1$); // debug function end; } THanks you!!!!
  8. I made event Job 2 event, so homunculus is not allow to use for balance. How can i disable skill "Call Homunculus" in my event map? Help me pls!!!!
  9. Pls help me for Lucky Roulette: - Where is SQL? - I lose my prize if my client crash, or disconect. - I lose all my silver, gold points if i restart my server. - How can i check logs? Thank u so much!!!!
×
×
  • Create New...

Important Information

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