• 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!

Death Times script

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
254
Solutions
3
Reaction score
18
Location
Egypt
hello i want to make action id with movement script step in the magicforce field if you jump at the magiceforce field a message sent to you "you have died "number of Death"
thanks
 
Of course we can make it, you just can't use it on your distro.

Sorry buddy. As far as I can see you have 3 options.

1) Delve deep and learn how to script c++ and create the functionality required on your own.
2) Same as above, but you get someone else to do it.
3) Upgrade/Move to another distro that has creaturescript functions.
 
Of course we can make it, you just can't use it on your distro.

Sorry buddy. As far as I can see you have 3 options.

1) Delve deep and learn how to script c++ and create the functionality required on your own.
2) Same as above, but you get someone else to do it.
3) Upgrade/Move to another distro that has creaturescript functions.
dude now i am running a forgotten server 0.3.7_svn and tfs 0.4.0 all client 8.6
 
nothing happen sir
This is probably the #1 most frustrating thing to look at when trying to help someone.
They want help but refuse to help themselves.

Is there an error code? Take a picture of the entire server log if you aren't seeing it.
How do you have it installed? Again, pictures are great.
What did you actually try? Although at first glance it appears obvious what you've done, I cannot be sure, and therefore cannot provide any modicum of help.

Please @Na Amigo put some thought into your posts because otherwise your going to feel like nobody cares, and for the most part, I think we all care otherwise we wouldn't be here looking at your post.
could you post some script with onDeath and PrepareDeath scripts
Since you have creaturescripts at this point, I'll go ahead and do my alternative method for you.

data/lib/000-constant.lua [anywhere is fine, but I prefer putting it at the bottom]
Lua:
STORAGE_DEATH_COUNT = 45001 -- put whatever storage value you want to use
data/creaturescripts/creaturescripts.xml
XML:
<event type="death" name="onDeath_death_count" event="script" value="onDeath_death_count.lua"/>
<event type="login" name="onLogin_death_count" event="script" value="onLogin_death_count.lua"/>
data/creaturescripts/scripts/login.lua [at the bottom with the other registered events.]
Lua:
registerCreatureEvent(cid, "onDeath_death_count")
registerCreatureEvent(cid, "onLogin_death_count")
data/creaturescripts/scripts/onDeath_death_count.lua
Lua:
function onDeath(cid, corpse, deathList)
   setPlayerStorageValue(cid, STORAGE_DEATH_COUNT, getPlayerStorageValue(cid, STORAGE_DEATH_COUNT) + 1)
   return true
end
data/creaturescripts/scripts/onLogin_death_count.lua
Lua:
function onLogin(cid)
   if getPlayerStorageValue(cid, STORAGE_DEATH_COUNT) < 0 then
       setPlayerStorageValue(cid, STORAGE_DEATH_COUNT, 0)
   end
   return true
end
data/movements/movements.xml [again, use whatever number you want and that is not currently in use.]
XML:
<movevent type="StepIn" actionid="45001" event="script" value="onStepIn_death_count_display.lua"/>
data/movements/scripts/onStepIn_death_count_display.lua
Lua:
function onStepIn(cid, item, position, fromPosition)
   doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "OTMadness: You have died " .. getPlayerStorageValue(cid, STORAGE_DEATH_COUNT) .. " times.")
   doSendMagicEffect(position, CONST_ME_TELEPORT)
   return true
end
 
Back
Top