Jump to content

Syreldar

Premium
  • Posts

    1298
  • Joined

  • Last visited

  • Days Won

    38
  • Feedback

    100%

Posts posted by Syreldar

  1. 3 hours ago, .plechito' said:

    I kind of miss myself there 🙂

    This video was meant for an italian community only, it wasn't supposed to go on m2dev, so there aren't many m2dev members :<

  2. quest item_change_sex begin
    	state start begin
    		when 71048.use begin
    			say_title(translate().change_empire._50_sayTitle)
    			if (pc.get_level() < 50) then
    				return say_reward(translate().item_change_sex._10_sayReward);
    
    			elseif (pc.get_wear(19) ~= nil) then
    				return say_reward("You have to unequip your body costume first.");
    
    			elseif (pc.is_engaged()) then
    				return say_reward(translate().item_change_sex._30_sayReward)
    
    			elseif (pc.is_married()) then
    				return say_reward(translate().item_change_sex._30_sayReward)
    
    			elseif (pc.is_polymorphed()) then
    				return say_reward(translate().item_change_sex._60_sayReward)
    			end -- if/elseif
    		
    			say(translate().item_change_sex._130_say)
    			wait()
    			say_title(translate().item_change_sex._120_sayTitle)
    			say(translate().item_change_sex._140_say)
    
    			if (select(translate().locale.guild.yes, translate().locale.guild.no) == 1) then
    				say_title(translate().item_change_sex._120_sayTitle)
    				say(translate().item_change_sex._150_say)
    				say_reward(translate().change_empire._230_sayReward)
    				
    				pc.remove_item(71048, 1);
    				pc.change_sex();
      				pc.polymorph(20032); -- So you don't need to relog.
    			end -- if
    		end -- when
    	end -- state
    end -- quest

     

    • Love 1
  3. On modern clients, Heal, just like the other buffs, works as a PARTY-based skill.

    Despite that there are many sources that still do not support the PARTY-flag, and/or there are many skill_protos without PARTY flag assigned to the respective skills.

    This is the result of such "conflict".

     

    1. If you want the skill to act like a normal buff skill (so it won't heal every member of the party when in party, but always only your target)

    in locale/skilldesc.txt:

    Spoiler

    Replace "STANDING_SKILL" with "STANDING_SKILL|CAN_USE_FOR_ME|NEED_TARGET|ONLY_FOR_ALLIANCE"

    exactly as @Macromango did, but you DO NOT HAVE to empty out the setFlag in the skill_proto, because that contains REMOVE_BAD_AFFECT, and it's needed to remove debuffs on your target, not just heal it, so just remove PARTY there, if you have it.

     

    2. If you want the skill to act like a party buff skill (so when in party it will heal all your party members and when you're not in party it will act as a normal buff skill, like official basically)

    in src/skill.h:

    Spoiler

    Make sure you have the SKILL_FLAG_PARTY definition.

    if you don't, you need to implement the PARTY skill system correctly.

    If you do, your sources have the system implemented by default, you can proceed.

     

    in player.skill_proto table:

    Spoiler

    Click 'Design table' and make sure the setFlag enum contains "PARTY", keep in mind that if, for example, your SKILL_FLAG_PARTY is the 28th value of the ESkillFlags enum, PARTY inside the skill_proto's setFlag enum must also be the 28th value, they need to be the very same.

    This is how mine looks like for comparison:

    'ATTACK','USE_MELEE_DAMAGE','COMPUTE_ATTGRADE','SELFONLY','USE_MAGIC_DAMAGE','USE_HP_AS_COST','COMPUTE_MAGIC_DAMAGE','SPLASH','GIVE_PENALTY','USE_ARROW_DAMAGE','PENETRATE','IGNORE_TARGET_RATING','ATTACK_SLOW','ATTACK_STUN','HP_ABSORB','SP_ABSORB','ATTACK_FIRE_CONT','REMOVE_BAD_AFFECT','REMOVE_GOOD_AFFECT','CRUSH','ATTACK_POISON','TOGGLE','DISABLE_BY_POINT_UP','CRUSH_LONG','WIND','ELEC','FIRE','ATTACK_BLEEDING','PARTY','KNOCKBACK'

     

    Spoiler

    Make sure the setFlag column value for the skill 109 is "REMOVE_BAD_AFFECT, PARTY"

     

    Then /reload and it's done.

    • Love 1
  4. 6 minutes ago, Klaus said:

    mob_proto.txt

    
    
    
    
    20118	"lion2"	"KING"	"NPC"	"MELEE"	1			0		"STUN,SLOW,CURSE,TERROR"	0	"pony"	2	0	0	0	0	0	0	120	3	1	0	0	12	4	100	100	0	2000	150	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0		0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0

    data/monster/lion_2/motlist.txt

    
    
    
    
    GENERAL WAIT wait.msa 90
    GENERAL WAIT1 wait1.msa 9
    GENERAL WAIT2 wait2.msa 1
    GENERAL WALK walk.msa 100
    GENERAL RUN run.msa 100
    GENERAL COMBO_ATTACK attack1.msa 100
    GENERAL COMBO_ATTACK1 attack2.msa 100
    GENERAL COMBO_ATTACK2 attack3.msa 100
    GENERAL FRONT_DAMAGE front_damage.msa 100
    GENERAL BACK_DAMAGE back_damage.msa 100
    GENERAL DEAD dead.msa 100
    GENERAL SKILL2 skill.msa 100

     

    I told you to check the accumulation inside the run.msa and walk.msa files, not to send me motlist.txt.

    Secondly, why is your lion mount using the pony folder? he's taking speed values from the pony's accumulation.. That's horribly wrong.

     

    The correct folder to use is

    lion

     

    The correct accumulation value for share/data/monster/lion/run.msa is:

    Accumulation             0.00    -589.63    0.00

     

    The correct accumulation value for share/data/monster/lion/walk.msa is:

    Accumulation             0.00    -278.46    0.00

     

    • Good 1
  5. Skill Damage gets calculated before Average Damage, the latter is based on the result of the first.

     

    This is the default formula:

    iSkillBonus = MINMAX(-30, (int) (gauss_random(0, 5) + 0.5f), 30);
    
    if (abs(iSkillBonus) <= 20)
        iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4);
    else
        iNormalHitBonus = -2 * iSkillBonus + number(1, 5);

     

    de facto, Max Avg Dmg should be 65% and Max Skill Dmg is 30%, but since values lower than 20 Skill Damage cause the Avg Damage to take into account the second calculation, it's impossible to get more than 60 Avg Damage, Max Skill Damage is still 30.

    Obviously, the formula is heavily weighted towards minimum values, so getting 50% Avg. Damage is significantly harder than getting 10% Avg Damage, and obviously the same goes for Skill Damage.

    The "+0.5f" has the purpose to round the value to the nearest integer.

    • Good 2
    • Love 1
  6. Vanilla's solution is a good way to deal with the problem.

     

    On the other hand, if you're not a programmer and still want to fix the issue, then I can help you.

     

    If you press space and unfocus the window, you're unable to use any macros or key inputs in that window, since it's not focused. Which means the player is stuck attacking and can't do anything else.

     

    Using non-aggressive monsters (so you're forced to aggro them using the mantle) and spawning the metins and bosses in random spots (so you're forced to look for them or at least focus them if they're distant) fixes the issue, the player gains nothing that way.

     

    If you don't like that, then setting up the bosses/metins/monsters to be difficult enough so a certain degree of attention is required from the player in order to kill them is another good solution.

    • Love 1
  7. 1 hour ago, kaJaMrSimple said:

    I specify the z coordinate as 2, it reacts as if the coordinate is random.

     

    I want to set the direction of mob.

     

    What should I do?

    Z coordinate is not the direction the mob is facing..

     

    either use

    d.spawn_mob_ac_dir

    (vnum, x, y, dir [0..359])

    (if you input -1 instead of a number between 0 and 359, it will choose a random dir between 0 and 359)

    or

    d.spawn_mob_dir

    (vnum, x, y, dir [1..8] {(direction - 1) * 45})

    (if you input 0 instead of a number between 1 and 9, it will choose a random dir between 1 and 8 )

  8. You can't do such a thing on login trigger, either make a timer or use "letter"

     

    quest welcomemsg begin
    	state start begin
    		when login with pc.getqf("basic_weapon") == 0 begin
    			timer("welcome", 2);
    		end
    			
    		when welcome.timer begin
    			pc.setqf("basic_weapon", 1)
    			say_title("Welcome to the SERVERNAME ")
    			say("")
    			say("Blah blah blah... ")
    			say("Blah blah blah... ")
    			say("Blah  blah...[ENTER]")
    			wait()
    			say("Have a nice game :)[ENTER]")
    		end
    	end
    end
    
    quest welcomemsg begin
    	state start begin
    		when letter with pc.getqf("basic_weapon") == 0 begin
    			pc.setqf("basic_weapon", 1)
    			say_title("Welcome to the SERVERNAME ")
    			say("")
    			say("Blah blah blah... ")
    			say("Blah blah blah... ")
    			say("Blah  blah...[ENTER]")
    			wait()
    			say("Have a nice game :)[ENTER]")
    		end
    	end
    end

     

  9. On 12/24/2020 at 11:09 PM, Sonitex said:

    input_login.cpp

     

    
    void CInputLogin::Entergame(LPDESC d, const char * data)
    {
      [...]
    	if (ch->GetMapIndex() >= DUNGEON_INDEX*10000 && ch->GetMapIndex() <= DUNGEON_INDEX*10010)
    	{
    		if(ch->IsAffectFlag(AFF_SHAMAN_SKILL))
    			RemoveAffect(AFF_SHAMAN_SKILL);
    	}
      [...]
    }

     

    Edit DUNGEON_INDEX & AFF_SHAMAN_SKILL and you should be good to go ;)

     

     

     

    if (ch->GetMapIndex() >= DUNGEON_INDEX*10000 && ch->GetMapIndex() <= DUNGEON_INDEX*10010)

    ?

     

    if (ch->GetMapIndex() >= DUNGEON_INDEX*10000 && ch->GetMapIndex() < (DUNGEON_INDEX+1)*10000)

     

    • Love 1
  10. when die with @self.CONDITION begin -- if you don't need any condition, then just "when die begin"
        warp_to_village();
    end -- when

     

    Yes you need to implement the event by following the step inside the topic posted in the answer up here.

  11. 		when login begin
    			local v = find_npc_by_vnum(NPC_VNUM)
    			if v != 0 then
    				target.vid("theowahdan", v, "Theowahdan")
    			end
    		end

    As expected, you're setting a target but you're not clearing it. You have 2 options:

     

    1. Add target.remove("theowahdan") under "when NPC_VNUM.chat."What is a Sash?" begin", and the target arrow will disappear the next time you click on that option in-game.

    2. Remove that whole snippet.

     

    After you did one of these 2, recompile the quest and write in game "/reload q" or restart cores.

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.