Alright! thanks manrequires lots of source editing, even changing monster name in game doesn't save i believe (it switches back whenever it leaves your sight)
https://otland.net/threads/intentialy-reset-level-on-death.247723/page-2#post-2410586i need one request, if death back level 8 or loss all exp
i use deathLosePercent = 100 and dont loss 100%
101+ more debug and dont loss any exp
@Xeraphus this funtcion is possible ?Is it possible a script add attributes by vocation?
#add item attributes
what do you even mean@Xeraphus this funtcion is possible ?
what do you even mean
add item attributes by equipping or what
you could but it would be awful to set upyes, one set for all vocations if knight use add male, mage add magic and palla dist
that's we make a table where we write unique names for conditions and load them on startup.you could but it would be awful to set up
you'd have a file with tons of conditions since you cant create conditions on the fly inside of functions (nor combats)
to make people able to step into object which has SOLID flag. Source edit is required.@Xeraphus I´d like to request a script that has this function. TFS 1.2
"Prevent noob chars from blocking players. Only players above lvl X can block chars from going through player . and if magicwall is used people cant get white skull of characters under x lvl.
This will prevent the annoying thing that when there is a big fight between guilds or players, noob chars cant block nor give white skulls to poeple who use magic walls and fire fields etc..
yes its possible.I want to request a script that I don't really know is possible. What I want is a command (maybe more funtions added to /attr) that would modify a certain monster's attacks, armor, name, flags, etc.. in-game. Like for example, I'd summon an Orc, rename is as Garrosh, and give it increased armor and attack.
Is that possible? mybe it would be a talkaction?
player:addExperience(1)CAN YOU HELP ME MAKE LEVER GIVE XP??? I ALSO HAVE SCRIPT PROBLEM PLS HELP!!!
that's we make a table where we write unique names for conditions and load them on startup.
Then we can use conditions on the fly
wrong.if you create a condition or combat object you have to assign parameters and values outside of functions, so it's still not on the fly.
if there were preset combat/conditions he could use one for each vocation for every eq piece
but if he wanted different values for each vocation for each eq piece, all of the conditions will get messy since you cannot edit condition/combat param values in time of execution.
i guess i was wrongwrong.
You only need to make condition
You can set parameters to condition inside the function
noone should use them.i guess i was wrong
was thinking about combats
yes, one set for all vocations if knight use add male, mage add magic and palla dist
--// Do not touch
local conditionSlots = {
[CONST_SLOT_HEAD] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_HEAD), id = CONDITIONID_HEAD},
[CONST_SLOT_NECKLACE] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_NECKLACE), id = CONDITIONID_NECKLACE},
[CONST_SLOT_BACKPACK] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_BACKPACK), id = CONDITIONID_BACKPACK},
[CONST_SLOT_ARMOR] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_ARMOR), id = CONDITIONID_ARMOR},
[CONST_SLOT_RIGHT] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_RIGHT), id = CONDITIONID_RIGHT},
[CONST_SLOT_LEFT] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_LEFT), id = CONDITIONID_LEFT},
[CONST_SLOT_LEGS] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_LEGS), id = CONDITIONID_LEGS},
[CONST_SLOT_FEET] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_FEET), id = CONDITIONID_FEET},
[CONST_SLOT_RING] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_RING), id = CONDITIONID_RING},
[CONST_SLOT_AMMO] = {condition = Condition(CONDITION_ATTRIBUTES, CONDITIONID_AMMO), id = CONDITIONID_AMMO}
}
-- Set all conditions to infinite ticks
for i = 1, #conditionSlots do
conditionSlots[i].condition:setParameter(CONDITION_PARAM_TICKS, -1)
end
local params = {
CONDITION_PARAM_SKILL_MELEE,
CONDITION_PARAM_SKILL_FIST,
CONDITION_PARAM_SKILL_CLUB,
CONDITION_PARAM_SKILL_SWORD,
CONDITION_PARAM_SKILL_AXE,
CONDITION_PARAM_SKILL_DISTANCE,
CONDITION_PARAM_SKILL_SHIELD,
CONDITION_PARAM_SKILL_FISHING,
CONDITION_PARAM_STAT_MAXHITPOINTS,
CONDITION_PARAM_STAT_MAXMANAPOINTS,
CONDITION_PARAM_STAT_SOULPOINTS,
CONDITION_PARAM_STAT_MAGICPOINTS,
CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT,
CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT,
CONDITION_PARAM_STAT_SOULPOINTSPERCENT,
CONDITION_PARAM_STAT_MAGICPOINTSPERCENT,
CONDITION_PARAM_SKILL_MELEEPERCENT,
CONDITION_PARAM_SKILL_FISTPERCENT,
CONDITION_PARAM_SKILL_CLUBPERCENT,
CONDITION_PARAM_SKILL_SWORDPERCENT,
CONDITION_PARAM_SKILL_AXEPERCENT,
CONDITION_PARAM_SKILL_DISTANCEPERCENT,
CONDITION_PARAM_SKILL_SHIELDPERCENT,
CONDITION_PARAM_SKILL_FISHINGPERCENT
}
--\\
-- Item config
local items = {
-- ItemID
[2506] = {
-- Vocation ID 4
[4] = {
{param = CONDITION_PARAM_SKILL_MELEE, value = 30},
{param = CONDITION_PARAM_SKILL_AXE, value = 15}
},
}
}
function onEquip(player, item, slot)
local statItem = items[item.itemid]
local vocStats = statItem and statItem[player:getVocation():getId()]
if not vocStats then
return true
end
local condition = conditionSlots[slot].condition
-- Remove previous parameters so all params don't get added
for p = 1, #params do
condition:setParameter(params[p], 0)
end
-- Set new parameters
for i = 1, #vocStats do
condition:setParameter(vocStats[i].param, vocStats[i].value)
end
player:addCondition(condition)
player:getPosition():sendMagicEffect(CONST_ME_FIREAREA)
return true
end
function onDeEquip(player, item, slot)
local conditionId = conditionSlots[slot].id
if player:getCondition(CONDITION_ATTRIBUTES, conditionId) then
player:removeCondition(CONDITION_ATTRIBUTES, conditionId)
end
return true
end
<movevent event="Equip" itemid="2506" slot="head" script="equip_dequip.lua" />
<movevent event="DeEquip" itemid="2506" slot="head" script="equip_dequip.lua" />
Thank you @XeraphusCode:add this script to whatever items you put in the item config table in movements.xml i only have 2506 in the config so i have this [code] <movevent event="Equip" itemid="2506" slot="head" script="equip_dequip.lua" /> <movevent event="DeEquip" itemid="2506" slot="head" script="equip_dequip.lua" />