Jump to content

Johnson

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Johnson

  1. How do we append multiple item ids if SFT_ID sellitem "egglog_shop",SFT_ID,501,502,503,504; or sellitem "egglog_shop",SFT_ID,.samplearray[.@i];
  2. Tried this hmm seems like when it execute on the block .@roll it returns to this error below. Also, fragment and combine is different from exchanger right? Or exchanger not yet applied? [Error]: buildin_rand: minimum (1) and maximum (1) are equal. No randomness possible. [Warning]: Script command 'rand' returned failure. [Debug]: Source (NPC): Pet Combination#1 at payon (95,114) [Error]: buildin_rand: minimum (1) and maximum (1) are equal. No randomness possible. [Warning]: Script command 'rand' returned failure. [Debug]: Source (NPC): Pet Combination#1 at payon (95,114) [Debug]: npc_scriptcont: Pet Combination#1 (sd->npc_id=110080596) is not 'Unknown NPC' (id=0). Thanks for this pajodex. Would like to see more updates
  3. Could this be possible instead of an item which accumulate inventory count of 1/100 to make it as a permanent variable without the item like bonus, bonus2, bonus3* bonus4*. General Idea: NPC quest or card deposit. if deposited card = 10 delete x10 cards then give some bonus to the attached player. Say like bonuses below if all x10 cards are met bonus bMdef,3; bonus2 bAddRace,RC_Insect,5; bonus2 bMagicAddRace,RC_Insect,5; bonus2 bSubRace,RC_Insect,5; bonus3 bAddMonsterDropItem,518,RC_Insect,2;
  4. Hi, For Context: I'm creating an exchange script of Common Eggs to item(not egg). Scenario: if player has 10 of Common Eggs it will be deleted and will receive an item. Excluding the hatched egg of current player. I have an array list of Pet Eggs and if the player has >= 10 based on .C_PetEggs it will delitem all the captured itemIDs. Note* : Pet Eggs is only 1 as default as it is non-stackable I'm having trouble as it deletes the hatched egg and will be deleted as well on database and cannot return to egg or feed etc. setarray .C_PetEggs, 9150, 9151, 9152, 9153, 9154, 9155, 9156, 9157, 9158, 9159, 9198, 9200, 9201, 9203, 9204, 9206, 9210; getinventorylist; for (set .@i, 0; .@i < @inventorylist_count; set .@i, .@i + 1) { for (set .@j, 0; .@j < getarraysize(.C_PetEggs); set .@j, .@j + 1) { if(@inventorylist_id[.@i] == .C_PetEggs[.@j]){ if(countitem(.C_PetEggs[.@j]) > 0){ if(.@ctr == 10) end; delitem .C_PetEggs[.@j], 1; .@ctr++; }else end; } } }
  5. Woah, thanks for this Wazaby and Happy Birthday!
  6. You can do it with simple script below, then use it on the item you want. Haven't tested it yet. function script testlevel { OnDo: goto(job_menu); job_menu: switch(select("Assassin Cross","Lord Knight")){ case 1: jobchange 4013; set BaseLevel,99; set JobLevel,70; break; case 2: jobchange 4008; set BaseLevel,99; set JobLevel,70; break; } end; }
  7. You can do it via script. *setbattleflag "<battle flag>",<value>{,<reload>}; *getbattleflag("<battle flag>") https://github.com/rathena/rathena/blob/e965e2794b96dc2fdd4364e457ef85ea5be6557e/doc/script_commands.txt#L7768-L7769
  8. Hi Emistry, Thanks for this i have managed to do it in src. Will still test this out tho thanks!
  9. Hi Rynbef, I have managed to fix double continuation I was messing with my script and managed to fix it. Thx
  10. Better to use this if you're using 2021+ clients https://github.com/rathena/rathena/pull/7410/files
  11. Thanks for this @Moooooon-Aisha will test this one out.
  12. May I ask help on getting monster to display on mapmoblist command. Somehow, it is not showing any monster data when use on @mapmoblist atcommand.cpp static int count_mob(struct block_list *bl, va_list ap) // [FE] { struct mob_data *md = (struct mob_data*)bl; short id = va_arg(ap, short); if (md->mob_id == id) return 1; return 0; } ACMD_FUNC(mapmoblist) // [FE] { char temp[100]; bool mob_searched[MAX_MOB_DB]; bool mob_mvp[MAX_MOB_DB]; // Store mvp data.. struct s_mapiterator* it; unsigned short count = 0, i, mapindex = 0; int m = 0; memset(mob_searched, 0, MAX_MOB_DB); memset(mob_mvp, 0, MAX_MOB_DB); if (message && *message) { // Player input map name, search mob list for that map mapindex = mapindex_name2id(message); if (!mapindex) { clif_displaymessage(fd, "Map not found"); return -1; } m = map_mapindex2mapid(mapindex); } else { // Player doesn't input map name, search mob list in player current map mapindex = sd->mapindex; m = sd->bl.m; } clif_displaymessage(fd, "--------Monster List--------"); sprintf(temp, "Mapname: %s", mapindex_id2name(mapindex)); clif_displaymessage(fd, temp); clif_displaymessage(fd, "Monsters: "); //Looping and search for mobs it = mapit_geteachmob(); while (true) { TBL_MOB* md = (TBL_MOB*)mapit_next(it); uint16 mob_id; std::shared_ptr<s_mob_db> mob = mob_db.find(mob_id); if (md == NULL) break; if (md->bl.m != m || md->status.hp <= 0) continue; if (mob_searched[md->mob_id] == true) continue; // Already found, skip it if (md->db->mexp) { mob_searched[md->mob_id] = true; mob_mvp[md->mob_id] = true; // Save id for later continue; // It's MVP! } mob_searched[md->mob_id] = true; count = map_foreachinmap(count_mob, m, BL_MOB, md->mob_id); sprintf(temp, " %s[%d] : %d", mob->jname, md->mob_id, count); clif_displaymessage(fd, temp); } mapit_free(it); clif_displaymessage(fd, "MVP: "); // Looping again and search for mvp, not sure if this is the best way.. for (i = 1000; i < MAX_MOB_DB; i++) { //First monster start at 1001 (Scorpion) if (mob_mvp[i] == true) { TBL_MOB* md = (TBL_MOB*)mapit_next(it); count = map_foreachinmap(count_mob, m, BL_MOB, i); sprintf(temp, " %s[%d] : %d", md->db->jname, i, count); clif_displaymessage(fd, temp); } } return 0; } ACMD_DEF(mapmoblist), Reference & Credits to FatalError:
  13. How do I link the item with enchant options from `<ITEM> <INFO> </INFO></ITEM>` I've tried this but just linking the Hat with no random option info In this line of script: if(.KeepItemData) set .@ref, getitem3(.@id,1,1,.@r,0,.@c0,.@c1,.@c2,.@c3,.@r_id,.@r_v,.@null); else getitem3(.@id,1,1,0,0,0,0,0,0,.@r_id,.@r_v,.@null); equip(.@id); .@s = getarraysize(getd(".ro_id_" + .@id)); mes "<ITEM>" + getitemname(.@id) + "[" + getitemslots(.@id) + "]<INFO>" + .@id[getrandomoptinfo(.@r_v)] + "</INFO></ITEM>"; mes "Done!";
  14. Is there by any chance setting up firewall / mitigate DDOS attacks && proxies to forward to original vps from proxy vps? Thanks!
  15. Good day! I'm having trouble on this warning and dunno in what part on the script made the error. Appreciate any help. Thanks a lot! Item_db_usable.yml menuskills.txt Console log:
  16. Manually disable the warps/npc/monsters/maps. Refer to this link for the episode release https://github.com/rathena/rathena/wiki/History_of_Ragnarok_Emulation
  17. I've got this already. The problem I encounter was when selecting the skill ID 42 or 153 it does not return the ID i've selected. instead it return basic skill which is skill id = 1 Edit: Solved
  18. I'm tryna do something with @skilllist_id that returns all skills based on player class(Job). However, i get all skills including passives. I created a sample script that lists all skill that is an attack. I get the result of 42 < Mammonite, 153 < Cart Revolution for blacksmith. when i tried using a for loop and the menu will show up like this. After selecting 42, it returns ID: 2 which is not the skill ID that i have selected. Code Snippet: getskilllist; for(set .@i, 0; .@i < @skilllist_count; set .@i, .@i+1){ if (@skilllist_flag != NoDamage){ set .@menu$, .@menu$ + ":" + getskillname(@skilllist_id[.@i]; } } .@skillids = select(.@men$+":Cancel") -1; mes "Skill level to use:"; mes "[" + getskillstring(0,.@skillids) + "]" + " - Max lv : " + getskilllv(.@skillids); input .@attskilllvl; } while(.@attskilllvl < 0 || .@attskilllvl > getskilllv(.@skillids)); setattack(.@skillids + ";" + .@attskilllvl); in the array for @skilllist_id how does it get the skills and how will i remove the skills after setting it in select(.@men$)
  19. can this still be implemented on latest rathena git? I'm having trouble applying the patch and diff since it does not contains all the texts. ex: @Autopilot.patch -line 27600 (stops from there "{") @@ -11734,7 +11834,7 @@ if (!((targetmd2->status.def_ele == ELE_HOLY) || (targetmd2->status.def_ele < 4) // *** Note I changed this to make the damage depend on missing HP more and it also costs 5 balls. // Only use when wounded. if (canskill(sd)) if (pc_checkskill(sd, SR_GATEOFHELL) > 0) - if (sd->spiritball >= 5) if (havepriest && havehealer) + if (sd->spiritball >= 5) if (sd->battle_status.sp > sd->battle_status.max_sp*0.33) if (sd->battle_status.hp < sd->battle_status.max_hp*0.3) {
  20. Thanks for the fast response @Gidz Cross Is this script available or script is for sale? Could not find any on rathena script collections.
  21. I'm looking for Compensation code redeemer where features are alike the ff: -Compen code (1201MAINTENANCE) generated by admin - 1201MAINTENANCE < can consist of multiple items that will be inputted by admin - Player1 Redeem 1201MAINTENANCE= get items - Checks if 1201MAINTENANCEredeemed already by Player1 (ip/mac) - Player2 Redeem 1201MAINTENANCE= get items - 1201MAINTENANCEcan be redeemed by all players but is once per ip/mac - Create tables and for log Sample like below: Player inputs 1201MAINTENANCE = items received from 1201MAINTENACE if 1201MAINTENANCE is entered by ip/account
×
×
  • Create New...