Hugofasima
Website: thenosegang.servegame.com
- Joined
- Jun 24, 2015
- Messages
- 206
- Reaction score
- 23
It's my first try on scripting. I read some tutorials but I can't figure it out what is happening with my low knowledge.
TFS 1.1
My error:
My tag:
My script:
Thanks every one is helping me, I'm learning a lot and has started studying scripts. I need you guys help!
Thanks OT Land!
TFS 1.1
My error:
Code:
[Error - GlobalEvents::think] Failed to execute event: check
My tag:
Code:
<globalevent name="check" interval="1" script="events/checkDeaths.lua"/>
My script:
Code:
local items = {2557}
local eventTopxyz = {x = 1000, y = 1000, z = 7, stackpos = 253}
local eventBottomxyz = {x = 1000, y = 1000, z = 7, stackpos = 253}
local eventPosition = eventTopxyz, eventBottomxyz
local outOfEvent = {x = 1000, y = 1000, z = 7}
local players = getThingfromPos(eventPosition)
function onThink(intravel)
if Game.getStorageValue(cid, rushEvent) == 1 then
if Game.getStorageValue(cid, redDeaths) == 0 or Game.getStorageValue(cid, blueDeaths) == 0 then
for i, pid in ipairs(players) do
if (isPlayer(players)) then
setPlayerStorageValue(pid, rushPlayer, 0)
doTeleportThing(pid, outOfEvent)
doPlayerSetLossPercent(pid, 1, 100)
if getPlayerStorageValue(pid, rushTeam) == 1 or 2 then
setPlayerStorageValue(pid, rushTeam, 0)
end
if getPlayerStorageValue(pid, rushPlayer) == 1 or 2 then
setPlayerStorageValue(pid, rushPlayer, 0)
end
if getPlayerStorageValue(pid, rushWinner) then
setPlayerStorageValue(pid, rushWinner, 0)
doPlayerAddItem(pid, math.random(items), 1)
if math.random(item) == 1 then
doPlayerAddItem(pid, items[1], 1)
end
end
end
end
end
end
end
Thanks every one is helping me, I'm learning a lot and has started studying scripts. I need you guys help!
Thanks OT Land!