GA

Action - Monstro Na Terra

Por Gabriel001, 29 de jan. de 2012 em Archived

2
715
Gabriel001G
29 de janeiro de 2012 às 19:43

Eu preciso de um action que é assim !

funciona tipo fishing rod que pesca monsters...mas eu quero que pesque scarab por exemplo ! que esta na terra escondido !

 

Só que só pode usar o item na terra de perto...tipo shovel..rope ! só usa emcima do buraco... no caso seria na terra

 

 

 

 

local config = {

waterIds = {4832, 4833, 806},

rateSkill = getConfigValue("rateSkill"),

allowFromPz = false,

randomsize = 20000,

 

v = {

[{1, 25}] = {level = 1000, monster = "Ancient Scarab"}

}

}

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

if not isInArray(config.waterIds, itemEx.itemid) then

return false

end

if (config.allowFromPz or not getTileInfo(getThingPos(cid)).protection) and itemEx.itemid ~= 493 and math.random((100 + (getPlayerSkill(cid, SKILL_FISHING) / 110))) < getPlayerSkill(cid, SKILL_FISHING) and (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1))) then

doPlayerAddSkillTry(cid, SKILL_FISHING, 1)

 

local formula, lvl = math.random(config.randomsize), getPlayerLevel(cid)

local fishing = getPlayerSkillLevel(cid, SKILL_FISHING)

for range, inf in pairs(config.v) do

if formula >= range[1] and formula <= range[2] and lvl >= inf.level and fishing >= inf.fishing then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, inf.msg)

doSummonCreature(inf.monster, getThingPos(cid))

break

 

end

end

end

doSendMagicEffect(toPosition, CONST_ME_YELLOW_RINGS)

return true

end

 

 

 

ESSE É UM , PARA SERVIR DE BASE...MAS QUERO QUE SÓ POSSA USAR O ITEM DE PERTO...DO LADO DA TERRA !

EXEMPLO : PLAYER AKI , TERRA DO LADO, OU EMBAIXO , ETC !

LordfireL
30 de janeiro de 2012 às 17:44

Fechado a pedido do dono.

 

Já que conseguiu criar o script, porque não posta? :D