What's new

Vip 2

Status
Not open for further replies.

HaiT

Advanced User
Joined
Mar 28, 2010
Messages
431
Reaction score
21
Mam na servie VIPa zwyklego chcem storzyc vipa 2 kopjuje tego pierwszego zmieniam tylko action id i niedziala, vip acces 2 dziala ale vip door 2 niechca dzialac.
Poradzi ktos cos?!
Reput za pomoc.
 

HaiT

Advanced User
Joined
Mar 28, 2010
Messages
431
Reaction score
21
Odp: Vip 2

Super Acces

-- By Maly Wizak --

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

if item.itemid == 2110 then

local playerpos = getCreaturePosition(cid)

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

doSendMagicEffect(playerpos, 12)
doPlayerSay(cid, "Congratulation! Now you are have Super VIP Access!!!", TALKTYPE_ORANGE_1)
end
end

Super Door

--VIP MALY WIZAK--

function onUse(cid, item, frompos, item2, topos)
local storageValue = 21444
vipstatus = getPlayerStorageValue(cid,storageValue)
newnPosition = {x=515, y=1031, z=7}
if vipstatus == 1 then
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if item.actionid == 2020 and getPlayerStorageValue(cid,21444) == 1 then
doTeleportThing(cid,newnPosition)
doSendMagicEffect(newnPosition, 10)
doPlayerSay(cid, "Welcome on Super VIP !!!", TALKTYPE_ORANGE_1)
end
else
doPlayerSay(cid, "You don't have Super VIP!!!", TALKTYPE_ORANGE_1)
end
return 1
end
 

ErMex

Egzekucja
Joined
Dec 1, 2010
Messages
574
Reaction score
181
Odp: Vip 2

Super Access:
-- By Maly Wizak --

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

if item.itemid == 2112 then

local playerpos = getCreaturePosition(cid)

doRemoveItem(item.uid,2112)
setPlayerStorageValue(cid,21445,1)

doSendMagicEffect(playerpos, 12)
doPlayerSay(cid, "Congratulation! Now you are have Super VIP Access!!!", TALKTYPE_ORANGE_1)
end
end

Super Door:
--VIP MALY WIZAK--

function onUse(cid, item, frompos, item2, topos)
local storageValue = 21445
vipstatus = getPlayerStorageValue(cid,storageValue)
newnPosition = {x=515, y=1031, z=7}
if vipstatus == 1 then
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if item.actionid == 2112 and getPlayerStorageValue(cid,21445) == 1 then
doTeleportThing(cid,newnPosition)
doSendMagicEffect(newnPosition, 10)
doPlayerSay(cid, "Welcome on Super VIP !!!", TALKTYPE_ORANGE_1)
end
else
doPlayerSay(cid, "You don't have Super VIP!!!", TALKTYPE_ORANGE_1)
end
return 1
end

Nie dzia?a?o Ci bo zapomnia?e? zmieni? storage.
 

HaiT

Advanced User
Joined
Mar 28, 2010
Messages
431
Reaction score
21
Odp: Vip 2

Dodalem to i nadal niedziala wtedy vip 2 acces dzialal a teraz niedziala ani acces ani dzwi niewiem musze jescze gdzies cos dodac?
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Vip 2

Tworzysz plik o nazwie superVIP.lua i wklejasz:
PHP:
local config = {
				--VIP acces
				item = 2322, --king doll
				storage = 20000,
				efekt = CONST_ME_SOUND_RED,
				--door
				position = {x=515, y=1031, z=7},
				actionid = 2010,
				efekt = CONST_ME_TELEPORT
				}

function onUse(cid, item, frompos, itemEx, topos)
local vipstatus = getPlayerStorageValue(cid, config.storage)
if item.itemid == config.item then
	local pos = getCreaturePosition(cid)
	doRemoveItem(item.uid, 1)
	doPlayerSetStorageValue(cid, config.storage, 1)
	doSendMagicEffect(pos, config.efekt)
	doCreatureSay(cid, "Congratulation! Now you are have Super VIP Access!!!", TALKTYPE_ORANGE_1)
end
if vipstatus == 1 and item.actionid == config.actionid then
	doTeleportThing(cid, config.position)
	doSendMagicEffect(config.position, config.efekt)
	doCreatureSay(cid, "Welcome on Super VIP !!!", TALKTYPE_ORANGE_1)
else
	doCreatureSay(cid, "You don't have Super VIP!!!", TALKTYPE_ORANGE_1)
end
return true
end
Do actions.xml:
PHP:
<action itemid="2322" event="script" value="superVIP.lua"/>
<action actionid="2010" event="script" value="superVIP.lua"/>
 

HaiT

Advanced User
Joined
Mar 28, 2010
Messages
431
Reaction score
21
Odp: Vip 2

Niestety niedzia?a ale za zaangazowanie dla panow reputy +
Moze ktos inny umie mi pomuc?
oczywiscie reputy za kazda probe pomocy.
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Vip 2

Jak to nie dzia?a? B??dy?
Co dok?adnie Ci nie dzia?a?
 

HaiT

Advanced User
Joined
Mar 28, 2010
Messages
431
Reaction score
21
Odp: Vip 2

na dzwiach napisane ze sa zamkniete a lalka jak nacisne to nieznika i niema napisu ze zostalem vipem.
Ogolnie rzecz bior?c wogle niedziala.
/ Zwykly vip dziala jak cos.
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Vip 2

Doda?e? linijki do actions.xml?
U?YWASZ LALKI O ID 2322?
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Vip 2

Wi?c co? ?le robisz, gdy? skrypt powinien dzia?a? dobrze.
Robisz nowy plik w actions/scripts? Podajesz dobr? ?cie?k? do pliku w actions.xml? Na pewno robisz wszystko dobrze?
 
Status
Not open for further replies.
Top