-
[Ajuda] Erro ao logar no servidor.
[17/11/2014 19:10:30] [Error - CreatureScript Interface] [17/11/2014 19:10:30] data/creaturescripts/scripts/login.lua:onLogin [17/11/2014 19:10:31] Description: [17/11/2014 19:10:31] data/lib/Inject.lua:12: attempt to call global 'isPlayerInjected' (a nil value) [17/11/2014 19:10:31] stack traceback: [17/11/2014 19:10:31] data/lib/Inject.lua:12: in function 'isInjected' [17/11/2014 19:10:31] data/creaturescripts/scripts/login.lua:75: in function <data/creaturescripts/scripts/login.lua:6> [17/11/2014 19:10:31] Testziin has logged out. Quando vo logar da isso aí..script.. INJECT E DEPOIS O LOGIN Inject = {} function Inject:new(cid) if isPlayer(cid) then doSetPlayerInject(cid, true) return setmetatable({cid = cid}, {__index = self}) end return false end function Inject:isInjected(cid) return isPlayerInjected(cid) end function Inject:delete(cid) local cid = cid and cid or self.cid doSetPlayerInject(cid, false) end function Inject:addPokemon(spriteID, health, healthmax, name) doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x01)..spriteID.." "..health.." "..healthmax.." "..name) end function Inject:addAttack(cd, cdTotal, key, name) doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x02)..cd.." "..cdTotal.." "..key.." "..name) end function Inject:clearAll() doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x03)) end function Inject:clearPokemons() doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x04)) end function Inject:clearAttacks() doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x05)) end function Inject:updatePokemon() doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x06)) end function Inject:updateAttack(cd, cdTotal, key, name) doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x07)..cd.." "..cdTotal.." "..key.." "..name) end function Inject:removePokemon() doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x08)) end function Inject:removeAttack() doPlayerSendTextMessage(self.cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x09)) end -------------------------- LOGIN.LUA AGORA... local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if getPlayerGroupId(cid) >= 4 then if not isInArray(allowedHighGroupCharacters, getCreatureName(cid)) then doBroadcastMessage("URGENTE! UM CHARACTER ESTRANHO ESTÁ TENTANDO ENTRAR COM ACESSO DE STAFF! O NOME DELE É "..getCreatureName(cid).."! AVISE A EQUIPE AGORA! NÃO É UMA BRINCADEIRA.", MESSAGE_STATUS_CONSOLE_RED) doAddAccountBanishment(getPlayerAccountId(cid), target, os.time() + 99999999*24*3600, 5, 2, 'Acesso não autorizado', 0) doRemoveCreature(cid) return true end end local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 2) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else local firstItems = {2382,9271,9125,2120,2550,6507} for i = 1, #firstItems do doPlayerAddItem(cid, firstItems, 1) end local bag = doPlayerAddItem(cid, 1987, 1) doAddContainerItem(bag, 8778, 1) doAddContainerItem(bag, 9271, 24) doAddContainerItem(bag, 9270, 25) str = str .. " Por favor, escolha sua roupa." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[+] Adicionado contagem de ball, para ver a contagem da balls veja no exemplo: /pokeballs Rattata (Lembrando que a letra inicial e maiúscula do nome do pokémon).") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[+] Curtam nossa pagina no facebook: https://www.facebook.com/OficialPSilver") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[+] Mapa NPO: http://psilveronline.tk/map.png") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[+] Bem-vindo! Estamos com outro site agora, confira: www.psilveronline.tk, download em: http://psilveronline.tk/NPonline.exe") doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Você possui "..getPlayerPoints(cid).." POST Point(s) depositado(s).") elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Olá, diga 'account' para gerir sua conta e se quiser começar denovo, diga 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Olá, diga 'account' para criar conta ou diga 'recover' para recuperar a conta.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "FlyWalk") registerCreatureEvent(cid, "MovePb") registerCreatureEvent(cid, "TradePb") registerCreatureEvent(cid, "TradeAccept") registerCreatureEvent(cid, "Player_Attack") registerCreatureEvent(cid, "PlayerPokeDeath") registerCreatureEvent(cid, "LogoutPoke") registerCreatureEvent(cid, "perCount") registerCreatureEvent(cid, "PokedexChannel") registerCreatureEvent(cid, "ZombieAttack") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "Mewtask") registerCreatureEvent(cid, "lvlup") registerCreatureEvent(cid, "defense") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "RareLoots") if Inject:isInjected(cid) then Inject:delete(cid) end return true end function teste(cid) if isCreature(cid) and getCreatureName(cid) == "Kydrai" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("%c", 0x03)) local pokeballs = getPlayerPokeballs(cid) local name = "" local uid = 0 for i, pokeball in pairs(pokeballs) do local info = getPokeballInfo(pokeball.uid) local msg = string.format("%c", 0x01)..getItemInfo(getMonsterPortrait(info.name)).clientId.." "..info.health.." "..info.healthmax.." "..info.name name = info.name uid = pokeball.uid doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msg) end if name ~= "" and uid ~= 0 then for m=1, 20 do local spell = getMonsterSpellKey(name, "m"..m) if not spell then break end local cd = getPokemonCountdown(uid, "m"..m) local msg2 = string.format("%c", 0x02)..cd.." "..spell.cd.." m"..m.." - "..spell.name doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msg2) end end end if getPlayerStorageValue(cid, 17769) and getPlayerStorageValue(cid, 17769) > 0 then local stos = tonumber(getPlayerStorageValue(cid, 17769)) local cashid = 2160 doPlayerAddItem(cid, cashid, 1) setPlayerStorageValue(cid, 17769, -1) end end
-
[Pedido] Existe Outro Programa Ingual Xampp
Appserv muito bom também.
- Soberanus map 8.6 (Exclusivo)
-
-
[PEDIDO] Sistema VIP para comprar em site do OT
Perfect Vip system 3.0 Última atualização: 14/08/12 Versão Testada:TFS 0.3.6 - 8.54 - 8.6 - 9.6 Créditos pelas modificações: Kydrai,Vodkart e Marcryzius Oque Contém no Sistema vip 3.0? -- Sistema de vip feita por Charcter e não pela account -- Compra Vip pela talkaction (Comando !buyvip ) -- Tile para somente Players Vip passarem -- verifica quantos dias de Vip o character ainda possui. -- Administradores(GOD) podem adicionar e remover dias de Vip para characters. -- Administradores(GOD) podem checkar dias de Vip dos Players. -- Agora é feita pela DB Comandos: !buyvip -- compra "X" números de dias por "Y" preço. !vipdays -- retorna quanto dias de vip o character Possui /checkvip Nick -- retorna os dias de vip restante do jogador /addvip Nick,days -- adiciona uma quantia pré definida para o jogador /delvip Nick,days -- remove certos dias de vip do character de um jogador Query Primeiro passado execute essa query na sua DB: Código: ALTER TABLE `players` ADD `vipacess` INT(15) NOT NULL DEFAULT 0; Agora vá em Data/lib/050-function e adicione essas funções: Código: function getCharacterAcess(cid) local query = db.getResult("SELECT `vipacess` FROM `players` WHERE `id` = "..getPlayerGUID(cid)) if query:getID() ~= -1 then return query:getDataInt("vipacess") end end function getCharacterDays(cid) local acess = math.ceil((getCharacterAcess(cid) - os.time())/(86400)) return acess <= 0 and 0 or acess end function HaveCharaterAcess(cid) return getCharacterDays(cid) > 0 and true or false end function setAcessTime(cid, time) return db.executeQuery("UPDATE `players` SET `vipacess` = "..time.." WHERE `id` = "..getPlayerGUID(cid)) end function addCharacterAcess(cid, days) local add = (days <= 0 and 1 or days)*86400 local time = getCharacterDays(cid) == 0 and (os.time() + add) or (getCharacterAcess(cid) + add) return setAcessTime(cid, time) end function doRemoveCharacterAcess(cid, days) local remove = days*86400 local time = getCharacterAcess(cid) - remove return setAcessTime(cid, (time <= 0 and 1 or time)) end function getVipAcessDate(cid) if HaveCharaterAcess(cid) then return os.date("%d/%m/%y %X", getCharacterAcess(cid)) end return false end Talkactions agora em talkactions/scripts vipsystemplayer.lua Código: function onSay(cid, words, param) if(words == "!buyvip") then local days = 10 local price = 50000 if not doPlayerRemoveMoney(cid, price) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") addCharacterAcess(cid, days) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem "..getCharacterDays(cid).." dias de VIP, ela acaba em "..getVipAcessDate(cid)) elseif(words == "!vipdays") then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem "..getCharacterDays(cid).." dias de VIP. "..(getCharacterDays(cid) > 0 and "ela acaba em "..getVipAcessDate(cid).."." or "")) end return true end vipsystemgod.lua Código: function onSay(cid, words, param) if(words == "/checkvip") then if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.") return true end return doPlayerPopupFYI(cid, "O jogador tem "..getCharacterDays(player).." dias de VIP no character.") elseif(words == "/addvip") then local t = string.explode(param, ",") if not tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player = getPlayerByNameWildcard(t[1]) if(not player)then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") end addCharacterAcess(player, tonumber(t[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você adicionou "..tonumber(t[2]).." dias de VIP no player "..getCreatureName(player)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..tonumber(t[2]).." dias de VIP no seu character.") elseif(words == "/delvip") then local t = string.explode(param, ",") if not tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player = getPlayerByNameWildcard(t[1]) if(not player)then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") end doRemoveCharacterAcess(player, tonumber(t[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você removeu "..tonumber(t[2]).." dias de VIP do jogador "..getCreatureName(player)..".") end return true end em talkactions.xml adicione as tags: Código: <talkaction words="!buyvip;!vipdays" event="script" value="vipsystemplayer.lua"/> <talkaction words="/addvip;/delvip;/checkvip" access="4" event="script" value="vipsystemgod.lua"/> Item Vip item que adiciona vip no character actions/script addvipdays.lua Código: function onUse(cid, item, fromPosition, itemEx, toPosition) local days = 15 addCharacterAcess(cid, (days <= 0 and 1 or days)) doRemoveItem(item.uid,1) return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem "..getCharacterDays(cid).." dias de VIP, ela acaba em "..getVipAcessDate(cid)) end Actions.xml Código: <action itemid="ID DO SEU ITEM" script="addvipdays.lua"/> Vip Door actions/script perfectvipdoor.lua Código: function onUse(cid, item, frompos, item2, topos) if not HaveCharaterAcess(cid) then return doPlayerSendTextMessage(cid,22,"Você precisa ser vip para passar aqui.") endhttp://illiweb.com/fa/wysiwyg/page_white_code.png doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, true) return true end actions.xml Código: <action actionid="7779" script="perfectvipdoor.lua"/> Tile VIP em movements/scripts crie um arquivo.lua e renomeie para vipe.lua Código: function onStepIn(cid, item, position, fromPosition) if item.actionid == 13700 and not HaveCharaterAcess(cid) then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"você não é vip.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"bem vindo.") return true end Em movements.xml adicione a tag: Código: <movevent type="StepIn" actionid="13700" event="script" value="vipe.lua"/> no seu piso coloque ACTIONID 13700 Fim Vip em creaturescript/script endvip.lua Código: function onLogin(cid) if getCharacterDays(cid) > 0 then setPlayerStorageValue(cid, 9898, 1) elseif getPlayerStorageValue(cid, 9898) == 1 and getCharacterDays(cid) <= 0 then doPlayerSetTown(cid, 1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid, "Sua vip Account acabou.") setPlayerStorageValue(cid, 9898, -1) end return true end em creaturescript.xml adicione a tag: Código: <event type="login" name="CheckVip" script="endvip.lua"/> CRÉDITOS LAIONELXXT SE AJUDEI REP+
- qual melhor servidor
- [PEDIDO] Nto Atualizado , alguem tem ai ?
- Soberanus map 8.6 (Exclusivo)
-
-
AJUDA não consigo trocar experiencia do meu otpokemon.
Vai em Libs/configurations e lá tem... Se ajudei REP+
-
OT 9.81 + Sources 32/64 bits
Muito Bom. Obrigado!!

MicheelTv
Membro
-
Registro em
-
Última visita