Jump to content

namerpus18

Members
  • Posts

    118
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by namerpus18

  1. SOLUTION: made an npc with ontouch and check if rentalitem is more than 1
  2. Good Day everyone, I just want to ask for help on how I can kick a player on a map when a rental item in inventory expires? I manage to do it on equipment but I want to make it simple ETC item on inventory. Thank you as always,
  3. It is within the script itself. // Update Market Shop - script Update_Shop -1,{ OnInit: OnClock0000: npcshopupdate "para_coin10",6304,0,1; npcshopupdate "para_coin10",6080,0,1; npcshopupdate "para_coin10",6081,0,1; npcshopupdate "para_coin10",6380,0,1; npcshopupdate "para_coin10",6004,0,1; npcshopupdate "para_hei10",6608,0,1; npcshopupdate "para_hei10",6607,0,1; npcshopupdate "para_hei10",0,1; npcshopupdate "para_hei10",7642,0,1; npcshopupdate "para_hei10",22687,0,1; npcshopupdate "para_hei10",23016,0,1; npcshopupdate "para_key10",7026,0,10; npcshopupdate "para_key10",7027,0,10; npcshopupdate "para_wp00",1181,0,1; npcshopupdate "para_arm10",5007,0,1; npcshopupdate "para_ptn00",678,0,999; npcshopupdate "para_ptn00",12016,0,9999; npcshopupdate "para_ptn00",525,0,1000; npcshopupdate "para_ptn00",12422,0,100; npcshopupdate "para_ptn00",12423,0,100; npcshopupdate "para_ptn00",12425,0,100; npcshopupdate "para_ptn00",12426,0,100; npcshopupdate "para_ptn10",505,0,100; npcshopupdate "para_ptn10",12679,0,500; npcshopupdate "para_ptn10",12676,0,500; npcshopupdate "para_ptn10",12680,0,100; npcshopupdate "para_itm00",12106,0,100; npcshopupdate "para_itm00",12107,0,100; npcshopupdate "para_itm00",616,0,100; npcshopupdate "para_itm00",12194,0,100; npcshopupdate "para_itm10",12008,0,99999; npcshopupdate "para_itm10",12009,0,99999; npcshopupdate "para_itm10",12012,0,100; npcshopupdate "para_itm10",12010,0,100; npcshopupdate "para_itm10",12011,0,100; npcshopupdate "para_itm10",12013,0,100; npcshopupdate "para_itm10",12014,0,100; npcshopupdate "para_itm10",7931,0,100; npcshopupdate "para_seed10",12290,0,100; npcshopupdate "para_seed10",12376,0,100; npcshopupdate "para_seed10",12291,0,100; npcshopupdate "para_seed10",12377,0,100; npcshopupdate "para_seed10",576,0,100; npcshopupdate "para_seed10",587,0,100; npcshopupdate "para_seed10",526,0,100; npcshopupdate "para_seed10",607,0,20; npcshopupdate "para_seed10",608,0,20; npcshopupdate "para_mora10",11526,0,100; npcshopupdate "para_mora10",11525,0,1000; npcshopupdate "para_mora10",11520,0,100; npcshopupdate "para_mora10",12574,0,100; npcshopupdate "para_ref10",998,0,500; npcshopupdate "para_ref10",1003,0,500; npcshopupdate "para_ref10",1002,0,500; npcshopupdate "para_ref10",999,0,500; npcshopupdate "para_ref20",984,0,10; npcshopupdate "para_ref20",985,0,100; npcshopupdate "para_ref20",987,0,1; npcshopupdate "para_ref20",988,0,1; npcshopupdate "para_ref20",989,0,1; npcshopupdate "para_jew10",969,0,20; npcshopupdate "para_jew10",7289,0,20; npcshopupdate "para_jew10",7290,0,20; npcshopupdate "para_jew10",7291,0,20; npcshopupdate "para_jew10",7292,0,20; npcshopupdate "para_jew10",7293,0,20; npcshopupdate "para_jew10",7294,0,20; npcshopupdate "para_jew10",7295,0,20; npcshopupdate "para_jew10",7296,0,20; npcshopupdate "para_jew10",7297,0,20; npcshopupdate "para_alc10",971,0,20; npcshopupdate "para_alc10",972,0,20; npcshopupdate "para_alc10",970,0,20; npcshopupdate "para_alc10",7136,0,20; npcshopupdate "para_alc10",7135,0,20; npcshopupdate "para_alc20",1061,0,1000; npcshopupdate "para_alc20",905,0,1000; npcshopupdate "para_alc20",1059,0,1000; npcshopupdate "para_alc20",7033,0,1000; npcshopupdate "para_alc20",929,0,1000; npcshopupdate "para_alc30",1000,0,100; npcshopupdate "para_alc30",1001,0,100; npcshopupdate "para_alc30",990,0,100; npcshopupdate "para_alc30",991,0,100; npcshopupdate "para_alc30",992,0,100; npcshopupdate "para_alc30",993,0,100; npcshopupdate "para_fod10",6252,0,100; npcshopupdate "para_fod10",6253,0,100; npcshopupdate "para_fod10",6254,0,100; npcshopupdate "para_fod10",6256,0,100; npcshopupdate "para_fod10",6257,0,100; npcshopupdate "para_fod10",6259,0,100; npcshopupdate "para_fod10",6260,0,100; npcshopupdate "para_fod10",22658,0,50; npcshopupdate "para_fod10",22659,0,50; npcshopupdate "para_mag10",12108,0,99999; npcshopupdate "para_mag10",717,0,99999; npcshopupdate "para_mag10",715,0,99999; npcshopupdate "para_mag10",716,0,99999; npcshopupdate "para_mag10",14512,0,100; npcshopupdate "para_mag10",14513,0,100; npcshopupdate "para_mag10",14514,0,100; npcshopupdate "para_mag10",12737,0,99999; npcshopupdate "para_mag10",12734,0,99999; npcshopupdate "para_mag10",12738,0,100; npcshopupdate "para_mag10",12735,0,50; npcshopupdate "para_mag10",12736,0,10; npcshopupdate "para_mag10",6360,0,99999; npcshopupdate "para_mag10",6363,0,99999; npcshopupdate "para_mag10",6361,0,99999; npcshopupdate "para_mag10",6362,0,99999; npcshopupdate "para_mag11",717,0,99999; npcshopupdate "para_mag11",12737,0,99999; npcshopupdate "para_mag11",12734,0,99999; npcshopupdate "para_mag11",6360,0,99999; npcshopupdate "para_mag11",6363,0,99999; npcshopupdate "para_mag11",6361,0,99999; npcshopupdate "para_mag11",6362,0,99999; npcshopupdate "para_mag20",12119,0,100; npcshopupdate "para_mag20",12121,0,100; npcshopupdate "para_mag20",12120,0,100; npcshopupdate "para_mag20",12118,0,100; npcshopupdate "para_plt01",709,0,50; npcshopupdate "para_plt01",7932,0,99999; npcshopupdate "para_plt01",7933,0,99999; npcshopupdate "para_plt01",7934,0,99999; npcshopupdate "para_plt01",7935,0,99999; npcshopupdate "para_plt01",7936,0,99999; npcshopupdate "para_plt01",7937,0,99999; end; }
  4. You also need some renewal features. kindly put here the exact error on your rathena.
  5. Thank you ill test this out, I figured out 1 method I tested it out using @command it works but in script it does not work. I remember i used this before and it worked now i dont know why it wont work atcommand "@showmobs "+ 1002;
  6. Good Day everyone, I tried searching a way to change clan names but not luck. Anyone have idea how? Thank you so much,
  7. Good Day everyone, I just want your help coz I really can't find my old script where I use this command where it marks on minimap all mobs(mobID) available on the map. I am really not quite sure if I used viewpoint or viewpointmap, I think it was couple months ago where I use that method. I used it on OldGlastHeim instance where I put marker on mobs location on minimap so players can see where to go. So now I need it but can't find the old file Thank you so much
  8. Hello Everyone, Can anyone help me with how I can disable a player shouting the skill name cast? I think I saw it already before but now I can't find it at the time I need it I only need it on this bonus3 autospell so that it wont show the skill name everytime it cast. bonus3 bAutoSpell,"MG_NAPALMBEAT",10,10000; Thank you so much as always.
  9. Hello everyone, Can I just have your thoughts or if you know what is happening why a character in @afk state if you @recall them they don't show up but the character is there. If I try to @goto it will lead me to where i make @recall so it tells me its there. And I also try to make the same party so I can see it in minimap. It shows the character's location but nothing is there. I tried so hard digging any possibilities and find a solution but nothing worked. What I really want to achieve here is a basic bot while @AFK. It is working but when it teleports, this problem occurs and I am now out of ideas about what to do to solve it. And after @recall the bot still works because it still teleport as long as there is no monster around. Thank you so much
  10. No I did not encounter an error there. The error appear when I start "boton" command. But the npc is working fine I think. Like I said the main problem is the sc_config. Are you trying to make it work ? Do you encounter error there? POst it here maybe we could fix it
  11. This is the problem I encounter. I can seem to add it as a valid status change constant because rathena does not have sc_config. I tried it on hercules but also did not manage to make it work, i think it has to be updated.
  12. I also tried it using hercules but also did not make it work, maybe it's too outdated. I had no problem in compilation but still doesnt work for me. I think in rathena sc_config is somewhat like status.yml
  13. Hi, I tried to translate this before but did not manage to make it work coz i am still a newbie in source coding and tried to seek help here multiple times but I think there was not a lot of activity this day, I was having ERROR (status_change_start: Invalid status change (931) then I abandoned it for a while. I will check my files and share it here. The problem I had was the sc_config is now not available in db and put somewhere else.My files are all over so it may take some time to look for it. EDIT: Here is what I translated before case SC_BOT: if (--(sce->val4) > 0) { { int i_ = 0; struct mmo_charstatus* sta = &sd->status; unsigned short inf_ = 0; int64 last_tick = (int64)time(NULL); unsigned short idle_ = cap_value(DIFF_TICK(last_tick, sd->idletime), 0, USHRT_MAX); unsigned short tele_ = cap_value(DIFF_TICK(last_tick, pc_readreg(sd, add_str("@SP_BOT_TELE"))), 0, USHRT_MAX); unsigned int starget_id_ = bot_check_target_alive(bl, pc_readreg(sd, add_str("@SP_BOT_TGID"))); {//Heal unsigned short item_id_ = sta->hotkeys[9].id; if ((sd->battle_status.hp * 100 / 80) < sd->battle_status.max_hp && item_id_ > 0) { i_ = pc_search_inventory(sd, item_id_); if (i_ >= 0) pc_useitem(sd, i_); } item_id_ = sta->hotkeys[10].id; if ((sd->battle_status.sp * 100 / 80) < sd->battle_status.max_sp && item_id_ > 0) { i_ = pc_search_inventory(sd, item_id_); if (i_ >= 0) pc_useitem(sd, i_); } } if (idle_ % 7 != 0)//Attack { { unsigned short inf_ = 0; starget_id_ = bot_check_target_alive(bl, pc_readreg(sd, add_str("@SP_BOT_TGID"))); if (starget_id_ > 0) { if (sce->val1 > 0) { switch (rand() % 10) { case 0: case 1: case 2: inf_ = bot_chec_khotkeys_is_skill(sd, 7); if (inf_ == 1) { unit_stop_attack(bl); unit_skilluse_id(bl, starget_id_, sta->hotkeys[7].id, sta->hotkeys[7].lv); } break; case 5: case 6: inf_ = bot_chec_khotkeys_is_skill(sd, 8); if (inf_ == 1) { unit_stop_attack(bl); unit_skilluse_id(bl, starget_id_, sta->hotkeys[8].id, sta->hotkeys[8].lv); } break; default: unit_attack(bl, starget_id_, 1); break; } } else { switch (rand() % 7) { case 0: case 1: case 2: case 3: case 4: inf_ = bot_chec_khotkeys_is_skill(sd, 7); if (inf_ == 1) { unit_skilluse_id(bl, starget_id_, sta->hotkeys[7].id, sta->hotkeys[7].lv); } break; case 5: case 6: inf_ = bot_chec_khotkeys_is_skill(sd, 8); if (inf_ == 1) { unit_skilluse_id(bl, starget_id_, sta->hotkeys[8].id, sta->hotkeys[8].lv); } break; } } } } } else {//Move bool flywing_ = false; if (bot_check_target(bl, starget_id_) == false) { if (tele_ > 7) { if (sta->hotkeys[0].type == 0 && sta->hotkeys[0].id == 601 && sta->hotkeys[0].lv == 0) { i_ = pc_search_inventory(sd, 601); if (i_ >= 0) { pc_useitem(sd, i_); flywing_ = true; } } if ((sta->sp > 20) && (flywing_ == false) && (sta->hotkeys[1].type == 1 && sta->hotkeys[1].id == AL_TELEPORT && sta->hotkeys[1].lv > 0)) { if (pc_checkskill(sd, AL_TELEPORT) > 0) { pc_randomwarp(sd, CLR_TELEPORT); status_heal(&sd->bl, 0, -(skill_get_sp(AL_TELEPORT, 1)), 1); flywing_ = true; } } if (flywing_ == true) pc_setreg(sd, add_str("@SP_BOT_TELE"), last_tick); } } if ((idle_ % 9 == 0 && idle_ > 0) || starget_id_ == 0) unit_walktoxy(&sd->bl, sd->bl.x + (rand() % 2 == 0 ? -1 : 1) * (rand() % 10), sd->bl.y + (rand() % 2 == 0 ? -1 : 1) * (rand() % 10), 0); } } status_change_timer(100 + tick, 1000, bl->id, data); return 0; } break;
  14. Hello everyone, Can i ask for help how i can do "if conditions or switch maybe, the option is yes or no only." I cannot find a reference anywhere, I am new in source coding and I know it is more technical than simple buildin function script but i hope to learn more into source coding. thank you so much. I found 1 reference clif_scriptmenu(sd, sd->bl.id, "yes:no"); //if select "yes" do {.....} //else if "no" do {.....} //else do {.....} OR switch(select) case "yes": case "no": default:
  15. That is what i am trying to achieve here. Using below but i cant figure how I can add rid of char id on the array for (int i = 0; i < DAMAGELOG_SIZE; i++) { map_session_data* sd = map_charid2sd(md->dmglog[i].id);
  16. Hi is there a script command to check if RIDs did damage to the monster?
  17. Actually, I already have a script that does that using addrid(4,.@x1-20,.@y1-20,.@x1+20,.@y1+20); which add rids of all players within the 20cellx20cell area around the mob. I want to filter out the players who did not damage the mob. Thank you
  18. Good Day everyone, I don't know if this script does make sense to you guys but I still hope you could help me achieve what I want to do here. What I am trying here is to attach all RIDs of players that are in the damagelog of the killedrid. I am not sure if I am on the right path. I've been learning source coding on different projects and got familiar with it but most of this code kinda strikes me with a lot of confusion about how it works so I can't solve it myself. Thank you so much, guys. BUILDIN_FUNC(addrid) { struct s_mapiterator* iter; struct block_list *bl; TBL_PC *sd; //IS THIS THE ATTACHED RID OF CHAR? ???? TBL_MOB* md = (TBL_MOB*)bl; //NEED TO ADD KILLEDRID DATE HERE???? if(st->rid < 1) { st->state = END; bl = map_id2bl(st->oid); } else bl = map_id2bl(st->rid); //if run without rid it'd error,also oid if npc, else rid for map iter = mapit_getallusers(); int type = script_getnum(st,2); bool forceflag = (script_hasdata(st,3) ? script_getnum(st,3) != 0 : 0); switch(type) { case 0: for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)) { if(!forceflag || !sd->st) if(sd->status.account_id != st->rid) //attached player already runs. run_script(st->script,st->pos,sd->status.account_id,st->oid); } break; case 1: for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)) { if(!forceflag || !sd->st) if((sd->bl.m == bl->m) && (sd->status.account_id != st->rid)) run_script(st->script,st->pos,sd->status.account_id,st->oid); } break; case 2: if(script_getnum(st,4) == 0) { script_pushint(st,0); mapit_free(iter); return SCRIPT_CMD_SUCCESS; } for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)) { if(!forceflag || !sd->st) if((sd->status.account_id != st->rid) && (sd->status.party_id == script_getnum(st,4))) //attached player already runs. run_script(st->script,st->pos,sd->status.account_id,st->oid); } break; case 3: if(script_getnum(st,4) == 0) { script_pushint(st,0); mapit_free(iter); return SCRIPT_CMD_SUCCESS; } for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)) { if(!forceflag || !sd->st) if((sd->status.account_id != st->rid) && (sd->status.guild_id == script_getnum(st,4))) //attached player already runs. run_script(st->script,st->pos,sd->status.account_id,st->oid); } break; case 4: map_foreachinallarea(buildin_addrid_sub, bl->m,script_getnum(st,4),script_getnum(st,5),script_getnum(st,6),script_getnum(st,7),BL_PC, st,forceflag);//4-x0 , 5-y0 , 6-x1, 7-y1 break; case 5: if (script_getstr(st, 4) == NULL) { script_pushint(st, 0); mapit_free(iter); return SCRIPT_CMD_FAILURE; } if (map_mapname2mapid(script_getstr(st, 4)) < 0) { script_pushint(st, 0); mapit_free(iter); return SCRIPT_CMD_FAILURE; } map_foreachinmap(buildin_addrid_sub, map_mapname2mapid(script_getstr(st, 4)), BL_PC, st, script_getnum(st, 3)); break; case 6: //ADDITION CODE ADD RID OF CHAR IDS IN DAMAGELOG OF THE KILLEDRID for (int i = 0; i < DAMAGELOG_SIZE; i++) { map_session_data* sd = map_charid2sd(md->dmglog[i].id); run_script(st->script, st->pos, sd->status.account_id, st->oid); } break; default: mapit_free(iter); if((map_id2sd(type)) == NULL) { // Player not found. script_pushint(st,0); return SCRIPT_CMD_SUCCESS; } if(!forceflag || !map_id2sd(type)->st) { run_script(st->script,st->pos,type,st->oid); script_pushint(st,1); } return SCRIPT_CMD_SUCCESS; } mapit_free(iter); script_pushint(st,1); return SCRIPT_CMD_SUCCESS; }
  19. Good Day everyone, I am trying to edit item_db where this item should stop stacking every 99 pcs. But it wont work. I also tried edited mmo.hpp #define MAX_AMOUNT 99 from 30000////Max amount of a single stacked item but also not working, well it stack at 99 but cannot carry more than 99 it gives message carry limit 30000. # Stack: Item stack amount. (Default: null) # Amount Maximum amount that can be stacked. # Inventory If the stack is applied to player's inventory. (Default: true) # Cart If the stack is applied to the player's cart. (Default: false) # Storage If the stack is applied to the player's storage. (Default: false) # GuildStorage If the stack is applied to the player's guild storage. (Default: false) - Id: 711 AegisName: Shoot Name: Shoot Type: Etc Buy: 16 Weight: 10 Flags: BuyingStore: true Stack: Amount: 99 - Id: 712 AegisName: Flower Name: Flower Type: Etc Buy: 2 Weight: 10 Stack: Amount: 99 Inventory: true Flags: BuyingStore: true
  20. Good Day Everyone, Please help me I want to make all cards in my inventory show in the select menu. Thank you so much, ~NOOB prontera,164,200,4 script selectcard 112,{ getinventorylist(); setarray .@menulist[0],0; .@j = 0; for (.@i = 0; .@i < @inventorylist_count; ++.@i) { .@idd = @inventorylist_id[.@i]; .@type = getiteminfo(.@idd,2); if (.@type == 6) { .@menulist[@j] = .@idd; .@j++; dispbottom .@menulist[@j]; } } for (.@i = 0; .@i < getarraysize(.@menulist); ++.@i) { .@menu$ = .@menu$ + getitemname(.@menulist[.@i]); .@menu$ = .@menu$ + ":"; .@part = .@menulist[select(.@menu$)]; } .@part = .@menulist[select(.@menu$)]; end; }
  21. Hello everyone, Can I ask for some help if someone has any script that uses clif_scriptinput that I can get a reference to? I want to learn how to use it. I want to learn to assign a value from an input to a variable. Thank you EDIT1: To be more detailed, I just want to make a @command where if you type the command it will pop up the input bar and assign that value to a variable inside the command script
  22. Hello everyone, Can anybody help me how should i put a new status change I am having this error everytime the system run sc_start4. I am not sure exactly what I am missing. Things I did already: 1. added src/map/script_constants.hpp export_constant(SC_BOT); 2. added doc/status_change.txt SC_BOT desc: autobot //I am not sure how this txt works val1: val4: 3. tried adding custom status at db/pre-re/status.yml - Status : SC_BOT //giving error says invalid status SC_BOT I am really sure how this list works 4. at src/map/status.hpp SC_BOT = 532, 5. I checked everywhere that has data for status changes but still failed. 6. I tried to follow this guide https://github.com/rathena/rathena/wiki/Adding_new_statuses but the files and some source functions are different now. Thank you so much and so much appreciate any help.
×
×
  • Create New...