Jump to content

ffman22

Members
  • Posts

    29
  • Joined

  • Last visited

Posts posted by ffman22

  1. hi, thank you for the script, really use full, but I dont know why the shop doesn't work after I put 8 items.

    there is an option to add more than 8 items?

    I dont know if is because I clone it in the same script.

    //	Author: Ehwaz
    //	Version: 2018/06/01
    
    // Dummy shop to insert items into:
    -	shop	templ_shop	-1,501:50.
    
    prontera,147,158,5	script	Templ Shop	20610,{
    	dispbottom DisplayCurrency(.currency);
    	callshop .shop_name$,1;
    	npcshopattach .shop_name$;
    	end;
    OnBuyItem:
    	BuyProcess(.priceList, .currency);
    OnInit:
    	.shop_name$ = "templ_shop";
    	.npcName$ 	= strnpcinfo(1);	//Visiable name
    	.currency 	= 7517;				// 0: Zeny, else Item
    
    	setarray .items,18119,1,	//Thanos_Bow
    					15380,5, //Lava_Leather_Robe
    					15378,5, //Lava_Leather_Armor
    					15379,3, //Lava_Leather_Suits
    					20935,3, //Lava_Leather_Manteau
    					20936,3, //Lava_Leather_Muffler
    					20937,2, //Lava_Leather_Hood
    					5658,20; //Imp_Hat
    					
    	InitItemShop(.items,.shop_name$,.npcName$);
    	end;
    }
    -	shop	templ_shop1	-1,501:50.
    
    
    prontera,147,155,5	script	Templ Shop2	1_M_WIZARD,{
    	dispbottom DisplayCurrency(.currency);
    	callshop .shop_name$,1;
    	npcshopattach .shop_name$;
    	end;
    OnBuyItem:
    	BuyProcess(.priceList, .currency);
    OnInit:
    	.shop_name$ = "templ_shop1";
    	.npcName$ 	= strnpcinfo(1);	//Visiable name
    	.currency 	= 0;				// 0: Zeny, else Item
    
    	setarray .items,523,rand(11111,22222),	//Holy_Water
    					19935,200000000, //C_Hunting_Cap_Of_Gust
    					2860,rand(1200,5999999),	//Aqua_Orb
    					15026,rand(2400,5999999),	//Aqua_Robe	
    					2468,rand(2400,5999999),	//Aqua_Shoes	
    					6456,15000000,	//Guarantee_Weapon_5Up
    					6457,18000000,	//Guarantee_Armor_5Up
    					15117,12000000,	//Felock_Armor
    					20744,12000000,	//Felock_Cape
    					22047,12000000,	//Felock_Boots
    					2581,18000000,	//Black_Wing_Manteau
    					2480,18000000,	//Black_Wing_Boots
    					20373,10000000;	//C_Watermelon_Hat
    					
    	InitItemShop(.items,.shop_name$,.npcName$);
    	end;
    }

     

  2. I am getting an error when I use the #worldboss 1 

    it said 
    #worldboss faild player not  found

    I have another question, how can we display a global announce that say that the world boss is going to spawn in the specific map?

    and that the kills for spawn the world boss is reached?

    there is an option to spawn a world boss every day, just 1 time.?

  3. On 5/19/2020 at 3:10 PM, Patskie said:

    I think there is something wrong with setmapflag for MF_SKILL_DAMAGE. It's causing error always -> map_setmapflag: Skill damage adjustment without casting type for map <map_name> because the caster is not set in script.cpp

    Anyway back to topic

    1. Apply the diff attached

    2. Try below sample npc. -100 (means no damage)

    prontera,150,150,6	script	Instance Create	100,{
    	[email protected]_name$ = "Old Glast Heim";
    	if (instance_create([email protected]_name$, IM_CHAR, getcharid(0)) < 0 ) {
    		message strcharinfo(0), "Failed to create instance";
    		end;
    	}
    	instance_enter([email protected]_name$, 150, 20, getcharid(0), instance_id(IM_CHAR));
    	doevent strnpcinfo(3) + "::OnEnter";
    	end;
    	
    	OnEnter:
    		[email protected]$ = instance_mapname("[email protected]_k", instance_id(IM_CHAR));
    		if (!getmapflag([email protected]$, MF_SKILL_DAMAGE, SKILLDMG_MOB))
    			setmapflag [email protected]$, MF_SKILL_DAMAGE, -100, SKILLDMG_MOB;
    		monster [email protected]$, 150, 20, "Poring", 1002, 10;
    		end;
    }
    
    prontera,153,153,6	script	Instance Destroy	100,{
    	instance_destroy instance_id(IM_CHAR);
    	end;
    }

     

     

    skill_damage.patch 621 B · 17 downloads

    sorry for the noob question how can I apply that patch?

     

  4.   - Id: 28942
        AegisName: Bloody_Knight_Shield
        Name: Cursed Knight's Shield
        Type: Armor
        Weight: 800
        Slots: 1
        Locations:
          Left_Hand: true
        EquipLevelMin: 1
        Refineable: true
        Script: |
          bonus bAspdRate,10;
          bonus2 bAddClass,Class_All,3;
          bonus bMatkRate,3;
          bonus2 bSubEle,Ele_All,7;
          autobonus2 "{ bonus2 bSPRegenRate,25,1000; }",50,5000;
          autobonus "{ bonus2 bHPRegenRate,150,1000; }",50,5000;
          [email protected] = getrefine();
          if ([email protected]>=7) {
             bonus bBaseAtk,10;
             bonus bMatk,10;
          }
          if ([email protected]>=9) {
             bonus bAspd,1;
          }
          if ([email protected]>=12) {
             bonus bDelayrate,-3;
          }
      - Id: 28945
        AegisName: Bloody_Knight_Shield_
        Name: Bloody Knight's Shield
        Type: Armor
        Weight: 800
        Slots: 1
        Locations:
          Left_Hand: true
        EquipLevelMin: 1
        Refineable: true
        Script: |
          bonus bAspdRate,10;
          bonus2 bAddClass,Class_All,3;
          bonus bMatkRate,3;
          bonus2 bSubEle,Ele_All,7;
          autobonus2 "{ bonus2 bSPRegenRate,25,1000; }",50,5000;
          autobonus "{ bonus2 bHPRegenRate,150,1000; }",50,5000;
          [email protected] = getrefine();
          if ([email protected]>=7) {
             bonus bBaseAtk,10;
             bonus bMatk,10;
          }
          if ([email protected]>=9) {
             bonus bAspd,1;
          }
          if ([email protected]>=12) {
             bonus bDelayrate,-3;
          }
      - Id: 28946
        AegisName: Bloody_Knight_Shield__
        Name: Purified Knight's Shield
        Type: Armor
        Weight: 800
        Slots: 1
        Locations:
          Left_Hand: true
        EquipLevelMin: 1
        Refineable: true
        Script: |
          bonus bAspdRate,10;
          bonus2 bAddClass,Class_All,5;
          bonus bMatkRate,5;
          bonus2 bSubEle,Ele_All,10;
          autobonus2 "{ bonus2 bSPRegenRate,50,1000; }",50,5000;
          autobonus "{ bonus2 bHPRegenRate,300,1000; }",50,5000;
          [email protected] = getrefine();
          if ([email protected]>=7) {
             bonus bBaseAtk,20;
             bonus bMatk,20;
          }
          if ([email protected]>=9) {
             bonus bAspd,2;
          }
          if ([email protected]>=12) {
             bonus bDelayrate,-5;
          }

    hello some knows why the paladin and royal guard shield skills are not working with all of the versions of the Purified Knight's Shield

  5. function	script	resetskip	{
    	if(doneS == 0){
    	setarray [email protected][0],7681,7682,11420,7684,14516,14469,7682,14474,7683,7686,14507,14495,7682,5403,5402,11400,11412,14475,14487,14481,14480,14482,14500,12369,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424,5425,5428,5431,5436,5439,5442,5445,5432;
    	setarray [email protected][0],7741,14615,16031,14602,14602,16019,16061,14600,11462,14601,11464,14613,5737,16030,16048,16045,16050,16014,16028,16054,16055,16056,16057,16013,16027,16041,16032,16041,16029,16036,12376,7746,7747,7748,7749,7751;
    			for(set [email protected],0; [email protected]<(getarraysize([email protected])); set [email protected],[email protected]+1) {
    				//mes "quest  "+ [email protected][[email protected]] + " ^FF0000 set^000000";
    				setquest [email protected][[email protected]];
    			}
    			next;
    			for(set [email protected],0; [email protected]<(getarraysize([email protected])); set [email protected],[email protected]+1) {
    				//mes "quest  "+ [email protected][[email protected]] + " ^FF0000 complete ^000000";
    				completequest [email protected][[email protected]];
    				if( [email protected] == (getarraysize([email protected]))){
    				}
    			}
    		dispbottom "16.1 done";
    			for(set [email protected],0; [email protected]<(getarraysize([email protected])); set [email protected],[email protected]+1) {
    				mes "quest  "+ [email protected][[email protected]] + " ^FF0000 set^000000";
    				setquest [email protected][[email protected]];
    			}
    			for(set [email protected],0; [email protected]<(getarraysize([email protected])); set [email protected],[email protected]+1) {
    				//mes "quest  "+ [email protected][[email protected]] + " ^FF0000 complete ^000000";
    				completequest [email protected][[email protected]];
    				if( [email protected] == (getarraysize([email protected]))){
    				}
    			} 
    		mes "16.2 done";
    		dispbottom "16.2 done";
    		questinfo_refresh();
    		terra_gloria_main = 25;
    		ep_illusion = 0;
    		set doneS, 1;
    		dispbottom "use /navi prt_cas_q 21/39 speak with Nihilim to start the episode 17.1 ";	
    		warp "prt_cas_q",134,8;
    	}(doneS == 1){
    		dispbottom "you already use this item in this character, if your are stuck speak with an admin.";
    		getitem, 11000022;	
    	]
    }

    I create that function that works exactly like the NPC, for a custom item, but I am getting the problem that the second condition doesnt work i dont know why

  6. 8 hours ago, Froost said:

    garment= back, there is no cape that you use in front.

    it looks like the 2dlayerdir file in the lua files you can set to bring forward, but I haven't tested it. (zell tip)

    you can use headgear to go ahead as an option.

    we are using head gear for the moment, but we want to use the system of the garmet, that with one item it use different act for each class so in that way the same item can match the animation with each class.

  7. hello, I am trying to create a fuction, to use in my custom branch to spawn, diferent mvps, with a specific chance for each one, I want to create a version that is more easy to implement, or use with a biger number of MVPs

    this is the current script that I made.

     

    function	script	active_branch	{
    set .tw,0;
    set [email protected]ms,0;
    setarray .mob_id[0],1582,1112,1492,1147;
    setarray .mob_c[0],80,60,20,10;
    		for(set [email protected]i,0; [email protected]i< (getarraysize(.mob_c)); set [email protected]i,[email protected]i+1) {
    		.tw += .mob_c[[email protected]i];
    		}
    set .rnum, rand(.tw);
    debugmes "total weight is: "+.tw;
    debugmes .rnum;
    freeloop(1);
    		for(set [email protected]i,0; [email protected]i< (getarraysize(.mob_c)); set [email protected]i,[email protected]i+1) {
    			if(.rnum <= .mob_c[[email protected]i]){
    			if([email protected]ms==0){
    			debugmes .mob_id[[email protected]i];
    			monster "this", -1,-1, "--ja--",.mob_id[[email protected]i], 1, "";
    			[email protected]ms = 1;
    			}
    			//			
    			}
    			else
    			{
    			//debugmes .rnum + "substracted by: "+.mob_c[[email protected]i];
    			.rnum -= .mob_c[[email protected]i];	
    			}
    		}
    freeloop(0);
    }

     

  8. On 7/14/2021 at 4:55 AM, BeWan said:
    function	script	LHZ_Boss	{
    
    OnInit:
    set .mob_id, rand(1646,1651);
    
    or if you want different id's you can use f_item
    
    .mob_id = callfunc("F_Rand",1,2,3,4,5,6,7,11,10,9);
    
    
      monster "this", -1,-1, "--ja--", .mob_id[[email protected]], 1, "";
    
    
    }
    
    For ITEMDB
    
    callfunc "LHZ_Boss";

     

    ok thanks you, and in the case that I need to get a parameter to select the random group that I want to use? like example

    callfunc "LHZ_Boss(1)";
    because I want to use the same fuction in diferent branches.

    I am trying something like this 

    function active_branch { if(getarg(0)==1){ setarray .mvpid[0],1147,1582,1492,1112; } monster "this",-1,-1,"--ja--",.mvpid[rand(4)],1,""; }

    function    active_branch    {
        if(getarg(0)==1){
            setarray .mvpid[0],1147,1582,1492,1112;
            }
         monster "this",-1,-1,"--ja--",.mvpid[rand(4)],1,"";
    }

     

     

    I am getting this error, 

    buildin_callfunc: Function not found!


    I include my script in the script_custom.conf
    like this.

    npc: npc/custom/branch_script.txt

     

     

    On 7/14/2021 at 5:46 AM, Capuche said:

    export_constant(MOBG_TAEKWON_MISSION

     

    On 7/14/2021 at 5:46 AM, Capuche said:

    To add a custom monster summon branch, the steps are:

    1.  Add MOBG_G_D_Branch_01 before MOBG_MAX in https://github.com/rathena/rathena/blob/2f311bd1ef6abf0de642f93690eb37bebbb34d14/src/map/mob.hpp#L116
    2.  Add MOBG_G_D_Branch_01 after export_constant(MOBG_TAEKWON_MISSION); in https://github.com/rathena/rathena/blob/2f311bd1ef6abf0de642f93690eb37bebbb34d14/src/map/script_constants.hpp#L4625
    3. After compiling your server should have created a folder named "import". Add your custom branch data in import/mob_summon.yml
    Header:
      Type: MOB_SUMMONABLE_DB
      Version: 1
    
    Body:
      - Group: G_D_Branch_01
        Default: MAYA
        Summon:
          - Mob: MAYA
            Rate: 100000
          - Mob: DEVILING
            Rate: 700000
          - Mob: Drake
            Rate: 700000

          4. In import/item_db.yml

      - Id: ****
        AegisName: name
        Name: name
        Type: Usable
        Buy: 10000
        Weight: 200
        Flags:
          BuyingStore: true
          DeadBranch: true
        Script: |
          monster "this",-1,-1,"--ja--",-1-MOBG_G_D_Branch_01,1,"";

     

    All other steps are unnecessary (I think you just forgot to compile according to the error in your first post).

    thank you for the answer, I just notice that my emulator doesnt have the MOBG_MAX in the list
     

    /// Random Monster Groups
    enum e_random_monster : uint16 {
    	MOBG_Branch_Of_Dead_Tree = 0,
    	MOBG_Poring_Box,
    	MOBG_Bloody_Dead_Branch,
    	MOBG_Red_Pouch_Of_Surprise,
    	MOBG_ClassChange,
    	MOBG_Taekwon_Mission,
    };

    in that case I just need to add it after MOBG_Taekwon_Mission, ?

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.