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

Problem z potionami, runami itd.

Mevinah

SativaOT.eu
Joined
Aug 9, 2009
Messages
88
Reaction score
0
Witam, mam problem z potionami, runami i wszystkimi przedmiotami które się używa.
Mam w plecaku np, 600 potów i gdy używam wyskakuje że jest ich tylko np 90, odczytuje po prostu z jednego stacka, nie mam pojęcia w czym leży błąd.
OTS 8.6, TFS 0.3.6
 
AvoubNR.png
[/IMG]
AvoubNR.png


Tak to wygląda
 
Po zmianie działa.
Jednak mam problem z INQ.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"

version="2.0" author="Tommy" contact="[email protected]" enabled="yes">
<config name="inqusitionFunctions"><![CDATA[
config = {
  message = "Go into the teleporter in 3 minutes, else it will disappear.",
  timeToRemove = 180, -- seconds
  teleportId = 1387,
  MonStor = 48000,
  bosses = { -- Monster Name, Teleport To Position, Teleport Position, UID
  ["Ushuriel"] = { ptp={ x=2028, y=2393, z=5}, pp={ x=1952, y=2469, z=5, stackpos=1 }, uid=49100 },
  ["Annihilon"] = { ptp={ x=2100, y=2552, z=5 }, pp={ x=2042, y=2469, z=5, stackpos=1 }, uid=49200 },
  ["Hellgorak"] = { ptp={ x=1919, y=2563, z=6 }, pp={ x=2047, y=2511, z=5, stackpos=1 }, uid=49300 },
  ["Madareth"] = { ptp={ x=1900, y=2460, z=6}, pp={ x=1967, y=2509, z=5, stackpos=1 }, uid=49400 },
  ["Zugurosh"] = { ptp={ x=1983, y=2406, z=5 }, pp={ x=1984, y=2469, z=5, stackpos=1 }, uid=49500 },
  ["Latrivan"] = { ptp={ x=2007, y=2450, z=6}, pp={ x=2002, y=2509, z=5, stackpos=1 }, uid=49600 }
  }
}

  function removal(position)
  if getThingfromPos(position).itemid == config.teleportId then
  doRemoveItem(getThingfromPos(position).uid)
  end
  return TRUE
end]]></config>

  <event type="login" name="inquisitionRegister" event="script"><![CDATA[
  domodlib('inqusitionFunctions')
  function onLogin(cid)
  registerCreatureEvent(cid, "Inquisition")
  return true
end]]></event>

  <event type="kill" name="Inquisition" event="script"><![CDATA[
function onKill(cid, target, lastHit)
  if(config.bosses[getCreatureName(target)]) then
  local t = config.bosses[getCreatureName(target)]
  local teleport = doCreateTeleport(config.teleportId, t.ptp, t.pp)
  local position = t.pp
  doItemSetAttribute(teleport, "uid", t.uid)
  doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
  addEvent(removal, config.timeToRemove * 1000, position)
  end
  return TRUE
end]]></event>


  <action fromuid="1301" touid="1311" event="script"><![CDATA[
  domodlib('inqusitionFunctions')
  local storage = 50301
  local inquisitionRewards = {
  [1300] = 8890, --a robe of the underworld
  [1301] = 8918, --a spellbook of dark mysteries
  [1302] = 8881, --a fireborn giant armor
  [1303] = 8888, --a master archer's armor
  [1304] = 8851, --a royal crossbow
  [1305] = 8924, --an executioner
  [1306] = 8928, --the stomper
  [1307] = 8930, --a emerald sword
  [1308] = 8854, --a warsinger bow
  [1309] = 8903, --a spellbook of lost souls
  [1310] = 2508, --a mystical armor
  [1311] = 8905 --a rainbow shield
  }
   
  if inquisitionRewards[item.uid] then
  if getPlayerStorageValue(cid, storage) < 1 then
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(inquisitionRewards[item.uid]) .. " " .. getItemNameById(inquisitionRewards[item.uid]) .. ".")
  doPlayerAddItem(cid, inquisitionRewards[item.uid], 1)
  setPlayerStorageValue(cid, storage, 1)
  else
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
  end
  end
   
  return true
]]></action>
</mod>

Wyskakuje mi taki błąd.
48p6n0.png
 
Back
Top