• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Error [Fast Please]

RobsonDias

New Member
Joined
Jun 17, 2009
Messages
455
Reaction score
3
Location
$this->Home()
hello

I have a script that when the player steps on the tile, he switches to the aid of tile 101, and again when the player switches to step 100, podesse wanted someone to help me.

see script

Code:
function onStepIn(cid, item, position, fromPosition)
local config = {
gametime = -1, --time in mins
redSide = {x=48, y=70, z=7, stackpos=253},
blueSide = {x=116, y=91, z=7, stackpos=253},
outfitRed = {lookType = 130, lookHead = 94, lookAddons = 1, lookLegs = 94, lookBody = 94, lookFeet = 94},
outfitBlue = {lookType = 130, lookHead = 88, lookAddons = 1, lookLegs = 88, lookBody = 88, lookFeet = 88}
}
local redStorage = getGlobalStorageValue(2001)
local blueStorage = getGlobalStorageValue(2002)
if getPlayerIp(cid) == 0 then
    doSendMagicEffect(position,28)
    doRemoveCreature(cid)
    return false
end
    if item.actionid == 100 then
        doSetCreatureOutfit(cid, config.outfitRed , config.gametime)
        doSetItemActionId(item.uid,item.actionid+1)
        doTeleportThing(cid,config.redSide,false)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are on the Red team")
        doPlayerSetStorageValue(cid, 1000, 3)
        doPlayerSetTown(cid,1)
    elseif item.actionid == 101 then
        doSetCreatureOutfit(cid, config.outfitBlue , config.gametime)
        doSetItemActionId(item.uid,item.actionid-1)
        doTeleportThing(cid,config.blueSide,false)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are on the Blue team")
        doPlayerSetStorageValue(cid, 1000, 4)
        doPlayerSetTown(cid,2)
end
    return true
end

srry for bad english ;d
 
Back
Top