Vip Door

Status
Zamknięty.

kuba1418

Banned
Zbanowany
Dołączył
Kwiecień 12, 2008
Posty
178
Liczba reakcji
17
VIP DOOR v2
8.42
Opis : S? to drzwi je?eli u?yjemy Vip access (amulet) na siebie to b?dziemy mogli przechodzi? przez drzwi.
W actions tworzymy plik vipdoor.lua i wklejamy do niego to :

-- Vip Door v2 by Kuba1418 --

function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if item.actionid == 2075 and getPlayerStorageValue(cid,21444) == 1 then
if cidPosition.y < toPosition.y then
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
end
return TRUE
else
doCreatureSay(cid, "Nie posiadasz vip access.", TALKTYPE_ORANGE_1)
return TRUE
end
return FALSE
end
Teraz robimy plik vipdoor2.lua i wklejamy tam to :

-- Vip Door v2 by Kuba1418 --
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if item.actionid == 2076 and getPlayerStorageValue(cid,21444) == 1 then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
end
return TRUE
else
doCreatureSay(cid, "Nie posiadasz vip access.", TALKTYPE_ORANGE_1)
return TRUE
end
return FALSE
end

Potem tworzymy plik vipaccess.lua i wklejmy do niego to :

-- By Kuba1418

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

if item.itemid == 5785 then

local playerpos = getCreaturePosition(cid)

doRemoveItem(item.uid,1)
setPlayerStorageValue(cid,21444,1)

doSendMagicEffect(playerpos, 12)
doCreatureSay(cid, "Gratulacie! Teraz jestes posiadaczem Vip Access!", TALKTYPE_ORANGE_1)
end
end
Jest to medal of honor gdy go u?yjemy to b?dziemy mogli przej?? przez vip door :D
W actions.xml dodajmy 3 linijki :

<action itemid="5785" script="Vipaccess.lua" />
<action actionid="2075" script="vipdoor.lua"/>
<action actionid="2076" script="vipdoor2.lua"/>

Teraz w items.xml znajdujemy :
<item id="5785" article="a" name="medal of honour">
<attribute key="weight" value="100"/>
</item>
I zamieniamy na :

<item id="5785" article="a" name="vip access">
<attribute key="weight" value="100"/>
<attribute key="writeable" value="0"/>
</item>

W map edytorze dajemy drzwiom Action ID : 2075 je?eli maj? nas teleportowa? na North /\ albo South \/ a je?li na < East albo West > to dajemy Action ID : 2076 na zdi?ciu s? drzwi

vipmk4.jpg

Pozdrawiam Kuba1418. :D
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Nie ?le jak to tw?j skrypt to naprawd? nie ?le ...Mo?e przyda sie na jakiego? ots...:rolleyes:
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Zwyk?e akcje na Value, ale bardzo fajne! 9/10
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

A dzia?a? by on na Aries0.4.0 Tibia 8.1 XML??
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

@Guzux
Skrypt m?j na 100% :D
@HamachiAdser
Dzi?ki za ocen :D
@Szupek
Wypr?buj jak nie b?dzie ci dzia?a? to po staram si? zrobi? pod 8.1 :D
Pozdrawiam ;p
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Jezeli bedzie dzialac to reputa dostaniesz :) Sprawdzam...

Edit:
Debug mi wyskakuje :/ Pomoz :P
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

@up
Wyskakuje ci jaki? b??d w silniku i jaki masz silnik??
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Usunalem debuga juz,ale co z drzwiami w map edytorze ? :s
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

w Map edytorze dajesz drzwi z postmana np. ItemID: [1223].
i dajesz im ActionID: [2076] je?li drzwi s? obrucone w stron? a je?li inaczej to ActionID: [2075]
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Ten Vip access "medal of honor" nie dziala i dzrzwi,gdy klikam na drzwi to pisze,ze sa zamkniete ;[

A to w silniku... Silnik TFS 8.40 !

Kod:
[03/01/2009  19:29:03] Warning: [Event::loadScript] Can not load script. data/actions/scripts/vipdoor.lua
[03/01/2009  19:29:03] data/actions/scripts/vipdoor.lua:56: '<eof>' expected near 'end'
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Wydaje mi si? ?e nie skopiowa?e? ca?ego skryptu bo brakuje ci zako?czenia skryptu 'end' mi smiga na TFS 0.2 pod 8.4
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Mam tak samo jak napisales w poscie ! ;S

Edit:
Vip door juz nie ma bledow,ale ten itemek vip access nie dziala...gdy klikam na niego mam debuga :/
W silnik nic nie pisze ze jest blad w skrypcie ! :s Pomocy
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

a morze bys kurde cos wytlumaczyl co skrypt daje i jak sie go testuje ??..
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Edit:
Vip door juz nie ma bledow,ale ten itemek vip access nie dziala...gdy klikam na niego mam debuga :/
W silnik nic nie pisze ze jest blad w skrypcie ! :s Pomocy

Spr?buj zamiast :
-- Vip Door by Kuba1418 --

function onUse(cid, item, frompos, item2, topos)
local storageValue = 21444
vipstatus = getPlayerStorageValue(cid,storageValue)


if vipstatus == 1 then

doTransformItem(item.uid, item.itemid + 1)

playerpos = getPlayerPosition(cid)

doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}

