Mariuskens
Sword Art Online 2D-MMORPG
Hello im starting this thread to build littlel list with some scripts writed here on this forum.
To start i need some scripts for my project Sword Art Online 2d so we can add more to all community.
This scripts major runs in Tfs 1.1 / Tfs 1.2 <<--
Lets go:
*Movements:
-Teleport creature when stepin "x" Uniqueid.
*Actions:
- With "X" Storageid players can open door.
*Creatures:
-
*Creaturescripts:
- When Creature name "dead" get player "X" storageid.
Thnx for your time to help me and others to complete/share/write this scripts
To start i need some scripts for my project Sword Art Online 2d so we can add more to all community.
This scripts major runs in Tfs 1.1 / Tfs 1.2 <<--
Lets go:
*Movements:
-Teleport creature when stepin "x" Uniqueid.
function onStepIn(player, item, pos)
if player:isPlayer() == true then
local newpos = {x = 123, y = 456, z = 7}
player:teleportThing(newpos)
sendMagicEffect(newpos, 12)
-- player:sendTextMessage(22, "Fui teletransportado!")
end
return true
end
if player:isPlayer() == true then
local newpos = {x = 123, y = 456, z = 7}
player:teleportThing(newpos)
sendMagicEffect(newpos, 12)
-- player:sendTextMessage(22, "Fui teletransportado!")
end
return true
end
*Actions:
- With "X" Storageid players can open door.
function onUse(player, item, fromPosition, target, toPosition, isHotkey)elseif isInArray(keys, itemId) then
local numberOfStorage = 1234
local newDoorId = 4321
local oldDoorId = 5678
if player:getStorageValue(numberOfStorage) >= 1 then
item:transform(newDoorId)
addEvent(function fecharSozinho(item)
item:transform(oldDoorId)
return true
end, 5000)
else
player:sendTextMessage(MESSAGE_STATUS_SMALL, "Voce precisa ter concluido a missao dos poneis viados.")
end
return true
end
local numberOfStorage = 1234
local newDoorId = 4321
local oldDoorId = 5678
if player:getStorageValue(numberOfStorage) >= 1 then
item:transform(newDoorId)
addEvent(function fecharSozinho(item)
item:transform(oldDoorId)
return true
end, 5000)
else
player:sendTextMessage(MESSAGE_STATUS_SMALL, "Voce precisa ter concluido a missao dos poneis viados.")
end
return true
end
*Creatures:
-
*Creaturescripts:
- When Creature name "dead" get player "X" storageid.
Thnx for your time to help me and others to complete/share/write this scripts
Last edited: