Jump to content

Mabuhay

Members
  • Posts

    446
  • Joined

  • Last visited

  • Days Won

    34

Community Answers

  1. Mabuhay's post in Stop the Clock Prize was marked as the answer   
    Change 
    getitem 22654,1; to
    getitem 22654,(@stopped == 1) ? 2:1;  
  2. Mabuhay's post in Help: Check VIP Status was marked as the answer   
    VP accounts are by default group_id 5 (if I am not mistaken) found in login table.
     
     
    Not tested.
    - script VIP_Checker -1,{ OnCheck: if(!(.@nb = query_sql(SELECT `account_id` FROM `login` WHERE `group_id` = '5'", .@aid))) { dispbottom "No data found."; end; } dispbottom "VIP Account ID list :"; for ( .@i = 0; .@i < .@nb; .@i++ ) dispbottom (.@i+1) +". Account ID : "+ .@aid[.@i]; dispbottom "Total of "+.@nb +" Active VIP account(s)."; end; OnInit: bindatcmd "checkvip", strnpcinfo(0)+"::OnCheck", 60, 60; // @checkvip to list active vip accounts }  
  3. Mabuhay's post in Duplicating Quest NPC was marked as the answer   
    If you only read the script carefully, you should be able to do make as much duplicates as you want without duplicating the whole script.
    // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prt_in,32,114,5 script Tier 1 Quest#1 998,{ callfunc "qshop"; }  
    If you want the npc to load only SHOP ID 1, you should do something like :
    map,x,y,f script Tier 1 Quest#1 998,{ callfunc "qshop", 1; } // Shows SHOP ID 1 only  
    Then for more examples:
    map,x,y,f script Tier 2 Quest#1 998,{ callfunc "qshop", 1, 2; } // Shows SHOP ID 1 and 2 map,x,y,f script Tier 3 Quest#1 998,{ callfunc "qshop", 1, 3; } // Shows SHOP ID 1 and 3 .....  
    And so on...
     
  4. Mabuhay's post in why i dont have instance_db.txt? I want to make some instance where should i put the name? was marked as the answer   
    db/pre-re/instance_db.yml  
  5. Mabuhay's post in How to write script Npc Walking in an Instance? was marked as the answer   
    Use `OnInstanceInit` instead of `OnInit`
  6. Mabuhay's post in How to Make NPC walk using other npc script was marked as the answer   
    Here is a better thing to do for your script. I made one myself instead of editing yours..
    Anyways, I think you can understand this very clearly..
    prontera,150,150,0 script NPC A 100,{ mes "Test.."; close2; if ( done_walking ) end; // trigger only once, cannot be triggered twice per character.. donpcevent "NPC B::OnNPCWalk"; sleep2 1000; // 1 sec delay before player walks unitwalk getcharid(3), 160, 158; done_walking = true; // sets done walking here.. end; } prontera,150,152,0 script NPC B 100,{ mes "Test"; close; OnNPCWalk: npcspeed 200; npcwalkto 160,160; sleep 5000; // pause for 5 sec.. then.. npcwalkto .x, .y; // walk back to orig position end; OnInit: getmapxy .map$, .x, .y, BL_NPC, strnpcinfo(0); // save orig position end; }  
  7. Mabuhay's post in @mall script was marked as the answer   
    - script at_mall_cmd -1,{ OnMallWarp: warp "map",x,y; end; OnInit: bindatcmd "mall", strnpcinfo(0)+"::OnMallWarp"; }  
  8. Mabuhay's post in @bodystyle to 2nd class was marked as the answer   
    This can easily be done thru scripting.
    Use this as reference : 
     
  9. Mabuhay's post in [Error]: npc_addsrcfile: Can't find source file was marked as the answer   
    try removing the dot (.) on the folder name. It might be causing the emulator to read it as file extension therefore it halts at that part.
  10. Mabuhay's post in Dota PvP Announcer Bug was marked as the answer   
    search for :
    getmapxy at the end of the code line, you will see 0 or 1. change it to BL_PC or BL_NPC respectively.
  11. Mabuhay's post in Two Server One Hosting was marked as the answer   
    Yes it is possible. I haven't personally tried this method but you could. 
    https://rathena.org/board/topic/116483-tutorial-multi-servers/#comment-349371
  12. Mabuhay's post in 1 Click Refine +10 Only Weapon was marked as the answer   
    // I only use R hand check since L hand may equip with shield. // And too lazy to add more checks. prontera,160,160,0 script Click Me 123,{ .@item = 501; // TCG ID here. .@amnt = 5; // TCG Amount here. if ( countitem(.@item) < .@amount ) { mes "I need 5 "+getitemname(.@item)+" to proceed."; close; } .@equipid = getequipid(EQI_HAND_R); if ( !.@equipid || !getequipisequiped(EQI_HAND_R) ) { mes "Please equip your weapon."; close; } if ( !getequipisenableref(EQI_HAND_R) ) { mes "This item is not refinable."; close; } if ( getequipweaponlv(EQI_HAND_R) > 4 ) { mes "I only refine Lv 1 - 4 weapons."; close; } if ( getequiprefinerycnt(EQI_HAND_R) >= 10 ) { // Added +10 check mes "This item is already +10"; close; } delitem .@item, .@amount; while ( getequiprefinerycnt(EQI_HAND_R) < 10 ) { successrefitem EQI_HAND_R; } end; } Not tested. But should work.
     
    Edit : Added +10 item check
  13. Mabuhay's post in How to fix mob.avail sprites was marked as the answer   
    Sorry, I thought you wanted an NPC to be a MOB. I didnt fully realize what you ask. 
    If you are asking how to make a player-looking mob, yes it is possible. 
    1. Create a mob in mob_db. (You should know how to add custom mob)
    2. Change the mob's looks into a player using db/mob_avail.txt
     
    // Mob Availability and Alias Database // // Structure of Database: // MobID,SpriteID{,Equipment} // // 01. MobID Mob ID to change. // 02. SpriteID Mob ID which will be sent to the client instead of MobID. // If 0, the mob becomes unavailable for use. // 03. Equipment Item ID of pet equipment (must be available for pet counterpart, or this will cause problems). // // To disguise a mob as a player: // MobID,SpriteID,Sex,Hair_Style,Hair_Color,Weapon,Shield,Head_Top,Head_Middle,Head_Bottom,Option,Dye_Color // // SpriteID is a job class value. // Weapon and Shield uses Item ID, while Head uses View ID. // Option for carts only works if you compiled your server for a packet version before 2012-02-01  
    Or the easiest way is use lhz mobs.. they pretty much looks like a player already.
  14. Mabuhay's post in skill_castend_nodamage_id: Unknown skill Star emperor Soul reaper was marked as the answer   
    have you checked this branch? https://github.com/rathena/rathena/tree/feature/star_emperor_soul_reaper
  15. Mabuhay's post in Making an NPC appear and disappear (help) was marked as the answer   
    --------------------------------------- *disablenpc "<NPC object name>"; *enablenpc "<NPC object name>"; These two commands will disable and enable, respectively, an NPC object specified by name. The disabled NPC will disappear from sight and will no longer be triggerable in the normal way. It is not clear whether it will still be accessible through 'donpcevent' and other triggering commands, but it probably will be. You can disable even warp NPCs if you know their object names, which is an easy way to make a map only accessible through walking half the time. Then you 'enablenpc' them back. You can also use these commands to create the illusion of an NPC switching between several locations, which is often better than actually moving the NPC - create one NPC object with a visible and a hidden part to their name, make a few copies, and then disable all except one. --------------------------------------- doc/script_commands.txt
  16. Mabuhay's post in @security Help me was marked as the answer   
    Here is my solution.
    All thanks to @Litro Endemic for the idea..
    goto pc.cpp
    look for 
    /*========================================== * Invoked once after the char/account/account2 registry variables are received. [Skotlex] * We didn't receive item information at this point so DO NOT attempt to do item operations here. * See intif_parse_StorageReceived() for item operations [lighta] *------------------------------------------*/ void pc_reg_received(struct map_session_data *sd) Add this :
    // Cash shop sd->cashPoints = pc_readaccountreg(sd, add_str(CASHPOINT_VAR)); sd->kafraPoints = pc_readaccountreg(sd, add_str(KAFRAPOINT_VAR)); + if ( pc_readaccountreg(sd, add_str("#BLOCKPASS")) ) + sd->state.protection_acc = 1; + else + sd->state.protection_acc = 0; Dont include +
     
    compile and done.
  17. Mabuhay's post in Need help with Event Script was marked as the answer   
    Change 0 to BL_PC then change 1 to BL_NPC from getmapxy codes
  18. Mabuhay's post in About Annie's DOTA PVP Announcer was marked as the answer   
    Look for all lines with getmapxy. Replace 0 to BL_PC
  19. Mabuhay's post in Welcome pack ip and itembound was marked as the answer   
    prontera,150,180,0 script Welcome Pack NPC 123,{ .@ip$ = replacestr(getcharip(),".","s"); if (getd("$ip_"+.@ip$)) { // edit message here. mes "You have claimed your reward."; close; } mes "Here you go."; close2; setd "$ip_"+.@ip$, 1; // add items here.. getitembound 1202, 1, Bound_Account; end; }  
  20. Mabuhay's post in R>Poring Hunter Event was marked as the answer   
    Here.
    I did follow most of it except for reward. I automatically sent the reward to player. 
    There are instructions in the script if you wish to change some stuff.
    Tested and should work on latest client rathena.
    I will only support bug fixes, modifications wont be entertained.
    This will be added on my Event Manager soon.
    poring_hunter.txt
  21. Mabuhay's post in Help with Script was marked as the answer   
    - script jklasdf -1,{ OnInit: setarray .mobid, 1002, 1001; setarray .map$, "prt_fild08", "prontera"; end; OnNPCKillEvent: .@index = inarray(.mobid[0], killedrid ); if ( strcharinfo(3) == .map$[.@index] ) { announce strcharinfo(0) +""+ ( strcharinfo(1) ? " of party "+ strcharinfo(1):"" ) +" has killed "+ getmonsterinfo(killedrid,MOB_NAME)+" at "+ strcharinfo(3), bc_all; } end; } list down all mvps and match the maplist corresponding to the spawn id. This may cause trouble on mvp with multiple spawn maps like Atroce but will help you at least (untested).
  22. Mabuhay's post in Is there Any chance to make script refine+7 item cant be drop? was marked as the answer   
    I updated from the original post : 
    nodrop_refine_mabuhay.patch
     
  23. Mabuhay's post in Help with Script was marked as the answer   
    @gnashxalex
    - script script_gh -1,{ OnAtCmd: .@gid = getcharid(2); if( !getmapflag(strcharinfo(3),mf_town)) { dispbottom "@"+.@atcmd_command$+" failed. Can only be used in towns.", 0xff0000; end; } for( .@i = 0; .@i <= 30; .@i++ ) if ( getd( "$GROOM" + .@i ) == .@gid || getd( "$GROOMB" + .@i ) == .@gid ) .@owned++; // Checks if owns a guild room.. if ( .@owned ) warp "sanctum",56,61; else dispbottom "Your guild does not own a room"; end; OnInit: bindatcmd("guildhouse",strnpcinfo(0)+"::OnAtCmd"); } You should have checked your mapserver. It will tell you your problem.
    Your original code has missing curlys just by the look of it.
  24. Mabuhay's post in Understanding of Level penalty was marked as the answer   
    There should be. I haven't tested or done myself but surely there is a way.
    Still need to read the src to see how level penalties are applied. 
    If someone who knows might be able to help you with that. 
    For now, I dont have the luxury time to check the src for this. 
  25. Mabuhay's post in Adding MATK bonus to skill was marked as the answer   
    I found something..
    Add this : 
    base_status->matk_max += base_status->matk_max * skill / 100; base_status->matk_min += base_status->matk_min * skill / 100; here:
    if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0) { #ifdef RENEWAL skill = skill * 2; #else skill = skill * 4; #endif sd->right_weapon.addrace[RC_DRAGON]+=skill; sd->left_weapon.addrace[RC_DRAGON]+=skill; sd->magic_addrace[RC_DRAGON]+=skill; sd->subrace[RC_DRAGON]+=skill;  
×
×
  • Create New...