Jump to content

n0tttt

Members
  • Posts

    303
  • Joined

  • Days Won

    12

Everything posted by n0tttt

  1. I fixed some typos and changed it a bit: https://pastebin.com/raw/tQy1eLNS I'd have changed more if I had a test server. Tell me how it goes.
  2. A lot of time since I don't diff, but try to use the last NEMO version: https://gitlab.com/4144/Nemo/-/archive/master/Nemo-master.zip I read something about translation not so much ago on the changelog. Try the Translate Client patch, it seems like it fixes it: http://nemo.herc.ws/patches/TranslateClient/
  3. Is it a custom command do you have? if not, use this: OnPCDieEvent: .@map$ = strcharinfo(3); if(inarray(.map$,.@map$) != -1){ for(.@y = 5; .@y; .@y--){ message strcharinfo(0),"You will respawn in "+.@y+" second"+((.@y > 1)?"s":"")+"."; sleep2 1000; } recovery 0; repairall; if(.size_buffs) { for(;.@i < .size_buffs;.@i+= 3) sc_start .buffs[.@i],.buffs[.@i + 1],.buffs[.@i + 2]; } warp .@map$,0,0; } end; OnInit: setarray .map$, "pvp_y_1-2","guild_vs2","guild_vs3"; // Buff Duration(ms) Lvl setarray .buffs, SC_INCREASEAGI, 5*60*1000, 10, SC_BLESSING, 5*60*1000, 10; .size_buffs = getarraysize(.buffs); end; You can add all the buffs you want in .buffs array.
  4. Here you go: OnPCDieEvent: .@map$ = strcharinfo(3); if(inarray(.map$,.@map$) != -1){ for(.@y = 5; .@y; .@y--){ message strcharinfo(0),"You will respawn in "+.@y+" second"+((.@y > 1)?"s":"")+"."; sleep2 1000; } recovery 0; repairall; atcommand "@buffs"; warp .@map$,0,0; } end; OnInit: setarray .map$, "pvp_y_1-2","guild_vs2","guild_vs3"; end;
  5. n0tttt

    event

    I didn't understand very well, but here you go: prontera,100,100,4 script Event 100,{ if(.event_open) { cutin "cutin",1; sleep2 5000; warp "map",x,y; } else { mes "Event is not open."; } close; OnMinute00: if(gettime(DT_HOUR)%4 == 0) { .event_open = 1; announce "Event is open for 5 minutes.",bc_all|bc_blue; sleep 5*60*1000; // 5 minutes open .event_open = 0; } end; }
  6. If you would like to keep the formula but reduce the chance, then use the first code I posted.
  7. As I understand, there's no fixed formula, because it varies with the dex and job. But, if you want 20% at max lvl, just change it to: rate = 4 * skill_lv; if I remember correctly, the max skill lv for this skill was 5. The part I did before was to have the 40% of the chance you said (50%). But I think I understand better now.
  8. I don't think you can without editing the client, but you can always have something like this: while(!.@s) { input .@add$; .@future_len = getstrlen(.@str$) + getstrlen(.@add$); if(.@add$ != " " && .@future_len <= 255) .@str$+= .@add$; if(.@future_len == 255) { mes "Max length."; break; } else if(.@future_len > 255) { mes "Max 255 characters."; } .@s = select("Ready.","Add.") - 1; } mes .@str$;
  9. You have to edit the skill in skill_db.txt and add 0x000010 to the inf3 value, which is: // 0x000010 - skill that could hit emperium So 434,9,6,1,0,0x1,0,3,1,yes,0,0,0,magic,0,0x0, SG_HATE,Hatred of the Sun Moon and Stars becomes: 434,9,6,1,0,0x1,0,3,1,yes,0,0,0,magic,0,0x10, SG_HATE,Hatred of the Sun Moon and Stars
  10. You have change the formula here in skill.cpp: case WL_EARTHSTRAIN: { int job_lv = 0; if (src->type == BL_PC) job_lv = ((TBL_PC*)src)->status.job_level; rate = 6 * skill_lv + job_lv / 4 + sstatus->dex / 10; break; } It seems like you might like it to have 40% of the original chance, so you can edit it like this and test: case WL_EARTHSTRAIN: { int job_lv = 0; if (src->type == BL_PC) job_lv = ((TBL_PC*)src)->status.job_level; rate = (6 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 40 / 100; break; }
  11. You can use the Hikirikawa script and add maps in the array you see in the end. I edited the script a bit to use inarray rather than the loop it used. OnPCDieEvent: .@map$ = strcharinfo(3); if(inarray(.map$,.@map$) != -1){ for(.@y = 5; .@y; .@y--){ message strcharinfo(0),"You will respawn in "+.@y+" second"+((.@y > 1)?"s":"")+"."; sleep2 1000; } recovery 0; warp .@map$,0,0; } end; OnInit: setarray .map$, "pvp_y_1-2","guild_vs2","guild_vs3"; end;
  12. Do you have rAthena updated at least to this commit? https://github.com/rathena/rathena/commit/c856b07c45aed6c5842ee19a940f7e76f780221c How did you kill the monster? By command or manually?
  13. It's because disablenpc gets executed twice. This should fix it: monster "1@pop1",50,53,"Guardian Chest",3733,1,"Erza::OnErzaDead"; warp "1@pop1",49,50; set hecho, 1; end; OnErzaDead: set .@id,killedgid; getunitdata .@id,.@data; set .@x,.@data[UMOB_X]; set .@y,.@data[UMOB_Y]; enablenpc "Chest Novice"; unitwarp getnpcid(0,"Chest Novice"),"1@pop1",.@x,.@y; sleep 500000; if(getmapxy(.@m$,.@x,.@y,UNITTYPE_NPC,"Chest Novice") != 0) disablenpc "Chest Novice"; end; 1@pop1,51,51,4 script Chest Novice 10005,{ rentitem 1599,1012000; rentitem 2199,1012000; disablenpc strnpcinfo(0); awake "Erza"; warp "prontera",58,59; end; } 
  14. Could you test this? monster "1@pop1",50,53,"Guardian Chest",3733,1,"Erza::OnErzaDead"; warp "1@pop1",49,50; set hecho, 1; end; OnErzaDead: set .@id,killedgid; getunitdata .@id,.@data; set .@x,.@data[UMOB_X]; set .@y,.@data[UMOB_Y]; enablenpc "Chest Novice"; unitwarp getnpcid(0,"Chest Novice"),"1@pop1",.@x,.@y; sleep 500000; disablenpc "Chest Novice"; end;
  15. Did a search on the forums and found this: https://rathena.org/board/topic/72930-help-with-this-script/?do=findComment&comment=149295 You can add all the skills you want there.
  16. Then this one might help: chase_range_rate: 100 I can't test right now but increasing the value will make mobs chase more.
  17. You could try to edit one of these in conf/battle/monsters.conf: // Defines various mob AI related settings. (Note 3) // 0x001: When enabled mobs will update their target cell every few iterations // (normally they never update their target cell until they reach it while // chasing) // 0x002: Makes mob use their "rude attack" skill (usually warping away) if they // are attacked and they can't attack back regardless of how they were // attacked (eg: GrimTooth), otherwise, their rude attack" is only activated // if they can't melee reach the target (eg: sniping) // 0x004: If not set, mobs that can change target only do so when attacked within a // distance of [attack range+1], otherwise mobs may change target and chase // ranged attackers. This flag also overrides the 'provoke' target. // 0x008: When set, mobs scatter as soon as they lose their target. Use this mode // to make it much harder to mob-train by hiding and collecting them on a // single spot (ie: GrimTooth training) // 0x010: If set, mob skills defined for friends will also trigger on themselves. // 0x020: When set, the monster ai is executed for all monsters in maps that // have players on them, instead of only for mobs who are in the vicinity // of players. // 0x040: When set, when the mob's target changes map, the mob will walk towards // any npc-warps in it's sight of view (use with mob_warp below) // 0x080: If not set, mobs on attack state will only change targets when attacked // by normal attacks. Set this if you want mobs to also switch targets when // hit by skills. // 0x100: When set, a mob will pick a random skill from it's list and start from // that instead of checking skills in orders (when unset, if a mob has too // many skills, the ones near the end will rarely get selected) // 0x200: When set, a mob's skill re-use delay will not be applied to all entries of // the same skill, instead, only to that particular entry (eg: Mob has heal // on six lines in the mob_skill_db, only the entry that is actually used // will receive the delay). This will make monsters harder, especially MvPs. // 0x400: Set this to make mobs have a range of 9 for all skills. Otherwise, they // will obey the normal skill range rules. // 0x800: When set, monsters that are provoked will always change target to the // provoking person, even if they would usually not change target on attack. // Example: 0x140 -> Chase players through warps + use skills in random order. monster_ai: 0 // How often should a monster rethink its chase? // 0: Every 100ms (MIN_MOBTHINKTIME) // 1: Every cell moved // 2: Every 2 cells moved // 3: Every 3 cells moved (official) // x: Every x cells moved // Regardless of this setting, a monster will always rethink its chase if it has // reached its target. Increase this value if you want to make monsters continue // moving after they lost their target (hide, no line of sight, etc.). monster_chase_refresh: 3 // Chase Range is the base minimum-chase that a mob gives before giving up // (as long as the target is outside their field of view). This is the range3 // column in the mob_db. (Note 2) chase_range_rate: 100 But I don't fully understand what you mean.
  18. You could try this, I added a new requirement. It's not the best way (didn't want to change that much) though. //===== rAthena Script ======================================= //= Euphy's Forja //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6c //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A dynamic Forja based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.2 Added category support. //= 1.3 More options and fixes. //= 1.4 Added debug settings. //= 1.5 Replaced categories with shop IDs. //= 1.6 Added support for purchasing stackables. //= 1.6a Added support for previewing costumes and robes. //= 1.6b Added 'disable_items' command. //= 1.6c Replaced function 'A_An' with "F_InsertArticle". //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; // ADD YOUR NPC HERE //============================================================ prt_in,65,71,3 script Forja#1 111,{ callfunc "qshop"; } // prontera,165,203,6 script Forja#2 998,{ callfunc "qshop",1,2; } // call the shop 1 and 2 defined below // etc.. Add your Shop NPCs 'Forja#XXX' here //============================================================ // Script Core - DO NOT DUPLICATE THIS NPC !!!!!!!!!!!!! //============================================================ - script quest_shop -1,{ function Add; function Chk; function Slot; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0], "#CASHPOINTS", "Cash Points"; //===================================================================================== // ------------------- ADD YOUR SHOPS NAME AND ITEMS SHOPS STARTING HERE -------------- //===================================================================================== // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1], "Elmos", // Shop Named 1 "Armas", // Shop Named 2 "Escudos"; // Shop Named 3 // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>,<required level>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- // Shop 1 Add(1,2299,1,20,0,0,7297,0,969,0,999,0,714,1); Add(1,5017,1,20,0,0,7297,0,969,0,999,0,714,1); Add(1,5022,1,20,0,0,7297,0,969,0,999,0,714,1); Add(1,5128,1,20,0,0,7297,0,969,0,999,0,714,1); Add(1,5157,1,40,0,0,7297,0,969,0,999,0,714,1); Add(1,5171,1,40,0,0,7297,0,969,0,999,0,714,1); Add(1,5217,1,40,0,0,7297,0,969,0,999,0,714,1); Add(1,5292,1,40,0,0,7297,0,969,0,999,0,714,1); // Shop 2 Add(2,1224,1,60,0,0,7297,0,969,0,999,0,714,1); Add(2,1225,1,60,0,0,7297,0,969,0,999,0,714,1); Add(2,1226,1,60,0,0,7297,0,969,0,999,0,714,1); Add(2,1227,1,60,0,0,7297,0,969,0,999,0,714,1); // Shop 3 Add(3,2102,1,80,0,0,7297,0,969,0,999,0,714,1); Add(3,2103,1,80,0,0,7297,0,969,0,999,0,714,1); Add(3,2105,1,80,0,0,7297,0,969,0,999,0,714,1); Add(3,2107,1,80,0,0,7297,0,969,0,999,0,714,1); // ----------------------------------------------------------- //===================================================================================== // ------------------- YOUR SHOPS AND ITEMS SHOPS HAVE BEEN ADDED --------------------- //===================================================================================== freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshop"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set @shop_index, select(.menu$); else if (.@size == 1) set @shop_index, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set @shop_index, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[@shop_index] == "") { message strcharinfo(0),"Ocorreu um erro."; end; } dispbottom "Selecione um item de cada vez."; callshop "qshop"+@shop_index,1; npcshopattach "qshop"+@shop_index; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+@shop_index+"_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+@shop_index+"_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; set .@lvl,getd(".q_lvl_"+@q[0]); if (BaseLevel < .@lvl) { message strcharinfo(0),"You need to be at least level "+.@lvl+" to buy "+getitemname(.@q[0])+"."; end; } if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"Você não pode comprar essa quantia "+getitemname(.@q[0])+"."; end; } mes "[Forja]"; mes "Item: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Itens necessários:"; disable_items; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT))) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Forjar ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Visualizar":"")+": ~ ^777777Fechar^000000")) { case 1: if (@qe[0]) { mes "[Forja]"; mes "Falta um item ou mais.."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Forja]"; mes "^FF0000Você precisa "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" capacidade de peso adicional para concluir este comércio.^000000"; close; } mes "[Forja]"; mes "Forjando aguarde..."; soundeffect "weapon_forj.wav", 0; progressbar "0xRRGGBB",20; if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; mes "Item forjado com sucesso..."; getnameditem .@q[0],strcharinfo(0); soundeffect "bs_refinesuccess.wav", 0; specialeffect2 EF_FLOWERLEAF; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; changelook LOOK_ROBE, @qe[6]; } deletearray @qe[0],8; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Item #"+getarg(1)+" inválido (skipped)."; return; } setarray .@j[0],getarg(2),getarg(4),getarg(5); for(set .@i,6; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Itens necessários #"+getarg(.@i)+" inválido (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); setd ".q_lvl_"+getarg(1),getarg(3); npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } } function script qshop { deletearray @i[0],getarraysize(@i); for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "quest_shop::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop1 -1,909:-1 - shop qshop2 -1,909:-1 - shop qshop3 -1,909:-1 - shop qshop4 -1,909:-1 - shop qshop5 -1,909:-1
  19. Yes, as Psy said you have to do this: setbattleflag "mob_count_rate",150; But this topic is kinda old so he probably already got the answer.
  20. First try with the latest version: https://raw.githubusercontent.com/rathena/rathena/master/npc/custom/quests/hunting_missions.txt
  21. Cold you try this? - script HappyHour -1,{ function set_rates; OnMinute01: if(gettime(DT_HOUR)%2) { set_rates(1,"base_exp_rate","job_exp_rate","item_rate_common","item_rate_common_boss","item_rate_common_mvp","item_rate_heal_boss","item_rate_heal_mvp","item_rate_equip_boss","item_rate_heal","item_rate_use","item_rate_equip","item_rate_card","item_rate_mvp","item_rate_treasure"); announce "HAPPY HOUR IS NOW ACTIVE.",0; } else { set_rates(2,"base_exp_rate","job_exp_rate","item_rate_common","item_rate_common_boss","item_rate_common_mvp","item_rate_heal_boss","item_rate_heal_mvp","item_rate_equip_boss","item_rate_heal","item_rate_use","item_rate_equip","item_rate_card","item_rate_mvp","item_rate_treasure"); announce "HAPPY HOUR HAS ENDED.",0; } end; OnInit: // Put here your original rates. // base job items set .@original_rates[0], 100, 100, 100; set_rates(.@original_rates[0],"base_exp_rate"); set_rates(.@original_rates[1],"job_exp_rate"); set_rates(.@original_rates[2],"item_rate_common","item_rate_common_boss","item_rate_common_mvp","item_rate_heal_boss","item_rate_heal_mvp","item_rate_equip_boss","item_rate_heal","item_rate_use","item_rate_equip","item_rate_card","item_rate_mvp","item_rate_treasure"); end; function set_rates { .@type = getarg(0); .@args = getargcount(); for(.@i = 1;.@i < .@args;.@i++) { if(.@type == 1) setbattleflag getarg(.@i),getbattleflag(getarg(.@i))*2, .@i/(.@args - 1); else if(.@type == 2) setbattleflag getarg(.@i),getbattleflag(getarg(.@i))/2, .@i/(.@args - 1); else setbattleflag getarg(.@i),.@type, .@i/(.@args - 1); } return; } }
  22. - script Item_Drop -1,{ OnNPCKillEvent: .@mob_id = killedrid; getmapxy .@m$,.@x,.@y,UNITTYPE_PC; getmobdrops .@mob_id; .@n = $@MobDrop_count; copyarray .@mob_item,$@MobDrop_item,.@n; for(;.@i < .@n;.@i++) { if(getareadropitem(.@m$,.@x - 15,.@y - 15,.@x + 15,.@y + 15,.@mob_item[.@i])) dispbottom "Dropped "+getitemname(.@mob_item[.@i]); } end; }
  23. I don't know, since I don't really see events here (maybe the gotos can be considered? I doubt). Anyways, I did a bit of optimization: function script F_botex { set .@i,0; while (.@i < 1) { set .@b,0; dispbottom .@i+""; .@rid = getcharid(3); getmapxy(.@m$,.@x0,.@y0,0); sleep2 100; .@x = rand(-13,13)+.@x0; .@y = rand(-13,13)+.@y0; sleep2 100; if(!checkcell( .@m$,.@x,.@y,cell_chkpass )){ dispbottom "Coordinate not exists!"; continue; } else if(checkcell( .@m$,.@x,.@y,cell_chkpass )){ dispbottom "Coordinate exists!"; } sleep2 100; while(.@x0 != .@x && .@y0 != .@y) { set .@b,.@b+1; viewpoint 1,.@x,.@y,1,0xFF0000; dispbottom "auto walking to x = "+.@x+" y = "+.@y; unitwalk getcharid(3),.@x,.@y,strnpcinfo(3)+"::OnReach"; sleep2 2000; if(.@b > 5) break; getmapxy(.@m$,.@x0,.@y0,0); sleep2 100; } unitskilluseid .@rid,"WL_JACKFROST",5,.@rid,-4; percentheal 100,100; sleep2 100; dispbottom "JackJack"; } end; }
  24. prontera,140,140,4 script MvP Warper 4_M_RACHMAN2,{ .@party = getcharid(1); .@event$ = "put here your monster event"; if(.@party) { if(mobcount(.map$,.@event$) && is_party_leader() && !.party) { warp .map$,0,0; .party = .@party; } else if(!is_party_leader() && .party == .@party) { .@leader = getpartyleader(.@party,2); if(strcharinfo(3,.@leader) == .map$ && getvar(HP,.@leader) > 0) warp .map$,0,0; else mes "Leader is not alive."; } else if(.party) { mes "Another party is registered."; } } else if(!.@party) { mes "You must be in a party."; } close; OnPCDieEvent: if(strcharinfo(3) == .map$) { .@map_u = getmapusers(.map$); .@party = getcharid(1); if(.@party) { getpartymember .@party,1,.@party_cid; getpartymember .@party,2,.@party_aid; .@n = $@partymembercount; for(;.@i < .@n;.@i++) { if(isloggedin(.@party_aid[.@i],.@party_cid[.@i])) { if(getvar(HP,.@party_cid[.@i]) <= 0 && strcharinfo(3,.@party_cid[.@i]) == .map$) .@dead++; } } detachrid; if(.@dead >= .@map_u) { sleep 3*60*1000; .party = 0; mapwarp .map$,"prontera",0,0; } } } end; OnInit: .map$ = "map"; end; } And you have to add this to the event you have on your other script: (event when mvp dead, something like OnMvPDead:) sleep 60*1000; .party = 0; mapwarp "map","prontera",0,0; end; I think can code the "idle" function, but I don't recommend you that, since it can cause some lag.
  25. There was no command. Could you try this? // https://rathena.org/board/topic/107940-bomb-poring-script-need-help/ prontera,175,210,4 script Bomb Poring 1904,{ OnRegister: if(getvariableofnpc( .start, "runordie" ) != 1) { if ( getvariableofnpc( .aidtotal, "runordie" ) >= 100 ) { // 100 participant max mes "["+strnpcinfo(0)+"]"; mes "I'm sorry, the room is full"; close; } mes "["+strnpcinfo(0)+"]"; mes "EI! voce gostaria de se unir a mim?"; next; if(select("Participar do evento!:Sair do evento!") == 2) end; percentheal 100, 100; warp "quiz_02", 334,345; .@size = getvariableofnpc( .aidtotal, "runordie" ); // if someone just registered set getvariableofnpc( .aid[ .@size ], "runordie" ), getcharid(3); set getvariableofnpc( .aidtotal, "runordie" ), .@size +1; end; } else { mes "["+strnpcinfo(0)+"]"; mes "Desculpe o evento esta desativado no momento."; close; } } - script runordie -1,{ OnInit: bindatcmd "runordie", strnpcinfo(0)+"::OnStart", 99,100; bindatcmd "je", "Bomb Poring::OnRegister"; .onesec = 1000; // use for script debugging... set to 100 to make the announcement run faster end; OnStart: OnClock0010: OnClock0110: OnClock0210: OnClock0310: OnClock0356: OnClock0420: OnClock0610: OnClock0710: OnClock0810: OnClock0910: OnClock1010: OnClock1110: OnClock1210: OnClock1310: OnClock1410: OnClock1510: OnClock1610: OnClock1710: OnClock1810: OnClock1910: OnClock2010: OnClock2110: OnClock2210: OnClock2310: deletearray .aid; .aidtotal = 0; mapwarp "quiz_02", "prontera", 140,76; killmonsterall "quiz_02"; .start = 1; announce "Bomb Poring event is on!",bc_all,0xffccff; sleep 4 * .onesec; announce "To participate in this event please talk to me at upper part of prontera beside reset girl!",bc_all,0xffccff; sleep 6 * .onesec; announce "You only have 1 minute to register on this event!",bc_all,0xffccff; sleep 20 * .onesec; announce "30 seconds left before registration is closed!",bc_all,0xffccff; sleep 10 * .onesec; announce "To participate in this event (@je)!",bc_all,0xffccff; sleep 10 * .onesec; announce "Last 10 seconds for registrations!",bc_all,0xffccff; sleep 5 * .onesec; announce "Bomb Poring : 5",bc_all,0xffccff; sleep 1000; announce "Bomb Poring : 4",bc_all,0xffccff; sleep 1000; announce "Bomb Poring : 3",bc_all,0xffccff; sleep 1000; announce "Bomb Poring : 2",bc_all,0xffccff; sleep 1000; announce "Bomb Poring : 1",bc_all,0xffccff; sleep 1000; .start = 2; announce "Event is now closed.",bc_all,0xffccff; if ( .aidtotal < 2 ) { // cannot start event if nobody joins(0) or just having (1) player announce "Bomb Poring is canceled not enough players to continue!",bc_all,0xffccff; mapwarp "quiz_02", "prontera", 160,168; deletearray .aid; .aidtotal = 0; .start = 0; end; } mapannounce "quiz_02", "Welcome Bomb Poring!",bc_map,0xffccff; sleep 3 * .onesec; mapannounce "quiz_02", "To the players don't know this event, It its very simple!",bc_map,0xffccff; sleep 3 * .onesec; mapannounce "quiz_02", "You just need to stay AWAY from anything that you think its DANGEROUS!!",bc_map,0xffccff; sleep 3 * .onesec; mapannounce "quiz_02", "Stay alive no matter what!",bc_map,0xffccff; sleep 3 * .onesec; mapannounce "quiz_02", "The LAST SURVIVOR will be the WINNER",bc_map,0xffccff; sleep 3 * .onesec; mapannounce "quiz_02", "Event will start in 3....",bc_map,0xffccff; sleep 1 * .onesec; mapannounce "quiz_02", "2...",bc_map,0xffccff; sleep 1 * .onesec; mapannounce "quiz_02", "1..",bc_map,0xffccff; sleep 1 * .onesec; mapannounce "quiz_02", "Start Running Now!",bc_map,0xffccff; while ( .start ) { .@more += rand(1,2); monster "quiz_02", 0,0, "Come On Baby!!!", 1904, 2 + .@more, "", 0; monster "quiz_02", 0,0, "Come On Baby!!!", 1904, 2 + .@more, "", 1; monster "quiz_02", 0,0, "Come On Baby!!!", 1904, 2 + .@more, "", 2; sleep 5000; } end; OnPCDieEvent: OnPCLogoutEvent: if ( strcharinfo(3) == "quiz_02" && .start ) { if ( .aidtotal > 1 ) { for ( .@i = .aidtotal - 1; .@i >= 0; .@i-- ) { if ( getcharid(3) == .aid[.@i] ) { deletearray .aid[.@i], 1; .aidtotal--; } } } if ( .aidtotal == 1 ) { .start = 0; killmonsterall "quiz_02"; announce "Congratulations ~ the winner is "+ rid2name(.aid),bc_all,0xffccff; sleep 5000; if ( isloggedin( .aid ) ) { attachrid .aid; getitem 20080,5; // winner prize warp "prontera", 160,168; } deletearray .aid; .aidtotal = 0; } } end; } quiz_02 mapflag nowarp quiz_02 mapflag noreturn quiz_02 mapflag nowarpto quiz_02 mapflag noteleport quiz_02 mapflag nosave SavePoint quiz_02 mapflag noskill quiz_02 mapflag nomemo quiz_02 mapflag nopenalty quiz_02 mapflag noicewall
×
×
  • Create New...