• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Error During WOE!

The extros

New Member
Joined
Jun 28, 2010
Messages
98
Reaction score
1
Hello, Im having a problem during the WOE (war of emperium), I will explain the situation: War starts perfectly (19:00 War of Emperium will start in next 5 minutes...
19:00 will have a duration of 30 minutes.
19:00 War has started...)

And as you know when the WOE starts you have to kill the Pre-Empes, here is where the problem is... When I kill any Pre-Empes it delay like 5 seconds on dying... and I see the description on the exe from the sv and this is what happens:














Code:
[15/5/2012 19:9:38] [Error - CreatureScript Interface] 
[15/5/2012 19:9:38] domodlib('itemstats_conf')
[15/5/2012 19:9:38]  
[15/5/2012 19:9:38] function round(n, s)
[15/5/2012 19:9:38]         return tonumber(('%.' .. (s or 0) .. 'f'):format(n))
[15/5/2012 19:9:38] end
[15/5/2012 19:9:38]  
[15/5/2012 19:9:38] function getContentDescription(uid, sep)
[15/5/2012 19:9:38]         local ret, i, containers = '', 0, {}
[15/5/2012 19:9:38]         while( i < getContainerSize(uid) )do
[15/5/2012 19:9:38]                 local v, s = getContainerItem(uid, i), ''
[15/5/2012 19:9:38]                 local k = getItemInfo(v.itemid)
[15/5/2012 19:9:38]                 k.name = getItemAttribute(v.uid, 'name') or k.name
[15/5/2012 19:9:39]                 if( k.name ~= '' )then
[15/5/2012 19:9:39]                         if( v.type > 1 and k.stackable and k.showCount )then
[15/5/2012 19:9:39]                                 s = v.type .. ' ' .. k.plural
[15/5/2012 19:9:39]                         else
[15/5/2012 19:9:39]                                 local article = getItemAttribute(v.uid, 'article') or k.article
[15/5/2012 19:9:39]                                 s = (article == '' and '' or article .. ' ') .. k.name
[15/5/2012 19:9:39]                         end
[15/5/2012 19:9:39]                         ret = ret .. (i == 0 and not sep and '' or ', ') .. s
[15/5/2012 19:9:39]                         if( isContainer(v.uid) and getContainerSize(v.uid) ~= 0 )then
[15/5/2012 19:9:39]                                 table.insert(containers, v.uid)
[15/5/2012 19:9:39]                         end
[15/5/2012 19:9:39]                 else
[15/5/2012 19:9:39]                         ret = ret .. (i == 0 and not sep and '' or ', ') .. 'an item of type ' .. v.itemid .. ', please report it to gamemaster'
[15/5/2012 19:9:39]                 end
[15/5/2012 19:9:39]                 i = i + 1
[15/5/2012 19:9:39]         end
[15/5/2012 19:9:39]         for i = 1, #containers do
[15/5/2012 19:9:39]                 ret = ret .. getContentDescription(containers[i], true)
[15/5/2012 19:9:39]         end
[15/5/2012 19:9:39]         return ret
[15/5/2012 19:9:39] end
[15/5/2012 19:9:39]  
[15/5/2012 19:9:39] local function send(cid, corpse, monster)
[15/5/2012 19:9:39]         if( isPlayer(cid) )then
[15/5/2012 19:9:39]                 local ret = corpse and isContainer(corpse) and getContentDescription(corpse)
[15/5/2012 19:9:39]                 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'))
[15/5/2012 19:9:39]                 local party = getPlayerParty(cid)
[15/5/2012 19:9:39]                 if( party )then
[15/5/2012 19:9:39]                         for _, pid in ipairs(getPartyMembers(party)) do
[15/5/2012 19:9:39]                                 doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY)
[15/5/2012 19:9:39]                         end
[15/5/2012 19:9:39]                 end
[15/5/2012 19:9:39]         end
[15/5/2012 19:9:39] end
[15/5/2012 19:9:39]  
[15/5/2012 19:9:39] local function createLoot(i, ext)
[15/5/2012 19:9:39]         local item = type(i.id) == 'table' and i.id[math.random(#i.id)] or i.id
[15/5/2012 19:9:39]         local random = math.ceil(math.random(100000) / ext)
[15/5/2012 19:9:39]         local tmpItem, f
[15/5/2012 19:9:39]  
[15/5/2012 19:9:39]         if( random < i.chance )then
[15/5/2012 19:9:39]                 if i.subType == -1 then
[15/5/2012 19:9:40]                         f = getItemInfo(item)
[15/5/2012 19:9:40]                 end
[15/5/2012 19:9:40]                 tmpItem = doCreateItemEx(item,
[15/5/2012 19:9:40]                         i.subType ~= -1 and i.subType or
[15/5/2012 19:9:40]                         f.stackable and random % i.count + 1 or
[15/5/2012 19:9:40]                         f.charges ~= 0 and f.charges or
[15/5/2012 19:9:40]                         1
[15/5/2012 19:9:40]                 )
[15/5/2012 19:9:40]         end
[15/5/2012 19:9:40]  
[15/5/2012 19:9:40]         if( not tmpItem )then
[15/5/2012 19:9:40]                 return
[15/5/2012 19:9:40]         end
[15/5/2012 19:9:40]  
[15/5/2012 19:9:40]         if( i.actionId ~= -1 )then
[15/5/2012 19:9:40]                 doItemSetAttribute(tmpItem, 'aid', i.actionId)
[15/5/2012 19:9:40]         end
[15/5/2012 19:9:40]  
[15/5/2012 19:9:40]         if( i.uniqueId ~= -1 )then
[15/5/2012 19:9:40]                 doItemSetAttribute(tmpItem, 'uid', i.uniqueId)
[15/5/2012 19:9:40]         end
[15/5/2012 19:9:40]  
[15/5/2012 19:9:40]         if( i.text ~= '' )then
[15/5/2012 19:9:40]                 doItemSetAttribute(tmpItem, 'text', i.text)
[15/5/2012 19:9:40]         end
[15/5/2012 19:9:40]  
[15/5/2012 19:9:40]         local ret, done
[15/5/2012 19:9:40]  
[15/5/2012 19:9:40]         for k, v in pairs(tiers) do
[15/5/2012 19:9:40]                 local cur, used = {}, {}
[15/5/2012 19:9:40]                 for i = 1, #v.chance do
[15/5/2012 19:9:40]                         if( math.random(100000) <= v.chance[i] )then
[15/5/2012 19:9:40]                                 if( f )then
[15/5/2012 19:9:40]                                         f = getItemInfo(item)
[15/5/2012 19:9:40]                                 end
[15/5/2012 19:9:40]                                 if( not f.stackable )then
[15/5/2012 19:9:40]                                         for m, n in pairs(attr) do
[15/5/2012 19:9:40]                                                 if( not table.find(used, m) and
[15/5/2012 19:9:40]                                                 (
[15/5/2012 19:9:40]                                                         ( table.find(n.types, MELEE) and table.find({WEAPON_SWORD, WEAPON_CLUB, WEAPON_AXE}, f.weaponType) ) or
[15/5/2012 19:9:40]                                                         ( table.find(n.types, DISTANCE) and f.weaponType == WEAPON_DIST and f.ammoType ~= 0 ) or
[15/5/2012 19:9:41]                                                         ( table.find(n.types, ARMOR) and f.armor ~= 0 and f.wieldPosition ~= CONST_SLOT_NECKLACE ) or
[15/5/2012 19:9:41]                                                         ( table.find(n.types, SHIELD) and f.defense ~= 0 and f.weaponType == WEAPON_SHIELD ) or
[15/5/2012 19:9:41]                                                         ( table.find(n.types, WAND) and f.weaponType == WEAPON_WAND ) or
[15/5/2012 19:9:41]                                                         ( table.find(n.types, DURATION_RING) and f.wieldPosition == CONST_SLOT_RING and f.transformEquipTo ~= 0 ) or
[15/5/2012 19:9:41]                                                         ( table.find(n.types, CHARGES) and table.find({CONST_SLOT_RING, CONST_SLOT_NECKLACE}, f.wieldPosition) and f.charges ~= 0 )
[15/5/2012 19:9:41]                                                 ) )then
[15/5/2012 19:9:41]                                                         table.insert(cur, m)
[15/5/2012 19:9:41]                                                 end
[15/5/2012 19:9:41]                                         end
[15/5/2012 19:9:41]  
[15/5/2012 19:9:41]                                         if( #cur ~= 0 )then
[15/5/2012 19:9:41]                                                 local n = cur[math.random(#cur)]
[15/5/2012 19:9:41]                                                 table.insert(used, n)
[15/5/2012 19:9:41]  
[15/5/2012 19:9:41]                                                 n = attr[n]
[15/5/2012 19:9:41]                                                 local percent, new, tmp = math.random(n.percent[1] + (v.extra[1] or 0), n.percent[2] + (v.extra[2] or 0))
[15/5/2012 19:9:41]                                                 -- hacks
[15/5/2012 19:9:41]                                                 if( n.attr == 'duration' )then
[15/5/2012 19:9:41]                                                         tmp = getItemInfo(f.transformEquipTo)
[15/5/2012 19:9:41]                                                         if tmp.transformDeEquipTo ~= item then
[15/5/2012 19:9:41]                                                                 break
[15/5/2012 19:9:41]                                                         end
[15/5/2012 19:9:41]                                                         new = round( tmp.decayTime * (1 + percent / 100) * 1000 )
[15/5/2012 19:9:41]                                                 elseif( n.attr == 'attackSpeed' )then
[15/5/2012 19:9:41]                                                         new = round( vocation_base_attackspeed / (1 + percent / 100) )
[15/5/2012 19:9:41]                                                 elseif( n.attr == 'hitChance' ) then
[15/5/2012 19:9:41]                                                         new = round(
[15/5/2012 19:9:41]                                                                 f.hitChance == -1 and
[15/5/2012 19:9:41]                                                                         percent
[15/5/2012 19:9:41]                                                                 or 
[15/5/2012 19:9:41]                                                                         f.hitChance * (1 + percent / 100)
[15/5/2012 19:9:41]                                                         )
[15/5/2012 19:9:41]                                                 else
[15/5/2012 19:9:41]                                                         new = round(
[15/5/2012 19:9:41]                                                                 n.base and
[15/5/2012 19:9:41]                                                                         f[n['attr']] + f[n['base']] * (percent / 100)
[15/5/2012 19:9:41]                                                                 or
[15/5/2012 19:9:41]                                                                         f[n['attr']] * (1 + percent / 100)
[15/5/2012 19:9:42]                                                         )
[15/5/2012 19:9:42]  
[15/5/2012 19:9:42]                                                         if( new == f[n[n.base and 'base' or 'attr']] )then -- no improvement
[15/5/2012 19:9:42]                                                                 break
[15/5/2012 19:9:42]                                                         end
[15/5/2012 19:9:42]                                                 end
[15/5/2012 19:9:42]  
[15/5/2012 19:9:42]                                                 doItemSetAttribute(tmpItem, n.attr:lower(), new)
[15/5/2012 19:9:42]  
[15/5/2012 19:9:42]                                                 local name = getItemAttribute(tmpItem, 'name')
[15/5/2012 19:9:42]                                                 if( v.attrNames or not name )then
[15/5/2012 19:9:42]                                                         local name = (v.attrNames and used[#used] or k) .. ' ' .. (name or f.name)
[15/5/2012 19:9:42]                                                         doItemSetAttribute(tmpItem, 'name', name)
[15/5/2012 19:9:42]  
[15/5/2012 19:9:42]                                                         if( f.article ~= '' )then
[15/5/2012 19:9:42]                                                                 local article = getArticle(name)
[15/5/2012 19:9:42]                                                                 if( article ~= f.article )then
[15/5/2012 19:9:42]                                                                         doItemSetAttribute(tmpItem, 'article', article)
[15/5/2012 19:9:42]                                                                 end
[15/5/2012 19:9:42]                                                         end
[15/5/2012 19:9:42]                                                 end
[15/5/2012 19:9:42]  
[15/5/2012 19:9:42]                                                 local desc = getItemAttribute(tmpItem, 'description') or f.description
[15/5/2012 19:9:42]                                                 doItemSetAttribute(tmpItem, 'description', '[' .. n.name .. ': +' .. percent .. '%]' .. (desc == '' and '' or '\n' .. desc))
[15/5/2012 19:9:42]  
[15/5/2012 19:9:42]                                                 ret = k
[15/5/2012 19:9:42]                                         end
[15/5/2012 19:9:42]                                         cur = {}
[15/5/2012 19:9:42]                                         if( #v.chance == i )then
[15/5/2012 19:9:42]                                                 done = true
[15/5/2012 19:9:42]                                         end
[15/5/2012 19:9:42]                                 end
[15/5/2012 19:9:42]                         else
[15/5/2012 19:9:42]                                 done = i ~= 1
[15/5/2012 19:9:43]                                 break
[15/5/2012 19:9:43]                         end
[15/5/2012 19:9:43]                 end
[15/5/2012 19:9:43]                 if( done )then
[15/5/2012 19:9:43]                         break
[15/5/2012 19:9:43]                 end
[15/5/2012 19:9:43]         end
[15/5/2012 19:9:43]  
[15/5/2012 19:9:43]         return tmpItem, ret
[15/5/2012 19:9:43] end
[15/5/2012 19:9:43]  
[15/5/2012 19:9:43] local function createChildLoot(parent, i, ext, pos)
[15/5/2012 19:9:43]         if( not i or #i == 0 )then
[15/5/2012 19:9:43]                 return true
[15/5/2012 19:9:43]         end
[15/5/2012 19:9:43]  
[15/5/2012 19:9:43]         local size, cap = 0, getContainerCap(parent)
[15/5/2012 19:9:43]         for k = 1, #i do
[15/5/2012 19:9:43]                 if( size == cap )then
[15/5/2012 19:9:43]                         break
[15/5/2012 19:9:43]                 end
[15/5/2012 19:9:43]                 local tmp, ret = createLoot(i[k], ext)
[15/5/2012 19:9:43]                 if( tmp )then
[15/5/2012 19:9:43]                         if( isContainer(tmp) )then
[15/5/2012 19:9:43]                                 if( createChildLoot(tmp, i[k].child, ext, pos) )then
[15/5/2012 19:9:43]                                         doAddContainerItemEx(parent, tmp)
[15/5/2012 19:9:43]                                         size = size + 1
[15/5/2012 19:9:43]                                 else
[15/5/2012 19:9:43]                                         doRemoveItem(tmp)
[15/5/2012 19:9:43]                                 end
[15/5/2012 19:9:43]                         else
[15/5/2012 19:9:43]                                 if( ret )then
[15/5/2012 19:9:43]                                         doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)
[15/5/2012 19:9:43]                                         doSendAnimatedText(pos, ret:upper(), tiers[ret].color)
[15/5/2012 19:9:43]                                 end
[15/5/2012 19:9:43]                                 doAddContainerItemEx(parent, tmp)
[15/5/2012 19:9:44]                                 size = size + 1
[15/5/2012 19:9:44]                         end
[15/5/2012 19:9:44]                 end
[15/5/2012 19:9:44]         end
[15/5/2012 19:9:44]  
[15/5/2012 19:9:44]         return size > 0
[15/5/2012 19:9:44] end
[15/5/2012 19:9:44]  
[15/5/2012 19:9:44] local function dropLoot(pos, v, ext, master, cid, target)
[15/5/2012 19:9:44]         local corpse
[15/5/2012 19:9:44]         if( not master or master == target )then -- 0.3/4
[15/5/2012 19:9:44]                 corpse = getTileItemById(pos, v.lookCorpse).uid
[15/5/2012 19:9:44]                 if( isContainer(corpse) )then
[15/5/2012 19:9:44]                         for i = 1, getContainerSize(corpse) do
[15/5/2012 19:9:44]                                 doRemoveItem(getContainerItem(corpse, 0).uid)
[15/5/2012 19:9:44]                         end
[15/5/2012 19:9:44]                         local size, cap = 0, getContainerCap(corpse)
[15/5/2012 19:9:44]                         for i = 1, #v.loot do
[15/5/2012 19:9:44]                                 if( size == cap )then
[15/5/2012 19:9:44]                                         break
[15/5/2012 19:9:44]                                 end
[15/5/2012 19:9:44]                                 local tmp, ret = createLoot(v.loot[i], ext)
[15/5/2012 19:9:44]                                 if( tmp )then
[15/5/2012 19:9:44]                                         if( isContainer(tmp) )then
[15/5/2012 19:9:44]                                                 if( createChildLoot(tmp, v.loot[i].child, ext, pos) )then
[15/5/2012 19:9:44]                                                         doAddContainerItemEx(corpse, tmp)
[15/5/2012 19:9:44]                                                         size = size + 1
[15/5/2012 19:9:44]                                                 else
[15/5/2012 19:9:44]                                                         doRemoveItem(tmp)
[15/5/2012 19:9:44]                                                 end
[15/5/2012 19:9:44]                                         else
[15/5/2012 19:9:44]                                                 if( ret )then
[15/5/2012 19:9:44]                                                         doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)
[15/5/2012 19:9:44]                                                         doSendAnimatedText(pos, ret:upper(), tiers[ret].color)
[15/5/2012 19:9:44]                                                 end
[15/5/2012 19:9:44]                                                 doAddContainerItemEx(corpse, tmp)
[15/5/2012 19:9:44]                                                 size = size + 1
[15/5/2012 19:9:45]                                         end
[15/5/2012 19:9:45]                                 end
[15/5/2012 19:9:45]                         end
[15/5/2012 19:9:45]                 end
[15/5/2012 19:9:45]         end
[15/5/2012 19:9:45]         send(cid, corpse, v.description)
[15/5/2012 19:9:45] end
[15/5/2012 19:9:45]  
[15/5/2012 19:9:45] function onKill(cid, target, damage, flags)
[15/5/2012 19:9:45]         if( (damage == true or bit.band(flags, 1) == 1) and isMonster(target) )then -- 0.3/4
[15/5/2012 19:9:45]                 local v = getMonsterInfo(getCreatureName(target))
[15/5/2012 19:9:45]                 if( v and v.lookCorpse ~= 0 )then
[15/5/2012 19:9:45]                         local s = getCreatureStorage(cid, extra_loot_key)
[15/5/2012 19:9:45]                         addEvent(dropLoot, 0, getThingPos(target), v, s == -1 and rate or s, getCreatureMaster(target), cid, target)
[15/5/2012 19:9:45]                 end
[15/5/2012 19:9:45]         end
[15/5/2012 19:9:45]         return true
[15/5/2012 19:9:45] end
[15/5/2012 19:9:45] :onKill
[15/5/2012 19:9:45] Description: 
[15/5/2012 19:9:45] (luaGetMonsterInfo) Monster not found
[15/5/2012 19:9:45] > Broadcasted message: "one of Pre-Empes have been broken...".
 
Back
Top