Autor |
Wiadomość |
Dawidx
Administrator

Dołączył: 19 Maj 2009
Posty: 3
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Cmolas
|
|
VIP Medal 8.1+ |
|
Ten skrypt NIE JEST MÓJ ale wiem ze jest bardzo przydatny na servach z sms shopem ;p Ja only opisze jak go wrzocic na OTSa ;p
A wiec zaczynamy ;p
data/actions/scripts tworzymy tutaj plik o nazwie vipdoor.lua
I wklejamy kod
 |  | 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 |
Potem w tym samym folderze tworzymi plik o nazwie vipaccess.lua
Wklejamy:
 |  | 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
|
Potem wchodzimy w actions.xml i wklejamy 2 linijki (obojetnie gdzie)
 |  | <action itemid="5785" script="Vipaccess.lua" />
<action actionid="2075" script="vipdoor.lua"/> |
Nastepnie w items.xml szukamy (ctrl+F i wpisujemy np ID lub nazwe)
 |  | <item id="5785" article="a" name="medal of honour">
<attribute key="weight" value="100"/>
</item> |
I zmieniamy to @up na
 |  | <item id="5785" article="a" name="vip access">
<attribute key="weight" value="100"/>
<attribute key="writeable" value="0"/>
</item> |
OK skrypt mamy juz dodany do OTSa ;p
Teraz w RME (map editor) robimy w danym miejscu drzwi i zmieniamy ich action ID na 2075- Wchodzisz w map edytora, tworzysz drzwi, klikasz na nie prawym przyciskiem i klikasz Properties i tam ustawiasz action ID ;p
Vip medal ma ID- 5785
Pozdrawiam ;D
Post został pochwalony 0 razy
Ostatnio zmieniony przez Dawidx dnia Pon 18:47, 25 Maj 2009, w całości zmieniany 1 raz
|
|
Pon 18:46, 25 Maj 2009 |
|
 |
|
 |
Arek
Administrator

Dołączył: 19 Maj 2009
Posty: 4
Przeczytał: 0 tematów
Ostrzeżeń: 0/5
|
|
|
|
Nom brawo Daj coś jeszcze.
Post został pochwalony 0 razy
|
|
Pon 19:30, 25 Maj 2009 |
|
 |
|
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach
|
|
|