if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then

doMoveCreature(cid, 0)

elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then

doMoveCreature(cid, 1)

elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then

doMoveCreature(cid, 2)

elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then

doMoveCreature(cid, 3)

elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then

doMoveCreature(cid, 4)

elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then

doMoveCreature(cid, 5)

elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then

doMoveCreature(cid, 6)

elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then

doMoveCreature(cid, 7)

end

else
doCreatureSay(cid, "Nie posiadasz Vip Access.", TALKTYPE_ORANGE_1)
end

return 1

end

Wklej :
-- Vip Door by Kuba1418 --

function onUse(cid, item, frompos, item2, topos)
local storageValue = 21444
vipstatus = getPlayerStorageValue(cid,storageValue)


if vipstatus == 1 then

doTransformItem(item.uid, item.itemid + 1)

playerpos = getPlayerPosition(cid)

doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}

if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then

doMoveCreature(cid, 0)

elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then

doMoveCreature(cid, 1)

elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then

doMoveCreature(cid, 2)

elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then

doMoveCreature(cid, 3)

elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then

doMoveCreature(cid, 4)

elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then

doMoveCreature(cid, 5)

elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then

doMoveCreature(cid, 6)

elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then

doMoveCreature(cid, 7)

end

else
doPlayerSendTextMessage(cid,22,"Nie posiadasz Vip Access!")
end

return 1

end

Je?li masz jaki? b??d w silniku to pisz.
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Vip door dzialaja !! :) teraz sie postaraj vip access :)
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Zamiast :
-- By Kuba1418

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

if item.itemid == 5785 then

local playerpos = getCreaturePosition(cid)

doRemoveItem(item.uid,5785)
setPlayerStorageValue(cid,21444,1)

doSendMagicEffect(playerpos, 12)
doCreatureSay(cid, "Gratulacie! Teraz jestes posiadaczem Vip Access!", TALKTYPE_ORANGE_1)
end
end
Sprubuj :
-- By Kuba1418

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

if item.itemid == 5785 then

local playerpos = getCreaturePosition(cid)

doRemoveItem(item.uid,5785)
setPlayerStorageValue(cid,21444,1)

doSendMagicEffect(playerpos, 12)
doPlayerSendTextMessage(cid,22,"Gratulacie! Teraz jestes posiadaczem Vip Access!")
end
end

@down
<action uniqueid="2021" script="blank.lua" />
function onUse(cid, item, frompos, item2, topos)
if doPlayerRemoveMoney(cid, 50) == TRUE then
local playerpos = getCreaturePosition(cid)
doPlayerAddItem(cid,2173,1)
doSendMagicEffect(playerpos, 12)
else
doPlayerSendCancel(cid, "Nie stac sie! To kosztuje 50gp")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
To na czerwono wpisz id przedmiotu czyli liny chyba b?dzie ?miga? jak nie to jutro jak znajd? czas to ci co? zrobi? .
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Noo... :D dziala :)
Thx :cool: Dalem reputa za pomoc :p

Edit: Jeszcze jedno :P Masz taki skrypt na kupowanie items za pomoca dzwigni ? tzn. chce np.kupic line i chce zeby odrazu do glownego BP mi wkladalo :P Bo ja mam taki skrypt ale jak kupuje to mi jakis blad w silniku wyskakuje-ale all dziala,normalnie sie kupuje !
Jak masz taki skrypt to poprosze go :)
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

@kuba1418
Niestety nie dzia?a gdy chce u?y? vip door to w silniku wyskakuje b??d tak samo robi z Vip Acces. Kuba1418 by?bym ci bardzo wdzi?czny gdyby? przerobi? go na tibia 8.1 Aries 0.4.0 XML...Zale?y mi na tym skrypcie
 
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

@UP
Masz tam zmienione...
Mi tez nie dzialalo i pozmienial cos i teraz dziala :P

Edit: @Kuba1418
Dziala ten skrypt na kupowanie :)
Dzieki :D 10/10
 
Ostatnia edycja:
Odp: [8.4] Vip Door

Odp: [8.4] Vip Door

Super ;] przyda sie 10/10
 
Status
Zamknięty.
Back
Do góry