ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
Using OTX 2 (tfs 0.3.7)
Hi! I've been trying a new method to do raids and rewards from bosses. At the moment, is intended to work but is messy, the reason I open this thread, is to someone help me finishing this as a request, if possible
The first part was to create a teleport with action id after Ghazbaran dies. This works well, added
to the Ghazabaran.xml. The next thing was to script the teleport, I gave it a cooldown to stepIn the teleport after you stepIn once, a chance to enter to reward room, a chance to teleport you out and start the stepIn cooldown
This two works well. I also added a decayTo function to the teleport id 8421 at items.xml to make it.
The problem starts here, I tried with this creaturescript to exequte a raid after the monster dies (in this case, Ghazbaran) with the intention of replacing the monster after its death. But the important thing of this is that the monster has to spawn at the same time that the cooldownStorage of the teleport expires.
The creaturescript:
I got this error when using it
The propose of this is that the player will have:
The third part would be the raid file, but I think this is not the way to script this...
Anyways, here it is:
The last step has to be a daily reward chest. I've seen lots of this scripts on OtLand but haven't tested yet. The main thing I need on this chest is to fit, somehow, the time of cooldownStorage of the teleport and the time of the Raid exeqution.
At the moment I could kick out players from reward room after picking their reward with doTeleportThing after use the chest, but they should also have a time limit to stay in the boss room, in case the guy kill Ghazbaran again and he's not able to pick `daily' reward because of the chest cooldown. The key is to fit this time limit with the raids and the teleport CDs.
The chest will have the same loot that Ghazbaran, in chances, based on this examples, and as I say, it should have the same time cooldown that the raids / portals, or one close, to fit it with all the system.
Thanks for reading, hope you guys can help me again
Regards, ralke!
Hi! I've been trying a new method to do raids and rewards from bosses. At the moment, is intended to work but is messy, the reason I open this thread, is to someone help me finishing this as a request, if possible
The first part was to create a teleport with action id after Ghazbaran dies. This works well, added
Code:
corpse="5024" corpseAid="8421"/>
Code:
local duration = 30
local per = 10
local outfit = 11 -- looktype
local chance = 30 -- in %
local newPos = {x = 1177, y = 1094, z = 15}
local failPos = {x = 1156, y = 1090, z = 14}
local cooldownStorage = 39001
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
-- cooldown
local cur_time = os.time()
local cooldown = getPlayerStorageValue(cid, cooldownStorage)
if cooldown > cur_time then
doSendMagicEffect(fromPosition, CONST_ME_POFF)
doPlayerSendCancel(cid, "[Boss Room] You can try to enter again in " .. os.date('!%H:%M:%S minutes.', (cooldown - cur_time)))
doSendMagicEffect(newPos, CONST_ME_WATERSPLASH)
return true
end
setPlayerStorageValue(cid, cooldownStorage, cur_time + 5)
if(not isPlayer(cid)) then
return true
end
local outfitt = getCreatureOutfit(cid)
outfitt.lookType = outfit
if(math.random(1, 100) <= chance) then
doSetCreatureOutfit(cid, outfitt, duration*1000)
doTeleportThing(cid, newPos)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You absorbed the spirit of Ghazbaran.")
doSendMagicEffect(newPos, CONST_ME_WATERSPLASH)
else
doPlayerSendCancel(cid, "[Boss Room] Good luck next time!")
doTeleportThing(cid,fromPosition)
doSendMagicEffect(fromPosition,2)
doCreatureAddHealth(cid, -(getCreatureMaxHealth(cid) * per / 100))
doTeleportThing(cid, failPos)
doSendMagicEffect(failPos, CONST_ME_CRAPS)
setPlayerStorageValue(cid, cooldownStorage, cur_time + 900)
end
return true
end
This two works well. I also added a decayTo function to the teleport id 8421 at items.xml to make it.
The problem starts here, I tried with this creaturescript to exequte a raid after the monster dies (in this case, Ghazbaran) with the intention of replacing the monster after its death. But the important thing of this is that the monster has to spawn at the same time that the cooldownStorage of the teleport expires.
Code:
setPlayerStorageValue(cid, cooldownStorage, cur_time + 900)
The creaturescript:
I got this error when using it
Code:
local raidName = "Ghazbaran"
function onKill(cid, target, lastHit)
if lastHit and getCreatureName(target):lower() == 'ghazbaran' then
doCreatureSay(cid, "A PORTAL TO GHAZBARAN'S REWARD ROOM HAS BEEN OPENED!", TALKTYPE_ORANGE_1)
doCreatureSay(cid, "A PORTAL TO GHAZBARAN'S REWARD ROOM HAS BEEN OPENED!", TALKTYPE_ORANGE_1)
doCreatureSay(cid, "A PORTAL TO GHAZBARAN'S REWARD ROOM HAS BEEN OPENED!", TALKTYPE_ORANGE_1)
doCreatureSay(cid, "Next".. raidName .." raid in 60 minutes!", TALKTYPE_ORANGE_1)
Game.startRaid(raidName)
end
return true
end
The propose of this is that the player will have:
- A % of chance to access to the reward room after killing Ghazbaran. He can get in, or be rejected.
- If player got rejected its going to have to wait till' Ghazbaran appear again.
- Players will be motivated to bring multiple caracteres to get more loot
The third part would be the raid file, but I think this is not the way to script this...
Anyways, here it is:
Code:
<?xml version="1.0" encoding="utf-8"?>
<raid>
<!--
// Raid System by 5mok3
// DO NOT CHANGE INTERVAL UNLESS YOU ARE SURE WHAT YOU ARE DOING!!
-->
<!--Announcements-->
<announce delay="1000" type="Event" message="An ancient evil is awakening in the mines beneath Hrodmir." />
<announce delay="30000" type="Event" message="Demonic entities are entering the mortal realm in the Hrodmir mines." />
<announce delay="60000" type="Event" message="The demonic master has revealed itself in the mines of Hrodmir." />
<!--Single Spawns-->
<singlespawn delay="60000" name="Ghazbaran" x="32228" y="31163" z="15" />
<!--Area Spawns-->
<areaspawn delay="53000" fromx="32194" fromy="30986" fromz="14" tox="32213" toy="31012" toz="14">
<monster name="Deathslicer" amount="12" />
</areaspawn>
<areaspawn delay="55000" fromx="32194" fromy="30986" fromz="14" tox="32213" toy="31012" toz="14">
<monster name="Juggernaut" amount="5" />
</areaspawn>
<areaspawn delay="56000" fromx="32194" fromy="30986" fromz="14" tox="32213" toy="31012" toz="14">
<monster name="Fury" amount="8" />
</areaspawn>
<areaspawn delay="58000" fromx="32194" fromy="30986" fromz="14" tox="32213" toy="31012" toz="14">
<monster name="Demon" amount="6" />
</areaspawn>
</raid>
The last step has to be a daily reward chest. I've seen lots of this scripts on OtLand but haven't tested yet. The main thing I need on this chest is to fit, somehow, the time of cooldownStorage of the teleport and the time of the Raid exeqution.
At the moment I could kick out players from reward room after picking their reward with doTeleportThing after use the chest, but they should also have a time limit to stay in the boss room, in case the guy kill Ghazbaran again and he's not able to pick `daily' reward because of the chest cooldown. The key is to fit this time limit with the raids and the teleport CDs.
The chest will have the same loot that Ghazbaran, in chances, based on this examples, and as I say, it should have the same time cooldown that the raids / portals, or one close, to fit it with all the system.
Random reward Chest
Hello folks! using tfs 1.0 tibia 8.60 Im trying to figure out how to make a 100% random reward chest. Idea: When you open the chest at final quest room, there will be only 1 chest. but with random reward, like 10% chance golden helmet 20% chance dragon scale legs 50% chance mpa 20% demon...
otland.net
Action - Time Chest (with random reward)
Tested with TFS 0.3.6pl1 8.54 From a request I made for Thylonn actions.xml timechest.lua -- Time Chest by Limos local config = { exhausttime = 7200, -- time in seconds exhauststorage = 2301, level = 50 -- minimum level to open the chest } function onUse(cid, item, fromPosition, itemEx...
otland.net
Thanks for reading, hope you guys can help me again
Regards, ralke!
Last edited: