Action De Boomerang

unltd15
em Lixeira Pública

unltd15

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 31/01/09Posts: 1

Galera eu to com um action de boomerang so que quando eu uso ele no server eu posso usar em qualquer pessoa nao importa se ele for abaixo do lvl 100 ( que eh o protection lvl do meu server), e tambem quando eu uso ele eu nao viro pk, ou seja a pessoa pode usar a vontade sem virar pk. Alguem consegue concertar pra mim?!

Obrigado

Felipe

ps: deixei o script nesse spoiler aqui embaixo V

V

V

 

Script
--100 PERCENT CREDITS TO PENIS PUMPE--

--1337.hopto.org--

--Please keep credits if used--

 

function target (stuff)

local cid = stuff.cid

local thing = getThingfromPos(stuff.toPosition)

 

if (stuff.counter == 2) then

if getTileHouseInfo(stuff.toPosition) > 0 then

warnPlayer(cid, "You cannot teleport items out of a house.")

elseif isCreature(thing.uid) == FALSE then

doTeleportThing(thing.uid, getCreaturePosition(stuff.cid))

end

return TRUE

end

doSendDistanceShoot(stuff.toPosition, getCreaturePosition(stuff.cid), CONST_ANI_WHIRLWINDAXE)

doAreaCombatHealth(0, COMBAT_HOLYDAMAGE, stuff.toPosition, 0, -100, -200, CONST_ME_HOLYDAMAGE)

stuff.counter = stuff.counter + 1

addEvent(target, 200, stuff)

end

 

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

if getTilePzInfo(getCreaturePosition(cid)) == TRUE or getTilePzInfo(toPosition) == TRUE then

warnPlayer(cid, "You cannot use this weapon in a protection zone.")

else

doSendDistanceShoot(getCreaturePosition(cid), toPosition, CONST_ANI_WHIRLWINDAXE)

local stuff = {cid = cid, toPosition = toPosition, counter = 1}

addEvent(target, 300, stuff)

end

return TRUE

end

RicardoIanelli

ANBU Leader
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 18/12/09Posts: 15

Resolvi seu problema do protection lv, o da skull eu não lembro qual é a função, mas é algo como skulltype, não posso pesquisar agora pois estou no trabalho, mas chegando em casa eu dou uma olhada e edito aqui pra você :)

 

function target (stuff) 
local cid = stuff.cid 
local thing = getThingfromPos(stuff.toPosition) 

if (stuff.counter == 2) then 
if getTileHouseInfo(stuff.toPosition) > 0 then 
warnPlayer(cid, "You cannot teleport items out of a house.") 
elseif isCreature(thing.uid) == FALSE then 
doTeleportThing(thing.uid, getCreaturePosition(stuff.cid)) 
end 
return TRUE 
end 
doSendDistanceShoot(stuff.toPosition, getCreaturePosition(stuff.cid), CONST_ANI_WHIRLWINDAXE) 
doAreaCombatHealth(0, COMBAT_HOLYDAMAGE, stuff.toPosition, 0, -100, -200, CONST_ME_HOLYDAMAGE) 
stuff.counter = stuff.counter + 1 
addEvent(target, 200, stuff) 
end 

function onUse(cid, item, fromPosition, itemEx, toPosition) 
if getTilePzInfo(getCreaturePosition(cid)) == TRUE or getTilePzInfo(toPosition) == TRUE then 
warnPlayer(cid, "You cannot use this weapon in a protection zone.") 
else 
if getPlayerLevel(cid) >= 100 then
doSendDistanceShoot(getCreaturePosition(cid), toPosition, CONST_ANI_WHIRLWINDAXE) 
local stuff = {cid = cid, toPosition = toPosition, counter = 1} 
addEvent(target, 300, stuff) 
else
warnPlayer(cid, "You cannot use this weapon before lv 100.") 
end
end 
return TRUE 
end

Faço sistemas, magias, e todo tipo de code.

Mandar mensagem caso queira negociar.