• 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 TFS 0.4 paralyze field

Hernest

New Member
Joined
Jul 26, 2010
Messages
152
Reaction score
3
Location
poland
Hello, I am making a rune like poison bomb, but those summoned fields are paralyzing/slowing creatures. To make this paral work I have to connect aid/uid with fields. Any ideas how to create fields with aid/uid via CombatObject?

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1503)

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

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Use this base to make yours (i found it here in forum)
Code:
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1000)
setConditionFormula(condition, -0.5, 0, -0.5, 0)


function onStepIn(cid, item, position, fromPosition)
   if not getCreatureCondition(cid, CONDITION_PARALYZE) then
       doAddCondition(cid, condition)
   end
end
 
use addEvent, with a 1 ms delay, that finds top item/field at location, and set's an aid to it?
 
use addEvent, with a 1 ms delay, that finds top item/field at location, and set's an aid to it?
wouldn't really work with top item since a player can just throw something on top of it but you can use getTileItemById(pos, id)
something like this:
Code:
condition for paralyze

function onstepin(...)
    if getTileItemById(pos, id) then
        add condition
    end
    return true
end
 
wouldn't really work with top item since a player can just throw something on top of it but you can use getTileItemById(pos, id)
something like this:
Code:
condition for paralyze

function onstepin(...)
    if getTileItemById(pos, id) then
        add condition
    end
    return true
end
If your looking on the tile for the top field/item of the specific value used by the rune, I fail to see how players throwing items on top of the field would effect anything.
 
If your looking on the tile for the top field/item of the specific value used by the rune, I fail to see how players throwing items on top of the field would effect anything.
since a field is an item, you cannot look for the top item, since a player can abuse this and throw a gold goin and then that would be counted as the topmost item of that tile.
tile -> field -> goldcoin (top item)
 
since a field is an item, you cannot look for the top item, since a player can abuse this and throw a gold goin and then that would be counted as the topmost item of that tile.
tile -> field -> goldcoin (top item)
Stop being dense. You and anyone else can clearly see the logic.

field_id = 1111
Search tile for top-most item_id with this value.
Add actionid to item.
 
Stop being dense. You and anyone else can clearly see the logic.

field_id = 1111
Search tile for top-most item_id with this value.
Add actionid to item.
if you search the tile for top most item id for field id 1111

tile -> 1111 (field id) -> gold coin
index - (0) (1)

the topmost itemid is the gold coin (index 1)
it is the last index of the tile (1)
"action id" wont be added if gold goin is the topmost item because its not finding field id 1111 as the topmost item.
 
if you search the tile for top most item id for field id 1111

tile -> 1111 (field id) -> gold coin
index - (0) (1)

the topmost itemid is the gold coin (index 1)
it is the last index of the tile (1)
"action id" wont be added if gold goin is the topmost item because its not finding field id 1111 as the topmost item.
I just.. can't even

Hopefully OP understands english.

Good luck OP.
 
Back
Top Bottom