• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Some problems

Zoool

New Member
Joined
Jul 18, 2014
Messages
163
Reaction score
2
Exori mas spell:
I want to make "attack" weapon doesnt mean anything.

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, TRUE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.7, 0, 1.1, 0)

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end


How does it work?
Code:
<raid name="Deadeye Devious" file="deadeye devious.xml" interval2="810" margin="0" enabled="1"/>

I mean "interval2=810" can someone explain when boss will attack?
 
Last edited:
You can change the formula of the spell. Just replace the line with the numbers with:
Lua:
onGetFormulaValues(cid, and the variables you want...)
and then:
Lua:
min = -(bla bla bla)
max = -(bla bla bla)

return(min, max)

EDIT: Oh but now that I read it again, you are not even looking at a monster xml file, that is a raid file. The interval is how often the raid will happen, and I'm not sure if it is in miliseconds. Probably seconds

EDIT 2: Here is how raids work:

Lua:
<raid name="Example" file="example.xml" interval2="2" margin="0" reftype="single" ref="no"/>

The interval is in minutes, so 820 would be 820 minutes (so nearly 14 hours)
The reftype defines if the boss needs to be killed for the raid to happen again. If the interval time is over and the boss is still alive, another boss will spawn if you set it to "block", and nothing will happen if you set it to "single".
 
Last edited:
Not really.
These 2 scripts are completly diffrend. And has nothing to do with themself.

First script is normal "exori mas" spell.
Second script is from raids. I have many raids so i want resp one 1/2h~
 
COMBAT_FORMULA_SKILL this analyzes the weapon and add the skills of it to the attack damage, change it to COMBAT_FORMULA_DAMAGE and test with some values

C++:
    if (formulaType == COMBAT_FORMULA_DAMAGE) {
        damage.primary.value = normal_random(
            static_cast<int32_t>(mina),
            static_cast<int32_t>(maxa)
);
 
But i want it totally to ignore weapon attack. I want it to hit the same with "long sword 20atk" and "magic long sword 55atk"
 

Not really any diffrence, look at your title, the rules and what other people use as titles.
"Need help" / "Some problems" isn't good at all.

Not sure what you need help with so I can't give you any hints on what you should use.

So this is also breaking rule #5 IMO;
I want to make "attack" weapon doesnt mean anything.
You want to make an attackable weapon (ex a sword) but it dosn't mean anything?
Please try to write it in detail in your own language and then use a translator.
 
Did you even read threard? i dont want to make attackable weapon. I want 20 or 50 attack weapon doesnt change anything in spell dmg ...
 
Did you even read threard? i dont want to make attackable weapon. I want 20 or 50 attack weapon doesnt change anything in spell dmg ...
dude do what I said, if you didn't understand just create a formula like this:
min = level * 3 + ml * 2
max = ( level * 3 + ml * 2 ) * 1.3

create the formula you want and send it to me, I will create the spell script for you
 
Back
Top