What's new

Tratka lub item teleportujacy

Status
Not open for further replies.

Doctor Who

Advanced User
Joined
Nov 8, 2008
Messages
221
Reaction score
7
Chodzi mi o skrypt na to ze dany item/kratka dzialaja jak teleport (aby mozna bylo ustawic x:y:z)
 

Vvex

Banned
Joined
Jun 28, 2009
Messages
460
Reaction score
91
Odp: Tratka lub item teleportujacy

Zrobi?em item tp, cho? kratka te? jest mo?liwa.


Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == XXX then -- id item
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,1)
doSendMagicEffect(playerpos,12)
doPlayerSendTextMessage(cid,22,"Zosta?e? przeniesiony do NAZWA MIEJSCA")
doTeleportThing(cid,{x=X, y=Y, z=Z})
end
end

Pozdro

@down
Ale mo?esz wpisa? id fielda czy co? i bedzie ok.
 
Last edited:

Doctor Who

Advanced User
Joined
Nov 8, 2008
Messages
221
Reaction score
7
Odp: Tratka lub item teleportujacy

nie chodzi?o mi o runke tylko item tylu fire fild ;p
 

Fizio95

Advanced User
Joined
Apr 8, 2008
Messages
317
Reaction score
3
Age
31
Odp: Tratka lub item teleportujacy

data/movements/scrpits towrzysz tp1.lau
Code:
--edit by Fizio--
function onStepIn(cid, item, pos)
if item.actionid == [COLOR="Lime"]9981[/COLOR] then
local pos = getPlayerPosition(cid)
local tppos = {[COLOR="Blue"]x=1031, y=995, z=5[/COLOR]}
doTeleportThing(cid,tppos)
doPlayerSendTextMessage(cid, 19, "[COLOR="Purple"]Zostales przeteleportowany do miasta[/COLOR].")
end
return 1
end
ID, ustaw taki w map edytorze
pozycja
tekst jaki ma si? pojawi? po nieteleportowaniu.
potem w data/movements/movements.xml
Code:
<movevent event="StepIn" actionid="[COLOR="Lime"]9981[/COLOR]" script="tp1.lua" />

Pozdrawiam.
 

Doctor Who

Advanced User
Joined
Nov 8, 2008
Messages
221
Reaction score
7
Odp: Tratka lub item teleportujacy

Dzieki, ale ju? wczesniej sobie z tym poradzi?em. Oczywiscie ++
 
Status
Not open for further replies.
Top