Obsdark
Member
- Joined
- Sep 25, 2011
- Messages
- 213
- Reaction score
- 9
¡Hey oh!
I have a problem with this script:
the script suposedly must teleport the user when he is in one exactly position and use a lever to another exact position, now acording with what lever and position it is, the destination point varies.
but when i try to pull the lever, just send me the 'else' message.
& the console don't send me any error message someone can help me? :S
I don't understand what is the problem, simply i can't detect it by myself...
Somebody can help me?, any help it would be very apreciated
.
¡Tnx since now for your atention!
¡Bless you and Cheers up!
(Y)(Y)
-Obsdark-
I have a problem with this script:
LUA:
local tid = {
[5011] = {{x = 3021, y = 3085, z = 8}, {x = 3017, y = 3085, z = 8}, {x = 3029, y = 3076, z = 8}, {x = 3030, y = 3076, z = 8}, 25, 5}
}
local CastilloWare = {[2674] = {x = 3105, y = 3101, z = 8},
}
--- item.actionid :=: Posicion(from), Posicion(to), Posicion(Pago Peaje), posicion (Lector) id's_castillo, Cobros(Peaje), Comision(Castillo). ---
--- item.itemid (Castillo id's) :=: Coords de paga Castillo ---
function onUse(cid, item, fromPosition, itemEx, toPosition)
local Plyrps = tid[item.actionid]
local CW = CastilloWare[item.itemid]
Money = getPlayerMoney(cid)
Players = getPlayerPosition(cid)
vis = getTileItemById(Plyrps[4], CW)
if item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[1] and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTeleportPlayer(cid, Plyrps[2])
doCreateItem(2148,(Plyrps[5] - Plyrps[6]), Plyrps[3])
doCreateItem(2148,Plyrps[6], CW[1])
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[1] and vis and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTeleportThing(cid, Plyrps[2])
doCreateItem(2148,Plyrps[5], Plyrps[3])
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[2] and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTeleportPlayer(cid, Plyrps[1])
doCreateItem(2148,(Plyrps[5] - Plyrps[6]), Plyrps[3])
doCreateItem(2148,Plyrps[6], CW[1])
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[2] and CW == Plyrps[4] and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTeleportThing(cid, Plyrps[1])
doCreateItem(2148,Plyrps[5], Plyrps[3])
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1946 and item.uid == Plyrps then
doPlayerSendTextMessage(cid,21,"¡La regresas a como estaba!")
doTransformItem(item.uid, item.itemid - 1)
else
doPlayerSendCancel(cid,"No tienes suficiente dinero")
end
return 1
end
the script suposedly must teleport the user when he is in one exactly position and use a lever to another exact position, now acording with what lever and position it is, the destination point varies.
but when i try to pull the lever, just send me the 'else' message.
& the console don't send me any error message someone can help me? :S
I don't understand what is the problem, simply i can't detect it by myself...
Somebody can help me?, any help it would be very apreciated
¡Tnx since now for your atention!
¡Bless you and Cheers up!
(Y)(Y)
-Obsdark-