SpO0KIe
:)
- Joined
- Feb 28, 2010
- Messages
- 192
- Solutions
- 1
- Reaction score
- 5
Hi guys, I would like to share my second script with you. It's not that hard to make but I like it and using it for my own server. And since I have two temples in one city I found it very usefull.
I have two temples with same TP that leads to the same room, and in the room you have only one TP that says "back to where you came from". If you came from temple 1 you will be teleported back to temple 1 when you enter the "back tp" in the room. But if you came from temple 2 then you will be telported back to temple 2 when you enter the "tp back" in the room.
Im sorry for the bad explaination but I tried
Here is the script:
Use this script on the room tp:
this script for temple 1:
and this script for temple 2:
add this to movements.xml
Tell me if you like or dislike and why?
The script is 100% made by me (SpO0KIe)
And if you don't understand the explaination tell me and I will try to explain better :thumbup:
I have two temples with same TP that leads to the same room, and in the room you have only one TP that says "back to where you came from". If you came from temple 1 you will be teleported back to temple 1 when you enter the "back tp" in the room. But if you came from temple 2 then you will be telported back to temple 2 when you enter the "tp back" in the room.
Im sorry for the bad explaination but I tried
Here is the script:
Use this script on the room tp:
Code:
local posOne = {x=[COLOR="sienna"]XXXX[/COLOR], y=[COLOR="sienna"]XXXX[/COLOR], z=[COLOR="sienna"]X[/COLOR]}
local posTwo = {x=[COLOR="darkolivegreen"]XXXX[/COLOR], y=[COLOR="darkolivegreen"]XXXX[/COLOR], z=[COLOR="darkolivegreen"]X[/COLOR]}
function onStepIn(cid, item, position, fromPosition)
if item.itemid == 1387 and getPlayerStorageValue(60001) == 1 then
doSendMagicEffect(getCreaturePosition(cid), 2)
doTeleportThing(cid, posOne)
doSendMagicEffect(getCreaturePosition(cid), 10)
setPlayerStorageValue(60001, 0)
else
if getPlayerStorageValue(60001) == 0 and getPlayerStorageValue(60002) == 1 then
doSendMagicEffect(getCreaturePosition(cid), 2)
doTeleportThing(cid, posTwo)
doSendMagicEffect(getCreaturePosition(cid), 10)
setPlayerStorageValue(60002, 0)
end
end
return true
end
this script for temple 1:
Code:
local posOne = {x=[COLOR="sienna"]XXXX[/COLOR], y=[COLOR="sienna"]XXXX[/COLOR], z=[COLOR="sienna"]X[/COLOR]}
function onStepIn(cid, item, position, fromPosition)
if item.itemid == 1387 then
doSendMagicEffect(getCreaturePosition(cid), 2)
doTeleportThing(cid, posOne)
doSendMagicEffect(getCreaturePosition(cid), 10)
setPlayerStorageValue(60001, 1)
end
return true
end
and this script for temple 2:
Code:
local posOne = {x=[COLOR="darkolivegreen"]XXXX[/COLOR], y=[COLOR="darkolivegreen"]XXXX[/COLOR], z=[COLOR="darkolivegreen"]X[/COLOR]}
function onStepIn(cid, item, position, fromPosition)
if item.itemid == 1387 then
doSendMagicEffect(getCreaturePosition(cid), 2)
doTeleportThing(cid, posOne)
doSendMagicEffect(getCreaturePosition(cid), 10)
setPlayerStorageValue(60002, 1)
end
return true
end
add this to movements.xml
Code:
<movevent type="StepIn" actionid="9998" event="script" value="[COLOR="royalblue"][B]room[/B][/COLOR].lua"/>
<movevent type="StepIn" actionid="9999" event="script" value="[B][COLOR="green"]temple2[/COLOR][/B].lua"/>
<movevent type="StepIn" actionid="10000" event="script" value="[COLOR="red"][B]temple1[/B][/COLOR].lua"/>
Tell me if you like or dislike and why?
The script is 100% made by me (SpO0KIe)
And if you don't understand the explaination tell me and I will try to explain better :thumbup:
Last edited: