• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

CreatureEvent [TFS 1.1] Revive System

so u have other script make no loot when u die because i run with this script and ur file loot.lua

test with out revive-system just unregisterEvent("deathMW") and
unregisterEvent("modalDeath")
 
the problem is in the code. find this


Code:
if buttonId == 2 then
     player:applyDeathAttributes(false)
     player:setStorageValue(deathStorage, 1)
     player:addHealth(-player:getHealth())
     player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have killed yourself")
   end

Change it to
Code:
if buttonId == 2 then
     player:applyDeathAttributes(true)
     player:setStorageValue(deathStorage, 1)
     player:addHealth(-player:getHealth())
     player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have killed yourself")
   end

You are not applying the death penelty here
Code:
player:applyDeathAttributes(false)
 
Sir Islam i was going to do it to test w/o the system and tell you :) i'll do next .. i was trying the beastn option

beastn i tried w/o success.. died and the character keept items.. im gonna try the Sir Islam thing..
 
Sir Islam and beastn sorry for making it longer. but even w/o the system the player dont lose anything.. i tried unregistering the system, and to just to be sure i ran another instance (free of changes) and even there the char kept the items.. so it makes me be sure that the problem isnt with the revive system but with the distro that im using.. really weird.. im not master of code as you guys but i'll try figure out.. i dont want to bother none of you with my problem.. sure would be helpful if i had some guidance ^^

Thanks both :D sorry 'bout my english ^.^

[edit] I forgot to say, not sure if its important, im making tests with a char with no vocation. but i have set up the death penalty to 100 just to be sure.
 
show me creaturescripts.xml

i don't like to give up :p

Thanks :D

Code:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" script="login.lua"/>
    <event type="logout" name="PlayerLogout" script="logout.lua"/>
    <event type="login" name="FirstItems" script="firstitems.lua"/>
    <event type="login" name="RegenerateStamina" script="regeneratestamina.lua"/>
    <event type="death" name="PlayerDeath" script="playerdeath.lua"/>
    <event type="death" name="DropLoot" script="droploot.lua"/>
    <event type="extendedopcode" name="ExtendedOpcode" script="extendedopcode.lua"/>
  
    <!-- <event type="preparedeath" name="modalDeath" script="modaldeath.lua"/>
    <event type="modalwindow" name="deathMW" script="modaldeath.lua"/>
    <event type="login" name="loginDeath" script="modaldeath.lua"/> -->
</creaturescripts>
 
tests with a char with no vocation

omg lol this no lost any loot

to edit it from here
Code:
    if getPlayerFlagValue(player, PlayerFlag_NotGenerateLoot) or player:getVocation():getId() == VOCATION_NONE then
        return true
    end

to

if getPlayerFlagValue(player, PlayerFlag_NotGenerateLoot) then
return true
end
 
omg lol this no lost any loot

Really? no matter the level it will never lose the loot? didnt knew.. i came back to tibia 1 month ago after some years w/o play and well i have a main acount 200+ .. nver played again with a noob chat.. im just backing also to OT thing cuz a couple of friends asked me to make another one.. but gosh .. too many different things from 0.3.6 that i used once and ofc that i dont remember a thing from that time :/
 
update change it from droploot.lua

to
if getPlayerFlagValue(player, PlayerFlag_NotGenerateLoot) then
return true
end

bye bye fix now i go sleep :p
 
I did and its working .. didnt tested yet with revive.. i'll test now :) hope it will work 100% .. once again.. i have no words to thank you for the time spent on helping me... sorry for being such lamme and not inform that i testing on a noob char from beggining.. really sorry :)
 
I did and its working .. didnt tested yet with revive.. i'll test now :) hope it will work 100% .. once again.. i have no words to thank you for the time spent on helping me... sorry for being such lamme and not inform that i testing on a noob char from beggining.. really sorry

i like to script like a game :p no problem you are welcome hope you like it
 
I understand :D thanks to the Colors for the system, and you for helping me alot... i wont disturb you anymore :D i really have no words to thanks :) but thanks ^^

#Off Topic I stil with a problem but isnt related.. i'll create a topic here about (cuz here appear to have more skilled person to help than out there:) i tried to find in many places (spanish forums/brazilian forums/english forums) all have same script than me mine isnt working ...
 
I understand :D thanks to the Colors for the system, and you for helping me alot... i wont disturb you anymore :D i really have no words to thanks :) but thanks ^^

#Off Topic I stil with a problem but isnt related.. i'll create a topic here about (cuz here appear to have more skilled person to help than out there:) i tried to find in many places (spanish forums/brazilian forums/english forums) all have same script than me mine isnt working ...
ur not disturbing bro, dont think that
 
b4ac93e2b456974e6347fbaf9de7cd8c.png

76080a39c333372a07f83e9c107fc5ee.png

5a66ecbdb86db6989b78ef03a917e574.png

0ae0afc14bb16366274de2e18fde8ee9.png

a04e3fe90fa1c99984e9d1ddc103a445.png


When the monster kills me it's said "Target Lost" and all basic character functions are disabled (attack, for example). I'm "alive" and can move lmao.

Help please?. Really want to use this system ^^.

Thanks in advance.
 
Back
Top