-Skrypt Vip Acces

Status
Zamknięty.

luks777

User
Zarejestrowany
Dołączył
Czerwiec 29, 2011
Posty
25
Liczba reakcji
0
Witam,

da sie zrobic komende ze jak napisze "!vip" to pokaze mi ile mam sie jeszcze dni?

a drugie pytanie to czy mozna zrobic statue jako vip dor (ze gdy uzyje vip medala to jak nacisne prawym na statule to mnie przeniesie na vip'a a jak nie ma sie vipa to przeniesie do temple?
 
Odp: Vip Acces

spr?buj co? takiego ( na statue)
w action robisz vip.lua
[LUA]
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
actionid = 2086, --actionid na pos?g
tekst = "Nie posiadasz Vip Access." --tekst odmowy
}
local cidPosition = getCreaturePosition(cid)
if item.actionid == config.actionid and getPlayerStorageValue(cid,21555) == 1 then
doTeleportThing(cid, {x=1111,y=22222,z=333333}, TRUE) ----Je?li masz vipa
else
doTeleportThing(cid, {x=4444,y=55555,z=66666}, TRUE) --- jesli nie masz
end
return TRUE
else
doCreatureSay(cid, config.tekst, TALKTYPE_ORANGE_1)
return TRUE
end
return FALSE
end [/LUA]
tam gdzie masz liczby wstawiasz posy. Nie wiem czy zadzia?a ale pr?buj :)
 
Odp: Vip Acces

nie wyskakuje zaden blad ale nie chce chodzic :(
 
Odp: Vip Acces

A spr?buj tak.
[LUA]
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
actionid = 2086, --actionid na pos?g
tekst = "Nie posiadasz Vip Access." --tekst odmowy
}
local cidPosition = getCreaturePosition(cid)
if item.actionid == config.actionid and getPlayerStorageValue(cid,21555) == 1 then
doTeleportThing(cid, {x=1111,y=22222,z=333333}) ----Je?li masz vipa
else
doTeleportThing(cid, {x=4444,y=55555,z=66666}) --- jesli nie masz
end
return TRUE
else
doCreatureSay(cid, config.tekst, TALKTYPE_ORANGE_1)
return TRUE
end
return FALSE
end[/LUA]
I nie wiem czy doda?e? w actions.xml linijke :D [XML]<action actionid="2086" event="script" value="vip.lua"/>[/XML]
I czy da?e? pos?gowi actionid 2086
 
Odp: Vip Acces

blad:

[02/02/2014 18:47:45] [Error - LuaScriptInterface::loadFile] data/actions/scripts/vip.lua:13: 'end' expected (to close 'function' at line 1) near 'else'
[02/02/2014 18:47:45] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/vip.lua)
[02/02/2014 18:47:45] data/actions/scripts/vip.lua:13: 'end' expected (to close 'function' at line 1) near 'else'
[02/02/2014 18:47:45] Reloaded actions.
 
Odp: Vip Acces

usun ostatnie return true i end
 
Odp: Vip Acces

blad:

[02/02/2014 19:06:11] [Error - LuaScriptInterface::loadFile] data/actions/scripts/vip.lua:13: 'end' expected (to close 'function' at line 1) near 'else'
[02/02/2014 19:06:11] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/vip.lua)
[02/02/2014 19:06:11] data/actions/scripts/vip.lua:13: 'end' expected (to close 'function' at line 1) near 'else'
[/QUOTE]

tak mam wpisane:

[LUA] function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
actionid = 8834, --actionid na pos?g
tekst = "Nie posiadasz Vip Access." --tekst odmowy
}
local cidPosition = getCreaturePosition(cid)
if item.actionid == config.actionid and getPlayerStorageValue(cid,21555) == 1 then
doTeleportThing(cid, {x=998,y=998,z=7}) ----Je?li masz vipa
else
doTeleportThing(cid, {x=1002,y=1001,z=7}) --- jesli nie masz
end
return TRUE
else
doCreatureSay(cid, config.tekst, TALKTYPE_ORANGE_1)
return FALSE
end[/LUA]
 
Odp: Vip Acces

Dopisz jeszcze jedno end na ko?cu mo?e to pomo?e ;]
 
Odp: Vip Acces

niestety nie pomoglo wciaz ten sam blad :(
 
Status
Zamknięty.
Back
Do góry