Khullendo 0 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Ae galera eu estou começando meu OT agora e quando um player compra a VIP do site ela não chega da o seguinte erro no shop.lua O erro é esse utimo ae !! Uso Tsf 0.2.0.0 Tibia 8.60 Meu site é o gesior 0.3.8 Rep++ Pra quem ajudar! Link para o comentário Compartilhar em outros sites More sharing options...
0 Yan Oliveira 211 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Pelo erro parece q é algum item q n existe q vc add no shop.lua ou n ta reconhecendo algum item, ou verifique se n tem alguma tag errada. Pelo que parece é algum item q vc add no shop.lua q n existe ou não te reconhecendo, mas veja se não tem alguma tag errada. Link para o comentário Compartilhar em outros sites More sharing options...
0 Khullendo 0 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 Cara eu não sei mecher com isso,o item que eu estou tentando compra é a VIP,e não está dando certo!! Link para o comentário Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Cara, VIP no seu server é em forma de item? Se não, é por isso o erro. Posta seu sistema vip aqui. Link para o comentário Compartilhar em outros sites More sharing options...
0 Khullendo 0 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 (editado) Ae cara eu tava procurando aqui,ou eu não achei ou nem tem vip system sabe me dizer que pasta que fica? @EDIT Achei um aqui,mas acho que quando usa esse nao passa no VIP TILE sabe me dizer porque? Script -- Script SYtem vip 2.0 -- function onSay(cid, words, param) if(words == "!vipdays") then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.") end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13540) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end elseif(words == "/addvip") then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local name = getCreatureName(player) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days*3600*24 local storageplayer = getPlayerStorageValue(player, 13540) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) if string.find(tostring(getCreatureName(pid)),"[[Vip]]") then doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") setPlayerStorageValue(player, 13540, time) local quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") else setPlayerStorageValue(player, 13540, time) db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(player)..";") doRemoveCreature(player) end end elseif(words == "/delvip") then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end local C,t = {},string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip. if(getPlayerStorageValue(C.uid,13540) < C.time)then doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.') else doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.') setPlayerStorageValue(C.uid,13540,getPlayerStorageValue(C.uid,13540)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end Editado Outubro 28, 2012 por Khullendo Link para o comentário Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Rapaz, esse ai é do GOD adicionar VIP. Você compra VIP por site? Link para o comentário Compartilhar em outros sites More sharing options...
0 Khullendo 0 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 Eu estou tentando comprar a vip pelo site sim,mas não consigo! Link para o comentário Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 o animal, vc tem que posta o arquivo shop.lua que fica em data > globalevents > script Link para o comentário Compartilhar em outros sites More sharing options...
0 Khullendo 0 Postado Outubro 28, 2012 Autor Share Postado Outubro 28, 2012 SHOP.LUA -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then full_weight = getItemWeightById(itemtogive_id, 1) end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") doPlayerSave(cid) else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end Link para o comentário Compartilhar em outros sites More sharing options...
0 caotic 393 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 O usuario Khullendo reportou o Vodkart por ofensa. Não vejo razão para fazer alguma coisa com o vodkart. Mais tome mais cuidado vodkart :3. Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
Khullendo 0
Ae galera eu estou começando meu OT agora e quando um player compra a VIP do site ela não chega da o seguinte erro no shop.lua
O erro é esse utimo ae !!
Uso Tsf 0.2.0.0 Tibia 8.60
Meu site é o gesior 0.3.8
Rep++
Pra quem ajudar!
Link para o comentário
Compartilhar em outros sites
9 respostass a esta questão
Posts Recomendados