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

[Mod] Random Item Stats

Using 0.3.5pl1 and whenever I kill a monster, it doesn't die. It stays alive without health bar. Any fix?
 
im reciving this issue

[10/09/2013 16:03:35] [Error - CreatureScript Interface]
[10/09/2013 16:03:35] In a timer event called from:
[10/09/2013 16:03:35] buffer:eek:nKill
[10/09/2013 16:03:35] Description:
[10/09/2013 16:03:35] [string "loadBuffer"]:53: attempt to compare number with nil
[10/09/2013 16:03:35] stack traceback:
[10/09/2013 16:03:35] [string "loadBuffer"]:53: in function 'createLoot'
[10/09/2013 16:03:35] [string "loadBuffer"]:225: in function <[string "loadBuffer"]:212>

(tfs 0.3.6)

any ideas :S
 
Last edited:
Im using rev 3.7, i paste that entire code into a .xml in the my folder. Once i launch my server it runs fine but when i kill anything it doesnt drop any of these items, even with the rates ramped all the way up. Anyone know whats wrong?
 
I have double loot message. Can delete elements when tell me what loot i have from monster and all be right?

I have two messages and loot descriptions is different -.^
examples:
you loot from warlock: 50gp, 3 worms
you loot from warlock: 20gp, blue robe, 2gp
 
lol wtf :D im so lazy to check and read this -.^
thanks

but.. hmm why the two messages in loot msg is different ?
 
where is that
"monsterLootMessage = 1"

i don't see that in script -.^
 
Code:
-- Saving-related
    -- houseDataStorage usage may be found at README.
    houseDataStorage = "binary"
    saveGlobalStorage = true
    storePlayerDirection = false
    savePlayerData = true

    -- Loot
    -- monsterLootMessage 0 to disable, 1 - only party, 2 - only player, 3 - party or player (like Tibia's)
    checkCorpseOwner = true
    monsterLootMessage = 0////HERE
    monsterLootMessageType = 29

    -- Ghost mode
    ghostModeInvisibleEffect = false
    ghostModeSpellEffects = true
 
How much work do you think it would be to implement this on an older distro like Avesta? That is based on OTServ I believe. No mod support what so ever. I am seriously thinking about implementing this but I fear too many functions are missing. But I am willing to do it if it's possible. May I just ask if you could make it a non-mod? I can implement the missing functions and all that on my own, but I honesly don't understand how the mods work so I'm asking you :)
 
Last edited:
well, if you have necessary functions it should be easy.
You need item attributes like TFS 0.4 - this is only reason it won't run on 1.0

data\creaturescripts\scripts\randomstats_kill.lua
Code:
Code available in URL below:
http://pastebin.com/6FXUgWbR

add this to login.lua
Code:
registerCreatureEvent(cid, 'itemstats')

and this to creaturescripts.xml:
Code:
<event type="kill" name="itemstats" script="randomstats_kill.lua"/>
if won't work try this:
Code:
<event type="kill" name="itemstats" event="script" value="randomstats_kill.lua"/>
 
well, if you have necessary functions it should be easy.
You need item attributes like TFS 0.4 - this is only reason it won't run on 1.0

data\creaturescripts\scripts\randomstats_kill.lua
Code:
Code available in URL below:
http://pastebin.com/6FXUgWbR

add this to login.lua
Code:
registerCreatureEvent(cid, 'itemstats')

and this to creaturescripts.xml:
Code:
<event type="kill" name="itemstats" script="randomstats_kill.lua"/>
if won't work try this:
Code:
<event type="kill" name="itemstats" event="script" value="randomstats_kill.lua"/>
Nice, thanks dude. Gonna try to get it working today :)
Anyway, don't you think it's better to do this in sources? I guess this is kind of heavy on the server as it seems to roll the loot normally, and then this scripts removes the loot and adds new loot. Twice the amount of work for the server I mean. Would it be hard to do it source instead of lua ? :)
 
As long as item attributes are implemented it would be easier(if you can do it in c++ obviously). There might be only configuration problem, because I don't think you really want people to loot studded club with fast attack or extra defense :D so XML maybe.
 
I was wondering if it was possible to make this to where I can use an item on the weapon, giving it the attributes randomly. I am opening up a warserver, and this is a must!
 
I was wondering if it was possible to make this to where I can use an item on the weapon, giving it the attributes randomly. I am opening up a warserver, and this is a must!
It's different kind of script - this one applies upgrades to loot
It's possible, but you have to find working upgrade system.
 
Back
Top