Reklama
Pokazuje wyniki od 1 do 3 z 3

Temat: [8.54] Problem z Annihilator Questem

  1. #1
    Avatar Punky <33
    Data rejestracji
    2008
    Położenie
    VALHALLA
    Wiek
    30
    Posty
    438
    Siła reputacji
    16

    Domyślny [8.54] Problem z Annihilator Questem

    Witam, jestem nowy w 'otsowaniu' postawiłem serwer i nie działa Anni, po prostu po naciśnięciu dźwigni nic się nie dzieje.
    Tu macie mój skrypt na anni, rzućcie okiem czy wszystko w porządku, jak dotąd rozkminiłem tylko,
    że entry -x, y , z (współrzędne płytek obok dźwigni) są nie takie jak w rme, to o to chodzi?

    Kod:
    local config = {
        daily = "no", -- allow only one enter per day? (like in global Tibia)
        level = 100,
        storage = 30015,
        entry =
        {
            {x = 247, y = 659, z = 13},
            {x = 247, y = 660, z = 13},
            {x = 247, y = 661, z = 13},
            {x = 247, y = 662, z = 13}
        },
        destination =
        {
            {x = 189, y = 650, z = 13},
            {x = 189, y = 651, z = 13},
            {x = 189, y = 652, z = 13},
            {x = 189, y = 653, z = 13}
        }
    }
    
    config.daily = getBooleanFromString(config.daily)
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(item.itemid == 1946) then
            if(config.daily) then
                doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
            else
                doTransformItem(item.uid, item.itemid - 1)
            end
    
            return true
        end
    
        if(item.itemid ~= 1945) then
            return true
        end
    
        local players = {}
        for _, position in ipairs(config.entry) do
            local pid = getTopCreature(position).uid
            if(pid == 0 or not isPlayer(pid) or getCreatureStorage(pid, config.storage) > 0 or getPlayerLevel(pid) < config.level) then
                doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
                return true
            end
    
            table.insert(players, pid)
        end
    
        for i, pid in ipairs(players) do
            doSendMagicEffect(config.entry[i], CONST_ME_POFF)
            doTeleportThing(pid, config.destination[i], false)
            doSendMagicEffect(config.destination[i], CONST_ME_ENERGYAREA)
        end
    
        doTransformItem(item.uid, item.itemid + 1)
        return true
    end
    A tutaj wycinek z mojego actions.xml
    Kod:
    <action uniqueid="30015" event="script" value="quests/annihilator.lua"/>
            <action uniqueid="9000" event="script" value="quests/annihilator.lua"/>
    Ostatnio zmieniony przez Punky <33 : 04-10-2010, 18:44


  2. #2
    Avatar Punky <33
    Data rejestracji
    2008
    Położenie
    VALHALLA
    Wiek
    30
    Posty
    438
    Siła reputacji
    16

    Domyślny

    Odświeżam.

    @Esio
    Dźwignia ma unique id 9000
    Co do pozycji, zmieniłem na te które miałem wyszukałem w rme.
    Ostatnio zmieniony przez Punky <33 : 05-10-2010, 21:38


  3. Reklama
  4. #3
    Avatar GM Esio
    Data rejestracji
    2007
    Położenie
    Mysłowice
    Wiek
    32
    Posty
    333
    Siła reputacji
    18

    Domyślny

    1. sprawdź czy gracz stoi na pewno na tych pozycjach.
    2. Czy dźwignia posiada posiada odpowiednie uniqueid?
    3. Czy w silniku pojawia się jakiś błąd?
    4. Tutaj masz inny skrypt może Tobie zadziała.

    Kod:
    function onUse(cid, item, frompos, item2, topos)
    
       	if item.uid == 7020 and item.itemid == 1945 then
    		local player1pos = {x=111, y=51, z=10, stackpos=253}
    		local player1 = getThingfromPos(player1pos)
    
    		local player2pos = {x=110, y=51, z=10, stackpos=253}
    		local player2 = getThingfromPos(player2pos)
    
    		local player3pos = {x=109, y=51, z=10, stackpos=253}
    		local player3 = getThingfromPos(player3pos)
    
    		local player4pos = {x=108, y=51, z=10, stackpos=253}
    		local player4 = getThingfromPos(player4pos)
    
    
    		if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
    			local queststatus1 = getPlayerStorageValue(player1.uid,7020)
    			local queststatus2 = getPlayerStorageValue(player2.uid,7020)
    			local queststatus3 = getPlayerStorageValue(player3.uid,7020)
    			local queststatus4 = getPlayerStorageValue(player4.uid,7020)
    
    			if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
    				local nplayer1pos = {x=99, y=56, z=11}
    				local nplayer2pos = {x=98, y=56, z=11}
    				local nplayer3pos = {x=97, y=56, z=11}
    				local nplayer4pos = {x=96, y=56, z=11}
    
    				doSendMagicEffect(player1pos,2)
    				doSendMagicEffect(player2pos,2)
    				doSendMagicEffect(player3pos,2)
    				doSendMagicEffect(player4pos,2)
    
    				doTeleportThing(player1.uid,nplayer1pos)
    				doTeleportThing(player2.uid,nplayer2pos)
    				doTeleportThing(player3.uid,nplayer3pos)
    				doTeleportThing(player4.uid,nplayer4pos)
    
    				doSendMagicEffect(nplayer1pos,10)
    				doSendMagicEffect(nplayer2pos,10)
    				doSendMagicEffect(nplayer3pos,10)
    				doSendMagicEffect(nplayer4pos,10)
    
    				doTransformItem(item.uid,item.itemid+1)
    			else
    				doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
    			end
    		else
    			doPlayerSendCancel(cid,"You need four players for this quest.")
    		end
    
    	elseif item.uid ==7020 and item.itemid == 1946 then
    		if getPlayerAccess(cid) <= 0 then
    			doTransformItem(item.uid,item.itemid-1)
    		else
    			doPlayerSendCancel(cid,"Sorry, not possible.")
    		end
    	else
    		return 0
    	end
    
    	return 1
    end
    http://ots.tibiaserver.pl/tibiaserver.gif

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. Problem z questem war of hive
    Przez tomazino32 w dziale Tibia
    Odpowiedzi: 0
    Ostatni post: 04-08-2014, 07:43
  2. Problem z elemental outfit questem
    Przez Sir Zajebioza w dziale Tibia
    Odpowiedzi: 1
    Ostatni post: 23-11-2013, 21:59
  3. Problem z FRONTIER questem!
    Przez Żółw w dziale Tibia
    Odpowiedzi: 6
    Ostatni post: 03-05-2013, 14:25
  4. Problem z ice island questem
    Przez matek697 w dziale Tibia
    Odpowiedzi: 1
    Ostatni post: 14-04-2012, 19:38
  5. [8.54] Problem z questem
    Przez dragon1155 w dziale Strefa developerska
    Odpowiedzi: 1
    Ostatni post: 09-03-2010, 03:21

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
  •