Skrypty & Kody TP nie dzia?a

Status
Zamknięty.

marllix

User
Zarejestrowany
Dołączył
Październik 7, 2011
Posty
32
Liczba reakcji
0
Witam,
u?ywam skryptu na losowy item z present baga :
http://tibia.net.pl/threads/573662-ToT-Bag
wszystko dzia?a opr?cz tp,
gdy wylosuje tp pojawia sie napis
You gotta Tricket ! Hmm how to back ?
nie telepertuje mnie w ?adne miejsce , wsp??rz?dne mam dobrze ustawione .
w konsoli te? nic nie wyskakuje.
 
Odp: TP nie dzia?a

Zmiana koncepcji. U?ywam silnika TFS 1.2 pod tibi? 7.72 / skrypt dzia?a bardzo dobrze. Poka? jak wpisa?e? dane do teleportu? Jakiego u?ywasz silnika? - dzia?a mi to >

PHP:
-- ToT by Leon Zawodowiec --
    -- Made for Halloween Update --
 
function onUse(cid, item, frompos, item2, topos)
 
local liczba = math.random(6,6)
-- no spoko  expl  dest  fbomb  hmm  gfb    sd   mwal   uh   paral    ava    5d   10d
runyyy_id = {2313, 2261, 2305, 2311, 2304, 2268, 2293, 2273, 2278,  2274,  2280, 2282}
x =         {50,   50,    50,    50,   50,   50,   50,   50,   50,    50,     1,    1}
 
 
    if (liczba == 1) then
        doPlayerAddItem(cid, 2160, 2, TRUE) -- 1. Treat - 2cc.
        doRemoveItem(item.uid, 1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got 2 Crystal Coins.")
        return true
 
    elseif (liczba == 2) then
        doPlayerAddBlessing(cid, 1)
        doPlayerAddBlessing(cid, 2)
        doPlayerAddBlessing(cid, 3)
        doPlayerAddBlessing(cid, 4)
        doPlayerAddBlessing(cid, 5)
        doPlayerAddItem(cid, 2160, 2, TRUE) -- 2. Treat - 2cc + Blessy.
        doRemoveItem(item.uid, 1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got 2 Crystal Coins and All Blessings.")
        return true
 
    elseif (liczba == 3) then
        local z = math.random(1,12)
        doPlayerAddItem(cid, runyyy_id[z], x[z])  -- 3. Treat - Losowa Runka x50, lub Runka z PACC'em.
        nazwa = getItemNameById(runyyy_id[z])
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got ".. x[z] .."x ".. nazwa .. ".")
        doRemoveItem(item.uid, 1)
        return true    
 
    elseif (liczba == 4) then
        doPlayerAddItem(cid, 6569, 25)  -- 4. Treat - 25x cukierkow
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got 25 Candies.")
        doRemoveItem(item.uid, 1)
        return true            
 
    elseif (liczba == 5) then
        doPlayerAddExperience(cid, 500000)  -- 5. Treat - 500k Expa
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received 500k Experience Points, Please Re-Log.")
        doRemoveItem(item.uid, 1)
        return true    
 
 
    elseif (liczba == 6) then
        doTeleportThing(cid,{x=149, y=40, z=7})  -- 6. Trick - Teleport na zadupie
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You gotta Tricket ! Hmm how to back ?")
        doRemoveItem(item.uid, 1)
        return true            
 
    elseif (liczba == 7) then
        doRemoveItem(item.uid, 1)
        doRemoveCreature(cid, true) -- 7. Trick - Kick
        return true    
 
    elseif (liczba == 8) then
 
            if (getPlayerSex(cid) == 0) then    -- 8. Trick - Zmiana p?ci
                doPlayerSetSex(cid, 1)
            else
                doPlayerSetSex(cid, 0)
            end
 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You gotta Owned ! Re-Log ! :D")
        doRemoveItem(item.uid, 1)
        return true        
 
    elseif (liczba == 9) then
        doPlayerSay(cid, "JESTEM PEDALEM")    -- 9. Trick - Krzyczy
        doRemoveItem(item.uid, 1)
        return true
 
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This bag was empty.") -- 10. Trick - Pusty worek
        doRemoveItem(item.uid, 1)
        return true
    end
return true
end
 
Ostatnia edycja:
Odp: TP nie dzia?a

zrobi?em tak :
-- ToT by Leon Zawodowiec --
-- Made for Halloween Update --
-- Remade by Simon --

function onUse(cid, item, frompos, item2, topos)

-- no spoko expl dest fbomb hmm gfb sd mwal uh paral ava 5d 10d
local runyyy_id = {2313, 2261, 2305, 2311, 2304, 2268, 2293, 2273, 2278, 2274, 2280, 2282}
local config = {
pos = {x=849, y=1113, z=6}
}
local x = {50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 1, 1}
local treats = {[1] = {f = function(cid,uid)
doPlayerAddItem(cid, 2160, 2, TRUE) -- 1. Treat - 2cc.
doRemoveItem(uid, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got 2 Crystal Coins.")
end},
[2] = {f = function(cid,uid)
for i = 1, 5 do
doPlayerAddBlessing(cid, i)
end
doPlayerAddItem(cid, 2160, 2, TRUE) -- 2. Treat - 2cc + Blessy.
doRemoveItem(uid, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got 2 Crystal Coins and All Blessings.")
end},
[3] = {f = function(cid,uid)
local z = math.random(1,12)
doPlayerAddItem(cid, runyyy_id[z], x[z]) -- 3. Treat - Losowa Runka x50, lub Runka z PACC'em.
nazwa = getItemNameById(runyyy_id[z])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got ".. x[z] .."x ".. nazwa .. ".")
doRemoveItem(uid, 1)
end},
[4] = {f = function(cid,uid)
doPlayerAddItem(cid, 6569, 25) -- 4. Treat - 25x cukierkow
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got 25 Candies.")
doRemoveItem(uid, 1)
end},
[5] = {f = function(cid,uid)
doPlayerAddExperience(cid, 500000) -- 5. Treat - 500k Expa
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received 500k Experience Points, Please Re-Log.")
doRemoveItem(uid, 1)
end},
[6] = {f = function(cid,uid)
doTeleportThing(cid, config.pos) -- 6. Trick - Teleport na zadupie
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You gotta Tricket ! Hmm how to back ?")
doRemoveItem(uid, 1)
end},
[7] = {f = function(cid,uid)
doRemoveItem(uid, 1)
doRemoveCreature(cid, true) -- 7. Trick - Kick
end},
[8] = {f = function(cid,uid)
if (getPlayerSex(cid) == 0) then -- 8. Trick - Zmiana p?ci
doPlayerSetSex(cid, 1)
else
doPlayerSetSex(cid, 0)
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You gotta Owned ! Re-Log ! :D")
doRemoveItem(uid, 1)
end},
[9] = {f = function(cid,uid)
doPlayerSay(cid, "JESTEM PEDALEM") -- 9. Trick - Krzyczy
doRemoveItem(uid, 1)
end},
[10] = {f = function(cid,uid)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This bag was empty.") -- 10. Trick - Pusty worek
doRemoveItem(uid, 1)
end}
}
local liczba = math.random(1,#treats)

treats[liczba].f(cid,item.uid) -- wywo?anie funkcji danego psikusa
return true
end

przeszuka?em z 50 bag?w i nie ma tp

---------- Tre?? dodana o 10:10 ----------

Dzia?a :D
przeszuka?em jeszcze kilka i mnie przenios?o , heh .

THX :)
 
Status
Zamknięty.
Back
Do góry