Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Community Answers

  1. AnnieRuru's post in Race to 99 Per Class was marked as the answer   
    mine -> https://rathena.org/board/topic/75015-asking-for-a-prize-npc/
    pajodex -> https://rathena.org/board/topic/115293-race-to-99-rewards/#comment-344269
    the similarity is there is always a permanent global variable, and your script is missing this thing
    heh ... you got potential ... so I refrain from doing this one ?
  2. AnnieRuru's post in Help stylist restriction bodystyle 2 was marked as the answer   
    @JinYuichi
    https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/stylist/stylist_r2.0.txt
  3. AnnieRuru's post in disable @autopot by checking pc_block PCBLOCK_SKILL was marked as the answer   
    @Mael oh that, players can enable the command and bring it into the map ...
    OnStart: if (!getstatus(SC_BERSERK) && !getstatus(SC_SATURDAYNIGHTFEVER) && !getstatus(SC_GRAVITATION) && !getstatus(SC_TRICKDEAD) && !getstatus(SC_HIDING) && !getstatus(SC__SHADOWFORM) && !getstatus(SC__INVISIBILITY) && !getstatus(SC__MANHOLE) && !getstatus(SC_KAGEHUMI) && !getstatus(SC_HEAT_BARREL_AFTER) && !getstatus(SC_STONE) && !getstatus(SC_FREEZE) && !getstatus(SC_STUN) && !getstatus(SC_SLEEP) && !getmapflag(strcharinfo(3), MF_BATTLEGROUND) && !getmapflag(strcharinfo(3), MF_PVP) && !getmapflag(strcharinfo(3), MF_GVG)) { its more like replacing with this condition, so it doesn't trigger with mapflags
  4. AnnieRuru's post in Run and Hide Script was marked as the answer   
    event script .... oh yeah its been a while ...
    rathena doesn't have OnUntouch: label ... but I think its still do-able with setpcblock after trigger OnTouch label
    https://github.com/AnnieRuru/Release/blob/master/scripts/Games %26 Events/Run and Hide/runandhide_0.2r.txt
    .... as usual there are always some people trying to ruin my fun =/

    also that event script that @Poring King link to ... doesn't really fit the description in this topic,
    this one wants a several npc for players to hide, and I think only 1 npc for each player ? because he said
    mean once a player stand next to an npc, the npc will also goes into hiding
    that event script only has 1 set of npc doing specialeffect and ALL players are force to stand in that location
  5. AnnieRuru's post in #cashpoints command was marked as the answer   
    - script command_controller -1,{ OnInit: bindatcmd("roks", strnpcinfo(0) +"::OnRoks", 99, 99); end; OnRoks: if (!getstrlen(.@atcmd_parameters$)) { message strcharinfo(0), "Please input a player name."; end; } .@aid = getcharid(3, .@atcmd_parameters$); if (!.@aid) { message strcharinfo(0), "Player not online or not found."; end; } .@origin$ = strcharinfo(0); attachrid .@aid; message .@origin$, "This player has "+ #CASHPOINTS +" RoK Points"; end; } com'on don't have to write everything out ... right ?
  6. AnnieRuru's post in Costume Exchange NPC was marked as the answer   
    https://gist.github.com/AnnieRuru/ecbbc25159e9dc6ab2b275aa9475df0f
    hahaha our conversation on discord is 100x more exiting on the forum XD
  7. AnnieRuru's post in max weight reduction was marked as the answer   
    answer all your question
    set MaxWeight, MaxWeight - 1000; yes,  I remember there was a bug report that merchant's increase weight limit doesn't work properly after using MaxWeight constant
    however after me suggesting adding `bAddMaxWeight` the problem is gone
    there shouldn't be any problem as the weight formula is calculate properly if using bAddMaxWeight -> eg: if they equip this item they immediately overweight if low strength
    bonus bAddMaxWeight, -1000;  
  8. AnnieRuru's post in Reset NPC - 10 Stat Points was marked as the answer   
    prontera,155,185,5 script fhdskdjf 1_F_MARIA,{ mes "select a stat to reduce by 10"; next; .@s = select("Str","Agi","Vit","Int","Dex","Luk") -1; for (.@i = 0; .@i < 10; ++.@i) { if (readparam(.stat[.@s]) == 1) break; statusup2 .stat[.@s], -1; StatusPoint += needed_status_point(.stat[.@s], 1); } close; OnInit: setarray .stat, bStr, bAgi, bVit, bInt, bDex, bLuk; end; }  
  9. AnnieRuru's post in Dead/Bloody Branch Timer was marked as the answer   
    can only be done with source edits
    src/map/mob.cpp | 9 +++++++++ src/map/mob.hpp | 1 + src/map/unit.cpp | 11 +++++++++++ 3 files changed, 21 insertions(+) diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 3e0b54f37..686c30ac1 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -708,6 +708,15 @@ int mob_once_spawn(struct map_session_data* sd, int16 m, int16 x, int16 y, const //"I understand the "Aggressive" part, but the "Can Move" and "Can Attack" is just stupid" - Poki#3 sc_start4(NULL,&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE|MD_CANATTACK|MD_CANMOVE|MD_ANGRY, 0, 60000); } + + if (md != NULL) { + if (mob_id < 0) { + md->special_state.deadbranch = 1; + md->deletetimer = add_timer(gettick()+5000,mob_timer_delete,md->bl.id,0); + } + else + md->special_state.deadbranch = 0; + } return (md) ? md->bl.id : 0; // id of last spawned mob } diff --git a/src/map/mob.hpp b/src/map/mob.hpp index 5b47b8c6f..37921599c 100644 --- a/src/map/mob.hpp +++ b/src/map/mob.hpp @@ -189,6 +189,7 @@ struct mob_data { unsigned int size : 2; //Small/Big monsters. enum mob_ai ai; //Special ai for summoned monsters. unsigned int clone : 1;/* is clone? 1:0 */ + unsigned int deadbranch : 1; /* summon from branch */ } special_state; //Special mob information that does not needs to be zero'ed on mob respawn. struct s_MobState { unsigned int aggressive : 1; //Signals whether the mob AI is in aggressive mode or reactive mode. [Skotlex] diff --git a/src/map/unit.cpp b/src/map/unit.cpp index 15632f201..b42668a1d 100644 --- a/src/map/unit.cpp +++ b/src/map/unit.cpp @@ -2420,6 +2420,17 @@ int unit_attack(struct block_list *src,int target_id,int continuous) if(ud->attacktimer != INVALID_TIMER) return 0; + if (target_id != 0) { + struct block_list *target_bl = map_id2bl(target_id); + if (target_bl->type == BL_MOB) { + struct mob_data *md = map_id2md(target_id); + if (md->special_state.deadbranch == 1 && md->deletetimer != INVALID_TIMER) { + delete_timer(md->deletetimer, mob_timer_delete); + md->deletetimer = add_timer(gettick() + 5000, mob_timer_delete, md->bl.id, 0); + } + } + } + // New action request received, delete previous action request if not executed yet if(ud->stepaction || ud->steptimer != INVALID_TIMER) unit_stop_stepaction(src); I tested with 5000 = 5 seconds, change them into 60000
  10. AnnieRuru's post in Mes Override was marked as the answer   
    then shouldn't use time limit, just set another npc variable for it
    prontera,150,185,0 script test override 1_F_MARIA,{ .@difficulty = 3; // official script only has 3 digits ... sux ... maximum is 9 btw if ( .start == 0 ) { if ( getgmlevel() != 99 ) { dispbottom "only GM can activate this event."; end; } F_ShuffleNumbers 1, 9, .@r, .@difficulty; for ( .@i = 0; .@i < .@difficulty; ++.@i ) .guess += .@r[.@i] * (10 ** .@i); // change 10**.@i into pow(10,.@i) for rathena dispbottom "input this number -> "+ .guess; .start = 1; end; } else if ( .start == 1 ) { input .@num; if ( .start != 1 ) { // <--- THIS is what you need dispbottom "the guessing time has over"; end; } if ( .@num != .guess ) { // Let's do some MATH !! if ( .@num < 10 ** (.@difficulty -1) || .@num >= 10 ** .@difficulty ) { dispbottom "Number input requirement has not been fulfilled. Please enter a "+ .@difficulty +" digit number."; end; } for ( .@i = 0; .@i < .@difficulty; ++.@i ) .@n[.@i] = .@num / ( 10**.@i ) % 10; for ( .@i = 0; .@i < .@difficulty; ++.@i ) { if ( .@n[.@i] == 0 ) { dispbottom "Violation of number input parameter. Number 0 has been input."; end; } if ( countstr( .@num +"", .@n[.@i] +"" ) > 1 ) { dispbottom "Violation of number input parameter. Number has been input more than once."; end; } } for ( .@i = 0; .@i < .@difficulty; ++.@i ) { if ( compare( .guess +"", .@n[.@i] +"" ) ) ++.@has_number; if ( charat( .@num +"", .@i ) == charat( .guess +"", .@i ) ) ++.@correct_pos; } dispbottom "Your guess has "+ .@has_number +" digit of number that is on the answer, and "+ .@correct_pos +" digit having same position with the answer."; end; } npctalk strcharinfo(0) +" has guess correctly"; getitem Apple, 1; .start = .guess = 0; end; } }  
  11. AnnieRuru's post in Delete only an equiped item. was marked as the answer   
    Method 1 - just unequip the item
    prontera,155,185,5 script khfskjdfh 1_F_MARIA,{ for ( .@i = 1; .@i <= 10; ++.@i ) if ( getequiprefinerycnt(.@i) >= 7 ) unequip .@i; end; } Method 2 - delete the item
    prontera,158,185,5 script khfskjdfh2 1_F_MARIA,{ getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( (@inventorylist_equip[.@i] & 1023) && @inventorylist_refine[.@i] >= 7 ) { if ( @inventorylist_option_id1[.@i] ) { // that's why rathena random option check so sux, still has to fall back to delitem2 setarray .@option_id, @inventorylist_option_id1[.@i], @inventorylist_option_id2[.@i], @inventorylist_option_id3[.@i], @inventorylist_option_id4[.@i], @inventorylist_option_id5[.@i]; setarray .@option_value, @inventorylist_option_value1[.@i], @inventorylist_option_value2[.@i], @inventorylist_option_value3[.@i], @inventorylist_option_value4[.@i], @inventorylist_option_value5[.@i]; setarray .@option_parameter, @inventorylist_option_parameter1[.@i], @inventorylist_option_parameter2[.@i], @inventorylist_option_parameter3[.@i], @inventorylist_option_parameter4[.@i], @inventorylist_option_parameter5[.@i]; delitem3 @inventorylist_id[.@i], @inventorylist_amount[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i], .@option_id, .@option_value, .@option_parameter; } else delitem2 @inventorylist_id[.@i], @inventorylist_amount[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i]; } } end; }  
    btw if you are thinking of denying players to use high refine in a pvp map or event map, after you delete the item player still can equip inside the map
    you have to create your own mapflag in this case
  12. AnnieRuru's post in Give Reward use unique_id was marked as the answer   
    - script WoE Reward FAKE_NPC,{ OnAgitEnd: callsub S_AgitEnd, 0, 20; OnAgitEnd2: callsub S_AgitEnd, 20, 30; S_AgitEnd: .@start = getarg(0); .@end = getarg(1); for ( .@i = .@start; .@i < .@end; ++.@i ) { .@guild_id = getcastledata( .castle$[.@i], CD_GUILD_ID ); if ( .@guild_id ) { deletearray .@unique_id; getguildmember .@guild_id, 1; getguildmember .@guild_id, 2; for ( .@j = 0; .@j < $@guildmembercount; ++.@j ) { if ( isloggedin( $@guildmemberaid[.@j], $@guildmembercid[.@j] ) ) { attachrid $@guildmemberaid[.@j]; if ( inarray( .@unique_id, get_unique_id() ) == -1 ) { dispbottom "Reward given for conquered "+ getcastlename(.castle$[.@i]) +"("+ .castle$[.@i] +")"; getitem 31509, 1; getitem 12103, 1; getitem 16770, 1; getitem 6380, 15; getitem 31510, 1; .@unique_id[ getarraysize(.@unique_id) ] = get_unique_id(); } } } } } end; OnInit: setarray .castle$[0], "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; end; } somehow I was expecting him to post a reply, but he edit the 1st post instead, so I bump
  13. AnnieRuru's post in Updated Annieruru Dota PVP ladder was marked as the answer   
    pajodex asked this question over discord, so this was answered there
    http://herc.ws/board/topic/7014-who-has-annierurus-pvp-ladder-with-announcement-files-and-sql-queries/?do=findComment&comment=42630
    well, even if I make an updated version, it will be hercules only,
    since rathena<->hercules are getting further apart
  14. AnnieRuru's post in NPC that pushes away the player was marked as the answer   
    guild_vs2,50,50,5 script #asdf HIDDEN_WARP_NPC,3,3,{ end; OnTouch: getmapxy .@map$, .@x, .@y, UNITTYPE_PC; dispbottom .@x +" "+ .@y; if ( .@x == 47 ) pushpc DIR_WEST, 1; else if ( .@x == 53 ) pushpc DIR_EAST, 1; else if ( .@y == 47 ) pushpc DIR_SOUTH, 1; else if ( .@y == 53 ) pushpc DIR_NORTH, 1; end; } hercules code, you know how to convert
  15. AnnieRuru's post in @costumeitem add +1 allstats? was marked as the answer   
    "@costumeitem" came from this topic
    the item bonus came from the <Script> field itself ...
    if you want to add bonuses to the costume item, either make a new shadow item ... or add random option to the costume ...
  16. AnnieRuru's post in PVP announce request was marked as the answer   
    if(!getgmlevel() || .Options&512){ // 512: Allow GMs to Join PvP .Options = 1|2|4|8|16|32|128|256|1024;//|2048|4096; you probably test this script with a GM account
    either enable the .Options|512 bits, or remove the .Options&512 checks
  17. AnnieRuru's post in Npc who change the job sprite was marked as the answer   
    prontera,147,174,5 script Change Dress 509,{ if ( !(eaclass() & EAJL_THIRD) || BaseJob == Job_SuperNovice ) { mes "I'm sorry, but you do not have 3rd class."; close; } mes "Hi "+strcharinfo(0)+" do you want to change your dress?"; next; if ( select ( "Yes", "No" ) == 2 ) close; if ( Zeny < 100000000 ) { mes "You need 100,000,000 Zeny"; close; } .@s = select("Primary Dress", "Second Dress") -1; if ( getlook(LOOK_BODY2) == .@s ) { mes "You already wearing that dress"; close; } setlook LOOK_BODY2, .@s; Zeny -= 100000000; mes "Done!"; close; } this script was like... just few topics down below ...
  18. AnnieRuru's post in Script Tarot was marked as the answer   
    I know about the Tarot Card of Fate event script
    but its too similar to Roulette script isn't it ?
    you just sit there AFK, and just wait for the npc to cast the skill effect on you
    its a very boring event
    and when I made the Russian Roulette script, I couldn't exactly make it happen having a last survivor at 3 rounds
    the npc just randomly shot someone dead in 1/6 chance
    Tarot Card of Fate have 14 cards, but only 3 of them dealing damage - The Chariot , The Devil, The Tower,
    not exactly killing them either
  19. AnnieRuru's post in ICE WALL - Block Long range was marked as the answer   
    src/map/skill.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 1864faeec..92a79e3e9 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -18026,8 +18026,8 @@ struct skill_unit *skill_initunit(struct skill_unit_group *group, int idx, int x // Perform oninit actions switch (group->skill_id) { case WZ_ICEWALL: - map_setgatcell(unit->bl.m,unit->bl.x,unit->bl.y,5); - clif_changemapcell(0,unit->bl.m,unit->bl.x,unit->bl.y,5,AREA); + map_setgatcell(unit->bl.m,unit->bl.x,unit->bl.y,1); + clif_changemapcell(0,unit->bl.m,unit->bl.x,unit->bl.y,1,AREA); skill_unitsetmapcell(unit,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,true); break; case SA_LANDPROTECTOR: answer is change gat type 5 into gat type 1
    because the map_get2cell function say so .. in src\map\map.cpp
    // gat system inline static struct mapcell map_gat2cell(int gat) { struct mapcell cell; memset(&cell,0,sizeof(struct mapcell)); switch( gat ) { case 0: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // walkable ground case 1: cell.walkable = 0; cell.shootable = 0; cell.water = 0; break; // non-walkable ground case 2: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? case 3: cell.walkable = 1; cell.shootable = 1; cell.water = 1; break; // walkable water case 4: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? case 5: cell.walkable = 0; cell.shootable = 1; cell.water = 0; break; // gap (snipable) case 6: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? default: ShowWarning("map_gat2cell: unrecognized gat type '%d'\n", gat); break; } return cell; }  
  20. AnnieRuru's post in Custom "Woe" was marked as the answer   
    100% scripting
    btw scripting is my absolute strong point
    https://irowiki.org/wiki/War_of_Emperium#Benefits
    - script ksdjfs FAKE_NPC,{ OnMinute00: for ( .@i = 0; .@i < 20; ++.@i ) { if ( getcastledata( .castle$[.@i], CD_GUILD_ID ) ) { if ( rand(100) < 50 ) { // 50% chance setcastledata .castle$[.@i], CD_GUILD_ID, 0; donpcevent "Agit#"+ .castle$[.@i] +"::OnStartArena"; } } else { if ( rand(100) < 50 ) // 50% chance setcastledata .castle$[.@i], CD_CURRENT_ECONOMY, getcastledata( .castle$[.@i], CD_CURRENT_ECONOMY ) - 5; } } end; OnInit: setarray .castle$[0], "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; end; }  
     
    npc/guild/agit_main.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index c2925487c..964e701fb 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -1135,8 +1135,8 @@ OnClock0001: set .@GID, GetCastleData(strnpcinfo(2),CD_GUILD_ID); - // If there is no owner, do nothing. - if (!.@GID) end; + // only spawn treasure chest when there is no owner + if (.@GID) end; // Is there Economy in this castle? set .@Treasure,GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY)/5+4;  
     
    npc/guild/agit_main.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index c2925487c..abe5c3cda 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -657,22 +657,18 @@ OnRecvCastle: else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; } else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; } else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; } - //Quadruple the cost of investing if you've already invested once. - if (GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY)) { - set .@eco_invest,.@eco_invest*4; - } mes "["+strnpcinfo(1)+"]"; mes "If you invest in commercial growth, the quantity of goods made by the guild will increase. Therfore, if you consider our future, investments will be a necessity."; mes " "; - mes "Initially, you are able to invest just once but if you pay more money, you will be able to invest twice."; + mes "You are able to invest just once."; if (.@Economy >= 100) { mes " "; mes "^ff0000The commercial growth level of our Castle is at it's highest, 100%. No more investments are needed. Just as I have expected from a great economist like you, Master.^000000"; close; } - if (GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY) >= 2) { + if (GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY) >= 1) { mes " "; - mes "^ff0000You have already invested twice today. You cannot invest any more.^000000 I expect riches of the guild to grow at a high rate."; + mes "^ff0000You have already invested today. You cannot invest any more.^000000 I expect riches of the guild to grow at a high rate."; close; } if (GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY) == 0) {  
     
    npc/guild/agit_main.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index c2925487c..fd76a0582 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -177,17 +177,57 @@ OnRecvCastle: if (compare(strnpcinfo(2),"aldeg")) { // Normal Spawns monster strnpcinfo(2),0,0,"Evil Druid",1117,10; + for ( .@i = 0; .@i < 10; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1117, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1117, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Khalitzburg",1132,4; + for ( .@i = 0; .@i < 4; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1132, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1132, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Abysmal Knight",1219,2; + for ( .@i = 0; .@i < 2; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1219, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1219, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Executioner",1205,1; + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1205, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1205, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; monster strnpcinfo(2),0,0,"Penomena",1216,10; + for ( .@i = 0; .@i < 10; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1216, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1216, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Alarm",1193,18; + for ( .@i = 0; .@i < 18; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1193, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1193, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Clock",1269,9; + for ( .@i = 0; .@i < 9; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1269, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1269, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Raydric Archer",1276,7; + for ( .@i = 0; .@i < 7; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1276, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1276, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Wanderer",1208,3; + for ( .@i = 0; .@i < 3; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1208, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1208, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + } monster strnpcinfo(2),0,0,"Alice",1275,1; + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1275, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1275, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; monster strnpcinfo(2),0,0,"Bloody Knight",1268,1; + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1268, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1268, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; monster strnpcinfo(2),0,0,"Dark Lord",1272,1; + setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( 1272, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; + setunitdata $@mobid[.@i], UMOB_HP, getmonsterinfo( 1272, MOB_MAXHP ) * getcastledata( strnpcinfo(2), CD_CURRENT_ECONOMY ) / 100; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(2) == "aldeg_cas01") { setarray .@emproom[0],216,23; } else if (strnpcinfo(2) == "aldeg_cas02") { setarray .@emproom[0],213,23; } lazy to do the rest ... anyway you get the point
     
     
    disable the npc/guild/agit_controller.txt file and use this
    - script ksdjfs FAKE_NPC,{ OnInit: agitstart; end; }  
     
    npc/guild/agit_main.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index c2925487c..d979649fa 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -769,6 +769,8 @@ OnRecvCastle: } case 4: mes "["+strnpcinfo(1)+"]"; + mes "Summon a Guardian is disabled"; + close; mes "Will you summon a Guardian? It'll be a protector to defend us loyally."; mes "Please select a guardian to defend us."; next;  
     
    for me, it is easy as 1 2 3 , A B C
     
     
    npc/guild/agit_main.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index c2925487c..133012e87 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -177,17 +177,45 @@ OnRecvCastle: if (compare(strnpcinfo(2),"aldeg")) { // Normal Spawns monster strnpcinfo(2),0,0,"Evil Druid",1117,10; + for ( .@i = 0; .@i < 10; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Khalitzburg",1132,4; + for ( .@i = 0; .@i < 4; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Abysmal Knight",1219,2; + for ( .@i = 0; .@i < 2; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Executioner",1205,1; + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; monster strnpcinfo(2),0,0,"Penomena",1216,10; + for ( .@i = 0; .@i < 10; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Alarm",1193,18; + for ( .@i = 0; .@i < 18; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Clock",1269,9; + for ( .@i = 0; .@i < 9; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Raydric Archer",1276,7; + for ( .@i = 0; .@i < 7; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Wanderer",1208,3; + for ( .@i = 0; .@i < 3; ++.@i ) { + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; + } monster strnpcinfo(2),0,0,"Alice",1275,1; + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; monster strnpcinfo(2),0,0,"Bloody Knight",1268,1; + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; monster strnpcinfo(2),0,0,"Dark Lord",1272,1; + setunitdata $@mobid[.@i], UMOB_LEVEL, 99; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(2) == "aldeg_cas01") { setarray .@emproom[0],216,23; } else if (strnpcinfo(2) == "aldeg_cas02") { setarray .@emproom[0],213,23; } change all monsters to level 99
     
     
    yes,
    1. it happens to be using agitstart2 ...
    2. use npc\guild2 folder ...
    3. rathena also has woe training edition ...
     
     
    btw you ask too many question at once
  21. AnnieRuru's post in setunitdata doesn't change normal mob to boss? was marked as the answer   
    4140,Knight_Of_Abyss_Card,Abysmal Knight Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddClass,Class_Boss,25; },{},{} * Class (c) Class_Normal, Class_Boss, Class_Guardian, Class_All case SP_ADDCLASS: // bonus2 bAddClass,c,x; PC_BONUS_CHK_CLASS(type2,SP_ADDCLASS); if(!sd->state.lr_flag || sd->state.lr_flag == 3) sd->right_weapon.addclass[type2]+=val; else if(sd->state.lr_flag == 1) sd->left_weapon.addclass[type2]+=val; else if(sd->state.lr_flag == 2) sd->arrow_addclass[type2]+=val; break; answer is no ... since rathena changed the monster mode, there are no field for setunitdata to modify a monster into Class_Boss mode
    unless ... well ... make an issue in rathena github
  22. AnnieRuru's post in Refine item was marked as the answer   
    prontera,150,185,5 script test 1_F_MARIA,{ if ( !isequipped(2589) && !isequipped(2576) ) dispbottom "go away"; end; }  
  23. AnnieRuru's post in SQL PVP Suport (please) was marked as the answer   
    hmm ... looking back at this script, I forgot to index the point(11) field
     
    although my current method has evolved to a little bit more complex ..
    https://annieruru.blogspot.com/2019/01/another-approach-to-write-pvp-ladder.html
    use method 1, which most people does
  24. AnnieRuru's post in MVP Board was marked as the answer   
    this script is no longer possible with the dynamic_mobs option on, which most server will left it on
    https://rathena.org/board/topic/118033-mobs-on-server-start/?do=findComment&amp;comment=356654
    the reason is because the MVP spawned on the map use boss_monster syntax
    https://github.com/rathena/rathena/blob/26720f041a3cd0edbaa975bfc70345a30e9bf706/doc/script_commands.txt#L186sd
     
    ok here's the explanation,
    No.1 You have to understand what is dynamic_mob configuration
    https://rathena.org/board/topic/117852-i-got-error-when-applying-custom-commands/?do=findComment&amp;comment=356255a
    tested with "@mapmoblist prt_fild07", you'll notice if there are no players in the map, it return empty
    but the moment you "@rura prt_fild07", warp into the map, it start to populate the map with monsters, and "@mapmoblist" will return something
    yup, if you go back to prontera, "@reloadscript" and "@mapmoblist prt_fild07" again, it will be empty again, because dynamic_mob is at play here
    in other words, if you actually just use *mobcount or *getmapunits to search for a monster on the map not yet populated, it will return empty
    this can be bypass by spawn with a *monster script command .... it just ...
    No.2 monster spawned by boss_monster syntax cannot replicate with *monster script command
    monster spawned by *monster script command can bypass the dynamic mob,
    but there are no script command available yet that can simulate with boss_monster syntax
    this has been suggested on hercules -> https://github.com/HerculesWS/Hercules/issues/1839
    in other words, if you want the MVP can search by Convex Mirror and also can search by a script command, currently not available
    it was available on eathena because both dynamic_mob and convex mirror wasn't implement yet, back then
    there are a few methods that I can think of to solve this issue, either
    1. implement the suggestion to have *boss_monster script command
    2. disable dynamic mob (not recommended)
    3. apply this patch -> https://rathena.org/board/topic/88722-dynamic-mobs-not-respawn-mvp-very-small-mod/
  25. AnnieRuru's post in WoE Random Castle was marked as the answer   
    while I was in the middle of writing this, the previous post shows up
    ok there are 4 topics, which I can only recommend 1st one (which was done by me)
    2nd and 3rd topic, the link is dead, eathena forum down
    4th topic, uses OnPCLoadMapEvent
    actually since Euphy rewrite the WoE system, we don't have to use that trick anymore
    just don't run the OnAgitStart: label for that particular castle is enough

    // https://rathena.org/board/topic/118185-woe-random-castle/ // remember to disable these links //== npc\guild\agit_controller.txt //== npc\guild2\agit_start_se.txt //== npc\re\guild3\agit_start_te.txt - script castle_randomize FAKE_NPC,{ OnInit: setarray .castle$[0], "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; // bindatcmd "cas", strnpcinfo(0)+"::OnDebug", 99, 100; end; OnWed2000: OnSat2000: OnAgitInit: if ( ( gettime(DT_DAYOFWEEK) == WEDNESDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) || ( gettime(DT_DAYOFWEEK) == SATURDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) ) agitstart; end; OnWed2200: OnSat2200: agitend; end; OnAgitStart: .@r = rand(0,19); sleep 100; announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe; for ( .@i = 0; .@i < 20; ++.@i ) { if ( .castle$[.@i] != .castle$[.@r] ) { removemapflag .castle$[.@i], mf_gvg_castle; killmonster .castle$[.@i], "Agit#"+ .castle$[.@i] +"::OnAgitBreak"; gvgoff .castle$[.@i]; } } end; OnAgitEnd: for ( .@i = 0; .@i < 20; ++.@i ) if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) ) setmapflag .castle$[.@i], mf_gvg_castle; end; OnSun2000: OnAgitInit2: if ( ( gettime(DT_DAYOFWEEK) == SUNDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) ) agitstart2; end; OnSun2200: agitend2; end; OnAgitStart2: .@r = rand(20,29); sleep 100; announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe; for ( .@i = 20; .@i < 30; ++.@i ) { if ( .castle$[.@i] != .castle$[.@r] ) { .@str$ = substr( .castle$[.@i], 0, 1 ) + substr( .castle$[.@i], 8, 9 ); removemapflag .castle$[.@i], mf_gvg_castle; killmonster .castle$[.@i], "Steward#"+ .@str$ +"::OnStartArena"; gvgoff .castle$[.@i]; } } end; OnAgitEnd2: for ( .@i = 20; .@i < 30; ++.@i ) if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) ) setmapflag .castle$[.@i], mf_gvg_castle; end; //OnDebug: switch ( atoi( .@atcmd_parameters$ ) ) { case 0: warp "aldeg_cas01",216,23; end; case 1: warp "aldeg_cas02",213,23; end; case 2: warp "aldeg_cas03",205,31; end; case 3: warp "aldeg_cas04",36,217; end; case 4: warp "aldeg_cas05",27,101; end; case 5: warp "gefg_cas01",197,181; end; case 6: warp "gefg_cas02",176,178; end; case 7: warp "gefg_cas03",244,166; end; case 8: warp "gefg_cas04",174,177; end; case 9: warp "gefg_cas05",194,184; end; case 10: warp "payg_cas01",139,139; end; case 11: warp "payg_cas02",38,25; end; case 12: warp "payg_cas03",269,265; end; case 13: warp "payg_cas04",270,28; end; case 14: warp "payg_cas05",30,30; end; case 15: warp "prtg_cas01",197,197; end; case 16: warp "prtg_cas02",157,174; end; case 17: warp "prtg_cas03",16,220; end; case 18: warp "prtg_cas04",291,14; end; case 19: warp "prtg_cas05",266,266; end; case 20: warp "arug_cas01",87,219; end; case 21: warp "arug_cas02",89,256; end; case 22: warp "arug_cas03",141,293; end; case 23: warp "arug_cas04",141,293; end; case 24: warp "arug_cas05",141,293; end; case 25: warp "schg_cas01",120,272; end; case 26: warp "schg_cas02",162,193; end; case 27: warp "schg_cas03",338,202; end; case 28: warp "schg_cas04",120,272; end; case 29: warp "schg_cas05",120,272; end; default: } end; }  
×
×
  • Create New...