Jump to content

Emistry

Forum Moderator
  • Posts

    9,779
  • Joined

  • Days Won

    322

Everything posted by Emistry

  1. these are reserved for npc sprite or clones. the numbers in these range are usable for monsters
  2. actually, you can also consider another alternative like this .size = getarraysize(.itemid); for ([email protected] = 0; [email protected] < .size; [email protected]++) .total_chance += .itemchance[[email protected]]; [email protected] = rand(.total_chance); for ([email protected] = 0; [email protected] < .size; [email protected]++) { [email protected]_itemchance += .itemchance[[email protected]]; if ([email protected] < [email protected]_itemchance) { getitem .itemid[[email protected]], 1; end; } } this would greatly reduce your array size, and probably perform slightly better
  3. [email protected] = convertpcinfo(.players[[email protected]],CPC_ACCOUNT); getitem .item_win, .count_win, [email protected];
  4. summon monster, set hp to 10, skill invincible on or set immune to damage. the mob shall take only 1 damage afterwards
  5. Emistry

    Autopots

    start with readying the info inside the script. npc/custom/etc/autopot.txt#L25-L36 all the info is there.
  6. you could try something like this. initialize all the character as specific character, then search and replace them randomly. if (abcde$ == "") abcde$ = "____"; // initialize with a dummy character if (compare(abcde$, "_")) { [email protected] = getstrlen(abcde$); do { [email protected] = rand([email protected]); } while (charat(abcde$, [email protected]) != "_")); // search for it setchar(abcde$, .word$[[email protected]], [email protected]); // replace it } message strcharinfo(0), "Letter's Collected : "+ abcde$;
  7. OnPCAttackEvent: if (strcharinf(3) != "prontera") end; // <--- change to the punching bag map message strcharinfo(0), "You have dealt "+ @damage +" damage to Punching Bag"; end;
  8. may refer this post for guide to fix the account_id issue. https://rathena.org/board/topic/131467-need-help-sql-db-error-pls-thanks/#comment-407968
  9. may refer this post for guide to fix the account_id issue. https://rathena.org/board/topic/131467-need-help-sql-db-error-pls-thanks/#comment-407968
  10. conf\log_athena.conf // Enable Logs? (Note 3) ... ... // 0x00000010 - (S) Log NPC transactions (buy/sell) ... ... enable_logs: 0x00000010 load the NPC prontera,155,181,5 script Sample 757,{ [email protected]$ = "SELECT `nameid`, SUM(`amount`) AS `total` FROM `picklog` WHERE `type` = 'S' AND `amount` > 0 GROUP BY `nameid` ORDER BY `total` DESC LIMIT 10"; [email protected] = query_sql([email protected]$, [email protected], [email protected]); mes "Items:"; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) mes getitemname([email protected][[email protected]])+" - "+F_InsertComma([email protected][[email protected]]); close; } however there is no way telling how much NPC have earned or lost from the transaction since it's not log.
  11. [email protected] = select( [email protected]$ ) - 1; setarray [email protected], LOOK_HEAD_TOP, LOOK_HEAD_MID, LOOK_HEAD_BOTTOM; if (getlook([email protected][[email protected]]) <= 0) { dispbottom [email protected]$[[email protected]] +" is already hidden"; end; }
  12. bonus bMatk,(getrefine() + 10); Magical attack power +10 per refine bonus bMatkRate,(getrefine() + 2); Magical attack power + 2% per refine
  13. Emistry

    Rent npc

    prontera,155,181,5 script Sample 757,{ mes "Give me Red Potion."; if (select("Enter", "Cancel") == 1) { if (!countitem(501)) { mes "You dont have it."; } else { TIME_LEFT = gettimetick(2) + (3 * 3600); addtimer (3 * 3600 * 1000), strnpcinfo(3)+"::OnExpire"; warp "prt_fild01", 0, 0; } } close; OnPCLoginEvent: [email protected]_left = TIME_LEFT - gettimetick(2); if ([email protected]_left > 0) { addtimer ([email protected]_left * 1000), strnpcinfo(3)+"::OnExpire"; } end; OnExpire: TIME_LEFT = 0; warp "prontera", 155, 181; end; }
  14. GSTORAGE_NO_STORAGE - Guild hasn't invested in the Guild Storage Expansion skill (only if OFFICIAL_GUILD_STORAGE is enabled). doc\script_commands.txt
  15. [email protected]_id = groupranditem(IG_Taming); getitem [email protected]_id, 1; announce "["+strcharinfo(0)+" obtained "+getitemname([email protected]_id)+"]", bc_all;
  16. if not mistaken, in official they should share the kill count if the party member are nearby...
  17. ALTER TABLE `char` ADD `pvp_kill` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `fame`; have you loaded the SQL script that was provided ?
  18. query_sql("SELECT `id`, `name_endlish` FROM `mob_db` WHERE `card_id` > 0 AND `id` NOT IN (1083,1084) ORDER BY RAND() LIMIT 1",[email protected]_id,[email protected]_name$); if u have a complete mob_db , just filter all the mob using the sql query. NOT IN (1083,1084) just fill in more mob_id that you want to blacklist.
  19. this? conf/battle/gm.conf#L38-L42 // requires RENEWAL_EXP or RENEWAL_DROP to be enabled (src/config/renewal.hpp) // modifies @mobinfo to display the users' real drop rate as per renewal_drop formula // modifies @iteminfo to not display the minimum item drop rate (since it can't tell the mob level) // modifies @whodrops to display the users' real drop rate as per renewal_drop formula atcommand_mobinfo_type: 1
  20. - script sample -1,{ OnNPCKillEvent: if (.player_count >= 20) { if (rand(1, 100) == 1) getitem 40003, 1; } end; OnPCLoginEvent: .player_count++; end; OnPCLogoutEvent: .player_count--; end; OnUpdate: if (.player_count < 20) { announce "There is "+.player_count+"/20 players online, a drop event will start when there is a total of 20 players online!", bc_all; } else if (.player_count == 20) { announce "A total "+.player_count+" player is online now, mini event will start, all monster will now drop Gatcha ticket by 1%", bc_all; } end; }
  21. just change your server exp rate to 10~20% higher ?
  22. - script atcmd_example -1,{ OnInit: bindatcmd "dice",strnpcinfo(3) + "::OnAtcommand"; end; OnAtcommand: switch (atoi([email protected]_parameters$)) { case 1: emotion ET_DICE1, getcharid(3); break; case 2: emotion ET_DICE2, getcharid(3); break; case 3: emotion ET_DICE3, getcharid(3); break; case 4: emotion ET_DICE4, getcharid(3); break; case 5: emotion ET_DICE5, getcharid(3); break; case 6: emotion ET_DICE6, getcharid(3); break; default: dispbottom "Invalid. " + [email protected]_command$ + " <1-6>"; break; } end; }
×
×
  • Create New...

Important Information

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