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

Fire that deals more damage if wrong vocation

  • Thread starter Thread starter Evil Puncker
  • Start date Start date
Status
Not open for further replies.
Try this man
data/actions/scripts/POIfire.lua
LUA:
local tk = {
[2000] = {200},
[2001] = {400},
[2002] = {600},
[2003] = {800},
[2004] = {1000},
[2005] = {1200},
[2006] = {1400},
[2007] = {1600},
[2008] = {1800},
[2009] = {2000},
[2010] = {2200}
}

local td = {
[3000] = {200},
[3001] = {400},
[3002] = {600},
[3003] = {800},
[3004] = {1000},
[3005] = {1200},
[3006] = {1400},
[3007] = {1600},
[3008] = {1800},
[3009] = {2000},
[3010] = {2200}
}

local ts = {
[4000] = {200},
[4001] = {400},
[4002] = {600},
[4003] = {800},
[4004] = {1000},
[4005] = {1200},
[4006] = {1400},
[4007] = {1600},
[4008] = {1800},
[4009] = {2000},
[4010] = {2200}
}

local tp = {
[5000] = {200},
[5001] = {400},
[5002] = {600},
[5003] = {800},
[5004] = {1000},
[5005] = {1200},
[5006] = {1400},
[5007] = {1600},
[5008] = {1800},
[5009] = {2000},
[5010] = {2200}
}

local bang = 300
function onStepIn(cid, item, pos)
local v = tk[item.uid]
local x = td[item.uid]
local a = ts[item.uid]
local b = tp[item.uid]
      if getPlayerVocation(cid) ~= 4 or 8 then
         doCreatureAddHealth(cid,-bang-v[1])
      elseif getPlayerVocation(cid) ~= 2 or 6 then
             doCreatureAddHealth(cid,-bang-x[1])
      elseif getPlayerVocation(cid) ~= 1 or 5 then
             doCreatureAddHealth(cid,-bang-a[1])
      elseif getPlayerVocation(cid) ~= 3 or 7 then
             doCreatureAddHealth(cid,-bang-b[1])
             end
      return true
end

data/actions/actions.xml
XML:
<action uniqueid="2000-2010;3000-3010;4000-4010;5000-5010" event="script" value="POIfire.lua"/>
If that wont work make 4 lines (one with 2000-2010/ the other with 3000-3010, etc.)
 
Last edited:
Yah, I wasn't feeling good when I made this xDD.
So just use the same file of xml but put it as a movement line.
 
Why to use this way
LUA:
local tk = {
[2000] = {200},
[2001] = {400},
[2002] = {600},
[2003] = {800},
[2004] = {1000},
[2005] = {1200},
[2006] = {1400},
[2007] = {1600},
[2008] = {1800},
[2009] = {2000},
[2010] = {2200}
}
 
local td = {
[3000] = {200},
[3001] = {400},
[3002] = {600},
[3003] = {800},
[3004] = {1000},
[3005] = {1200},
[3006] = {1400},
[3007] = {1600},
[3008] = {1800},
[3009] = {2000},
[3010] = {2200}
}
 
local ts = {
[4000] = {200},
[4001] = {400},
[4002] = {600},
[4003] = {800},
[4004] = {1000},
[4005] = {1200},
[4006] = {1400},
[4007] = {1600},
[4008] = {1800},
[4009] = {2000},
[4010] = {2200}
}
 
local tp = {
[5000] = {200},
[5001] = {400},
[5002] = {600},
[5003] = {800},
[5004] = {1000},
[5005] = {1200},
[5006] = {1400},
[5007] = {1600},
[5008] = {1800},
[5009] = {2000},
[5010] = {2200}
}

Instead of this way?
LUA:
local tk = {
[2000] = 200,
[2001] = 400,
[2002] = 600,
[2003] = 800,
[2004] = 1000,
[2005] = 1200,
[2006] = 1400,
[2007] = 1600,
[2008] = 1800,
[2009] = 2000,
[2010] = 2200
}
 
local td = {
[3000] = 200,
[3001] = 400,
[3002] = 600,
[3003] = 800,
[3004] = 1000,
[3005] = 1200,
[3006] = 1400,
[3007] = 1600,
[3008] = 1800,
[3009] = 2000,
[3010] = 2200
}
 
local ts = {
[4000] = 200,
[4001] = 400,
[4002] = 600,
[4003] = 800,
[4004] = 1000,
[4005] = 1200,
[4006] = 1400,
[4007] = 1600,
[4008] = 1800,
[4009] = 2000,
[4010] = 2200
}
 
local tp = {
[5000] = 200,
[5001] = 400,
[5002] = 600,
[5003] = {800,
[5004] = 1000,
[5005] = 1200,
[5006] = 1400,
[5007] = 1600,
[5008] = 1800,
[5009] = 2000,
[5010] = 2200
}
 
@Up: I don't know, I recently learned to make tables so, I thought that with only 1 {} it wu be with {} xD
 
Status
Not open for further replies.
Back
Top