[08/01/2020 10:21:55] [Error - LuaScriptInterface::loadFile] data/actions/scripts/addons.lua:1: unexpected symbol near 'ï'
[08/01/2020 10:21:55] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/addons.lua)
[08/01/2020 10:21:55] data/actions/scripts/addons.lua:1: unexpected symbol near 'ï'
Script
Spoiler
function onUse(cid, item, fromPosition, itemEx, toPosition)
local addons = {
[20219] = {pokemon= "Pikachu", looktype = 3493, nome = "Adventurer addon", fly = 0, ride = 0, surf = 0},
}
if #getCreatureSummons(cid) > 0 then
if getPlayerLanguage(cid) == 0 then
doPlayerSendCancel(cid, "Por favor volte seu pokémon.")
end
if getPlayerLanguage(cid) == 1 then
doPlayerSendCancel(cid ,"Por favor, vuelve su pokémon.")
end
if getPlayerLanguage(cid) == 2 then
doPlayerSendCancel(cid, "Please back your pokémon.")
end
return false
end
local addon = addons[item.itemid].looktype
local fly = addons[item.itemid].fly
local ride = addons[item.itemid].ride
local surf = addons[item.itemid].surf
local addonlook = addons[item.itemid].nome
local pb = getPlayerSlotItem(cid, 8).uid
local pk = addons[item.itemid].pokemon
if getItemAttribute(pb,"poke") ~= pk then
if getPlayerLanguage(cid) == 0 then
doPlayerSendCancel(cid, "Desculpa, você não pode usar esse addon nesse pokémon.")
end
if getPlayerLanguage(cid) == 1 then
doPlayerSendCancel(cid ,"Lo sentimos, no se puede utilizar este addon en esse pokémon.")
end
if getPlayerLanguage(cid) == 2 then
doPlayerSendCancel(cid, "Sorry, you can't use this addon on this pokémon.")
end
return false
end
if getItemAttribute(pb, "pokeballusada") == 0 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, 180)
doSetItemAttribute(pb,"addon",addon)
doSetItemAttribute(pb,"addonfly",fly)
doSetItemAttribute(pb,"addonride",ride)
doSetItemAttribute(pb,"addonsurf",surf)
doSetItemAttribute(pb,"addonlook",addonlook)
return true
end
end
Pergunta
M i s s 9
[08/01/2020 10:21:55] [Error - LuaScriptInterface::loadFile] data/actions/scripts/addons.lua:1: unexpected symbol near 'ï'
[08/01/2020 10:21:55] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/addons.lua)
[08/01/2020 10:21:55] data/actions/scripts/addons.lua:1: unexpected symbol near 'ï'
Script
function onUse(cid, item, fromPosition, itemEx, toPosition)
local addons = {
[20219] = {pokemon= "Pikachu", looktype = 3493, nome = "Adventurer addon", fly = 0, ride = 0, surf = 0},
}
if #getCreatureSummons(cid) > 0 then
if getPlayerLanguage(cid) == 0 then
doPlayerSendCancel(cid, "Por favor volte seu pokémon.")
end
if getPlayerLanguage(cid) == 1 then
doPlayerSendCancel(cid ,"Por favor, vuelve su pokémon.")
end
if getPlayerLanguage(cid) == 2 then
doPlayerSendCancel(cid, "Please back your pokémon.")
end
return false
end
local addon = addons[item.itemid].looktype
local fly = addons[item.itemid].fly
local ride = addons[item.itemid].ride
local surf = addons[item.itemid].surf
local addonlook = addons[item.itemid].nome
local pb = getPlayerSlotItem(cid, 8).uid
local pk = addons[item.itemid].pokemon
if getItemAttribute(pb,"poke") ~= pk then
if getPlayerLanguage(cid) == 0 then
doPlayerSendCancel(cid, "Desculpa, você não pode usar esse addon nesse pokémon.")
end
if getPlayerLanguage(cid) == 1 then
doPlayerSendCancel(cid ,"Lo sentimos, no se puede utilizar este addon en esse pokémon.")
end
if getPlayerLanguage(cid) == 2 then
doPlayerSendCancel(cid, "Sorry, you can't use this addon on this pokémon.")
end
return false
end
if getItemAttribute(pb, "pokeballusada") == 0 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, 180)
doSetItemAttribute(pb,"addon",addon)
doSetItemAttribute(pb,"addonfly",fly)
doSetItemAttribute(pb,"addonride",ride)
doSetItemAttribute(pb,"addonsurf",surf)
doSetItemAttribute(pb,"addonlook",addonlook)
return true
end
end
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados