Postado Maio 27, 2017 8 anos tenho um sistema de reset aqui muito bom, ele nao desloga para resetar, só que tem um problema quando da look ele nao aparece quantos resets o pleyer tem alguem pode colocar pra mim, eu so sei ler os scripts nao sei fazer apenas editar algumas coisas Spoiler local config = { backToLevel = 40, redskull = false, -- need to be without redskull to reset? battle = true, -- need to be without battle to reset? pz = false, -- need to be in protect zone to reset? stages = { {resets = 4, level = 350, premium = 330}, {resets = 9, level = 355, premium = 340}, {resets = 14, level = 450, premium = 450}, {resets = 19, level = 600, premium = 600}, {resets = 24, level = 800, premium = 800}, {resets = 29, level = 1000, premium = 1000}, {resets = 34, level = 1100, premium = 1100}, {resets = 39, level = 1200, premium = 1200}, {resets = 44, level = 1300, premium = 1300}, {resets = 49, level = 1500, premium = 1500}, {resets = 54, level = 1600, premium = 1600}, {resets = 59, level = 1650, premium = 1650}, {resets = 64, level = 1700, premium = 1700}, {resets = 69, level = 1800, premium = 1800}, {resets = 74, level = 1850, premium = 1850}, {resets = 79, level = 1900, premium = 1900}, {resets = 84, level = 2200, premium = 2200}, {resets = 89, level = 2500, premium = 2500}, {resets = 94, level = 5000, premium = 5000}, {resets = 2^1024, level = 7000, premium = 7000} } } function onSay(cid, words, param) local function getPlayerResets(cid) local resets = getPlayerStorageValue(cid, 500) return resets < 0 and 0 or resets end local function doPlayerAddResets(cid, count) setPlayerStorageValue(cid, 500, getPlayerResets(cid) + count) end if config.redskull and getCreatureSkullType(cid) == 4 then return doPlayerSendCancel(cid, "Voce precisa estar sem red skull para resetar.") elseif config.pz and not getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "Voce precisa estar em protection zone para resetar.") elseif config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "Voce precisa estar sem battle para resetar.") end local resetLevel = 0 for x, y in ipairs(config.stages) do if getPlayerResets(cid) <= y.resets then resetLevel = isPremium(cid) and y.premium or y.level break end end if getPlayerLevel(cid) < resetLevel then return doPlayerSendCancel(cid, "Voce precida de level " .. resetLevel .. " para o proximo reset.") end doPlayerAddResets(cid, 1) local healthMax, manaMax = getCreatureMaxHealth(cid), getCreatureMaxMana(cid) doPlayerAddLevel(cid, -(getPlayerLevel(cid) - config.backToLevel)) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Now you have " .. getPlayerResets(cid) .. " " .. (getPlayerResets(cid) == 1 and "reset" or "resets") .. ".") return true end
Postado Maio 27, 2017 8 anos @vitors23 posta aqui o seu script de look que fica na pasta creaturescripts.
Postado Maio 27, 2017 8 anos Autor 4 horas atrás, KotZletY disse: @vitors23 posta aqui o seu script de look que fica na pasta creaturescripts. @KotZletY Seria o login? se for esta ai Spoiler local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) 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 str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) 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, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "VipReceive") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, VipReceive) registerCreatureEvent(cid, "PlayerKill") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid,9564) > -1 then doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,'Você não confirmou seu último número do sistema anti-bot. Ele é: '..getPlayerStorageValue(cid,9564)..'.') end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena end if getPlayerStorageValue(cid, 12036) == -1 then setPlayerStorageValue(cid, 12036, 1) end return true end e se nao for achei esse ecript com o nome fraglook to dando uma olhada la Spoiler function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']') local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end Editado Maio 28, 2017 8 anos por vitors23 (veja o histórico de edições)
Postado Maio 28, 2017 8 anos @vitors23 showvoc, algo assim, se não tiver, modifico o fraglook mesmo, não teria problema, porém, seria melhor o showvoc!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.