Reklama
Pokazuje wyniki od 1 do 4 z 4

Temat: [Movements] Firewalker boots, działające jak na RL.

  1. #1
    Avatar Mefix
    Data rejestracji
    2009
    Położenie
    Photoshop
    Posty
    98
    Siła reputacji
    15

    Domyślny [Movements] Firewalker boots, działające jak na RL.

    Witam, na początku napiszę że skrypt wykonał Oskar z OT.
    Tworzymy plik o nazwie fields.lua we folderze data/movements/scripts i wklejamy do niego:
    Kod PHP:
    local fire = createConditionObject(CONDITION_FIRE)
    setConditionParam(fire, CONDITION_PARAM_DELAYED, 1)
    addDamageCondition(fire, 7, 4000, -10)
    
    local poison = createConditionObject(CONDITION_POISON)
    setConditionParam(poison, CONDITION_PARAM_DELAYED, 1)
    addDamageCondition(poison, 4, 4000, -5)
    addDamageCondition(poison, 5, 4000, -4)
    addDamageCondition(poison, 7, 4000, -3)
    addDamageCondition(poison, 10, 4000, -2)
    addDamageCondition(poison, 19, 4000, -1)
    
    local energy = createConditionObject(CONDITION_ENERGY)
    setConditionParam(energy, CONDITION_PARAM_DELAYED, 1)
    addDamageCondition(energy, -1, 4000, -25)
    
    local energy1 = createConditionObject(CONDITION_ENERGY)
    setConditionParam(energy1, CONDITION_PARAM_DELAYED, 1)
    addDamageCondition(energy1, 1, 4000, -25)
    
    function onStepIn(cid, item, position, fromPosition, toPosition)
    if isCreature(cid) then
        if isInArray({1487,1488,1489,1492,1493,1494}, item.itemid) then
            if isInArray({1487,1492}, item.itemid) then
                if isPlayer(cid) then
                    if getPlayerAccess(cid) < 5 then
                        if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 then
                            doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -2, -2, CONST_ME_HITBYFIRE)
                        else
                            doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -20, -20, CONST_ME_HITBYFIRE)
                        end
                    end
                else
                    doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -20, -20, CONST_ME_HITBYFIRE)
                end
            doAddCondition(cid, fire)
            elseif isInArray({1488,1493}, item.itemid) then
                if isPlayer(cid) then
                    if getPlayerAccess(cid) < 5 then
                        if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 then
                            doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -1, -1, CONST_ME_HITBYFIRE)
                        else
                            doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -10, -10, CONST_ME_HITBYFIRE)
                        end
                    end
                else
                    doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -10, -10, CONST_ME_HITBYFIRE)
                end
            doAddCondition(cid, fire)
            end
        elseif isInArray({1490,1496}, item.itemid) then
            if isPlayer(cid) then
                if getPlayerAccess(cid) < 5 then
                    doTargetCombatHealth(0, cid, COMBAT_POISONDAMAGE, -5, -5, CONST_ME_GREEN_RINGS)
                    doAddCondition(cid, poison)
                end
            else
                doTargetCombatHealth(0, cid, COMBAT_POISONDAMAGE, -5, -5, CONST_ME_GREEN_RINGS)
                doAddCondition(cid, poison)
            end
        elseif isInArray({1491,1495}, item.itemid) then
            if isPlayer(cid) then
                if getPlayerAccess(cid) < 5 then
                    doTargetCombatHealth(0, cid, COMBAT_ENERGYDAMAGE, -30, -30, CONST_ME_ENERGYHIT)
                    doAddCondition(cid, energy)
                end
            else
                doTargetCombatHealth(0, cid, COMBAT_ENERGYDAMAGE, -30, -30, CONST_ME_ENERGYHIT)
                doAddCondition(cid, energy)
            end
        end
    end
    return true
    end
    
    function onStepOut(cid, item, position, fromPosition, toPosition)
    if isCreature(cid) then
        if isInArray({1491,1495}, item.itemid) then
            if isPlayer(cid) then
                if getPlayerAccess(cid) < 5 then
                    doRemoveCondition(cid, CONDITION_ENERGY)
                    doAddCondition(cid, energy1)
                end
            else
                doRemoveCondition(cid, CONDITION_ENERGY)
                doAddCondition(cid, energy1)
            end
        end
    end
    return true
    end
    Zaś w movements.xml szukamy takich linijek:
    Kod PHP:
    <!-- Campfires -->
        <movevent type="StepIn" itemid="1423" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1423" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1424" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1424" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1425" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1425" event="function" value="onAddField"/>
    
        <!-- Fields -->
        <movevent type="StepIn" itemid="1487" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1487" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1488" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1488" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1489" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1489" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1490" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1490" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1491" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1491" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1492" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1492" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1493" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1493" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1494" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1494" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1495" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1495" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1496" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1496" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1497" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1497" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1498" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1498" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1499" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1499" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1500" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1500" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1501" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1501" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1502" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1502" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1503" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1503" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1504" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1504" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1505" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1505" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1506" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1506" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1507" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1507" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1508" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1508" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="7359" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="7359" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="7360" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="7360" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="7465-7473" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="7465-7473" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="11095" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="11095" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="11096" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="11096" event="function" value="onAddField"/>
    I zamieniamy je na te:
    Kod PHP:
    <!-- Campfires -->
        <movevent type="StepIn" itemid="1423" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1423" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1424" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1424" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1425" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1425" event="function" value="onAddField"/>
    
        <!-- Fields -->
        <movevent type="StepIn" itemid="1487" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1487" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1488" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1488" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1489" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1489" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1490" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1490" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1491" event="script" value="fields.lua"/>
        <movevent type="StepOut" itemid="1491" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1491" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1492" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1492" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1493" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1493" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1494" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1494" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1495" event="script" value="fields.lua"/>
        <movevent type="StepOut" itemid="1495" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1495" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1496" event="script" value="fields.lua"/>
        <movevent type="AddItem" itemid="1496" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1497" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1497" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1498" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1498" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1499" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1499" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1500" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1500" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1501" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1501" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1502" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1502" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1503" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1503" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1504" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1504" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1505" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1505" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1506" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1506" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1507" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1507" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="1508" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="1508" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="7359" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="7359" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="7360" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="7360" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="7465-7473" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="7465-7473" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="11095" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="11095" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="11096" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="11096" event="function" value="onAddField"/>
        <movevent type="StepIn" itemid="11779" event="function" value="onStepInField"/>
        <movevent type="AddItem" itemid="11779" event="function" value="onAddField"/>
    ~Mefix
    "Nie chcę sławy i pieniędzy.. Chcę być tylko doskonały"

  2. #2
    Avatar zakius
    Data rejestracji
    2008
    Położenie
    The Internets
    Wiek
    33
    Posty
    11,075
    Siła reputacji
    24

    Domyślny

    Kod:
    local condition = {}
    for i = 1, 4 do
        table.insert(condition, createConditionObject(CONDITION_FIRE))
        addDamageCondition(condition[i], 1, 0, -(i == 1 and 20 or i==2 and 2 or i == 3 and 10 or i == 4 and 1))
        addDamageCondition(condition[i], isInArray({1,3},i)==TRUE and 7 or 2, 9000, -(isInArray({1,3},i)==TRUE and 10 or 1))
    end
     
    function onStepIn(cid, item, position, fromPosition)
        if isPlayer(cid) == TRUE and getPlayerFlagValue(cid, PlayerFlag_CannotBeAttacked) == FALSE then
            return doRemoveCondition(cid, CONDITION_FIRE), doAddCondition(cid, isInArray({1487,1492},item.itemid) == TRUE and condition[getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 2 or 1] or condition[getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 4 or 3])
        elseif isMonster(cid) then
            return doRemoveCondition(cid, CONDITION_FIRE), doAddCondition(cid, isInArray({1487,1492},item.itemid) == TRUE and condition[1 or 3])
        else    
        doSendMagicEffect(position, CONST_ME_POFF)
        end
    end
    hmm?
    credidts cykotitan i ja
    look

    albo, podobno nowsze 0.4 mają już item attribute absorbujący obrażenia od danego typu fielda

    no i po co zmieniac zachowanie poison i energy fieldów to ja nie wiem, to może najwyżej mulić

    ach, i jak możesz daj linki do oryginału
    Ostatnio zmieniony przez zakius : 15-10-2010, 15:04
    Problem z komputerem? Instrukcja diagnostyczna
    Cytuj Vegeta napisał Pokaż post
    Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
    Baby maja wymagania jak windows vista, takze nigdy nie wiesz.
    Cytuj Dzzej napisał Pokaż post
    Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
    Moje posty to esencja głupoty.
    "Don't worry, I'm just a pervert"

  3. Reklama
  4. #3

    Data rejestracji
    2010
    Posty
    9
    Siła reputacji
    0

    Domyślny

    Dałem inne fieldy, ponieważ w moim silniku potwór przemieszczał się przez nie, nie otrzymując żadnych obrażeń, więc napisałem skrypt by wyrządzał im krzywdę.

  5. #4

    Notoryczny Miotacz Postów Cro jest teraz offline
    Avatar Cro
    Data rejestracji
    2010
    Położenie
    Aokigahara
    Wiek
    29
    Posty
    1,123
    Siła reputacji
    15

    Domyślny

    Cytuj zakius napisał Pokaż post
    Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
    no i po co zmieniac zachowanie poison i energy fieldów to ja nie wiem, to może najwyżej mulić
    Dokładnie, to tylko zasyfianie pamięci, w ogóle nie wiem czemu to takie długie, nie przyglądałem się dokładnie ale już widzę, że zjebałeś sprawę ;f

    Poćwicz trochę + podpowiem Ci, że w skryptowaniu baardzo przydaje się logiczne myślenie ;)

Reklama

Informacje o temacie

Użytkownicy przeglądający temat

Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)

Podobne tematy

  1. Firewalker Boots Quest
    Przez ekowsky w dziale Tibia
    Odpowiedzi: 5
    Ostatni post: 11-03-2014, 14:32
  2. Firewalker boots quest
    Przez Raptor Nobis w dziale Tibia
    Odpowiedzi: 1
    Ostatni post: 30-11-2012, 03:40
  3. Odpowiedzi: 1
    Ostatni post: 20-06-2012, 18:16
  4. Firewalker Bootsy Quest oraz INQ
    Przez billy w dziale Tibia
    Odpowiedzi: 4
    Ostatni post: 06-01-2012, 14:20
  5. [8.0][Movements] Trap Room
    Przez konto usunięte w dziale Skrypty i technika
    Odpowiedzi: 56
    Ostatni post: 07-06-2009, 10:02

Zakładki

Zakładki

Zasady postowania

  • Nie możesz pisać nowych tematów
  • Nie możesz pisać postów
  • Nie możesz używać załączników
  • Nie możesz edytować swoich postów
  •