Histórico de Curtidas
-
Wirgulino recebeu reputação de Gustavo Ntos em [Dúvida] Como mudar o local onde o player nasce?Cara, eu vi esse tópico quando estava tentando aprender a fazer isso também, dai eu descobri sozinho, vc tem que baixar o Remere's, dai vc no Menu "Map" e Submenu "Edit Towns". Pronto, agora é só vc mudar as corrdenadas para o lugar de ID iqual ao "newPlayerTownId = 1" da sua config.lua.
-
Wirgulino deu reputação a ViitinG em [actions] Adicionar premium points ao usar X itemBom para quem não sabe como funciona é o seguinte,quando o player usar X item ele vai ganhar X dias de premium points.
• Adicionando o script •
Em "data/lib" crie um arquivo chamado "048-ppoints.lua" e adicione esse script dentro :
function getAccountPoints(cid) local res = db.getResult('select `premium_points` from accounts where name = \''..getPlayerAccount(cid)..'\'') if(res:getID() == -1) then return false end local ret = res:getDataInt("premium_points") res:free() return tonumber(ret) end function doAccountAddPoints(cid, count) return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) + count .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end function doAccountRemovePoints(cid, count) return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) - count .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end Em "data/actions/actions.xml" adicione está tag :
<action itemid="5952" event="script" value="points.lua"/> Em "data/actions/scripts" crie um arquivo lua chamado "points" e cole isso dentro :
local cfg = { amount = 10 } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) > 8 then doAccountAddPoints(cid, cfg.amount) doCreatureSay(cid, "Parabéns! Você recebeu 10 Premium Points! ", TALKTYPE_ORANGE_1) doSendMagicEffect(getCreaturePosition(cid), 28) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"Você precisa de level 8 para usar este item.") end return TRUE end • Configurando •
-
Wirgulino recebeu reputação de uesleirodrigues em [Dúvida] Como mudar o local onde o player nasce?Cara, eu vi esse tópico quando estava tentando aprender a fazer isso também, dai eu descobri sozinho, vc tem que baixar o Remere's, dai vc no Menu "Map" e Submenu "Edit Towns". Pronto, agora é só vc mudar as corrdenadas para o lugar de ID iqual ao "newPlayerTownId = 1" da sua config.lua.
-
Wirgulino deu reputação a gristony em (Resolvido)[DUVIDA] Piso que remove items por slotUsa assim
function onStepIn(cid, item, fromPosition, itemEx, toPosition)
local slot = {1, 4, 7, 6, 5}
for i = 1, #slot do
local slot_item = getPlayerSlotItem(cid, slot).uid
if slot_item > 0 then
doRemoveItem(slot_item, 1)
end
end
doSendMagicEffect(getThingPos(cid), 13)
return true
end
-
Wirgulino deu reputação a Tricoder em Remover todos itens do personagem.Sei através do phpmyadmin, que é de executar o codigo sql:
DELETE FROM `player_depotitems` , `player_items` WHERE `player_id` = '1234' o 1234 você troca pelo id do player.
-
Wirgulino deu reputação a zipter98 em (Resolvido)[DUVIDA] Piso que remove items por slotfunction onStepIn(cid, item, fromPosition, itemEx, toPosition) local storage = 417345 local slot = {1, 4, 7, 6, 5} if getCreatureStorage(cid, storage) < 0 then doCreatureSetStorage(cid, storage, 1) for i = 1, #slot do local slot_item = getPlayerSlotItem(cid, slot[i]).uid if slot_item > 0 then doRemoveItem(slot_item, 1) end end doSendMagicEffect(getThingPos(cid), 13) else doSendMagicEffect(getThingPos(cid), 2) end return true end
-
Wirgulino deu reputação a zipter98 em (Resolvido)[DUVIDA] Piso que remove items por slotnp (:
-
Wirgulino recebeu reputação de wandersonnc em [Dúvida] Como mudar o local onde o player nasce?Cara, eu vi esse tópico quando estava tentando aprender a fazer isso também, dai eu descobri sozinho, vc tem que baixar o Remere's, dai vc no Menu "Map" e Submenu "Edit Towns". Pronto, agora é só vc mudar as corrdenadas para o lugar de ID iqual ao "newPlayerTownId = 1" da sua config.lua.
-
Wirgulino deu reputação a xWhiteWolf em PEDIDO (deathBroadcast)substitui o primeiro script por esse aqui.. eu adicionei uma checagem de ver se são dos mesmos times antes de dar o storage
local config = { affected = 10, -- quantos jogadores (deathAssits) da tabela Deathlist este script deve ser executado para? killStorageValue = 3943, deathStorageValue = 3944, -- commands for the texts (those inside of ||, example: |KILLS| to show skills): KILLS, KILLERNAME, TARGETNAME rewardItem = { use = true, itemid = 2160, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). }, killMessage = { use = true, text = "You owned |TARGETNAME|! You have now |KILLERKILLS| kills!", messageClass = MESSAGE_STATUS_CONSOLE_BLUE }, broadcastMessage = { use = false, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). text = "|KILLERNAME| [|KILLERLEVEL|] just killed |TARGETNAME| [|TARGETLEVEL|]!", messageClass = MESSAGE_STATUS_WARNING }, killerAnimation = { use = true, text = "Frag!", -- Only 9 letters! No "commands" here. color = 144 }, targetAnimation = { use = true, text = "OWNED!!", -- Only 9 letters! No "commands" here. color = 180 } } function onDeath(cid, corpse, deathList) for i = 1, math.min(config.affected, getConfigInfo('deathAssistCount')) do local killer = deathList[i] if((isPlayer(killer) == TRUE) and (getPlayerTown(cid) ~= getPlayerTown(killer))) then local targetKills = math.max(0, getPlayerStorageValue(cid, config.killStorageValue)) + 1 local targetDeaths = math.max(0, getPlayerStorageValue(cid, config.deathStorageValue)) + 1 local killerKills = math.max(0, getPlayerStorageValue(killer, config.killStorageValue)) + 1 local killerDeaths = math.max(0, getPlayerStorageValue(killer, config.deathStorageValue)) + 1 setPlayerStorageValue(killer, config.killStorageValue, targetKills) setPlayerStorageValue(cid, config.deathStorageValue, targetDeaths) local killerLevel = getPlayerLevel(killer) local targetLevel = getPlayerLevel(cid) local levelDiff = targetLevel - killerLevel local values = { ["KILLERKILLS"] = killerKills, ["KILLERDEATHS"] = killerDeaths, ["KILLERNAME"] = getCreatureName(killer), ["KILLERLEVEL"] = killerLevel, ["TARGETKILLS"] = targetKills, ["TARGETDEATHS"] = targetDeaths, ["TARGETNAME"] = getCreatureName(cid), ["TARGETLEVEL"] = targetLevel } function formateString(str) return(str:gsub("|([A-Z]+)|", (function(a) return values[a] end))) end if(config.rewardItem.use and (not config.rewardItem.minLevel or targetLevel >= config.rewardItem.minLevel) and (not config.rewardItem.minLevelDiff or levelDiff >= config.rewardItem.minLevelDiff)) then local uid = doPlayerAddItem(killer, config.rewardItem.itemid, 1) end if(config.killMessage.use) then doPlayerSendTextMessage(killer, config.killMessage.messageClass, formateString(config.killMessage.text)) end if(config.broadcastMessage.use and (not config.broadcastMessage.minLevel or getPlayerLevel(cid) >= config.broadcastMessage.minLevel) and (not config.broadcastMessage.minLevelDiff or levelDiff >= config.broadcastMessage.minLevelDiff)) then broadcastMessage(formateString(config.broadcastMessage.text), config.broadcastMessage.messageClass) end if(config.killerAnimation.use) then doSendAnimatedText(getCreaturePosition(killer), config.killerAnimation.text, config.killerAnimation.color) end if(config.targetAnimation.use) then doSendAnimatedText(getCreaturePosition(cid), config.targetAnimation.text, config.targetAnimation.color) end end end return true end -
Wirgulino deu reputação a dyroz em [ Pedido ] NPC DE TROCAAcho q isso é simples amigo pegue por exemplo o npc mad, e substitua os itens q ele vende por os que vc quér vende e o id dos coins vc poe o do itens q quér q seja sua nova moeda !