Ainda é preciso testar tudo pra ver se estão funcionando corretamente.
1° - Quando um tal monstro morre (Morgaroth), aparecer os items do loot na bp do player que deu mais hit.
Esse script adiciona ao player uma bp com os items do monster dentro.
creaturescripts/creaturescripts.xml
<event type="death" name="Loot" event="script" value="loot.lua"/>
creaturescripts/scripts/loot.lua
-- by Kydrai
local function getLoot(cid, container, bp)
for i=0, getContainerCap(container.uid)-1 do
local loot = getContainerItem(container.uid, 0)
-- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Loot.itemid = "..loot.itemid)
if loot.itemid ~= 0 then
if isContainer(loot.uid) then
local loot2 = getLoot(cid, loot, doCreateItemEx(loot.itemid))
doAddContainerItemEx(bp, loot2)
doRemoveItem(loot.uid)
else
local qnt = loot.type > 0 and loot.type or 1
doRemoveItem(loot.uid, qnt)
doAddContainerItem(bp, loot.itemid, qnt)
end
else
return bp
end
end
end
local function autoloot(cid, corpsePos)
local bp = doPlayerAddItem(cid, 1988) -- bp onde será add os items
local loot = getLoot(cid, getThingfromPos(corpsePos), bp)
doAddContainerItemEx(bp, loot)
end
function onDeath(cid, corpse, deathList)
addEvent(autoloot, 100, deathList[1], getCreaturePosition(cid))
return TRUE
end
monstername.xml
<script>
<event name="Loot"/>
</script>
2° - Vai ter ums 6 tiles que nenhum player pode passa, ae so podem passa quando qualquer god fala /open, e quando o god fala /closed ae os tiles sao ativados para que nenhum player passe
Modificado e entregue pelo msn.
talkactions/talkactions.xml
<talkaction words="/open;/close" event="script" value="tile.lua"/>
talkactions/scripts/tile.lua
function onSay(cid, words, param, channel)
if words == "/open" then
setGlobalStorageValue(5001, 1)
else
setGlobalStorageValue(5001, 0)
end
return TRUE
end
movements/movements.xml
<movevent type="StepIn" actionid="2003" event="script" value="tile.lua"/>
movements/scripts/tile.lua
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getGlobalStorageValue(5001) <= 0 then
doTeleportThing(cid, fromPosition, false)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
end
return TRUE
end
3° - Vai ser um tipo war, mais dentro de uma aréa vai ter um monstro (morgaroth), a guild que causa mais dano ou seja mais hit ganha-rá o evento, e essa guild vai ter acesso a uma area exclusiva por 3 dias.
Entregue pelo msn.
~ Kydrai
Programador / Scripter