Reklama
Pokazuje wyniki od 1 do 6 z 6

Temat: [8.42][Actions] Heartstone! Do domu z exspowiska :)

  1. #1
    Grzybson

    Domyślny [8.42][Actions] Heartstone! Do temple z exspowiska :)

    Hejka. Zrobiłem skrypt teleportujący cię na podane miejsce. Są jego 2 wersje. 1 usuwa przedmiot i cię przenosi, 2 natomiast nie usuwa przedmiotu ale ma exhaust 30 minut. Tak więc:
    1. Wersja usuwająca przedmiot.
    Kod:
    local posx = 59 -- POZYCJA X
    local posy = 47 -- POZYCJA Y
    local posz = 7 -- POZYCJA Z
    --
    function onUse(cid, item, frompos, item2, topos)
    --
    local condition = getCreatureCondition(cid, CONDITION_INFIGHT)
    local pos = getPlayerPosition(cid)
    --
    	if  (condition == TRUE) then
    		doPlayerSendCancel(cid, "You are in fight.")
    	else
    		doTeleportThing(cid, {x=posx, y=posy, z=posz})
    		doRemoveItem(item.uid,1)
    		doSendMagicEffect(pos, 37)
    	end
    	return 1
    end
    2. Z exhaustem.
    Kod:
    local posx = 59 -- POZYCJA X
    local posy = 47 -- POZYCJA Y
    local posz = 7 -- POZYCJA Z
    --
    function onUse(cid, item, frompos, item2, topos)
    --
    local condition = getCreatureCondition(cid, CONDITION_INFIGHT)
    local pos = getPlayerPosition(cid)
    local condition2 = getCreatureCondition(cid, CONDITION_EXHAUST)
    --
    local EXHAUST_TIME = 30 -- minut ma trwać exhaust
    local EXHAUST_STOR = 7286
    --
    	if  (condition == TRUE) then
    		doPlayerSendCancel(cid, "You are in fight.")
    	elseif (os.time() < getPlayerStorageValue(cid, EXHAUST_STOR)) then
    		doSendMagicEffect(frompos, CONST_ME_POFF)
    		doPlayerSendCancel(cid, "You are exhausted.")
    	else
    		doTeleportThing(cid, {x=posx, y=posy, z=posz})
    		setPlayerStorageValue(cid, EXHAUST_STOR, os.time() + EXHAUST_TIME*60)
    		doSendMagicEffect(pos, 37)
    	end
    	return 1
    end
    Testowane pod najnowszego TFS-a. W razie błędów, śmiało pisać tutaj. Zapraszam do komentowania!
    Grzybson.

    PS Skrypt wrzucony również na tibie.net.pl pod takim samym nickiem.

    TYTUŁ JEST TROCHĘ MYLĄCY, NIE DO DOMKU TYLKO DO LOKACJI W SKRYPCIE (pisząc "domu" miałem na mysli miasto :P)
    Ostatnio zmieniony przez Grzybson : 21-06-2009, 19:44

  2. #2
    Studzian

    Domyślny

    Jak wiem taki kamyczek jest w WoWie ;D Dobra robota.

  3. Reklama
  4. #3
    Avatar St.Mike
    Data rejestracji
    2007
    Położenie
    W Polsce
    Posty
    156
    Siła reputacji
    17

    Domyślny

    Bo na wowie napisane jest, że przenosi do domu ;) Dziekuje bardzo, napewno skożystam:)

  5. #4
    Avatar Aragornik
    Data rejestracji
    2007
    Posty
    19
    Siła reputacji
    0

    Domyślny

    Nic ciekawego zwykły tp
    jedyny plus jest taki że mocny ex jest 30 minut

    Gdybyś zrobił coś takiego że do domku a jak nie masz domku to do temple
    WOC

  6. #5
    Grzybson

    Domyślny

    #up

    Na tibi.net.pl jeden z użytkowników zrobił takie coś.
    --DONE BY RAHIM--
    Kod:
    local config = {
    accessToUse = 0, 
    level = 40,
    mlvl = 3,
    teleportTo = "town", --house/town
    ignorePZ = false,  --true/false
    removeItem = false,   --true/false
    payForTeleportation = false,  --true/false
    howPay = 1000,  --only if payForTeleportation == true
    effect = CONST_ME_MAGIC_BLUE, --magic efect after tp
    exhaust = {false,300,5675}, --enable exhaust, how seconds, storage
    messages = {'You don\'t have required access!','You can not teleport to with PZ!','You don\'t have enought money to teleportation!',
    'You are teleported!','You are exhausted!','You don\'t have enought level!','You don\'t have enought magic level!',"Position, that you want be teleported, does not exist!","You dont have any house!"}
    }
    function onUse(cid,item,fromPosition,itemEx,toPosition)
        --by Rahim
            if getPlayerAccess(cid) < config.accessToUse then return (doPlayerSendCancel(cid,config.messages[1]) + 1) end
            if config.level > getPlayerLevel(cid) then return (doPlayerSendCancel(cid,config.messages[6]) + 1) end
            if config.mlvl > getPlayerMagLevel(cid) then return (doPlayerSendCancel(cid,config.messages[7]) + 1) end
            if config.ignorePZ == false then
                if getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
                    return (doPlayerSendCancel(cid,config.messages[2]) +1)
                end
            end
            if config.teleportTo == "house" then
                if getHouseByPlayerGUID(getPlayerGUID(cid)) == "" then
                    return (doPlayerSendCancel(cid,config.messages[9])+1)
                end
                pos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))
            elseif config.teleportTo == "town" then
                pos = getTownTemplePosition(getPlayerTown(cid))
            else
                return TRUE
            end
            if pos == nil or pos == -1 then return (doPlayerSendCancel(cid,config.messages[8]) +1) end
            if config.payForTeleportation == true then
                if getPlayerMoney(cid) < config.howPay then
                    return (doPlayerSendCancel(cid,config.messages[3])+1)
                end
                doPlayerRemoveMoney(cid,config.howPay)
            end
            if config.exhaust[1] == true then
                if getPlayerStorageValue(cid,config.exhaust[3]) > os.time() then
                    return (doPlayerSendCancel(cid,config.messages[5])+1)
                end
                setPlayerStorageValue(cid,config.exhaust[3],os.time()+config.exhaust[2])
            end
            doTeleportThing(cid,pos)
            doSendMagicEffect(pos,config.effect)
            doPlayerSendTextMessage(cid,22,config.messages[4])
            if config.removeItem == true then
                if isItemRune(item.itemid) == TRUE then
                    if item.type > 1 then
                        doChangeTypeItem(item.uid,item.type-1)
                    else
                        doRemoveItem(item.uid,1)
                    end
                else
                    doRemoveItem(item.uid,1)
                end
            end
            return TRUE
    end
    Pisał, że nie testował ale to przenosi do domku lub do temple. Pozdrawiam
    Grzybson.

    PS. Dzięki za komentarze :P
    Ostatnio zmieniony przez Grzybson : 22-06-2009, 11:23

  7. #6
    Guth_Arina

    Domyślny

    Skrypt prosto z WoW'a ściągnięty xD ale mi na forgotten działa xD

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. Doradźcie jakiś tani tablet do pogrania w heartstone
    Przez dright w dziale Sprzęt i oprogramowanie
    Odpowiedzi: 0
    Ostatni post: 09-06-2015, 21:05
  2. Odpowiedzi: 1
    Ostatni post: 01-01-2014, 16:39
  3. Sprzedam Klucz do zamkniętych Beta-testów Heartstone
    Przez Zed w dziale Giełda
    Odpowiedzi: 1
    Ostatni post: 30-10-2013, 08:29
  4. Wymienię Heartstone Beta Key
    Przez Rish w dziale Giełda
    Odpowiedzi: 0
    Ostatni post: 30-10-2013, 07:03
  5. Heartstone - klucze do beta testów!
    Przez Slonio w dziale Inne gry
    Odpowiedzi: 0
    Ostatni post: 06-09-2013, 11:17

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
  •