What's new

Actions Teleport Scroll

Status
Not open for further replies.

qwasniak

Advanced User
Joined
May 9, 2013
Messages
303
Reaction score
7
Cze??.
Chce wam pokaza? m?j pierwszy skrypt, a mianowicie jest to Teleport Scroll ;)
[LUA]function onUse(cid, item, fromPos, itemEx, toPos)
local tp = {x=1050,y=1050,z=7}
local time = 3 -- w minutach
return getPlayerStorageValue(cid,12345) <= os.time() and doTeleportThing(cid,tp) and doPlayerSendTextMessage(cid, 22, "Jestesmy na miejscu!") and setPlayerStorageValue(cid, 12345, os.time() + (time * 1000 * 60)) and true or doSendMagicEffect(getPlayerPosition(cid),2) and doPlayerSendTextMessage(cid, 22, "Kolejny teleport za trzy minuty !")
end[/LUA]
Zmiany :
[LUA]local tp = {x=1050,y=1050,z=7} < Pozycja ( to chyba wiadomo )
local time = 3 -- w minutach < Czas [/LUA]
- i Linijka do Actions : [LUA]<action itemid="xxxx" event="script" value="xxxx/xxxx.lua" />[/LUA]

To chyba Tyle :D Pozdrawiam serdecznie, my?le ?e si? komu? spodoba i zostawi mo?e reputka :p
 

Raa

Senior User
Joined
Aug 9, 2009
Messages
715
Reaction score
50
Age
29
Odp: Teleport Scroll

Brakuje sprwadzania PZ, no i to masowe "and" nie wyglada zbyt dobrze.
 

Kopek14

Advanced User
Joined
May 19, 2008
Messages
226
Reaction score
10
Odp: Teleport Scroll

Mo?e mi kto? wyja?ni? t? instrukcje? getPlayerStorageValue(cid,12345) <= os.time()
Dlaczego jest sprawdzane storage gracza z czasem aktualnym? Nie mog? tego poj?? ;/
 

qwasniak

Advanced User
Joined
May 9, 2013
Messages
303
Reaction score
7
Odp: Teleport Scroll

Tak o jest dodane, jest to tez moj pierwszy (?rednio/?atwy) skrypt,
Ale og?lni dziala ci? Czy napisac nowy bez storage?
 

sawex

Advanced User
Joined
Aug 17, 2008
Messages
421
Reaction score
23
Odp: Teleport Scroll

[LUA]local tp = {x=1050,y=1050,z=7} < Pozycja ( to chyba wiadomo )
local time = 3 -- w minutach < Czas[/LUA]

Wywal przed onUse.

Og?lnie to ten wielki return powiniene? rozbi? na kilka if?w, tak by dla ka?dego niespe?nionego warunku by? jaki? komunikat ?adnie podany.
 
Status
Not open for further replies.
Top